xref: /freebsd/sys/contrib/device-tree/src/arm/microchip/at91-sama5d3_eds.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR MIT
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * at91-sama5d3_eds.dts - Device Tree file for the SAMA5D3 Ethernet
4*f126890aSEmmanuel Vadot *    Development System board.
5*f126890aSEmmanuel Vadot *
6*f126890aSEmmanuel Vadot * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries
7*f126890aSEmmanuel Vadot *
8*f126890aSEmmanuel Vadot * Author: Jerry Ray <jerry.ray@microchip.com>
9*f126890aSEmmanuel Vadot */
10*f126890aSEmmanuel Vadot/dts-v1/;
11*f126890aSEmmanuel Vadot#include "sama5d36.dtsi"
12*f126890aSEmmanuel Vadot
13*f126890aSEmmanuel Vadot/ {
14*f126890aSEmmanuel Vadot	model = "SAMA5D3 Ethernet Development System";
15*f126890aSEmmanuel Vadot	compatible = "microchip,sama5d3-eds", "atmel,sama5d36",
16*f126890aSEmmanuel Vadot		     "atmel,sama5d3", "atmel,sama5";
17*f126890aSEmmanuel Vadot
18*f126890aSEmmanuel Vadot	chosen {
19*f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
20*f126890aSEmmanuel Vadot	};
21*f126890aSEmmanuel Vadot
22*f126890aSEmmanuel Vadot	gpio-keys {
23*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
24*f126890aSEmmanuel Vadot
25*f126890aSEmmanuel Vadot		pinctrl-names = "default";
26*f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_key_gpio>;
27*f126890aSEmmanuel Vadot
28*f126890aSEmmanuel Vadot		button-3 {
29*f126890aSEmmanuel Vadot			label = "PB_USER";
30*f126890aSEmmanuel Vadot			gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
31*f126890aSEmmanuel Vadot			linux,code = <0x104>;
32*f126890aSEmmanuel Vadot			wakeup-source;
33*f126890aSEmmanuel Vadot		};
34*f126890aSEmmanuel Vadot	};
35*f126890aSEmmanuel Vadot
36*f126890aSEmmanuel Vadot	memory@20000000 {
37*f126890aSEmmanuel Vadot		reg = <0x20000000 0x10000000>;
38*f126890aSEmmanuel Vadot	};
39*f126890aSEmmanuel Vadot
40*f126890aSEmmanuel Vadot	vcc_3v3_reg: regulator-1 {
41*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
42*f126890aSEmmanuel Vadot		regulator-name = "VCC_3V3";
43*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
44*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
45*f126890aSEmmanuel Vadot		regulator-always-on;
46*f126890aSEmmanuel Vadot	};
47*f126890aSEmmanuel Vadot
48*f126890aSEmmanuel Vadot	vcc_2v5_reg: regulator-2 {
49*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
50*f126890aSEmmanuel Vadot		regulator-name = "VCC_2V5";
51*f126890aSEmmanuel Vadot		regulator-min-microvolt = <2500000>;
52*f126890aSEmmanuel Vadot		regulator-max-microvolt = <2500000>;
53*f126890aSEmmanuel Vadot		regulator-always-on;
54*f126890aSEmmanuel Vadot		vin-supply = <&vcc_3v3_reg>;
55*f126890aSEmmanuel Vadot	};
56*f126890aSEmmanuel Vadot
57*f126890aSEmmanuel Vadot	vcc_1v8_reg: regulator-3 {
58*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
59*f126890aSEmmanuel Vadot		regulator-name = "VCC_1V8";
60*f126890aSEmmanuel Vadot		regulator-min-microvolt = <1800000>;
61*f126890aSEmmanuel Vadot		regulator-max-microvolt = <1800000>;
62*f126890aSEmmanuel Vadot		regulator-always-on;
63*f126890aSEmmanuel Vadot		vin-supply = <&vcc_3v3_reg>;
64*f126890aSEmmanuel Vadot	};
65*f126890aSEmmanuel Vadot
66*f126890aSEmmanuel Vadot	vcc_1v2_reg: regulator-4 {
67*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
68*f126890aSEmmanuel Vadot		regulator-name = "VCC_1V2";
69*f126890aSEmmanuel Vadot		regulator-min-microvolt = <1200000>;
70*f126890aSEmmanuel Vadot		regulator-max-microvolt = <1200000>;
71*f126890aSEmmanuel Vadot		regulator-always-on;
72*f126890aSEmmanuel Vadot	};
73*f126890aSEmmanuel Vadot
74*f126890aSEmmanuel Vadot	vcc_mmc0_reg: regulator-5 {
75*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
76*f126890aSEmmanuel Vadot		regulator-name = "mmc0-card-supply";
77*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
78*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
79*f126890aSEmmanuel Vadot		regulator-always-on;
80*f126890aSEmmanuel Vadot		pinctrl-names = "default";
81*f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_vcc_mmc0_reg_gpio>;
82*f126890aSEmmanuel Vadot		gpio = <&pioE 2 GPIO_ACTIVE_LOW>;
83*f126890aSEmmanuel Vadot	};
84*f126890aSEmmanuel Vadot};
85*f126890aSEmmanuel Vadot
86*f126890aSEmmanuel Vadot&can0 {
87*f126890aSEmmanuel Vadot	status = "okay";
88*f126890aSEmmanuel Vadot};
89*f126890aSEmmanuel Vadot
90*f126890aSEmmanuel Vadot&dbgu {
91*f126890aSEmmanuel Vadot	status = "okay";
92*f126890aSEmmanuel Vadot};
93*f126890aSEmmanuel Vadot
94*f126890aSEmmanuel Vadot&ebi {
95*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_ebi_nand_addr>;
96*f126890aSEmmanuel Vadot	pinctrl-names = "default";
97*f126890aSEmmanuel Vadot	status = "okay";
98*f126890aSEmmanuel Vadot
99*f126890aSEmmanuel Vadot	nand_controller: nand-controller {
100*f126890aSEmmanuel Vadot		status = "okay";
101*f126890aSEmmanuel Vadot
102*f126890aSEmmanuel Vadot		nand@3 {
103*f126890aSEmmanuel Vadot			reg = <0x3 0x0 0x2>;
104*f126890aSEmmanuel Vadot			atmel,rb = <0>;
105*f126890aSEmmanuel Vadot			nand-bus-width = <8>;
106*f126890aSEmmanuel Vadot			nand-ecc-mode = "hw";
107*f126890aSEmmanuel Vadot			nand-ecc-strength = <4>;
108*f126890aSEmmanuel Vadot			nand-ecc-step-size = <512>;
109*f126890aSEmmanuel Vadot			nand-on-flash-bbt;
110*f126890aSEmmanuel Vadot			label = "atmel_nand";
111*f126890aSEmmanuel Vadot
112*f126890aSEmmanuel Vadot			partitions {
113*f126890aSEmmanuel Vadot				compatible = "fixed-partitions";
114*f126890aSEmmanuel Vadot				#address-cells = <1>;
115*f126890aSEmmanuel Vadot				#size-cells = <1>;
116*f126890aSEmmanuel Vadot
117*f126890aSEmmanuel Vadot				at91bootstrap@0 {
118*f126890aSEmmanuel Vadot					label = "at91bootstrap";
119*f126890aSEmmanuel Vadot					reg = <0x0 0x40000>;
120*f126890aSEmmanuel Vadot				};
121*f126890aSEmmanuel Vadot
122*f126890aSEmmanuel Vadot				bootloader@40000 {
123*f126890aSEmmanuel Vadot					label = "bootloader";
124*f126890aSEmmanuel Vadot					reg = <0x40000 0xc0000>;
125*f126890aSEmmanuel Vadot				};
126*f126890aSEmmanuel Vadot
127*f126890aSEmmanuel Vadot				bootloaderenvred@100000 {
128*f126890aSEmmanuel Vadot					label = "bootloader env redundant";
129*f126890aSEmmanuel Vadot					reg = <0x100000 0x40000>;
130*f126890aSEmmanuel Vadot				};
131*f126890aSEmmanuel Vadot
132*f126890aSEmmanuel Vadot				bootloaderenv@140000 {
133*f126890aSEmmanuel Vadot					label = "bootloader env";
134*f126890aSEmmanuel Vadot					reg = <0x140000 0x40000>;
135*f126890aSEmmanuel Vadot				};
136*f126890aSEmmanuel Vadot
137*f126890aSEmmanuel Vadot				dtb@180000 {
138*f126890aSEmmanuel Vadot					label = "device tree";
139*f126890aSEmmanuel Vadot					reg = <0x180000 0x80000>;
140*f126890aSEmmanuel Vadot				};
141*f126890aSEmmanuel Vadot
142*f126890aSEmmanuel Vadot				kernel@200000 {
143*f126890aSEmmanuel Vadot					label = "kernel";
144*f126890aSEmmanuel Vadot					reg = <0x200000 0x600000>;
145*f126890aSEmmanuel Vadot				};
146*f126890aSEmmanuel Vadot
147*f126890aSEmmanuel Vadot				rootfs@800000 {
148*f126890aSEmmanuel Vadot					label = "rootfs";
149*f126890aSEmmanuel Vadot					reg = <0x800000 0x0f800000>;
150*f126890aSEmmanuel Vadot				};
151*f126890aSEmmanuel Vadot			};
152*f126890aSEmmanuel Vadot		};
153*f126890aSEmmanuel Vadot	};
154*f126890aSEmmanuel Vadot};
155*f126890aSEmmanuel Vadot
156*f126890aSEmmanuel Vadot&i2c0 {
157*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_i2c0_pu>;
158*f126890aSEmmanuel Vadot	status = "okay";
159*f126890aSEmmanuel Vadot};
160*f126890aSEmmanuel Vadot
161*f126890aSEmmanuel Vadot&i2c1 {
162*f126890aSEmmanuel Vadot	status = "okay";
163*f126890aSEmmanuel Vadot};
164*f126890aSEmmanuel Vadot
165*f126890aSEmmanuel Vadot&i2c2 {
166*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_i2c2_pu>;
167*f126890aSEmmanuel Vadot	status = "okay";
168*f126890aSEmmanuel Vadot};
169*f126890aSEmmanuel Vadot
170*f126890aSEmmanuel Vadot&main_xtal {
171*f126890aSEmmanuel Vadot	clock-frequency = <12000000>;
172*f126890aSEmmanuel Vadot};
173*f126890aSEmmanuel Vadot
174*f126890aSEmmanuel Vadot&mmc0 {
175*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3
176*f126890aSEmmanuel Vadot		     &pinctrl_mmc0_dat4_7 &pinctrl_mmc0_cd>;
177*f126890aSEmmanuel Vadot	vmmc-supply = <&vcc_mmc0_reg>;
178*f126890aSEmmanuel Vadot	vqmmc-supply = <&vcc_3v3_reg>;
179*f126890aSEmmanuel Vadot	status = "okay";
180*f126890aSEmmanuel Vadot	slot@0 {
181*f126890aSEmmanuel Vadot		reg = <0>;
182*f126890aSEmmanuel Vadot		bus-width = <8>;
183*f126890aSEmmanuel Vadot		cd-gpios = <&pioE 0 GPIO_ACTIVE_LOW>;
184*f126890aSEmmanuel Vadot	};
185*f126890aSEmmanuel Vadot};
186*f126890aSEmmanuel Vadot
187*f126890aSEmmanuel Vadot&pinctrl {
188*f126890aSEmmanuel Vadot	board {
189*f126890aSEmmanuel Vadot		pinctrl_i2c0_pu: i2c0-pu {
190*f126890aSEmmanuel Vadot			atmel,pins =
191*f126890aSEmmanuel Vadot				<AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
192*f126890aSEmmanuel Vadot				<AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
193*f126890aSEmmanuel Vadot		};
194*f126890aSEmmanuel Vadot
195*f126890aSEmmanuel Vadot		pinctrl_i2c2_pu: i2c2-pu {
196*f126890aSEmmanuel Vadot			atmel,pins =
197*f126890aSEmmanuel Vadot				<AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
198*f126890aSEmmanuel Vadot				<AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
199*f126890aSEmmanuel Vadot		};
200*f126890aSEmmanuel Vadot
201*f126890aSEmmanuel Vadot		pinctrl_key_gpio: key-gpio-0 {
202*f126890aSEmmanuel Vadot			atmel,pins =
203*f126890aSEmmanuel Vadot				<AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
204*f126890aSEmmanuel Vadot		};
205*f126890aSEmmanuel Vadot
206*f126890aSEmmanuel Vadot		pinctrl_mmc0_cd: mmc0-cd {
207*f126890aSEmmanuel Vadot			atmel,pins =
208*f126890aSEmmanuel Vadot				<AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
209*f126890aSEmmanuel Vadot		};
210*f126890aSEmmanuel Vadot
211*f126890aSEmmanuel Vadot		/* Reserved for reset signal to the RGMII connector. */
212*f126890aSEmmanuel Vadot		pinctrl_rgmii_rstn: rgmii-rstn {
213*f126890aSEmmanuel Vadot			atmel,pins =
214*f126890aSEmmanuel Vadot				<AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
215*f126890aSEmmanuel Vadot		};
216*f126890aSEmmanuel Vadot
217*f126890aSEmmanuel Vadot		/* Reserved for an interrupt line from the RMII and RGMII connectors. */
218*f126890aSEmmanuel Vadot		pinctrl_spi_irqn: spi-irqn {
219*f126890aSEmmanuel Vadot			atmel,pins =
220*f126890aSEmmanuel Vadot				<AT91_PIOB 28 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
221*f126890aSEmmanuel Vadot		};
222*f126890aSEmmanuel Vadot
223*f126890aSEmmanuel Vadot		pinctrl_spi0_cs: spi0-cs-default {
224*f126890aSEmmanuel Vadot			atmel,pins =
225*f126890aSEmmanuel Vadot				<AT91_PIOD 13 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
226*f126890aSEmmanuel Vadot				 AT91_PIOD 16 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
227*f126890aSEmmanuel Vadot		};
228*f126890aSEmmanuel Vadot
229*f126890aSEmmanuel Vadot		pinctrl_spi1_cs: spi1-cs-default {
230*f126890aSEmmanuel Vadot			atmel,pins = <AT91_PIOC 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
231*f126890aSEmmanuel Vadot				      AT91_PIOC 28 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
232*f126890aSEmmanuel Vadot		};
233*f126890aSEmmanuel Vadot
234*f126890aSEmmanuel Vadot		pinctrl_usba_vbus: usba-vbus {
235*f126890aSEmmanuel Vadot			atmel,pins =
236*f126890aSEmmanuel Vadot				<AT91_PIOE 9 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
237*f126890aSEmmanuel Vadot		};
238*f126890aSEmmanuel Vadot
239*f126890aSEmmanuel Vadot		pinctrl_usb_default: usb-default {
240*f126890aSEmmanuel Vadot			atmel,pins =
241*f126890aSEmmanuel Vadot				<AT91_PIOE 3 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
242*f126890aSEmmanuel Vadot				 AT91_PIOE 4 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
243*f126890aSEmmanuel Vadot		};
244*f126890aSEmmanuel Vadot
245*f126890aSEmmanuel Vadot		/* Reserved for VBUS fault interrupt. */
246*f126890aSEmmanuel Vadot		pinctrl_vbusfault_irqn: vbusfault-irqn {
247*f126890aSEmmanuel Vadot			atmel,pins =
248*f126890aSEmmanuel Vadot				<AT91_PIOE 5 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
249*f126890aSEmmanuel Vadot		};
250*f126890aSEmmanuel Vadot
251*f126890aSEmmanuel Vadot		pinctrl_vcc_mmc0_reg_gpio: vcc-mmc0-reg-gpio-default {
252*f126890aSEmmanuel Vadot			atmel,pins = <AT91_PIOE 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
253*f126890aSEmmanuel Vadot		};
254*f126890aSEmmanuel Vadot	};
255*f126890aSEmmanuel Vadot};
256*f126890aSEmmanuel Vadot
257*f126890aSEmmanuel Vadot&slow_xtal {
258*f126890aSEmmanuel Vadot	clock-frequency = <32768>;
259*f126890aSEmmanuel Vadot};
260*f126890aSEmmanuel Vadot
261*f126890aSEmmanuel Vadot&spi0 {
262*f126890aSEmmanuel Vadot	pinctrl-names = "default", "cs";
263*f126890aSEmmanuel Vadot	pinctrl-1 = <&pinctrl_spi0_cs>;
264*f126890aSEmmanuel Vadot	cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
265*f126890aSEmmanuel Vadot	status = "okay";
266*f126890aSEmmanuel Vadot};
267*f126890aSEmmanuel Vadot
268*f126890aSEmmanuel Vadot&spi1 {
269*f126890aSEmmanuel Vadot	pinctrl-names = "default", "cs";
270*f126890aSEmmanuel Vadot	pinctrl-1 = <&pinctrl_spi1_cs>;
271*f126890aSEmmanuel Vadot	cs-gpios = <&pioC 25 0>, <0>, <0>, <&pioC 28 0>;
272*f126890aSEmmanuel Vadot	status = "okay";
273*f126890aSEmmanuel Vadot};
274*f126890aSEmmanuel Vadot
275*f126890aSEmmanuel Vadot&tcb0 {
276*f126890aSEmmanuel Vadot	timer0: timer@0 {
277*f126890aSEmmanuel Vadot		compatible = "atmel,tcb-timer";
278*f126890aSEmmanuel Vadot		reg = <0>;
279*f126890aSEmmanuel Vadot	};
280*f126890aSEmmanuel Vadot
281*f126890aSEmmanuel Vadot	timer1: timer@1 {
282*f126890aSEmmanuel Vadot		compatible = "atmel,tcb-timer";
283*f126890aSEmmanuel Vadot		reg = <1>;
284*f126890aSEmmanuel Vadot	};
285*f126890aSEmmanuel Vadot};
286*f126890aSEmmanuel Vadot
287*f126890aSEmmanuel Vadot&usb0 {	/* USB Device port with VBUS detection. */
288*f126890aSEmmanuel Vadot	atmel,vbus-gpio = <&pioE 9 GPIO_ACTIVE_HIGH>;
289*f126890aSEmmanuel Vadot	pinctrl-names = "default";
290*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_usba_vbus>;
291*f126890aSEmmanuel Vadot	status = "okay";
292*f126890aSEmmanuel Vadot};
293*f126890aSEmmanuel Vadot
294*f126890aSEmmanuel Vadot&usb1 {	/* 3-port Host. First port is unused. */
295*f126890aSEmmanuel Vadot	atmel,vbus-gpio = <0
296*f126890aSEmmanuel Vadot			   &pioE 3 GPIO_ACTIVE_HIGH
297*f126890aSEmmanuel Vadot			   &pioE 4 GPIO_ACTIVE_HIGH
298*f126890aSEmmanuel Vadot			  >;
299*f126890aSEmmanuel Vadot	num-ports = <3>;
300*f126890aSEmmanuel Vadot	pinctrl-names = "default";
301*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_usb_default>;
302*f126890aSEmmanuel Vadot	status = "okay";
303*f126890aSEmmanuel Vadot};
304*f126890aSEmmanuel Vadot
305*f126890aSEmmanuel Vadot&usb2 {
306*f126890aSEmmanuel Vadot	status = "okay";
307*f126890aSEmmanuel Vadot};
308