1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * at91-sam9x60ek.dts - Device Tree file for Microchip SAM9X60-EK board
4 *
5 * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries
6 *
7 * Author: Sandeep Sheriker M <sandeepsheriker.mallikarjun@microchip.com>
8 */
9/dts-v1/;
10#include "sam9x60.dtsi"
11#include <dt-bindings/input/input.h>
12
13/ {
14	model = "Microchip SAM9X60-EK";
15	compatible = "microchip,sam9x60ek", "microchip,sam9x60", "atmel,at91sam9";
16
17	aliases {
18		i2c0 = &i2c0;
19		i2c1 = &i2c1;
20		serial1 = &uart1;
21	};
22
23	chosen {
24		stdout-path = "serial0:115200n8";
25	};
26
27	clocks {
28		slow_xtal {
29			clock-frequency = <32768>;
30		};
31
32		main_xtal {
33			clock-frequency = <24000000>;
34		};
35	};
36
37	gpio-keys {
38		compatible = "gpio-keys";
39		pinctrl-names = "default";
40		pinctrl-0 = <&pinctrl_key_gpio_default>;
41
42		button-1 {
43			label = "SW1";
44			gpios = <&pioD 18 GPIO_ACTIVE_LOW>;
45			linux,code = <KEY_PROG1>;
46			wakeup-source;
47		};
48	};
49
50	leds {
51		compatible = "gpio-leds";
52		pinctrl-names = "default";
53		pinctrl-0 = <&pinctrl_gpio_leds>;
54		status = "okay"; /* Conflict with pwm0. */
55
56		red {
57			label = "red";
58			gpios = <&pioB 11 GPIO_ACTIVE_HIGH>;
59		};
60
61		green {
62			label = "green";
63			gpios = <&pioB 12 GPIO_ACTIVE_HIGH>;
64		};
65
66		blue {
67			label = "blue";
68			gpios = <&pioB 13 GPIO_ACTIVE_HIGH>;
69			linux,default-trigger = "heartbeat";
70		};
71	};
72
73	vdd_1v8: fixed-regulator-vdd_1v8 {
74		compatible = "regulator-fixed";
75		regulator-name = "VDD_1V8";
76		regulator-min-microvolt = <1800000>;
77		regulator-max-microvolt = <1800000>;
78		regulator-always-on;
79		status = "okay";
80	};
81
82	vdd_1v15: fixed-regulator-vdd_1v15 {
83		compatible = "regulator-fixed";
84		regulator-name = "VDD_1V15";
85		regulator-min-microvolt = <1150000>;
86		regulator-max-microvolt = <1150000>;
87		regulator-always-on;
88		status = "okay";
89	};
90
91	vdd1_3v3: fixed-regulator-vdd1_3v3 {
92		compatible = "regulator-fixed";
93		regulator-name = "VDD1_3V3";
94		regulator-min-microvolt = <3300000>;
95		regulator-max-microvolt = <3300000>;
96		regulator-always-on;
97		status = "okay";
98	};
99
100	vdd2_3v3: regulator-fixed-vdd2_3v3 {
101		compatible = "regulator-fixed";
102		regulator-name = "VDD2_3V3";
103		regulator-min-microvolt = <3300000>;
104		regulator-max-microvolt = <3300000>;
105		regulator-always-on;
106		status = "okay";
107	};
108};
109
110&adc {
111	vddana-supply = <&vdd1_3v3>;
112	vref-supply = <&vdd1_3v3>;
113	pinctrl-names = "default";
114	pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
115	status = "okay";
116};
117
118&can0 {
119	pinctrl-names = "default";
120	pinctrl-0 = <&pinctrl_can0_rx_tx>;
121	status = "disabled"; /* Conflict with dbgu. */
122};
123
124&can1 {
125	pinctrl-names = "default";
126	pinctrl-0 = <&pinctrl_can1_rx_tx>;
127	status = "okay";
128};
129
130&classd {
131	pinctrl-names = "default";
132	pinctrl-0 = <&pinctrl_classd_default>;
133	atmel,pwm-type = "diff";
134	atmel,non-overlap-time = <10>;
135	status = "okay";
136};
137
138&dbgu {
139	pinctrl-names = "default";
140	pinctrl-0 = <&pinctrl_dbgu>;
141	status = "okay"; /* Conflict with can0. */
142};
143
144&ebi {
145	pinctrl-names = "default";
146	pinctrl-0 = <&pinctrl_ebi_addr_nand &pinctrl_ebi_data_0_7>;
147	status = "okay";
148
149	nand_controller: nand-controller {
150		pinctrl-names = "default";
151		pinctrl-0 = <&pinctrl_nand_oe_we &pinctrl_nand_cs &pinctrl_nand_rb>;
152		status = "okay";
153
154		nand@3 {
155			reg = <0x3 0x0 0x800000>;
156			rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
157			cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
158			nand-bus-width = <8>;
159			nand-ecc-mode = "hw";
160			nand-ecc-strength = <8>;
161			nand-ecc-step-size = <512>;
162			nand-on-flash-bbt;
163			label = "atmel_nand";
164
165			partitions {
166				compatible = "fixed-partitions";
167				#address-cells = <1>;
168				#size-cells = <1>;
169
170				at91bootstrap@0 {
171					label = "at91bootstrap";
172					reg = <0x0 0x40000>;
173				};
174
175				uboot@40000 {
176					label = "u-boot";
177					reg = <0x40000 0xc0000>;
178				};
179
180				ubootenvred@100000 {
181					label = "U-Boot Env Redundant";
182					reg = <0x100000 0x40000>;
183				};
184
185				ubootenv@140000 {
186					label = "U-Boot Env";
187					reg = <0x140000 0x40000>;
188				};
189
190				dtb@180000 {
191					label = "device tree";
192					reg = <0x180000 0x80000>;
193				};
194
195				kernel@200000 {
196					label = "kernel";
197					reg = <0x200000 0x600000>;
198				};
199
200				rootfs@800000 {
201					label = "rootfs";
202					reg = <0x800000 0x1f800000>;
203				};
204			};
205		};
206	};
207};
208
209&flx0 {
210	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
211	status = "okay";
212
213	i2c0: i2c@600 {
214		compatible = "microchip,sam9x60-i2c";
215		reg = <0x600 0x200>;
216		interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
217		#address-cells = <1>;
218		#size-cells = <0>;
219		clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
220		pinctrl-names = "default";
221		pinctrl-0 = <&pinctrl_flx0_default>;
222		atmel,fifo-size = <16>;
223		i2c-analog-filter;
224		i2c-digital-filter;
225		i2c-digital-filter-width-ns = <35>;
226		status = "okay";
227
228		eeprom@53 {
229			compatible = "atmel,24c02";
230			reg = <0x53>;
231			pagesize = <16>;
232			status = "okay";
233		};
234	};
235};
236
237&flx4 {
238	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
239	status = "disabled";
240
241	spi0: spi@400 {
242		compatible = "microchip,sam9x60-spi", "atmel,at91rm9200-spi";
243		reg = <0x400 0x200>;
244		interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
245		clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
246		clock-names = "spi_clk";
247		pinctrl-names = "default";
248		pinctrl-0 = <&pinctrl_flx4_default>;
249		atmel,fifo-size = <16>;
250		#address-cells = <1>;
251		#size-cells = <0>;
252		status = "disabled";
253	};
254};
255
256&flx5 {
257	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
258	status = "okay";
259
260	uart1: serial@200 {
261		compatible = "microchip,sam9x60-dbgu", "microchip,sam9x60-usart", "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
262		reg = <0x200 0x200>;
263		atmel,usart-mode = <AT91_USART_MODE_SERIAL>;
264		interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
265		dmas = <&dma0
266			(AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
267			 AT91_XDMAC_DT_PERID(10))>,
268		       <&dma0
269			(AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
270			 AT91_XDMAC_DT_PERID(11))>;
271		dma-names = "tx", "rx";
272		clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
273		clock-names = "usart";
274		pinctrl-0 = <&pinctrl_flx5_default>;
275		pinctrl-names = "default";
276		atmel,use-dma-rx;
277		atmel,use-dma-tx;
278		status = "okay";
279	};
280};
281
282&flx6 {
283	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
284	status = "okay";
285
286	i2c1: i2c@600 {
287		compatible = "microchip,sam9x60-i2c";
288		reg = <0x600 0x200>;
289		interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
290		#address-cells = <1>;
291		#size-cells = <0>;
292		clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
293		pinctrl-names = "default";
294		pinctrl-0 = <&pinctrl_flx6_default>;
295		atmel,fifo-size = <16>;
296		i2c-analog-filter;
297		i2c-digital-filter;
298		i2c-digital-filter-width-ns = <35>;
299		status = "okay";
300
301		gpio_exp: mcp23008@20 {
302			compatible = "microchip,mcp23008";
303			reg = <0x20>;
304		};
305	};
306};
307
308&gpbr {
309	status = "okay";
310};
311
312&i2s {
313	pinctrl-names = "default";
314	pinctrl-0 = <&pinctrl_i2s_default>;
315	#sound-dai-cells = <0>;
316	status = "disabled"; /* Conflict with QSPI. */
317};
318
319&macb0 {
320	phy-mode = "rmii";
321	#address-cells = <1>;
322	#size-cells = <0>;
323	pinctrl-names = "default";
324	pinctrl-0 = <&pinctrl_macb0_rmii>;
325	status = "okay";
326
327	ethernet-phy@0 {
328		reg = <0x0>;
329	};
330};
331
332&pinctrl {
333	adc {
334		pinctrl_adc_default: adc_default {
335			atmel,pins = <AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
336		};
337
338		pinctrl_adtrg_default: adtrg_default {
339			atmel,pins = <AT91_PIOB 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
340		};
341	};
342
343	dbgu {
344		pinctrl_dbgu: dbgu-0 {
345			atmel,pins = <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
346				      AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
347		};
348	};
349
350	i2s {
351		pinctrl_i2s_default: i2s {
352			atmel,pins =
353				<AT91_PIOB 19 AT91_PERIPH_B AT91_PINCTRL_NONE		/* I2SCK */
354				 AT91_PIOB 20 AT91_PERIPH_B AT91_PINCTRL_NONE		/* I2SWS */
355				 AT91_PIOB 21 AT91_PERIPH_B AT91_PINCTRL_NONE		/* I2SDIN */
356				 AT91_PIOB 22 AT91_PERIPH_B AT91_PINCTRL_NONE		/* I2SDOUT */
357				 AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE>;		/* I2SMCK */
358		};
359	};
360
361	qspi {
362		pinctrl_qspi: qspi {
363			atmel,pins =
364				<AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS
365				 AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS
366				 AT91_PIOB 21 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_SLEWRATE_DIS)
367				 AT91_PIOB 22 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_SLEWRATE_DIS)
368				 AT91_PIOB 23 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_SLEWRATE_DIS)
369				 AT91_PIOB 24 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_SLEWRATE_DIS)>;
370		};
371	};
372
373	nand {
374		pinctrl_nand_oe_we: nand-oe-we-0 {
375			atmel,pins =
376				<AT91_PIOD 0 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
377				 AT91_PIOD 1 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>;
378		};
379
380		pinctrl_nand_rb: nand-rb-0 {
381			atmel,pins =
382				<AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
383		};
384
385		pinctrl_nand_cs: nand-cs-0 {
386			atmel,pins =
387				<AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
388		};
389	};
390
391	ebi {
392		pinctrl_ebi_data_0_7: ebi-data-lsb-0 {
393			atmel,pins =
394				<AT91_PIOD 6 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
395				 AT91_PIOD 7 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
396				 AT91_PIOD 8 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
397				 AT91_PIOD 9 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
398				 AT91_PIOD 10 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
399				 AT91_PIOD 11 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
400				 AT91_PIOD 12 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
401				 AT91_PIOD 13 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>;
402		};
403
404		pinctrl_ebi_data_0_15: ebi-data-msb-0 {
405			atmel,pins =
406				<AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_NONE
407				 AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_NONE
408				 AT91_PIOD 8 AT91_PERIPH_A AT91_PINCTRL_NONE
409				 AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_NONE
410				 AT91_PIOD 10 AT91_PERIPH_A AT91_PINCTRL_NONE
411				 AT91_PIOD 11 AT91_PERIPH_A AT91_PINCTRL_NONE
412				 AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE
413				 AT91_PIOD 13 AT91_PERIPH_A AT91_PINCTRL_NONE
414				 AT91_PIOD 14 AT91_PERIPH_A AT91_PINCTRL_NONE
415				 AT91_PIOD 15 AT91_PERIPH_A AT91_PINCTRL_NONE
416				 AT91_PIOD 16 AT91_PERIPH_A AT91_PINCTRL_NONE
417				 AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_NONE
418				 AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_NONE
419				 AT91_PIOD 19 AT91_PERIPH_A AT91_PINCTRL_NONE
420				 AT91_PIOD 20 AT91_PERIPH_A AT91_PINCTRL_NONE
421				 AT91_PIOD 21 AT91_PERIPH_A AT91_PINCTRL_NONE>;
422		};
423
424		pinctrl_ebi_addr_nand: ebi-addr-0 {
425			atmel,pins =
426				<AT91_PIOD 2 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
427				 AT91_PIOD 3 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>;
428		};
429	};
430
431	flexcom {
432		pinctrl_flx0_default: flx0_twi {
433			atmel,pins =
434				<AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
435				 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
436		};
437
438		pinctrl_flx4_default: flx4_spi {
439			atmel,pins =
440				<AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE
441				 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE
442				 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE
443				 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE>;
444		};
445
446		pinctrl_flx5_default: flx_uart {
447			atmel,pins =
448				<AT91_PIOA 7 AT91_PERIPH_C AT91_PINCTRL_NONE
449				 AT91_PIOA 8 AT91_PERIPH_B AT91_PINCTRL_NONE
450				 AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE
451				 AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
452		};
453
454		pinctrl_flx6_default: flx6_twi {
455			atmel,pins =
456				<AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
457				 AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
458		};
459	};
460
461	classd {
462		pinctrl_classd_default: classd {
463			atmel,pins =
464				<AT91_PIOA 24 AT91_PERIPH_C AT91_PINCTRL_PULL_UP
465				 AT91_PIOA 25 AT91_PERIPH_C AT91_PINCTRL_PULL_DOWN
466				 AT91_PIOA 26 AT91_PERIPH_C AT91_PINCTRL_PULL_UP
467				 AT91_PIOA 27 AT91_PERIPH_C AT91_PINCTRL_PULL_DOWN>;
468		};
469	};
470
471	can0 {
472		pinctrl_can0_rx_tx: can0_rx_tx {
473			atmel,pins =
474				<AT91_PIOA 9 AT91_PERIPH_B AT91_PINCTRL_NONE	/* CANRX0 */
475				 AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_NONE	/* CANTX0 */
476				 AT91_PIOD 20 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN	/* Enable CAN0 mux */
477				 AT91_PIOD 21 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN>;	/* Enable CAN Transceivers */
478		};
479	};
480
481	can1 {
482		pinctrl_can1_rx_tx: can1_rx_tx {
483			atmel,pins =
484				<AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_NONE	/* CANRX1 RXD1 */
485				 AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_NONE	/* CANTX1 TXD1 */
486				 AT91_PIOD 19 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN	/* Enable CAN1 mux */
487				 AT91_PIOD 21 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN>;	/* Enable CAN Transceivers */
488		};
489	};
490
491	macb0 {
492		pinctrl_macb0_rmii: macb0_rmii-0 {
493			atmel,pins =
494				<AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB0 periph A */
495				 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB1 periph A */
496				 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB2 periph A */
497				 AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB3 periph A */
498				 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB4 periph A */
499				 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB5 periph A */
500				 AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB6 periph A */
501				 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB7 periph A */
502				 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB9 periph A */
503				 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PB10 periph A */
504		};
505	};
506
507	pwm0 {
508		pinctrl_pwm0_0: pwm0_0 {
509			atmel,pins = <AT91_PIOB 11 AT91_PERIPH_B AT91_PINCTRL_NONE>;
510		};
511
512		pinctrl_pwm0_1: pwm0_1 {
513			atmel,pins = <AT91_PIOB 12 AT91_PERIPH_B AT91_PINCTRL_NONE>;
514		};
515
516		pinctrl_pwm0_2: pwm0_2 {
517			atmel,pins = <AT91_PIOB 13 AT91_PERIPH_B AT91_PINCTRL_NONE>;
518		};
519
520		pinctrl_pwm0_3: pwm0_3 {
521			atmel,pins = <AT91_PIOB 14 AT91_PERIPH_B AT91_PINCTRL_NONE>;
522		};
523	};
524
525	sdmmc0 {
526		pinctrl_sdmmc0_default: sdmmc0 {
527			atmel,pins =
528				<AT91_PIOA 17 AT91_PERIPH_A (AT91_PINCTRL_DRIVE_STRENGTH_HI)				/* PA17 CK  periph A with pullup */
529				 AT91_PIOA 16 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA16 CMD periph A with pullup */
530				 AT91_PIOA 15 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA15 DAT0 periph A */
531				 AT91_PIOA 18 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA18 DAT1 periph A with pullup */
532				 AT91_PIOA 19 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA19 DAT2 periph A with pullup */
533				 AT91_PIOA 20 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)>;	/* PA20 DAT3 periph A with pullup */
534		};
535		pinctrl_sdmmc0_cd: sdmmc0_cd {
536			atmel,pins =
537				<AT91_PIOA 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
538		};
539	};
540
541	sdmmc1 {
542		pinctrl_sdmmc1_default: sdmmc1 {
543			atmel,pins =
544				<AT91_PIOA 13 AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI)				/* PA13 CK periph B */
545				 AT91_PIOA 12 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA12 CMD periph B with pullup */
546				 AT91_PIOA 11 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA11 DAT0 periph B with pullup */
547				 AT91_PIOA  2 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA2 DAT1 periph B with pullup */
548				 AT91_PIOA  3 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA3 DAT2 periph B with pullup */
549				 AT91_PIOA  4 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)>;	/* PA4 DAT3 periph B with pullup */
550		};
551	};
552
553	gpio_keys {
554		pinctrl_key_gpio_default: pinctrl_key_gpio {
555			atmel,pins = <AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
556		};
557	};
558
559	usb0 {
560		pinctrl_usba_vbus: usba_vbus {
561			atmel,pins = <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
562		};
563	};
564
565	usb1 {
566		pinctrl_usb_default: usb_default {
567			atmel,pins = <AT91_PIOD 15 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
568				      AT91_PIOD 16 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
569		};
570	};
571
572	leds {
573		pinctrl_gpio_leds: gpio_leds {
574			atmel,pins = <AT91_PIOB 11 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
575				      AT91_PIOB 12 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
576				      AT91_PIOB 13 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
577		};
578	};
579}; /* pinctrl */
580
581&pwm0 {
582	pinctrl-names = "default";
583	pinctrl-0 = <&pinctrl_pwm0_0 &pinctrl_pwm0_1 &pinctrl_pwm0_2 &pinctrl_pwm0_3>;
584	status = "disabled"; /* Conflict with leds. */
585};
586
587&sdmmc0 {
588	bus-width = <4>;
589	pinctrl-names = "default";
590	pinctrl-0 = <&pinctrl_sdmmc0_default &pinctrl_sdmmc0_cd>;
591	status = "okay";
592	cd-gpios = <&pioA 23 GPIO_ACTIVE_LOW>;
593	disable-wp;
594};
595
596&sdmmc1 {
597	bus-width = <4>;
598	pinctrl-names = "default";
599	pinctrl-0 = <&pinctrl_sdmmc1_default>;
600	no-1-8-v;
601	non-removable;
602	status = "disabled"; /* Conflict with flx4. */
603};
604
605&qspi {
606	pinctrl-names = "default";
607	pinctrl-0 = <&pinctrl_qspi>;
608	status = "okay"; /* Conflict with i2s. */
609
610	flash@0 {
611		#address-cells = <1>;
612		#size-cells = <1>;
613		compatible = "jedec,spi-nor";
614		reg = <0>;
615		spi-max-frequency = <80000000>;
616		spi-tx-bus-width = <4>;
617		spi-rx-bus-width = <4>;
618		m25p,fast-read;
619
620		at91bootstrap@0 {
621			label = "qspi: at91bootstrap";
622			reg = <0x0 0x40000>;
623		};
624
625		bootloader@40000 {
626			label = "qspi: bootloader";
627			reg = <0x40000 0xc0000>;
628		};
629
630		bootloaderenvred@100000 {
631			label = "qspi: bootloader env redundant";
632			reg = <0x100000 0x40000>;
633		};
634
635		bootloaderenv@140000 {
636			label = "qspi: bootloader env";
637			reg = <0x140000 0x40000>;
638		};
639
640		dtb@180000 {
641			label = "qspi: device tree";
642			reg = <0x180000 0x80000>;
643		};
644
645		kernel@200000 {
646			label = "qspi: kernel";
647			reg = <0x200000 0x600000>;
648		};
649	};
650};
651
652&rtt {
653	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
654	status = "okay";
655};
656
657&shutdown_controller {
658	debounce-delay-us = <976>;
659	status = "okay";
660
661	input@0 {
662		reg = <0>;
663	};
664};
665
666&tcb0 {
667	timer0: timer@0 {
668		compatible = "atmel,tcb-timer";
669		reg = <0>;
670	};
671
672	timer1: timer@1 {
673		compatible = "atmel,tcb-timer";
674		reg = <1>;
675	};
676};
677
678&usb0 {
679	atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
680	pinctrl-names = "default";
681	pinctrl-0 = <&pinctrl_usba_vbus>;
682	status = "okay";
683};
684
685&usb1 {
686	num-ports = <3>;
687	atmel,vbus-gpio = <0
688			   &pioD 15 GPIO_ACTIVE_HIGH
689			   &pioD 16 GPIO_ACTIVE_HIGH>;
690	pinctrl-names = "default";
691	pinctrl-0 = <&pinctrl_usb_default>;
692	status = "okay";
693};
694
695&usb2 {
696	status = "okay";
697};
698
699&watchdog {
700	status = "okay";
701};
702
703