xref: /freebsd/sys/contrib/device-tree/src/arm/microchip/at91-sam9x60_curiosity.dts (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * at91-sam9x60_curiosity.dts - Device Tree file for Microchip SAM9X60 Curiosity board
4 *
5 * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries
6 *
7 * Author: Durai Manickam KR <durai.manickamkr@microchip.com>
8 */
9/dts-v1/;
10#include "sam9x60.dtsi"
11#include <dt-bindings/input/input.h>
12
13/ {
14	model = "Microchip SAM9X60 Curiosity";
15	compatible = "microchip,sam9x60-curiosity", "microchip,sam9x60", "atmel,at91sam9";
16
17	aliases {
18		i2c0 = &i2c0;
19		i2c1 = &i2c6;
20		serial2 = &uart7;
21	};
22
23	chosen {
24		stdout-path = "serial0:115200n8";
25	};
26
27	memory@20000000 {
28		reg = <0x20000000 0x8000000>;
29	};
30
31	clocks {
32		slow_xtal {
33			clock-frequency = <32768>;
34		};
35
36		main_xtal {
37			clock-frequency = <24000000>;
38		};
39	};
40
41	gpio-keys {
42		compatible = "gpio-keys";
43		pinctrl-names = "default";
44		pinctrl-0 = <&pinctrl_key_gpio_default>;
45
46		button-user {
47			label = "PB_USER";
48			gpios = <&pioA 29 GPIO_ACTIVE_LOW>;
49			linux,code = <KEY_PROG1>;
50			wakeup-source;
51		};
52	};
53
54	leds {
55		compatible = "gpio-leds";
56		pinctrl-names = "default";
57		pinctrl-0 = <&pinctrl_gpio_leds>;
58
59		led-red {
60			label = "red";
61			gpios = <&pioD 17 GPIO_ACTIVE_HIGH>;
62		};
63
64		led-green {
65			label = "green";
66			gpios = <&pioD 19 GPIO_ACTIVE_HIGH>;
67		};
68
69		led-blue {
70			label = "blue";
71			gpios = <&pioD 21 GPIO_ACTIVE_HIGH>;
72			linux,default-trigger = "heartbeat";
73		};
74	};
75
76
77	vdd_1v8: regulator-0 {
78		compatible = "regulator-fixed";
79		regulator-always-on;
80		regulator-max-microvolt = <1800000>;
81		regulator-min-microvolt = <1800000>;
82		regulator-name = "VDD_1V8";
83	};
84
85	vdd_1v15: regulator-1 {
86		compatible = "regulator-fixed";
87		regulator-always-on;
88		regulator-max-microvolt = <1150000>;
89		regulator-min-microvolt = <1150000>;
90		regulator-name = "VDD_1V15";
91	};
92
93	vdd1_3v3: regulator-2 {
94		compatible = "regulator-fixed";
95		regulator-always-on;
96		regulator-max-microvolt = <3300000>;
97		regulator-min-microvolt = <3300000>;
98		regulator-name = "VDD1_3V3";
99	};
100};
101
102&adc {
103	vddana-supply = <&vdd1_3v3>;
104	vref-supply = <&vdd1_3v3>;
105	pinctrl-names = "default";
106	pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
107	status = "okay";
108};
109
110&can0 {
111	pinctrl-names = "default";
112	pinctrl-0 = <&pinctrl_can0_rx_tx>;
113	status = "disabled"; /* Conflict with dbgu. */
114};
115
116&can1 {
117	pinctrl-names = "default";
118	pinctrl-0 = <&pinctrl_can1_rx_tx>;
119	status = "okay";
120};
121
122&dbgu {
123	pinctrl-names = "default";
124	pinctrl-0 = <&pinctrl_dbgu>;
125	status = "okay"; /* Conflict with can0. */
126};
127
128&ebi {
129	pinctrl-names = "default";
130	pinctrl-0 = <&pinctrl_ebi_addr_nand &pinctrl_ebi_data_lsb>;
131	status = "okay";
132
133	nand_controller: nand-controller {
134		pinctrl-names = "default";
135		pinctrl-0 = <&pinctrl_nand_oe_we &pinctrl_nand_cs &pinctrl_nand_rb>;
136		status = "okay";
137
138		nand@3 {
139			reg = <0x3 0x0 0x800000>;
140			rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
141			cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
142			nand-bus-width = <8>;
143			nand-ecc-mode = "hw";
144			nand-ecc-strength = <8>;
145			nand-ecc-step-size = <512>;
146			nand-on-flash-bbt;
147			label = "atmel_nand";
148
149			partitions {
150				compatible = "fixed-partitions";
151				#address-cells = <1>;
152				#size-cells = <1>;
153
154				at91bootstrap@0 {
155					label = "at91bootstrap";
156					reg = <0x0 0x40000>;
157				};
158
159				uboot@40000 {
160					label = "u-boot";
161					reg = <0x40000 0xc0000>;
162				};
163
164				ubootenvred@100000 {
165					label = "U-Boot Env Redundant";
166					reg = <0x100000 0x40000>;
167				};
168
169				ubootenv@140000 {
170					label = "U-Boot Env";
171					reg = <0x140000 0x40000>;
172				};
173
174				dtb@180000 {
175					label = "device tree";
176					reg = <0x180000 0x80000>;
177				};
178
179				kernel@200000 {
180					label = "kernel";
181					reg = <0x200000 0x600000>;
182				};
183
184				rootfs@800000 {
185					label = "rootfs";
186					reg = <0x800000 0x1f800000>;
187				};
188			};
189		};
190	};
191};
192
193&flx0 {
194	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
195	status = "okay";
196
197	i2c0: i2c@600 {
198		dmas = <0>, <0>;
199		pinctrl-names = "default";
200		pinctrl-0 = <&pinctrl_flx0_default>;
201		#address-cells = <1>;
202		#size-cells = <0>;
203		i2c-analog-filter;
204		i2c-digital-filter;
205		i2c-digital-filter-width-ns = <35>;
206		status = "okay";
207
208		eeprom@53 {
209			compatible = "atmel,24c02";
210			reg = <0x53>;
211			pagesize = <16>;
212		};
213	};
214};
215
216&flx6 {
217	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
218	status = "okay";
219
220	i2c6: i2c@600 {
221		dmas = <0>, <0>;
222		pinctrl-names = "default";
223		pinctrl-0 = <&pinctrl_flx6_default>;
224		i2c-analog-filter;
225		i2c-digital-filter;
226		i2c-digital-filter-width-ns = <35>;
227		status = "disabled";
228	};
229};
230
231&flx7 {
232	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
233	status = "okay";
234
235	uart7: serial@200 {
236		pinctrl-names = "default";
237		pinctrl-0 = <&pinctrl_flx7_default>;
238		status = "okay";
239	};
240};
241
242&macb0 {
243	phy-mode = "rmii";
244	#address-cells = <1>;
245	#size-cells = <0>;
246	pinctrl-names = "default";
247	pinctrl-0 = <&pinctrl_macb0_rmii>;
248	status = "okay";
249
250	ethernet-phy@0 {
251		reg = <0x0>;
252	};
253};
254
255&pinctrl {
256	adc {
257		pinctrl_adc_default: adc-default {
258			atmel,pins = <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE>;
259		};
260
261		pinctrl_adtrg_default: adtrg-default {
262			atmel,pins = <AT91_PIOB 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
263		};
264	};
265
266	can0 {
267		pinctrl_can0_rx_tx: can0-rx-tx {
268			atmel,pins =
269				<AT91_PIOA 9 AT91_PERIPH_B AT91_PINCTRL_NONE	/* CANRX0 */
270				 AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_NONE	/* CANTX0 */
271				 AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN>;	/* Enable CAN Transceivers */
272		};
273	};
274
275	can1 {
276		pinctrl_can1_rx_tx: can1-rx-tx {
277			atmel,pins =
278				<AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_NONE	/* CANRX1 */
279				 AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_NONE	/* CANTX1 */
280				 AT91_PIOB 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN>;	/* Enable CAN Transceivers */
281		};
282	};
283
284	dbgu {
285		pinctrl_dbgu: dbgu-0 {
286			atmel,pins = <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
287				      AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
288		};
289	};
290
291	ebi {
292		pinctrl_ebi_data_lsb: ebi-data-lsb {
293			atmel,pins =
294				<AT91_PIOD 6 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
295				 AT91_PIOD 7 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
296				 AT91_PIOD 8 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
297				 AT91_PIOD 9 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
298				 AT91_PIOD 10 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
299				 AT91_PIOD 11 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
300				 AT91_PIOD 12 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
301				 AT91_PIOD 13 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>;
302		};
303
304		pinctrl_ebi_addr_nand: ebi-addr-nand {
305			atmel,pins =
306				<AT91_PIOD 2 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
307				 AT91_PIOD 3 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>;
308		};
309	};
310
311	flexcom {
312		pinctrl_flx0_default: flx0-twi {
313			atmel,pins =
314				<AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
315				 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
316		};
317
318		pinctrl_flx6_default: flx6-twi {
319			atmel,pins =
320				<AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
321				 AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
322		};
323
324		pinctrl_flx7_default: flx7-usart {
325			atmel,pins =
326				<AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE
327				 AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>;
328		};
329	};
330
331	gpio-keys {
332		pinctrl_key_gpio_default: pinctrl-key-gpio {
333			atmel,pins = <AT91_PIOA 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
334		};
335	};
336
337	leds {
338		pinctrl_gpio_leds: gpio-leds {
339			atmel,pins = <AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
340				      AT91_PIOD 19 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
341				      AT91_PIOD 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
342		};
343	};
344
345	macb0 {
346		pinctrl_macb0_rmii: macb0-rmii-0 {
347			atmel,pins =
348				<AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB0 periph A */
349				 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB1 periph A */
350				 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB2 periph A */
351				 AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB3 periph A */
352				 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB4 periph A */
353				 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB5 periph A */
354				 AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB6 periph A */
355				 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB7 periph A */
356				 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PB9 periph A */
357				 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PB10 periph A */
358		};
359	};
360
361	nand {
362		pinctrl_nand_oe_we: nand-oe-we-0 {
363			atmel,pins =
364				<AT91_PIOD 0 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
365				 AT91_PIOD 1 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>;
366		};
367
368		pinctrl_nand_rb: nand-rb-0 {
369			atmel,pins =
370				<AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
371		};
372
373		pinctrl_nand_cs: nand-cs-0 {
374			atmel,pins =
375				<AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
376		};
377	};
378
379	pwm0 {
380		pinctrl_pwm0_0: pwm0-0 {
381			atmel,pins = <AT91_PIOB 12 AT91_PERIPH_B AT91_PINCTRL_NONE>;
382		};
383
384		pinctrl_pwm0_1: pwm0-1 {
385			atmel,pins = <AT91_PIOB 13 AT91_PERIPH_B AT91_PINCTRL_NONE>;
386		};
387
388		pinctrl_pwm0_2: pwm0-2 {
389			atmel,pins = <AT91_PIOD 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
390		};
391	};
392
393	sdmmc0 {
394		pinctrl_sdmmc0_default: sdmmc0 {
395			atmel,pins =
396				<AT91_PIOA 17 AT91_PERIPH_A (AT91_PINCTRL_DRIVE_STRENGTH_HI)				/* PA17 CK  periph A with pullup */
397				 AT91_PIOA 16 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA16 CMD periph A with pullup */
398				 AT91_PIOA 15 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA15 DAT0 periph A */
399				 AT91_PIOA 18 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA18 DAT1 periph A with pullup */
400				 AT91_PIOA 19 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA19 DAT2 periph A with pullup */
401				 AT91_PIOA 20 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)>;	/* PA20 DAT3 periph A with pullup */
402		};
403
404		pinctrl_sdmmc0_cd: sdmmc0-cd {
405			atmel,pins =
406				<AT91_PIOA 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
407		};
408	};
409
410	sdmmc1 {
411		pinctrl_sdmmc1_default: sdmmc1 {
412			atmel,pins =
413				<AT91_PIOA 13 AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI)				/* PA13 CK periph B */
414				 AT91_PIOA 12 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA12 CMD periph B with pullup */
415				 AT91_PIOA 11 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA11 DAT0 periph B with pullup */
416				 AT91_PIOA 2 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA2 DAT1 periph B with pullup */
417				 AT91_PIOA 3 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)	/* PA3 DAT2 periph B with pullup */
418				 AT91_PIOA 4 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)>;	/* PA4 DAT3 periph B with pullup */
419		};
420	};
421
422	usb0 {
423		pinctrl_usba_vbus: usba-vbus {
424			atmel,pins = <AT91_PIOA 27 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
425		};
426	};
427
428	usb1 {
429		pinctrl_usb_default: usb-default {
430			atmel,pins = <AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
431				      AT91_PIOD 15 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
432		};
433	};
434}; /* pinctrl */
435
436&pwm0 {
437	pinctrl-names = "default";
438	pinctrl-0 = <&pinctrl_pwm0_0 &pinctrl_pwm0_1 &pinctrl_pwm0_2>;
439	status = "okay";
440};
441
442&sdmmc0 {
443	bus-width = <4>;
444	pinctrl-names = "default";
445	pinctrl-0 = <&pinctrl_sdmmc0_default &pinctrl_sdmmc0_cd>;
446	cd-gpios = <&pioA 25 GPIO_ACTIVE_LOW>;
447	disable-wp;
448	status = "okay";
449};
450
451&sdmmc1 {
452	bus-width = <4>;
453	pinctrl-names = "default";
454	pinctrl-0 = <&pinctrl_sdmmc1_default>;
455	disable-wp;
456	status = "okay";
457};
458
459&shutdown_controller {
460	debounce-delay-us = <976>;
461	status = "okay";
462
463	input@0 {
464		reg = <0>;
465	};
466};
467
468&tcb0 {
469	timer0: timer@0 {
470		compatible = "atmel,tcb-timer";
471		reg = <0>;
472	};
473
474	timer1: timer@1 {
475		compatible = "atmel,tcb-timer";
476		reg = <1>;
477	};
478};
479
480&usb0 {
481	atmel,vbus-gpio = <&pioA 27 GPIO_ACTIVE_HIGH>;
482	pinctrl-names = "default";
483	pinctrl-0 = <&pinctrl_usba_vbus>;
484	status = "okay";
485};
486
487&usb1 {
488	num-ports = <3>;
489	atmel,vbus-gpio = <0
490			   &pioD 18 GPIO_ACTIVE_HIGH
491			   &pioD 15 GPIO_ACTIVE_HIGH>;
492	pinctrl-names = "default";
493	pinctrl-0 = <&pinctrl_usb_default>;
494	status = "okay";
495};
496
497&usb2 {
498	status = "okay";
499};
500
501&watchdog {
502	status = "okay";
503};
504