1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * at91-sama5d2_icp.dts - Device Tree file for SAMA5D2-ICP board
5 * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries
7 * Author: Radu Pirea & Razvan Stefanescu,
8 * Codrin Ciubotariu <codrin.ciubotariu@microchip.com>,
9 * Cristian Birsan <cristian.birsan@microchip.com>
12 #include "sama5d2.dtsi"
13 #include "sama5d2-pinfunc.h"
14 #include <dt-bindings/gpio/gpio.h>
15 #include <dt-bindings/mfd/atmel-flexcom.h>
18 model = "Microchip SAMA5D2-ICP";
19 compatible = "microchip,sama5d2-icp", "atmel,sama5d27", "atmel,sama5d2", "atmel,sama5";
22 serial0 = &uart0; /* debug uart0 + mikro BUS 1 */
23 serial1 = &uart1; /* mikro BUS 3 */
24 serial3 = &uart3; /* mikro BUS 2 */
25 serial5 = &uart7; /* flx2 */
31 stdout-path = "serial0:115200n8";
36 clock-frequency = <32768>;
40 clock-frequency = <12000000>;
45 compatible = "gpio-keys";
47 pinctrl-names = "default";
48 pinctrl-0 = <&pinctrl_key_gpio_default>;
53 gpios = <&pioA PIN_PD0 GPIO_ACTIVE_LOW>;
60 compatible = "gpio-leds";
61 pinctrl-names = "default";
62 pinctrl-0 = <&pinctrl_led_gpio_default>;
63 status = "okay"; /* conflict with pwm0 */
67 gpios = <&pioA PIN_PB0 GPIO_ACTIVE_HIGH>;
72 gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;
77 gpios = <&pioA PIN_PA31 GPIO_ACTIVE_HIGH>;
78 linux,default-trigger = "heartbeat";
84 vddana-supply = <&vdd_io_reg>;
85 vref-supply = <&vdd_io_reg>;
86 pinctrl-names = "default";
87 pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
92 pinctrl-names = "default";
93 pinctrl-0 = <&pinctrl_can0_default>;
98 pinctrl-names = "default";
99 pinctrl-0 = <&pinctrl_can1_default>;
103 &flx0 { /* mikrobus2 spi */
104 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
109 cs-gpios = <&pioA PIN_PC0 GPIO_ACTIVE_LOW>;
110 pinctrl-names = "default";
111 pinctrl-0 = <&pinctrl_mikrobus2_spi &pinctrl_ksz_spi_cs>;
113 #address-cells = <1>;
117 compatible = "microchip,ksz8563";
119 reset-gpios = <&pioA PIN_PD4 GPIO_ACTIVE_LOW>;
121 spi-max-frequency = <500000>;
126 #address-cells = <1>;
154 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
158 pinctrl-0 = <&pinctrl_flx2_default>;
159 pinctrl-names = "default";
162 status = "okay"; /* Conflict w/ qspi1. */
166 &flx3 { /* mikrobus1 spi */
167 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
172 pinctrl-names = "default";
173 pinctrl-0 = <&pinctrl_mikrobus1_spi &pinctrl_mikrobus1_spi_cs>;
179 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
184 pinctrl-names = "default";
185 pinctrl-0 = <&pinctrl_flx4_default>;
189 compatible = "microchip,mcp16502";
192 lpm-gpios = <&pioBU 7 GPIO_ACTIVE_LOW>;
196 regulator-name = "VDD_IO";
197 regulator-min-microvolt = <1200000>;
198 regulator-max-microvolt = <3700000>;
199 regulator-initial-mode = <2>;
200 regulator-allowed-modes = <2>, <4>;
203 regulator-state-standby {
204 regulator-on-in-suspend;
205 regulator-mode = <4>;
208 regulator-state-mem {
209 regulator-off-in-suspend;
210 regulator-mode = <4>;
215 regulator-name = "VDD_DDR";
216 regulator-min-microvolt = <600000>;
217 regulator-max-microvolt = <1850000>;
218 regulator-initial-mode = <2>;
219 regulator-allowed-modes = <2>, <4>;
222 regulator-state-standby {
223 regulator-on-in-suspend;
224 regulator-mode = <4>;
227 regulator-state-mem {
228 regulator-on-in-suspend;
229 regulator-mode = <4>;
234 regulator-name = "VDD_CORE";
235 regulator-min-microvolt = <600000>;
236 regulator-max-microvolt = <1850000>;
237 regulator-initial-mode = <2>;
238 regulator-allowed-modes = <2>, <4>;
241 regulator-state-standby {
242 regulator-on-in-suspend;
243 regulator-mode = <4>;
246 regulator-state-mem {
247 regulator-off-in-suspend;
248 regulator-mode = <4>;
253 regulator-name = "VDD_OTHER";
254 regulator-min-microvolt = <600000>;
255 regulator-max-microvolt = <1850000>;
256 regulator-initial-mode = <2>;
257 regulator-allowed-modes = <2>, <4>;
260 regulator-state-standby {
261 regulator-on-in-suspend;
262 regulator-mode = <4>;
265 regulator-state-mem {
266 regulator-off-in-suspend;
267 regulator-mode = <4>;
272 regulator-name = "LDO1";
273 regulator-min-microvolt = <1200000>;
274 regulator-max-microvolt = <3700000>;
277 regulator-state-standby {
278 regulator-on-in-suspend;
281 regulator-state-mem {
282 regulator-off-in-suspend;
287 regulator-name = "LDO2";
288 regulator-min-microvolt = <1200000>;
289 regulator-max-microvolt = <3700000>;
292 regulator-state-standby {
293 regulator-on-in-suspend;
296 regulator-state-mem {
297 regulator-off-in-suspend;
306 &i2c0 { /* mikrobus i2c */
307 pinctrl-names = "default";
308 pinctrl-0 = <&pinctrl_mikrobus_i2c>;
314 pinctrl-names = "default";
315 pinctrl-0 = <&pinctrl_i2c1_default>;
319 compatible = "atmel,24c32";
326 compatible = "atmel,24c32";
333 compatible = "atmel,24c32";
341 pinctrl-names = "default";
342 pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq &pinctrl_macb0_rst>;
353 pinctrl_adc_default: adc_default {
354 pinmux = <PIN_PD24__GPIO>,
361 * The ADTRG pin can work on any edge type.
362 * In here it's being pulled up, so need to
363 * connect it to ground to get an edge e.g.
364 * Trigger can be configured on falling, rise
365 * or any edge, and the pull-up can be changed
366 * to pull-down or left floating according to
369 pinctrl_adtrg_default: adtrg_default {
370 pinmux = <PIN_PD31__ADTRG>;
374 pinctrl_flx4_default: flx4_default {
375 pinmux = <PIN_PC28__FLEXCOM4_IO0>,
376 <PIN_PC29__FLEXCOM4_IO1>;
380 pinctrl_can0_default: can0_default {
381 pinmux = <PIN_PC10__CANTX0>,
386 pinctrl_can1_default: can1_default {
387 pinmux = <PIN_PC26__CANTX1>,
392 pinctrl_i2c1_default: i2c1_default {
393 pinmux = <PIN_PD19__TWD1>,
398 pinctrl_key_gpio_default: key_gpio_default {
399 pinmux = <PIN_PD0__GPIO>;
403 pinctrl_led_gpio_default: led_gpio_default {
404 pinmux = <PIN_PB0__GPIO>,
410 pinctrl_qspi1_default: qspi1_default {
411 pinmux = <PIN_PA6__QSPI1_SCK>,
412 <PIN_PA7__QSPI1_IO0>,
413 <PIN_PA8__QSPI1_IO1>,
414 <PIN_PA9__QSPI1_IO2>,
415 <PIN_PA10__QSPI1_IO3>,
416 <PIN_PA11__QSPI1_CS>;
420 pinctrl_sdmmc0_default: sdmmc0_default {
422 pinmux = <PIN_PA1__SDMMC0_CMD>,
423 <PIN_PA2__SDMMC0_DAT0>,
424 <PIN_PA3__SDMMC0_DAT1>,
425 <PIN_PA4__SDMMC0_DAT2>,
426 <PIN_PA5__SDMMC0_DAT3>;
431 pinmux = <PIN_PA0__SDMMC0_CK>,
432 <PIN_PA13__SDMMC0_CD>;
437 pinctrl_sdmmc1_default: sdmmc1_default {
439 pinmux = <PIN_PA18__SDMMC1_DAT0>,
440 <PIN_PA19__SDMMC1_DAT1>,
441 <PIN_PA20__SDMMC1_DAT2>,
442 <PIN_PA21__SDMMC1_DAT3>;
447 pinmux = <PIN_PA22__SDMMC1_CK>,
448 <PIN_PA28__SDMMC1_CMD>;
453 pinctrl_mikrobus_i2c: mikrobus_i2c {
454 pinmux = <PIN_PD22__TWCK0>,
459 pinctrl_mikrobus1_an: mikrobus1_an {
460 pinmux = <PIN_PD26__GPIO>;
464 pinctrl_mikrobus1_rst: mikrobus1_rst {
465 pinmux = <PIN_PC5__GPIO>;
469 pinctrl_mikrobus1_spi_cs: mikrobus1_spi_cs {
470 pinmux = <PIN_PC21__FLEXCOM3_IO3>;
474 pinctrl_mikrobus1_spi: mikrobus1_spi {
475 pinmux = <PIN_PC20__FLEXCOM3_IO0>,
476 <PIN_PC19__FLEXCOM3_IO1>,
477 <PIN_PC18__FLEXCOM3_IO2>;
481 pinctrl_mikrobus1_pwm: mikrobus1_pwm {
482 pinmux = <PIN_PC4__TIOB1>;
486 pinctrl_mikrobus1_int: mikrobus1_int {
487 pinmux = <PIN_PC3__GPIO>;
491 pinctrl_mikrobus1_uart: mikrobus1_uart {
492 pinmux = <PIN_PB26__URXD0>,
497 pinctrl_mikrobus2_an: mikrobus2_an {
498 pinmux = <PIN_PD25__GPIO>;
502 pinctrl_mikrobus2_rst: mikrobus2_rst {
503 pinmux = <PIN_PB24__GPIO>;
507 pinctrl_mikrobus2_spi_cs: mikrobus2_spi_cs {
508 pinmux = <PIN_PB31__FLEXCOM0_IO3>;
512 pinctrl_mikrobus2_spi: mikrobus2_spi {
513 pinmux = <PIN_PB28__FLEXCOM0_IO0>,
514 <PIN_PB29__FLEXCOM0_IO1>,
515 <PIN_PB30__FLEXCOM0_IO2>;
519 pinctrl_ksz_spi_cs: ksz_spi_cs {
520 pinmux = <PIN_PC0__GPIO>;
524 pinctrl_mikrobus2_pwm: mikrobus2_pwm {
525 pinmux = <PIN_PB23__TIOB2>;
529 pinctrl_mikrobus2_int: mikrobus2_int {
530 pinmux = <PIN_PB22__GPIO>;
534 pinctrl_mikrobus2_uart: mikrobus2_uart {
535 pinmux = <PIN_PC12__URXD3>,
540 pinctrl_mikrobus3_an: mikrobus3_an {
541 pinmux = <PIN_PD24__GPIO>;
545 pinctrl_mikrobus3_rst: mikrobus3_rst {
546 pinmux = <PIN_PB21__GPIO>;
550 pinctrl_mikrobus3_spi_cs: mikrobus3_spi_cs {
551 pinmux = <PIN_PA17__SPI0_NPCS0>;
555 pinctrl_mikrobus3_spi: mikrobus3_spi {
556 pinmux = <PIN_PA14__SPI0_SPCK>,
557 <PIN_PA16__SPI0_MISO>,
558 <PIN_PA15__SPI0_MOSI>;
562 pinctrl_mikrobus3_pwm: mikrobus3_pwm {
563 pinmux = <PIN_PB20__TIOB3>;
567 pinctrl_mikrobus3_int: mikrobus3_int {
568 pinmux = <PIN_PB18__GPIO>;
572 pinctrl_mikrobus3_uart: mikrobus3_uart {
573 pinmux = <PIN_PC7__URXD1>,
578 pinctrl_usb_default: usb_default {
579 pinmux = <PIN_PC17__GPIO>;
583 pinctrl_usba_vbus: usba_vbus {
584 pinmux = <PIN_PD23__GPIO>;
588 pinctrl_pwm0_pwm2_default: pwm0_pwm2_default {
589 pinmux = <PIN_PB5__PWMH2>,
594 pinctrl_macb0_default: macb0_default {
595 pinmux = <PIN_PD1__GRXCK>,
614 pinctrl_macb0_phy_irq: macb0_phy_irq {
615 pinmux = <PIN_PD3__GPIO>;
619 pinctrl_macb0_rst: macb0_sw_rst {
620 pinmux = <PIN_PD4__GPIO>;
624 pinctrl_flx2_default: flx2_default {
625 pinmux = <PIN_PA6__FLEXCOM2_IO0>,
626 <PIN_PA7__FLEXCOM2_IO1>,
627 <PIN_PA9__FLEXCOM2_IO3>,
628 <PIN_PA10__FLEXCOM2_IO4>;
634 pinctrl-names = "default";
635 pinctrl-0 = <&pinctrl_pwm0_pwm2_default>;
636 status = "disabled"; /* conflict with leds, HSIC */
640 pinctrl-names = "default";
641 pinctrl-0 = <&pinctrl_qspi1_default>;
642 status = "disabled"; /* Conflict with wilc_pwrseq, flx2 */
645 #address-cells = <1>;
647 compatible = "jedec,spi-nor";
649 spi-max-frequency = <80000000>;
650 spi-tx-bus-width = <4>;
651 spi-rx-bus-width = <4>;
655 label = "qspi: at91bootstrap";
656 reg = <0x00000000 0x00040000>;
660 label = "qspi: bootloader";
661 reg = <0x00040000 0x000c0000>;
664 bootloaderenvred@100000 {
665 label = "qspi: bootloader env redundant";
666 reg = <0x00100000 0x00040000>;
669 bootloaderenv@140000 {
670 label = "qspi: bootloader env";
671 reg = <0x00140000 0x00040000>;
675 label = "qspi: device tree";
676 reg = <0x00180000 0x00080000>;
680 label = "qspi: kernel";
681 reg = <0x00200000 0x00600000>;
689 pinctrl-names = "default";
690 pinctrl-0 = <&pinctrl_sdmmc0_default>;
694 &shutdown_controller {
695 atmel,shdwc-debouncer = <976>;
696 atmel,wakeup-rtc-timer;
700 atmel,wakeup-type = "low";
704 &spi0 { /* mikrobus3 spi */
705 pinctrl-names = "default";
706 pinctrl-0 = <&pinctrl_mikrobus3_spi &pinctrl_mikrobus3_spi_cs>;
712 compatible = "atmel,tcb-timer";
717 compatible = "atmel,tcb-timer";
723 pinctrl-names = "default";
724 pinctrl-0 = <&pinctrl_mikrobus1_uart>;
731 pinctrl-names = "default";
732 pinctrl-0 = <&pinctrl_mikrobus3_uart>;
739 pinctrl-names = "default";
740 pinctrl-0 = <&pinctrl_mikrobus2_uart>;
747 atmel,vbus-gpio = <&pioA PIN_PD23 GPIO_ACTIVE_HIGH>;
748 pinctrl-names = "default";
749 pinctrl-0 = <&pinctrl_usba_vbus>;
755 pinctrl-names = "default";
756 pinctrl-0 = <&pinctrl_usb_default>;