GNU Linux-libre 4.14.313-gnu1
[releases.git] / arch / arm / boot / dts / at91sam9g20ek_common.dtsi
1 /*
2  * at91sam9g20ek_common.dtsi - Device Tree file for Atmel at91sam9g20ek board
3  *
4  * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
5  *
6  * Licensed under GPLv2.
7  */
8 #include "at91sam9g20.dtsi"
9
10 / {
11
12         chosen {
13                 bootargs = "mem=64M root=/dev/mtdblock5 rw rootfstype=ubifs";
14                 stdout-path = "serial0:115200n8";
15         };
16
17         memory {
18                 reg = <0x20000000 0x4000000>;
19         };
20
21         clocks {
22                 slow_xtal {
23                         clock-frequency = <32768>;
24                 };
25
26                 main_xtal {
27                         clock-frequency = <18432000>;
28                 };
29         };
30
31         ahb {
32                 apb {
33                         pinctrl@fffff400 {
34                                 board {
35                                         pinctrl_pck0_as_mck: pck0_as_mck {
36                                                 atmel,pins =
37                                                         <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;  /* PC1 periph B */
38                                         };
39
40                                 };
41
42                                 usb1 {
43                                         pinctrl_usb1_vbus_gpio: usb1_vbus_gpio {
44                                                 atmel,pins =
45                                                         <AT91_PIOC 5 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;   /* PC5 GPIO */
46                                         };
47                                 };
48
49                                 mmc0_slot1 {
50                                         pinctrl_board_mmc0_slot1: mmc0_slot1-board {
51                                                 atmel,pins =
52                                                         <AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;   /* PC9 gpio CD pin pull up and deglitch */
53                                         };
54                                 };
55                         };
56
57                         dbgu: serial@fffff200 {
58                                 status = "okay";
59                         };
60
61                         usart0: serial@fffb0000 {
62                                 pinctrl-0 =
63                                         <&pinctrl_usart0
64                                          &pinctrl_usart0_rts
65                                          &pinctrl_usart0_cts
66                                          &pinctrl_usart0_dtr_dsr
67                                          &pinctrl_usart0_dcd
68                                          &pinctrl_usart0_ri>;
69                                 status = "okay";
70                         };
71
72                         usart1: serial@fffb4000 {
73                                 status = "okay";
74                         };
75
76                         macb0: ethernet@fffc4000 {
77                                 phy-mode = "rmii";
78                                 status = "okay";
79                         };
80
81                         usb1: gadget@fffa4000 {
82                                 pinctrl-0 = <&pinctrl_usb1_vbus_gpio>;
83                                 pinctrl-names = "default";
84                                 atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
85                                 status = "okay";
86                         };
87
88                         mmc0: mmc@fffa8000 {
89                                 pinctrl-0 = <
90                                         &pinctrl_board_mmc0_slot1
91                                         &pinctrl_mmc0_clk
92                                         &pinctrl_mmc0_slot1_cmd_dat0
93                                         &pinctrl_mmc0_slot1_dat1_3>;
94                                 status = "okay";
95                                 slot@1 {
96                                         reg = <1>;
97                                         bus-width = <4>;
98                                         cd-gpios = <&pioC 9 GPIO_ACTIVE_HIGH>;
99                                 };
100                         };
101
102                         ssc0: ssc@fffbc000 {
103                                 status = "okay";
104                                 pinctrl-0 = <&pinctrl_ssc0_tx>;
105                         };
106
107                         spi0: spi@fffc8000 {
108                                 cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
109                                 mtd_dataflash@0 {
110                                         compatible = "atmel,at45", "atmel,dataflash";
111                                         spi-max-frequency = <50000000>;
112                                         reg = <1>;
113                                 };
114                         };
115
116                         shdwc@fffffd10 {
117                                 atmel,wakeup-counter = <10>;
118                                 atmel,wakeup-rtt-timer;
119                         };
120
121                         rtc@fffffd20 {
122                                 atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
123                                 status = "okay";
124                         };
125
126                         watchdog@fffffd40 {
127                                 status = "okay";
128                         };
129
130                         gpbr: syscon@fffffd50 {
131                                 status = "okay";
132                         };
133                 };
134
135                 ebi: ebi@10000000 {
136                         status = "okay";
137
138                         nand_controller: nand-controller {
139                                 status = "okay";
140                                 pinctrl-0 = <&pinctrl_nand_cs &pinctrl_nand_rb>;
141                                 pinctrl-names = "default";
142
143                                 nand@3 {
144                                         reg = <0x3 0x0 0x800000>;
145                                         rb-gpios = <&pioC 13 GPIO_ACTIVE_HIGH>;
146                                         cs-gpios = <&pioC 14 GPIO_ACTIVE_HIGH>;
147                                         nand-bus-width = <8>;
148                                         nand-ecc-mode = "soft";
149                                         nand-on-flash-bbt;
150                                         label = "atmel_nand";
151
152                                         partitions {
153                                                 compatible = "fixed-partitions";
154                                                 #address-cells = <1>;
155                                                 #size-cells = <1>;
156
157                                                 at91bootstrap@0 {
158                                                         label = "at91bootstrap";
159                                                         reg = <0x0 0x20000>;
160                                                 };
161
162                                                 barebox@20000 {
163                                                         label = "barebox";
164                                                         reg = <0x20000 0x40000>;
165                                                 };
166
167                                                 bareboxenv@60000 {
168                                                         label = "bareboxenv";
169                                                         reg = <0x60000 0x20000>;
170                                                 };
171
172                                                 bareboxenv2@80000 {
173                                                         label = "bareboxenv2";
174                                                         reg = <0x80000 0x20000>;
175                                                 };
176
177                                                 oftree@80000 {
178                                                         label = "oftree";
179                                                         reg = <0xa0000 0x20000>;
180                                                 };
181
182                                                 kernel@a0000 {
183                                                         label = "kernel";
184                                                         reg = <0xc0000 0x400000>;
185                                                 };
186
187                                                 rootfs@4a0000 {
188                                                         label = "rootfs";
189                                                         reg = <0x4c0000 0x7800000>;
190                                                 };
191
192                                                 data@7ca0000 {
193                                                         label = "data";
194                                                         reg = <0x7cc0000 0x8340000>;
195                                                 };
196                                         };
197                                 };
198                         };
199                 };
200
201                 usb0: ohci@500000 {
202                         num-ports = <2>;
203                         status = "okay";
204                 };
205         };
206
207         i2c-gpio-0 {
208                 status = "okay";
209
210                 24c512@50 {
211                         compatible = "24c512";
212                         reg = <0x50>;
213                 };
214
215                 wm8731: wm8731@1b {
216                         compatible = "wm8731";
217                         reg = <0x1b>;
218                 };
219         };
220
221         gpio_keys {
222                 compatible = "gpio-keys";
223
224                 btn3 {
225                         label = "Button 3";
226                         gpios = <&pioA 30 GPIO_ACTIVE_LOW>;
227                         linux,code = <0x103>;
228                         wakeup-source;
229                 };
230
231                 btn4 {
232                         label = "Button 4";
233                         gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
234                         linux,code = <0x104>;
235                         wakeup-source;
236                 };
237         };
238
239         sound {
240                 compatible = "atmel,at91sam9g20ek-wm8731-audio";
241                 pinctrl-names = "default";
242                 pinctrl-0 = <&pinctrl_pck0_as_mck>;
243
244                 atmel,model = "wm8731 @ AT91SAMG20EK";
245
246                 atmel,audio-routing =
247                         "Ext Spk", "LHPOUT",
248                         "Int Mic", "MICIN";
249
250                 atmel,ssc-controller = <&ssc0>;
251                 atmel,audio-codec = <&wm8731>;
252         };
253 };