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/input/input.h>
16 #include <dt-bindings/mfd/atmel-flexcom.h>
19 model = "Microchip SAMA5D2-ICP";
20 compatible = "microchip,sama5d2-icp", "atmel,sama5d27", "atmel,sama5d2", "atmel,sama5";
23 serial0 = &uart0; /* debug uart0 + mikro BUS 1 */
24 serial1 = &uart1; /* mikro BUS 3 */
25 serial3 = &uart3; /* mikro BUS 2 */
26 serial5 = &uart7; /* flx2 */
32 stdout-path = "serial0:115200n8";
37 clock-frequency = <32768>;
41 clock-frequency = <12000000>;
46 compatible = "gpio-keys";
48 pinctrl-names = "default";
49 pinctrl-0 = <&pinctrl_key_gpio_default>;
54 gpios = <&pioA PIN_PD0 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_PROG1>;
61 compatible = "gpio-leds";
62 pinctrl-names = "default";
63 pinctrl-0 = <&pinctrl_led_gpio_default>;
64 status = "okay"; /* conflict with pwm0 */
68 gpios = <&pioA PIN_PB0 GPIO_ACTIVE_HIGH>;
73 gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;
78 gpios = <&pioA PIN_PA31 GPIO_ACTIVE_HIGH>;
79 linux,default-trigger = "heartbeat";
85 vddana-supply = <&vdd_io_reg>;
86 vref-supply = <&vdd_io_reg>;
87 pinctrl-names = "default";
88 pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
93 pinctrl-names = "default";
94 pinctrl-0 = <&pinctrl_can0_default>;
99 pinctrl-names = "default";
100 pinctrl-0 = <&pinctrl_can1_default>;
104 &flx0 { /* mikrobus2 spi */
105 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
110 cs-gpios = <&pioA PIN_PC0 GPIO_ACTIVE_LOW>;
111 pinctrl-names = "default";
112 pinctrl-0 = <&pinctrl_mikrobus2_spi &pinctrl_ksz_spi_cs>;
114 #address-cells = <1>;
118 compatible = "microchip,ksz8563";
120 reset-gpios = <&pioA PIN_PD4 GPIO_ACTIVE_LOW>;
122 spi-max-frequency = <500000>;
127 #address-cells = <1>;
155 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
159 pinctrl-0 = <&pinctrl_flx2_default>;
160 pinctrl-names = "default";
163 status = "okay"; /* Conflict w/ qspi1. */
167 &flx3 { /* mikrobus1 spi */
168 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
173 pinctrl-names = "default";
174 pinctrl-0 = <&pinctrl_mikrobus1_spi &pinctrl_mikrobus1_spi_cs>;
180 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
185 pinctrl-names = "default";
186 pinctrl-0 = <&pinctrl_flx4_default>;
188 i2c-digital-filter-width-ns = <35>;
192 compatible = "microchip,mcp16502";
195 lpm-gpios = <&pioBU 7 GPIO_ACTIVE_LOW>;
199 regulator-name = "VDD_IO";
200 regulator-min-microvolt = <1200000>;
201 regulator-max-microvolt = <3700000>;
202 regulator-initial-mode = <2>;
203 regulator-allowed-modes = <2>, <4>;
206 regulator-state-standby {
207 regulator-on-in-suspend;
208 regulator-mode = <4>;
211 regulator-state-mem {
212 regulator-off-in-suspend;
213 regulator-mode = <4>;
218 regulator-name = "VDD_DDR";
219 regulator-min-microvolt = <600000>;
220 regulator-max-microvolt = <1850000>;
221 regulator-initial-mode = <2>;
222 regulator-allowed-modes = <2>, <4>;
225 regulator-state-standby {
226 regulator-on-in-suspend;
227 regulator-mode = <4>;
230 regulator-state-mem {
231 regulator-on-in-suspend;
232 regulator-mode = <4>;
237 regulator-name = "VDD_CORE";
238 regulator-min-microvolt = <600000>;
239 regulator-max-microvolt = <1850000>;
240 regulator-initial-mode = <2>;
241 regulator-allowed-modes = <2>, <4>;
244 regulator-state-standby {
245 regulator-on-in-suspend;
246 regulator-mode = <4>;
249 regulator-state-mem {
250 regulator-off-in-suspend;
251 regulator-mode = <4>;
256 regulator-name = "VDD_OTHER";
257 regulator-min-microvolt = <600000>;
258 regulator-max-microvolt = <1850000>;
259 regulator-initial-mode = <2>;
260 regulator-allowed-modes = <2>, <4>;
263 regulator-state-standby {
264 regulator-on-in-suspend;
265 regulator-mode = <4>;
268 regulator-state-mem {
269 regulator-off-in-suspend;
270 regulator-mode = <4>;
275 regulator-name = "LDO1";
276 regulator-min-microvolt = <1200000>;
277 regulator-max-microvolt = <3700000>;
280 regulator-state-standby {
281 regulator-on-in-suspend;
284 regulator-state-mem {
285 regulator-off-in-suspend;
290 regulator-name = "LDO2";
291 regulator-min-microvolt = <1200000>;
292 regulator-max-microvolt = <3700000>;
295 regulator-state-standby {
296 regulator-on-in-suspend;
299 regulator-state-mem {
300 regulator-off-in-suspend;
309 &i2c0 { /* mikrobus i2c */
310 pinctrl-names = "default";
311 pinctrl-0 = <&pinctrl_mikrobus_i2c>;
313 i2c-digital-filter-width-ns = <35>;
319 pinctrl-names = "default";
320 pinctrl-0 = <&pinctrl_i2c1_default>;
322 i2c-digital-filter-width-ns = <35>;
326 compatible = "atmel,24c32";
333 compatible = "atmel,24c32";
340 compatible = "atmel,24c32";
348 pinctrl-names = "default";
349 pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq &pinctrl_macb0_rst>;
360 pinctrl_adc_default: adc_default {
361 pinmux = <PIN_PD24__GPIO>,
368 * The ADTRG pin can work on any edge type.
369 * In here it's being pulled up, so need to
370 * connect it to ground to get an edge e.g.
371 * Trigger can be configured on falling, rise
372 * or any edge, and the pull-up can be changed
373 * to pull-down or left floating according to
376 pinctrl_adtrg_default: adtrg_default {
377 pinmux = <PIN_PD31__ADTRG>;
381 pinctrl_flx4_default: flx4_default {
382 pinmux = <PIN_PC28__FLEXCOM4_IO0>,
383 <PIN_PC29__FLEXCOM4_IO1>;
387 pinctrl_can0_default: can0_default {
388 pinmux = <PIN_PC10__CANTX0>,
393 pinctrl_can1_default: can1_default {
394 pinmux = <PIN_PC26__CANTX1>,
399 pinctrl_i2c1_default: i2c1_default {
400 pinmux = <PIN_PD19__TWD1>,
405 pinctrl_key_gpio_default: key_gpio_default {
406 pinmux = <PIN_PD0__GPIO>;
410 pinctrl_led_gpio_default: led_gpio_default {
411 pinmux = <PIN_PB0__GPIO>,
417 pinctrl_qspi1_default: qspi1_default {
418 pinmux = <PIN_PA6__QSPI1_SCK>,
419 <PIN_PA7__QSPI1_IO0>,
420 <PIN_PA8__QSPI1_IO1>,
421 <PIN_PA9__QSPI1_IO2>,
422 <PIN_PA10__QSPI1_IO3>,
423 <PIN_PA11__QSPI1_CS>;
427 pinctrl_sdmmc0_default: sdmmc0_default {
429 pinmux = <PIN_PA1__SDMMC0_CMD>,
430 <PIN_PA2__SDMMC0_DAT0>,
431 <PIN_PA3__SDMMC0_DAT1>,
432 <PIN_PA4__SDMMC0_DAT2>,
433 <PIN_PA5__SDMMC0_DAT3>;
438 pinmux = <PIN_PA0__SDMMC0_CK>,
439 <PIN_PA13__SDMMC0_CD>;
444 pinctrl_sdmmc1_default: sdmmc1_default {
446 pinmux = <PIN_PA18__SDMMC1_DAT0>,
447 <PIN_PA19__SDMMC1_DAT1>,
448 <PIN_PA20__SDMMC1_DAT2>,
449 <PIN_PA21__SDMMC1_DAT3>;
454 pinmux = <PIN_PA22__SDMMC1_CK>,
455 <PIN_PA28__SDMMC1_CMD>;
460 pinctrl_mikrobus_i2c: mikrobus_i2c {
461 pinmux = <PIN_PD22__TWCK0>,
466 pinctrl_mikrobus1_an: mikrobus1_an {
467 pinmux = <PIN_PD26__GPIO>;
471 pinctrl_mikrobus1_rst: mikrobus1_rst {
472 pinmux = <PIN_PC5__GPIO>;
476 pinctrl_mikrobus1_spi_cs: mikrobus1_spi_cs {
477 pinmux = <PIN_PC21__FLEXCOM3_IO3>;
481 pinctrl_mikrobus1_spi: mikrobus1_spi {
482 pinmux = <PIN_PC20__FLEXCOM3_IO0>,
483 <PIN_PC19__FLEXCOM3_IO1>,
484 <PIN_PC18__FLEXCOM3_IO2>;
488 pinctrl_mikrobus1_pwm: mikrobus1_pwm {
489 pinmux = <PIN_PC4__TIOB1>;
493 pinctrl_mikrobus1_int: mikrobus1_int {
494 pinmux = <PIN_PC3__GPIO>;
498 pinctrl_mikrobus1_uart: mikrobus1_uart {
499 pinmux = <PIN_PB26__URXD0>,
504 pinctrl_mikrobus2_an: mikrobus2_an {
505 pinmux = <PIN_PD25__GPIO>;
509 pinctrl_mikrobus2_rst: mikrobus2_rst {
510 pinmux = <PIN_PB24__GPIO>;
514 pinctrl_mikrobus2_spi_cs: mikrobus2_spi_cs {
515 pinmux = <PIN_PB31__FLEXCOM0_IO3>;
519 pinctrl_mikrobus2_spi: mikrobus2_spi {
520 pinmux = <PIN_PB28__FLEXCOM0_IO0>,
521 <PIN_PB29__FLEXCOM0_IO1>,
522 <PIN_PB30__FLEXCOM0_IO2>;
526 pinctrl_ksz_spi_cs: ksz_spi_cs {
527 pinmux = <PIN_PC0__GPIO>;
531 pinctrl_mikrobus2_pwm: mikrobus2_pwm {
532 pinmux = <PIN_PB23__TIOB2>;
536 pinctrl_mikrobus2_int: mikrobus2_int {
537 pinmux = <PIN_PB22__GPIO>;
541 pinctrl_mikrobus2_uart: mikrobus2_uart {
542 pinmux = <PIN_PC12__URXD3>,
547 pinctrl_mikrobus3_an: mikrobus3_an {
548 pinmux = <PIN_PD24__GPIO>;
552 pinctrl_mikrobus3_rst: mikrobus3_rst {
553 pinmux = <PIN_PB21__GPIO>;
557 pinctrl_mikrobus3_spi_cs: mikrobus3_spi_cs {
558 pinmux = <PIN_PA17__SPI0_NPCS0>;
562 pinctrl_mikrobus3_spi: mikrobus3_spi {
563 pinmux = <PIN_PA14__SPI0_SPCK>,
564 <PIN_PA16__SPI0_MISO>,
565 <PIN_PA15__SPI0_MOSI>;
569 pinctrl_mikrobus3_pwm: mikrobus3_pwm {
570 pinmux = <PIN_PB20__TIOB3>;
574 pinctrl_mikrobus3_int: mikrobus3_int {
575 pinmux = <PIN_PB18__GPIO>;
579 pinctrl_mikrobus3_uart: mikrobus3_uart {
580 pinmux = <PIN_PC7__URXD1>,
585 pinctrl_usb_default: usb_default {
586 pinmux = <PIN_PC17__GPIO>;
590 pinctrl_usba_vbus: usba_vbus {
591 pinmux = <PIN_PD23__GPIO>;
595 pinctrl_pwm0_pwm2_default: pwm0_pwm2_default {
596 pinmux = <PIN_PB5__PWMH2>,
601 pinctrl_macb0_default: macb0_default {
602 pinmux = <PIN_PD1__GRXCK>,
621 pinctrl_macb0_phy_irq: macb0_phy_irq {
622 pinmux = <PIN_PD3__GPIO>;
626 pinctrl_macb0_rst: macb0_sw_rst {
627 pinmux = <PIN_PD4__GPIO>;
631 pinctrl_flx2_default: flx2_default {
632 pinmux = <PIN_PA6__FLEXCOM2_IO0>,
633 <PIN_PA7__FLEXCOM2_IO1>,
634 <PIN_PA9__FLEXCOM2_IO3>,
635 <PIN_PA10__FLEXCOM2_IO4>;
641 pinctrl-names = "default";
642 pinctrl-0 = <&pinctrl_pwm0_pwm2_default>;
643 status = "disabled"; /* conflict with leds, HSIC */
647 pinctrl-names = "default";
648 pinctrl-0 = <&pinctrl_qspi1_default>;
649 status = "disabled"; /* Conflict with wilc_pwrseq, flx2 */
652 #address-cells = <1>;
654 compatible = "jedec,spi-nor";
656 spi-max-frequency = <80000000>;
657 spi-tx-bus-width = <4>;
658 spi-rx-bus-width = <4>;
662 label = "qspi: at91bootstrap";
663 reg = <0x00000000 0x00040000>;
667 label = "qspi: bootloader";
668 reg = <0x00040000 0x000c0000>;
671 bootloaderenvred@100000 {
672 label = "qspi: bootloader env redundant";
673 reg = <0x00100000 0x00040000>;
676 bootloaderenv@140000 {
677 label = "qspi: bootloader env";
678 reg = <0x00140000 0x00040000>;
682 label = "qspi: device tree";
683 reg = <0x00180000 0x00080000>;
687 label = "qspi: kernel";
688 reg = <0x00200000 0x00600000>;
696 pinctrl-names = "default";
697 pinctrl-0 = <&pinctrl_sdmmc0_default>;
701 &shutdown_controller {
702 debounce-delay-us = <976>;
703 atmel,wakeup-rtc-timer;
710 &spi0 { /* mikrobus3 spi */
711 pinctrl-names = "default";
712 pinctrl-0 = <&pinctrl_mikrobus3_spi &pinctrl_mikrobus3_spi_cs>;
718 compatible = "atmel,tcb-timer";
723 compatible = "atmel,tcb-timer";
729 pinctrl-names = "default";
730 pinctrl-0 = <&pinctrl_mikrobus1_uart>;
737 pinctrl-names = "default";
738 pinctrl-0 = <&pinctrl_mikrobus3_uart>;
745 pinctrl-names = "default";
746 pinctrl-0 = <&pinctrl_mikrobus2_uart>;
753 atmel,vbus-gpio = <&pioA PIN_PD23 GPIO_ACTIVE_HIGH>;
754 pinctrl-names = "default";
755 pinctrl-0 = <&pinctrl_usba_vbus>;
761 pinctrl-names = "default";
762 pinctrl-0 = <&pinctrl_usb_default>;