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