xref: /freebsd/sys/contrib/device-tree/src/arm/microchip/at91-sama5d4_xplained.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * at91-sama5d4_xplained.dts - Device Tree file for SAMA5D4 Xplained board
4*f126890aSEmmanuel Vadot *
5*f126890aSEmmanuel Vadot *  Copyright (C) 2015 Atmel,
6*f126890aSEmmanuel Vadot *                2015 Josh Wu <josh.wu@atmel.com>
7*f126890aSEmmanuel Vadot */
8*f126890aSEmmanuel Vadot/dts-v1/;
9*f126890aSEmmanuel Vadot#include "sama5d4.dtsi"
10*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
11*f126890aSEmmanuel Vadot
12*f126890aSEmmanuel Vadot/ {
13*f126890aSEmmanuel Vadot	model = "Atmel SAMA5D4 Xplained";
14*f126890aSEmmanuel Vadot	compatible = "atmel,sama5d4-xplained", "atmel,sama5d4", "atmel,sama5";
15*f126890aSEmmanuel Vadot
16*f126890aSEmmanuel Vadot	chosen {
17*f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
18*f126890aSEmmanuel Vadot	};
19*f126890aSEmmanuel Vadot
20*f126890aSEmmanuel Vadot	memory@20000000 {
21*f126890aSEmmanuel Vadot		reg = <0x20000000 0x20000000>;
22*f126890aSEmmanuel Vadot	};
23*f126890aSEmmanuel Vadot
24*f126890aSEmmanuel Vadot	clocks {
25*f126890aSEmmanuel Vadot		slow_xtal {
26*f126890aSEmmanuel Vadot			clock-frequency = <32768>;
27*f126890aSEmmanuel Vadot		};
28*f126890aSEmmanuel Vadot
29*f126890aSEmmanuel Vadot		main_xtal {
30*f126890aSEmmanuel Vadot			clock-frequency = <12000000>;
31*f126890aSEmmanuel Vadot		};
32*f126890aSEmmanuel Vadot	};
33*f126890aSEmmanuel Vadot
34*f126890aSEmmanuel Vadot	ahb {
35*f126890aSEmmanuel Vadot		apb {
36*f126890aSEmmanuel Vadot			uart0: serial@f8004000 {
37*f126890aSEmmanuel Vadot				atmel,use-dma-rx;
38*f126890aSEmmanuel Vadot				atmel,use-dma-tx;
39*f126890aSEmmanuel Vadot				status = "okay";
40*f126890aSEmmanuel Vadot			};
41*f126890aSEmmanuel Vadot
42*f126890aSEmmanuel Vadot			i2c0: i2c@f8014000 {
43*f126890aSEmmanuel Vadot				i2c-digital-filter;
44*f126890aSEmmanuel Vadot				status = "okay";
45*f126890aSEmmanuel Vadot			};
46*f126890aSEmmanuel Vadot
47*f126890aSEmmanuel Vadot			macb0: ethernet@f8020000 {
48*f126890aSEmmanuel Vadot				phy-mode = "rmii";
49*f126890aSEmmanuel Vadot				status = "okay";
50*f126890aSEmmanuel Vadot				pinctrl-names = "default";
51*f126890aSEmmanuel Vadot				pinctrl-0 = <&pinctrl_macb0_rmii &pinctrl_macb0_phy_irq>;
52*f126890aSEmmanuel Vadot
53*f126890aSEmmanuel Vadot				phy0: ethernet-phy@1 {
54*f126890aSEmmanuel Vadot					interrupt-parent = <&pioE>;
55*f126890aSEmmanuel Vadot					interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
56*f126890aSEmmanuel Vadot					reg = <1>;
57*f126890aSEmmanuel Vadot				};
58*f126890aSEmmanuel Vadot			};
59*f126890aSEmmanuel Vadot
60*f126890aSEmmanuel Vadot			mmc1: mmc@fc000000 {
61*f126890aSEmmanuel Vadot				pinctrl-names = "default";
62*f126890aSEmmanuel Vadot				pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
63*f126890aSEmmanuel Vadot				vmmc-supply = <&vcc_mmc1_reg>;
64*f126890aSEmmanuel Vadot				vqmmc-supply = <&vcc_3v3_reg>;
65*f126890aSEmmanuel Vadot				status = "okay";
66*f126890aSEmmanuel Vadot				slot@0 {
67*f126890aSEmmanuel Vadot					reg = <0>;
68*f126890aSEmmanuel Vadot					bus-width = <4>;
69*f126890aSEmmanuel Vadot					cd-gpios = <&pioE 3 0>;
70*f126890aSEmmanuel Vadot				};
71*f126890aSEmmanuel Vadot			};
72*f126890aSEmmanuel Vadot
73*f126890aSEmmanuel Vadot			usart3: serial@fc00c000 {
74*f126890aSEmmanuel Vadot				atmel,use-dma-rx;
75*f126890aSEmmanuel Vadot				atmel,use-dma-tx;
76*f126890aSEmmanuel Vadot				status = "okay";
77*f126890aSEmmanuel Vadot			};
78*f126890aSEmmanuel Vadot
79*f126890aSEmmanuel Vadot			usart4: serial@fc010000 {
80*f126890aSEmmanuel Vadot				status = "okay";
81*f126890aSEmmanuel Vadot			};
82*f126890aSEmmanuel Vadot
83*f126890aSEmmanuel Vadot			spi1: spi@fc018000 {
84*f126890aSEmmanuel Vadot				pinctrl-names = "default", "cs";
85*f126890aSEmmanuel Vadot				pinctrl-1 = <&pinctrl_spi1_cs>;
86*f126890aSEmmanuel Vadot				cs-gpios = <&pioB 21 0>;
87*f126890aSEmmanuel Vadot				status = "okay";
88*f126890aSEmmanuel Vadot			};
89*f126890aSEmmanuel Vadot
90*f126890aSEmmanuel Vadot			tcb2: timer@fc024000 {
91*f126890aSEmmanuel Vadot				timer0: timer@0 {
92*f126890aSEmmanuel Vadot					compatible = "atmel,tcb-timer";
93*f126890aSEmmanuel Vadot					reg = <0>;
94*f126890aSEmmanuel Vadot				};
95*f126890aSEmmanuel Vadot
96*f126890aSEmmanuel Vadot				timer1: timer@1 {
97*f126890aSEmmanuel Vadot					compatible = "atmel,tcb-timer";
98*f126890aSEmmanuel Vadot					reg = <1>;
99*f126890aSEmmanuel Vadot				};
100*f126890aSEmmanuel Vadot			};
101*f126890aSEmmanuel Vadot
102*f126890aSEmmanuel Vadot			adc0: adc@fc034000 {
103*f126890aSEmmanuel Vadot				pinctrl-names = "default";
104*f126890aSEmmanuel Vadot				pinctrl-0 = <
105*f126890aSEmmanuel Vadot					/* external trigger conflicts with USBA_VBUS */
106*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad0
107*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad1
108*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad2
109*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad3
110*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad4
111*f126890aSEmmanuel Vadot					>;
112*f126890aSEmmanuel Vadot				atmel,adc-vref = <3300>;
113*f126890aSEmmanuel Vadot				status = "okay";
114*f126890aSEmmanuel Vadot			};
115*f126890aSEmmanuel Vadot
116*f126890aSEmmanuel Vadot			watchdog@fc068640 {
117*f126890aSEmmanuel Vadot				status = "okay";
118*f126890aSEmmanuel Vadot			};
119*f126890aSEmmanuel Vadot
120*f126890aSEmmanuel Vadot			pinctrl@fc06a000 {
121*f126890aSEmmanuel Vadot				board {
122*f126890aSEmmanuel Vadot					pinctrl_mmc1_cd: mmc1_cd {
123*f126890aSEmmanuel Vadot						atmel,pins =
124*f126890aSEmmanuel Vadot							<AT91_PIOE 3 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
125*f126890aSEmmanuel Vadot					};
126*f126890aSEmmanuel Vadot					pinctrl_usba_vbus: usba_vbus {
127*f126890aSEmmanuel Vadot						atmel,pins =
128*f126890aSEmmanuel Vadot							<AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
129*f126890aSEmmanuel Vadot					};
130*f126890aSEmmanuel Vadot					pinctrl_usb_default: usb_default {
131*f126890aSEmmanuel Vadot						atmel,pins =
132*f126890aSEmmanuel Vadot							<AT91_PIOE 11 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
133*f126890aSEmmanuel Vadot							 AT91_PIOE 14 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
134*f126890aSEmmanuel Vadot					};
135*f126890aSEmmanuel Vadot					pinctrl_key_gpio: key_gpio_0 {
136*f126890aSEmmanuel Vadot						atmel,pins =
137*f126890aSEmmanuel Vadot							<AT91_PIOE 8 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
138*f126890aSEmmanuel Vadot					};
139*f126890aSEmmanuel Vadot					pinctrl_macb0_phy_irq: macb0_phy_irq_0 {
140*f126890aSEmmanuel Vadot						atmel,pins =
141*f126890aSEmmanuel Vadot							<AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
142*f126890aSEmmanuel Vadot					};
143*f126890aSEmmanuel Vadot					pinctrl_spi1_cs: spi1_cs_default {
144*f126890aSEmmanuel Vadot						atmel,pins =
145*f126890aSEmmanuel Vadot							<AT91_PIOB 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
146*f126890aSEmmanuel Vadot					};
147*f126890aSEmmanuel Vadot					pinctrl_gpio_leds: gpio_leds_default {
148*f126890aSEmmanuel Vadot						atmel,pins =
149*f126890aSEmmanuel Vadot							<AT91_PIOD 30 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
150*f126890aSEmmanuel Vadot							 AT91_PIOE 15 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
151*f126890aSEmmanuel Vadot					};
152*f126890aSEmmanuel Vadot					pinctrl_vcc_mmc1_reg: vcc_mmc1_reg {
153*f126890aSEmmanuel Vadot						atmel,pins =
154*f126890aSEmmanuel Vadot							<AT91_PIOE 4 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
155*f126890aSEmmanuel Vadot					};
156*f126890aSEmmanuel Vadot				};
157*f126890aSEmmanuel Vadot			};
158*f126890aSEmmanuel Vadot		};
159*f126890aSEmmanuel Vadot
160*f126890aSEmmanuel Vadot		usb0: gadget@400000 {
161*f126890aSEmmanuel Vadot			atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>;
162*f126890aSEmmanuel Vadot			pinctrl-names = "default";
163*f126890aSEmmanuel Vadot			pinctrl-0 = <&pinctrl_usba_vbus>;
164*f126890aSEmmanuel Vadot			status = "okay";
165*f126890aSEmmanuel Vadot		};
166*f126890aSEmmanuel Vadot
167*f126890aSEmmanuel Vadot		usb1: ohci@500000 {
168*f126890aSEmmanuel Vadot			num-ports = <3>;
169*f126890aSEmmanuel Vadot			atmel,vbus-gpio = <0
170*f126890aSEmmanuel Vadot					   &pioE 11 GPIO_ACTIVE_HIGH
171*f126890aSEmmanuel Vadot					   &pioE 14 GPIO_ACTIVE_HIGH
172*f126890aSEmmanuel Vadot					  >;
173*f126890aSEmmanuel Vadot			pinctrl-names = "default";
174*f126890aSEmmanuel Vadot			pinctrl-0 = <&pinctrl_usb_default>;
175*f126890aSEmmanuel Vadot			status = "okay";
176*f126890aSEmmanuel Vadot		};
177*f126890aSEmmanuel Vadot
178*f126890aSEmmanuel Vadot		usb2: ehci@600000 {
179*f126890aSEmmanuel Vadot			status = "okay";
180*f126890aSEmmanuel Vadot		};
181*f126890aSEmmanuel Vadot
182*f126890aSEmmanuel Vadot		ebi: ebi@10000000 {
183*f126890aSEmmanuel Vadot			pinctrl-0 = <&pinctrl_ebi_cs3 &pinctrl_ebi_nrd_nandoe
184*f126890aSEmmanuel Vadot				     &pinctrl_ebi_nwe_nandwe &pinctrl_ebi_nandrdy
185*f126890aSEmmanuel Vadot				     &pinctrl_ebi_data_0_7 &pinctrl_ebi_nand_addr>;
186*f126890aSEmmanuel Vadot			pinctrl-names = "default";
187*f126890aSEmmanuel Vadot			status = "okay";
188*f126890aSEmmanuel Vadot
189*f126890aSEmmanuel Vadot			nand_controller: nand-controller {
190*f126890aSEmmanuel Vadot				status = "okay";
191*f126890aSEmmanuel Vadot
192*f126890aSEmmanuel Vadot				nand@3 {
193*f126890aSEmmanuel Vadot					reg = <0x3 0x0 0x2>;
194*f126890aSEmmanuel Vadot					atmel,rb = <0>;
195*f126890aSEmmanuel Vadot					nand-bus-width = <8>;
196*f126890aSEmmanuel Vadot					nand-ecc-mode = "hw";
197*f126890aSEmmanuel Vadot					nand-on-flash-bbt;
198*f126890aSEmmanuel Vadot					label = "atmel_nand";
199*f126890aSEmmanuel Vadot
200*f126890aSEmmanuel Vadot					partitions {
201*f126890aSEmmanuel Vadot						compatible = "fixed-partitions";
202*f126890aSEmmanuel Vadot						#address-cells = <1>;
203*f126890aSEmmanuel Vadot						#size-cells = <1>;
204*f126890aSEmmanuel Vadot
205*f126890aSEmmanuel Vadot						at91bootstrap@0 {
206*f126890aSEmmanuel Vadot							label = "at91bootstrap";
207*f126890aSEmmanuel Vadot							reg = <0x0 0x40000>;
208*f126890aSEmmanuel Vadot						};
209*f126890aSEmmanuel Vadot
210*f126890aSEmmanuel Vadot						bootloader@40000 {
211*f126890aSEmmanuel Vadot							label = "bootloader";
212*f126890aSEmmanuel Vadot							reg = <0x40000 0xc0000>;
213*f126890aSEmmanuel Vadot						};
214*f126890aSEmmanuel Vadot
215*f126890aSEmmanuel Vadot						bootloaderenvred@100000 {
216*f126890aSEmmanuel Vadot							label = "bootloader env redundant";
217*f126890aSEmmanuel Vadot							reg = <0x100000 0x40000>;
218*f126890aSEmmanuel Vadot						};
219*f126890aSEmmanuel Vadot
220*f126890aSEmmanuel Vadot						bootloaderenv@140000 {
221*f126890aSEmmanuel Vadot							label = "bootloader env";
222*f126890aSEmmanuel Vadot							reg = <0x140000 0x40000>;
223*f126890aSEmmanuel Vadot						};
224*f126890aSEmmanuel Vadot
225*f126890aSEmmanuel Vadot						dtb@180000 {
226*f126890aSEmmanuel Vadot							label = "device tree";
227*f126890aSEmmanuel Vadot							reg = <0x180000 0x80000>;
228*f126890aSEmmanuel Vadot						};
229*f126890aSEmmanuel Vadot
230*f126890aSEmmanuel Vadot						kernel@200000 {
231*f126890aSEmmanuel Vadot							label = "kernel";
232*f126890aSEmmanuel Vadot							reg = <0x200000 0x600000>;
233*f126890aSEmmanuel Vadot						};
234*f126890aSEmmanuel Vadot
235*f126890aSEmmanuel Vadot						rootfs@800000 {
236*f126890aSEmmanuel Vadot							label = "rootfs";
237*f126890aSEmmanuel Vadot							reg = <0x800000 0x1f800000>;
238*f126890aSEmmanuel Vadot						};
239*f126890aSEmmanuel Vadot					};
240*f126890aSEmmanuel Vadot				};
241*f126890aSEmmanuel Vadot			};
242*f126890aSEmmanuel Vadot		};
243*f126890aSEmmanuel Vadot	};
244*f126890aSEmmanuel Vadot
245*f126890aSEmmanuel Vadot	gpio-keys {
246*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
247*f126890aSEmmanuel Vadot
248*f126890aSEmmanuel Vadot		pinctrl-names = "default";
249*f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_key_gpio>;
250*f126890aSEmmanuel Vadot
251*f126890aSEmmanuel Vadot		button {
252*f126890aSEmmanuel Vadot			label = "pb_user1";
253*f126890aSEmmanuel Vadot			gpios = <&pioE 8 GPIO_ACTIVE_HIGH>;
254*f126890aSEmmanuel Vadot			linux,code = <KEY_PROG1>;
255*f126890aSEmmanuel Vadot			wakeup-source;
256*f126890aSEmmanuel Vadot		};
257*f126890aSEmmanuel Vadot	};
258*f126890aSEmmanuel Vadot
259*f126890aSEmmanuel Vadot	leds {
260*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
261*f126890aSEmmanuel Vadot		pinctrl-names = "default";
262*f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_gpio_leds>;
263*f126890aSEmmanuel Vadot		status = "okay";
264*f126890aSEmmanuel Vadot
265*f126890aSEmmanuel Vadot		led-d8 {
266*f126890aSEmmanuel Vadot			label = "d8";
267*f126890aSEmmanuel Vadot			gpios = <&pioD 30 GPIO_ACTIVE_HIGH>;
268*f126890aSEmmanuel Vadot			default-state = "on";
269*f126890aSEmmanuel Vadot		};
270*f126890aSEmmanuel Vadot
271*f126890aSEmmanuel Vadot		led-d10 {
272*f126890aSEmmanuel Vadot			label = "d10";
273*f126890aSEmmanuel Vadot			gpios = <&pioE 15 GPIO_ACTIVE_LOW>;
274*f126890aSEmmanuel Vadot			linux,default-trigger = "heartbeat";
275*f126890aSEmmanuel Vadot		};
276*f126890aSEmmanuel Vadot	};
277*f126890aSEmmanuel Vadot
278*f126890aSEmmanuel Vadot	vcc_3v3_reg: fixedregulator_3v3 {
279*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
280*f126890aSEmmanuel Vadot		regulator-name = "VCC 3V3";
281*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
282*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
283*f126890aSEmmanuel Vadot		regulator-boot-on;
284*f126890aSEmmanuel Vadot		regulator-always-on;
285*f126890aSEmmanuel Vadot	};
286*f126890aSEmmanuel Vadot
287*f126890aSEmmanuel Vadot	vcc_mmc1_reg: fixedregulator_mmc1 {
288*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
289*f126890aSEmmanuel Vadot		pinctrl-names = "default";
290*f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_vcc_mmc1_reg>;
291*f126890aSEmmanuel Vadot		gpio = <&pioE 4 GPIO_ACTIVE_LOW>;
292*f126890aSEmmanuel Vadot		regulator-name = "VDD MCI1";
293*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
294*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
295*f126890aSEmmanuel Vadot		vin-supply = <&vcc_3v3_reg>;
296*f126890aSEmmanuel Vadot		regulator-always-on;
297*f126890aSEmmanuel Vadot	};
298*f126890aSEmmanuel Vadot};
299