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