xref: /freebsd/sys/contrib/device-tree/src/arm/microchip/at91-sama5d27_som1_ek.dts (revision e1e636193db45630c7881246d25902e57c43d24e)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * at91-sama5d27_som1_ek.dts - Device Tree file for SAMA5D27-SOM1-EK board
4 *
5 *  Copyright (c) 2017, Microchip Technology Inc.
6 *                2016 Nicolas Ferre <nicolas.ferre@atmel.com>
7 *                2017 Cristian Birsan <cristian.birsan@microchip.com>
8 *                2017 Claudiu Beznea <claudiu.beznea@microchip.com>
9 */
10/dts-v1/;
11#include "at91-sama5d27_som1.dtsi"
12#include <dt-bindings/mfd/atmel-flexcom.h>
13#include <dt-bindings/gpio/gpio.h>
14#include <dt-bindings/input/input.h>
15
16/ {
17	model = "Atmel SAMA5D27 SOM1 EK";
18	compatible = "atmel,sama5d27-som1-ek", "atmel,sama5d27-som1", "atmel,sama5d27", "atmel,sama5d2", "atmel,sama5";
19
20	aliases {
21		serial0 = &uart1;	/* DBGU */
22		serial1 = &uart4;	/* mikro BUS 1 */
23		serial2 = &uart2;	/* mikro BUS 2 */
24		i2c1 = &i2c1;
25		i2c2 = &i2c3;
26	};
27
28	chosen {
29		stdout-path = "serial0:115200n8";
30	};
31
32	ahb {
33		usb0: gadget@300000 {
34			atmel,vbus-gpio = <&pioA PIN_PD20 GPIO_ACTIVE_HIGH>;
35			pinctrl-names = "default";
36			pinctrl-0 = <&pinctrl_usba_vbus>;
37			status = "okay";
38		};
39
40		usb1: ohci@400000 {
41			num-ports = <3>;
42			atmel,vbus-gpio = <0 /* &pioA PIN_PD20 GPIO_ACTIVE_HIGH */
43					   &pioA PIN_PA27 GPIO_ACTIVE_HIGH
44					   0
45					  >;
46			pinctrl-names = "default";
47			pinctrl-0 = <&pinctrl_usb_default>;
48			status = "okay";
49		};
50
51		usb2: ehci@500000 {
52			status = "okay";
53		};
54
55		sdmmc0: sdio-host@a0000000 {
56			bus-width = <8>;
57			mmc-ddr-3_3v;
58			pinctrl-names = "default";
59			pinctrl-0 = <&pinctrl_sdmmc0_default>;
60			status = "okay";
61		};
62
63		sdmmc1: sdio-host@b0000000 {
64			bus-width = <4>;
65			pinctrl-names = "default";
66			pinctrl-0 = <&pinctrl_sdmmc1_default>;
67			status = "okay";
68		};
69
70		apb {
71			isc: isc@f0008000 {
72				pinctrl-names = "default";
73				pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>;
74			};
75
76			qspi1: spi@f0024000 {
77				status = "okay";
78			};
79
80			spi0: spi@f8000000 {
81				pinctrl-names = "default";
82				pinctrl-0 = <&pinctrl_spi0_default>;
83				status = "okay";
84			};
85
86			macb0: ethernet@f8008000 {
87				status = "okay";
88			};
89
90			tcb0: timer@f800c000 {
91				timer0: timer@0 {
92					compatible = "atmel,tcb-timer";
93					reg = <0>;
94				};
95
96				timer1: timer@1 {
97					compatible = "atmel,tcb-timer";
98					reg = <1>;
99				};
100			};
101
102			uart1: serial@f8020000 {
103				pinctrl-names = "default";
104				pinctrl-0 = <&pinctrl_uart1_default>;
105				atmel,use-dma-rx;
106				atmel,use-dma-tx;
107				status = "okay";
108			};
109
110			uart2: serial@f8024000 {
111				pinctrl-names = "default";
112				pinctrl-0 = <&pinctrl_mikrobus2_uart>;
113				atmel,use-dma-rx;
114				atmel,use-dma-tx;
115				status = "okay";
116			};
117
118			pwm0: pwm@f802c000 {
119				pinctrl-names = "default";
120				pinctrl-0 = <&pinctrl_mikrobus1_pwm &pinctrl_mikrobus2_pwm>;
121				status = "disabled"; /* Conflict with leds. */
122			};
123
124			flx1: flexcom@f8038000 {
125				atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
126				status = "okay";
127
128				i2c3: i2c@600 {
129					dmas = <0>, <0>;
130					i2c-analog-filter;
131					i2c-digital-filter;
132					i2c-digital-filter-width-ns = <35>;
133					pinctrl-names = "default", "gpio";
134					pinctrl-0 = <&pinctrl_mikrobus_i2c>;
135					pinctrl-1 = <&pinctrl_i2c3_gpio>;
136					sda-gpios = <&pioA PIN_PA24 GPIO_ACTIVE_HIGH>;
137					scl-gpios = <&pioA PIN_PA23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
138					status = "okay";
139				};
140			};
141
142			poweroff@f8048010 {
143				debounce-delay-us = <976>;
144				atmel,wakeup-rtc-timer;
145
146				input@0 {
147					reg = <0>;
148				};
149			};
150
151			watchdog@f8048040 {
152				status = "okay";
153			};
154
155			uart3: serial@fc008000 {
156				atmel,use-dma-rx;
157				atmel,use-dma-tx;
158				pinctrl-names = "default";
159				pinctrl-0 = <&pinctrl_uart3_default>;
160				status = "disabled"; /* Conflict with isc. */
161			};
162
163			uart4: serial@fc00c000 {
164				atmel,use-dma-rx;
165				atmel,use-dma-tx;
166				pinctrl-names = "default";
167				pinctrl-0 = <&pinctrl_mikrobus1_uart>;
168				status = "okay";
169			};
170
171			flx3: flexcom@fc014000 {
172				atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
173				status = "disabled";
174
175				uart8: serial@200 {
176					dmas = <0>, <0>;
177					pinctrl-names = "default";
178					pinctrl-0 = <&pinctrl_flx3_default>;
179					status = "disabled"; /* Conflict with isc. */
180				};
181
182				spi5: spi@400 {
183					dmas = <0>, <0>;
184					pinctrl-names = "default";
185					pinctrl-0 = <&pinctrl_flx3_default>;
186					status = "disabled"; /* Conflict with isc. */
187				};
188			};
189
190			flx4: flexcom@fc018000 {
191				atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
192				status = "okay";
193
194				uart9: serial@200 {
195					dmas = <0>, <0>;
196					pinctrl-names = "default";
197					pinctrl-0 = <&pinctrl_flx4_default>;
198					status = "disabled"; /* Conflict with spi6 and i2c6. */
199				};
200
201				spi6: spi@400 {
202					dmas = <0>, <0>;
203					pinctrl-names = "default";
204					pinctrl-0 = <&pinctrl_mikrobus_spi &pinctrl_mikrobus1_spi_cs &pinctrl_mikrobus2_spi_cs>;
205					status = "okay"; /* Conflict with uart5 and i2c6. */
206				};
207
208				i2c6: i2c@600 {
209					dmas = <0>, <0>;
210					pinctrl-names = "default";
211					pinctrl-0 = <&pinctrl_flx4_default>;
212					status = "disabled"; /* Conflict with uart5 and spi6. */
213				};
214			};
215
216			i2c1: i2c@fc028000 {
217				dmas = <0>, <0>;
218				i2c-analog-filter;
219				i2c-digital-filter;
220				i2c-digital-filter-width-ns = <35>;
221				pinctrl-names = "default", "gpio";
222				pinctrl-0 = <&pinctrl_i2c1_default>;
223				pinctrl-1 = <&pinctrl_i2c1_gpio>;
224				sda-gpios = <&pioA PIN_PD4 GPIO_ACTIVE_HIGH>;
225				scl-gpios = <&pioA PIN_PD5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
226				status = "okay";
227			};
228
229			adc: adc@fc030000 {
230				vddana-supply = <&vddana>;
231				vref-supply = <&advref>;
232				pinctrl-names = "default";
233				pinctrl-0 = <&pinctrl_mikrobus1_an &pinctrl_mikrobus2_an>;
234
235				status = "okay";
236			};
237
238			pinctrl@fc038000 {
239
240				pinctrl_can1_default: can1_default {
241					pinmux = <PIN_PC26__CANTX1>,
242						 <PIN_PC27__CANRX1>;
243					bias-disable;
244				};
245
246				pinctrl_flx3_default: flx3_default {
247					pinmux = <PIN_PC20__FLEXCOM3_IO0>,
248						 <PIN_PC19__FLEXCOM3_IO1>,
249						 <PIN_PC18__FLEXCOM3_IO2>,
250						 <PIN_PC21__FLEXCOM3_IO3>,
251						 <PIN_PC22__FLEXCOM3_IO4>;
252					bias-disable;
253				};
254
255				pinctrl_i2c1_default: i2c1_default {
256					pinmux = <PIN_PD4__TWD1>,
257						 <PIN_PD5__TWCK1>;
258					bias-disable;
259				};
260
261				pinctrl_i2c1_gpio: i2c1_gpio {
262                                        pinmux = <PIN_PD4__GPIO>,
263                                                 <PIN_PD5__GPIO>;
264                                        bias-disable;
265                                };
266
267
268				pinctrl_isc_base: isc_base {
269					pinmux = <PIN_PC21__ISC_PCK>,
270						 <PIN_PC22__ISC_VSYNC>,
271						 <PIN_PC23__ISC_HSYNC>,
272						 <PIN_PC24__ISC_MCK>;
273					bias-disable;
274				};
275
276				pinctrl_isc_data_8bit: isc_data_8bit {
277					pinmux = <PIN_PC20__ISC_D11>,
278						 <PIN_PC19__ISC_D10>,
279						 <PIN_PC18__ISC_D9>,
280						 <PIN_PC17__ISC_D8>,
281						 <PIN_PC16__ISC_D7>,
282						 <PIN_PC15__ISC_D6>,
283						 <PIN_PC14__ISC_D5>,
284						 <PIN_PC13__ISC_D4>;
285					bias-disable;
286				};
287
288				pinctrl_isc_data_9_10: isc_data_9_10 {
289					pinmux = <PIN_PC12__ISC_D3>,
290						 <PIN_PC11__ISC_D2>;
291					bias-disable;
292				};
293
294				pinctrl_isc_data_11_12: isc_data_11_12 {
295					pinmux = <PIN_PC10__ISC_D1>,
296						 <PIN_PC9__ISC_D0>;
297					bias-disable;
298				};
299
300				pinctrl_key_gpio_default: key_gpio_default {
301					pinmux = <PIN_PA29__GPIO>;
302					bias-pull-up;
303				};
304
305				pinctrl_led_gpio_default: led_gpio_default {
306					pinmux = <PIN_PA10__GPIO>,
307						 <PIN_PB1__GPIO>,
308						 <PIN_PA31__GPIO>;
309					bias-pull-up;
310				};
311
312				pinctrl_sdmmc0_default: sdmmc0_default {
313					cmd_data {
314						pinmux = <PIN_PA1__SDMMC0_CMD>,
315							 <PIN_PA2__SDMMC0_DAT0>,
316							 <PIN_PA3__SDMMC0_DAT1>,
317							 <PIN_PA4__SDMMC0_DAT2>,
318							 <PIN_PA5__SDMMC0_DAT3>,
319							 <PIN_PA6__SDMMC0_DAT4>,
320							 <PIN_PA7__SDMMC0_DAT5>,
321							 <PIN_PA8__SDMMC0_DAT6>,
322							 <PIN_PA9__SDMMC0_DAT7>;
323						bias-disable;
324					};
325
326					ck_cd_vddsel {
327						pinmux = <PIN_PA0__SDMMC0_CK>,
328							 <PIN_PA11__SDMMC0_VDDSEL>,
329							 <PIN_PA13__SDMMC0_CD>;
330						bias-disable;
331					};
332				};
333
334				pinctrl_sdmmc1_default: sdmmc1_default {
335					cmd_data {
336						pinmux = <PIN_PA28__SDMMC1_CMD>,
337							 <PIN_PA18__SDMMC1_DAT0>,
338							 <PIN_PA19__SDMMC1_DAT1>,
339							 <PIN_PA20__SDMMC1_DAT2>,
340							 <PIN_PA21__SDMMC1_DAT3>;
341						bias-disable;
342					};
343
344					conf-ck_cd {
345						pinmux = <PIN_PA22__SDMMC1_CK>,
346							 <PIN_PA30__SDMMC1_CD>;
347						bias-disable;
348					};
349				};
350
351				pinctrl_spi0_default: spi0_default {
352					pinmux = <PIN_PA14__SPI0_SPCK>,
353						 <PIN_PA15__SPI0_MOSI>,
354						 <PIN_PA16__SPI0_MISO>,
355						 <PIN_PA17__SPI0_NPCS0>;
356					bias-disable;
357				};
358
359				pinctrl_uart1_default: uart1_default {
360					pinmux = <PIN_PD2__URXD1>,
361						 <PIN_PD3__UTXD1>;
362					bias-disable;
363				};
364
365				pinctrl_uart3_default: uart3_default {
366					pinmux = <PIN_PC12__URXD3>,
367						 <PIN_PC13__UTXD3>;
368					bias-disable;
369				};
370
371				pinctrl_usb_default: usb_default {
372					pinmux = <PIN_PA27__GPIO>,
373						 <PIN_PD19__GPIO>;
374					bias-disable;
375				};
376
377				pinctrl_usba_vbus: usba_vbus {
378					pinmux = <PIN_PD20__GPIO>;
379					bias-disable;
380				};
381
382				pinctrl_mikrobus1_an: mikrobus1_an {
383					pinmux = <PIN_PD25__GPIO>;
384					bias-disable;
385				};
386
387				pinctrl_mikrobus2_an: mikrobus2_an {
388					pinmux = <PIN_PD26__GPIO>;
389					bias-disable;
390				};
391
392				pinctrl_mikrobus1_rst: mikrobus1_rst {
393					pinmux = <PIN_PB2__GPIO>;
394					bias-disable;
395				};
396
397				pinctrl_mikrobus2_rst: mikrobus2_rst {
398					pinmux = <PIN_PA26__GPIO>;
399					bias-disable;
400				};
401
402				pinctrl_mikrobus1_spi_cs: mikrobus1_spi_cs {
403					pinmux = <PIN_PD0__FLEXCOM4_IO4>;
404					bias-disable;
405				};
406
407				pinctrl_mikrobus2_spi_cs: mikrobus2_spi_cs {
408					pinmux = <PIN_PC31__FLEXCOM4_IO3>;
409					bias-disable;
410				};
411
412				pinctrl_mikrobus_spi: mikrobus_spi {
413					pinmux = <PIN_PC28__FLEXCOM4_IO0>,
414						 <PIN_PC29__FLEXCOM4_IO1>,
415						 <PIN_PC30__FLEXCOM4_IO2>;
416					bias-disable;
417				};
418
419				pinctrl_mikrobus1_pwm: mikrobus1_pwm {
420					pinmux = <PIN_PB1__PWML1>;
421					bias-disable;
422				};
423
424				pinctrl_mikrobus2_pwm: mikrobus2_pwm {
425					pinmux = <PIN_PA31__PWML0>;
426					bias-disable;
427				};
428
429				pinctrl_mikrobus1_int: mikrobus1_int {
430					pinmux = <PIN_PB0__GPIO>;
431					bias-disable;
432				};
433
434				pinctrl_mikrobus2_int: mikrobus2_int {
435					pinmux = <PIN_PA25__GPIO>;
436					bias-disable;
437				};
438
439				pinctrl_mikrobus1_uart: mikrobus1_uart {
440					pinmux = <PIN_PB3__URXD4>,
441						 <PIN_PB4__UTXD4>;
442					bias-disable;
443				};
444
445				pinctrl_mikrobus2_uart: mikrobus2_uart {
446					pinmux = <PIN_PD23__URXD2>,
447						 <PIN_PD24__UTXD2>;
448					bias-disable;
449				};
450
451				pinctrl_mikrobus_i2c: mikrobus1_i2c {
452					pinmux = <PIN_PA24__FLEXCOM1_IO0>,
453						 <PIN_PA23__FLEXCOM1_IO1>;
454					bias-disable;
455				};
456
457				pinctrl_i2c3_gpio: i2c3_gpio {
458					pinmux = <PIN_PA24__GPIO>,
459						 <PIN_PA23__GPIO>;
460					bias-disable;
461				};
462
463				pinctrl_flx4_default: flx4_uart_default {
464					pinmux = <PIN_PC28__FLEXCOM4_IO0>,
465						 <PIN_PC29__FLEXCOM4_IO1>,
466						 <PIN_PC30__FLEXCOM4_IO2>,
467						 <PIN_PC31__FLEXCOM4_IO3>,
468						 <PIN_PD0__FLEXCOM4_IO4>;
469					bias-disable;
470				};
471			};
472
473			can1: can@fc050000 {
474				pinctrl-names = "default";
475				pinctrl-0 = <&pinctrl_can1_default>;
476				status = "okay";
477			};
478		};
479	};
480
481	gpio-keys {
482		compatible = "gpio-keys";
483
484		pinctrl-names = "default";
485		pinctrl-0 = <&pinctrl_key_gpio_default>;
486
487		button {
488			label = "USER";
489			gpios = <&pioA PIN_PA29 GPIO_ACTIVE_LOW>;
490			linux,code = <KEY_PROG1>;
491			wakeup-source;
492		};
493	};
494
495	leds {
496		compatible = "gpio-leds";
497		pinctrl-names = "default";
498		pinctrl-0 = <&pinctrl_led_gpio_default>;
499		status = "okay"; /* Conflict with pwm0. */
500
501		led-red {
502			label = "red";
503			gpios = <&pioA PIN_PA10 GPIO_ACTIVE_HIGH>;
504		};
505
506		led-green {
507			label = "green";
508			gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;
509		};
510
511		led-blue {
512			label = "blue";
513			gpios = <&pioA PIN_PA31 GPIO_ACTIVE_HIGH>;
514			linux,default-trigger = "heartbeat";
515		};
516	};
517
518	vddin_3v3: fixed-regulator-vddin_3v3 {
519		compatible = "regulator-fixed";
520
521		regulator-name = "VDDIN_3V3";
522		regulator-min-microvolt = <3300000>;
523		regulator-max-microvolt = <3300000>;
524		regulator-always-on;
525		regulator-boot-on;
526		status = "okay";
527	};
528
529	vddana: fixed-regulator-vddana {
530		compatible = "regulator-fixed";
531
532		regulator-name = "VDDANA";
533		regulator-min-microvolt = <3300000>;
534		regulator-max-microvolt = <3300000>;
535		regulator-always-on;
536		regulator-boot-on;
537		vin-supply = <&vddin_3v3>;
538		status = "okay";
539	};
540
541	advref: fixed-regulator-advref {
542		compatible = "regulator-fixed";
543
544		regulator-name = "advref";
545		regulator-min-microvolt = <3300000>;
546		regulator-max-microvolt = <3300000>;
547		regulator-always-on;
548		regulator-boot-on;
549		vin-supply = <&vddana>;
550		status = "okay";
551	};
552};
553