GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / at91-som60.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * at91-som60.dtsi - Device Tree file for the SOM60 module
4  *
5  *  Copyright (C) 2018 Laird,
6  *                2018 Ben Whitten <ben.whitten@lairdtech.com>
7  *
8  */
9 #include "sama5d36.dtsi"
10
11 / {
12         model = "Laird SOM60";
13         compatible = "laird,som60", "atmel,sama5d36", "atmel,sama5d3", "atmel,sama5";
14
15         chosen {
16                 stdout-path = &dbgu;
17         };
18
19         memory {
20                 reg = <0x20000000 0x8000000>;
21         };
22
23         clocks {
24                 slow_xtal {
25                         clock-frequency = <32768>;
26                 };
27
28                 main_xtal {
29                         clock-frequency = <12000000>;
30                 };
31         };
32 };
33
34 &pinctrl {
35         board {
36                 pinctrl_mmc0_cd: mmc0_cd {
37                         atmel,pins =
38                                 <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
39                 };
40
41                 pinctrl_mmc0_en: mmc0_en {
42                         atmel,pins =
43                                 <AT91_PIOE 30 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
44                 };
45
46                 pinctrl_nand0_wp: nand0_wp {
47                         atmel,pins =
48                                 <AT91_PIOE 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
49                 };
50
51                 pinctrl_usb_vbus: usb_vbus {
52                         atmel,pins =
53                                 <AT91_PIOE 20 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
54                                 /* Conflicts with USART2_SCK */
55                 };
56
57                 pinctrl_usart2_sck: usart2_sck {
58                         atmel,pins =
59                                 <AT91_PIOE 20 AT91_PERIPH_B AT91_PINCTRL_NONE>;
60                                 /* Conflicts with USB_VBUS */
61                 };
62
63                 pinctrl_usb_oc: usb_oc {
64                         atmel,pins =
65                                 <AT91_PIOE 15 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
66                                 /* Conflicts with USART3_SCK */
67                 };
68
69                 pinctrl_usart3_sck: usart3_sck {
70                         atmel,pins =
71                                 <AT91_PIOE 15 AT91_PERIPH_B AT91_PINCTRL_NONE>;
72                                 /* Conflicts with USB_OC */
73                 };
74
75                 pinctrl_usba_vbus: usba_vbus {
76                    atmel,pins =
77                                 <AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
78                 };
79
80                 pinctrl_geth_int: geth_int {
81                         atmel,pins =
82                                 <AT91_PIOB 25 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
83                                 /* Conflicts with USART1_SCK */
84                 };
85
86                 pinctrl_usart1_sck: usart1_sck {
87                         atmel,pins =
88                                 <AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE>;
89                                 /* Conflicts with GETH_INT */
90                 };
91
92                 pinctrl_eth_int: eth_int {
93                         atmel,pins =
94                                 <AT91_PIOC 10 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
95                 };
96
97                 pinctrl_pck2_as_audio_mck: pck2_as_audio_mck {
98                         atmel,pins =
99                                 <AT91_PIOC 15 AT91_PERIPH_B AT91_PINCTRL_NONE>;
100                 };
101         };
102 };
103
104 &mmc0 {
105         slot@0 {
106                 reg = <0>;
107                 bus-width = <8>;
108         };
109 };
110
111 &mmc1 {
112         status = "okay";
113         slot@0 {
114                 reg = <0>;
115                 bus-width = <4>;
116         };
117 };
118
119 &spi0 {
120         cs-gpios = <&pioD 13 0>, <0>, <0>, <0>;
121 };
122
123 &usart0 {
124         atmel,use-dma-rx;
125         atmel,use-dma-tx;
126         status = "okay";
127         pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts_cts>;
128 };
129
130 &usart1 {
131         pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
132 };
133
134 &usart2 {
135         pinctrl-0 = <&pinctrl_usart2 &pinctrl_usart2_rts_cts>;
136 };
137
138 &usart3 {
139         pinctrl-0 = <&pinctrl_usart3 &pinctrl_usart3_rts_cts>;
140 };
141
142 &adc0 {
143         pinctrl-0 = <
144                 &pinctrl_adc0_adtrg
145                 &pinctrl_adc0_ad0
146                 &pinctrl_adc0_ad1
147                 &pinctrl_adc0_ad2
148                 &pinctrl_adc0_ad3
149                 &pinctrl_adc0_ad4
150                 &pinctrl_adc0_ad5
151                 >;
152 };
153
154 &macb0 {
155         phy-mode = "rgmii";
156 };
157
158 &macb1 {
159         phy-mode = "rmii";
160 };
161
162 &ebi {
163         pinctrl-0 = <&pinctrl_ebi_nand_addr>;
164         pinctrl-names = "default";
165         status = "okay";
166 };
167
168 &nand_controller {
169         status = "okay";
170
171         nand: nand@3 {
172                 reg = <0x3 0x0 0x2>;
173                 atmel,rb = <0>;
174                 nand-bus-width = <8>;
175                 nand-ecc-mode = "hw";
176                 nand-ecc-strength = <8>;
177                 nand-ecc-step-size = <512>;
178                 nand-on-flash-bbt;
179                 label = "atmel_nand";
180
181                 partitions {
182                         compatible = "fixed-partitions";
183                         #address-cells = <1>;
184                         #size-cells = <1>;
185
186                         ubootspl@0 {
187                                 label = "u-boot-spl";
188                                 reg = <0x0 0x20000>;
189                         };
190
191                         uboot@20000 {
192                                 label = "u-boot";
193                                 reg = <0x20000 0x80000>;
194                         };
195
196                         ubootenv@a0000 {
197                                 label = "u-boot-env";
198                                 reg = <0xa0000 0x20000>;
199                         };
200
201                         ubootenv@c0000 {
202                                 label = "u-boot-env";
203                                 reg = <0xc0000 0x20000>;
204                         };
205
206                         ubi@e0000 {
207                                 label = "ubi";
208                                 reg = <0xe0000 0xfe00000>;
209                         };
210                 };
211         };
212 };
213
214 &usb0 {
215         pinctrl-names = "default";
216         pinctrl-0 = <&pinctrl_usba_vbus>;
217         atmel,vbus-gpio = <&pioC 14 GPIO_ACTIVE_HIGH>;
218 };
219
220 &usb1 {
221         pinctrl-names = "default";
222         pinctrl-0 = <&pinctrl_usb_vbus &pinctrl_usb_oc>;
223         num-ports = <3>;
224         atmel,vbus-gpio = <0
225                 &pioE 20 GPIO_ACTIVE_HIGH
226                 0>;
227         atmel,oc-gpio = <0
228                 &pioE 15 GPIO_ACTIVE_LOW
229                 0>;
230 };