1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * at91-sama7g5ek.dts - Device Tree file for SAMA7G5-EK board
5 * Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries
7 * Author: Eugen Hristev <eugen.hristev@microchip.com>
8 * Author: Claudiu Beznea <claudiu.beznea@microchip.com>
12 #include "sama7g5-pinfunc.h"
13 #include "sama7g5.dtsi"
14 #include <dt-bindings/mfd/atmel-flexcom.h>
15 #include <dt-bindings/input/input.h>
16 #include <dt-bindings/pinctrl/at91.h>
17 #include <dt-bindings/sound/microchip,pdmc.h>
20 model = "Microchip SAMA7G5-EK";
21 compatible = "microchip,sama7g5ek", "microchip,sama7g5", "microchip,sama7";
24 bootargs = "rw root=/dev/mmcblk1p2 rootfstype=ext4 rootwait";
25 stdout-path = "serial0:115200n8";
40 clock-frequency = <32768>;
44 clock-frequency = <24000000>;
49 compatible = "gpio-keys";
51 pinctrl-names = "default";
52 pinctrl-0 = <&pinctrl_key_gpio_default>;
56 gpios = <&pioA PIN_PA12 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_PROG1>;
63 compatible = "gpio-leds";
64 pinctrl-names = "default";
65 pinctrl-0 = <&pinctrl_led_gpio_default>;
66 status = "okay"; /* Conflict with pwm. */
70 gpios = <&pioA PIN_PB8 GPIO_ACTIVE_HIGH>;
75 gpios = <&pioA PIN_PA13 GPIO_ACTIVE_HIGH>;
80 gpios = <&pioA PIN_PD20 GPIO_ACTIVE_HIGH>;
81 linux,default-trigger = "heartbeat";
87 device_type = "memory";
88 reg = <0x60000000 0x20000000>;
92 compatible = "simple-audio-card";
93 simple-audio-card,name = "sama7g5ek audio";
96 simple-audio-card,dai-link@0 {
99 sound-dai = <&spdiftx>;
102 sound-dai = <&spdif_out>;
105 simple-audio-card,dai-link@1 {
108 sound-dai = <&spdifrx>;
111 sound-dai = <&spdif_in>;
117 #sound-dai-cells = <0>;
118 compatible = "linux,spdif-dir";
121 spdif_out: spdif-out {
122 #sound-dai-cells = <0>;
123 compatible = "linux,spdif-dit";
128 vddana-supply = <&vddout25>;
129 vref-supply = <&vddout25>;
130 pinctrl-names = "default";
131 pinctrl-0 = <&pinctrl_mikrobus1_an_default &pinctrl_mikrobus2_an_default>;
136 pinctrl-names = "default";
137 pinctrl-0 = <&pinctrl_can0_default>;
142 pinctrl-names = "default";
143 pinctrl-0 = <&pinctrl_can1_default>;
148 cpu-supply = <&vddcpu>;
152 pinctrl-names = "default";
153 pinctrl-0 = <&pinctrl_qspi>;
157 #address-cells = <1>;
159 compatible = "jedec,spi-nor";
161 spi-max-frequency = <133000000>;
162 spi-tx-bus-width = <8>;
163 spi-rx-bus-width = <8>;
167 label = "ospi: at91bootstrap";
172 label = "ospi: bootloader";
173 reg = <0x40000 0xc0000>;
176 bootloaderenvred@100000 {
177 label = "ospi: bootloader env redundant";
178 reg = <0x100000 0x40000>;
181 bootloaderenv@140000 {
182 label = "ospi: bootloader env";
183 reg = <0x140000 0x40000>;
187 label = "ospi: device tree";
188 reg = <0x180000 0x80000>;
192 label = "ospi: kernel";
193 reg = <0x200000 0x600000>;
197 label = "ospi: rootfs";
198 reg = <0x800000 0x7800000>;
217 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
221 pinctrl-names = "default";
222 pinctrl-0 = <&pinctrl_flx0_default>;
228 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
232 pinctrl-names = "default";
233 pinctrl-0 = <&pinctrl_i2c1_default>;
236 i2c-digital-filter-width-ns = <35>;
240 compatible = "microchip,mcp16502";
246 regulator-name = "VDD_IO";
247 regulator-min-microvolt = <3300000>;
248 regulator-max-microvolt = <3300000>;
249 regulator-initial-mode = <2>;
250 regulator-allowed-modes = <2>, <4>;
253 regulator-state-standby {
254 regulator-on-in-suspend;
255 regulator-suspend-microvolt = <3300000>;
256 regulator-mode = <4>;
259 regulator-state-mem {
260 regulator-off-in-suspend;
261 regulator-mode = <4>;
266 regulator-name = "VDD_DDR";
267 regulator-min-microvolt = <1350000>;
268 regulator-max-microvolt = <1350000>;
269 regulator-initial-mode = <2>;
270 regulator-allowed-modes = <2>, <4>;
273 regulator-state-standby {
274 regulator-on-in-suspend;
275 regulator-suspend-microvolt = <1350000>;
276 regulator-mode = <4>;
279 regulator-state-mem {
280 regulator-on-in-suspend;
281 regulator-suspend-microvolt = <1350000>;
282 regulator-mode = <4>;
287 regulator-name = "VDD_CORE";
288 regulator-min-microvolt = <1150000>;
289 regulator-max-microvolt = <1150000>;
290 regulator-initial-mode = <2>;
291 regulator-allowed-modes = <2>, <4>;
294 regulator-state-standby {
295 regulator-on-in-suspend;
296 regulator-suspend-voltage = <1150000>;
297 regulator-mode = <4>;
300 regulator-state-mem {
301 regulator-off-in-suspend;
302 regulator-mode = <4>;
307 regulator-name = "VDD_OTHER";
308 regulator-min-microvolt = <1050000>;
309 regulator-max-microvolt = <1250000>;
310 regulator-initial-mode = <2>;
311 regulator-allowed-modes = <2>, <4>;
312 regulator-ramp-delay = <3125>;
315 regulator-state-standby {
316 regulator-on-in-suspend;
317 regulator-suspend-voltage = <1050000>;
318 regulator-mode = <4>;
321 regulator-state-mem {
322 regulator-off-in-suspend;
323 regulator-mode = <4>;
328 regulator-name = "LDO1";
329 regulator-min-microvolt = <1800000>;
330 regulator-max-microvolt = <1800000>;
333 regulator-state-standby {
334 regulator-suspend-voltage = <1800000>;
335 regulator-on-in-suspend;
338 regulator-state-mem {
339 regulator-off-in-suspend;
344 regulator-name = "LDO2";
345 regulator-min-microvolt = <1200000>;
346 regulator-max-microvolt = <3700000>;
348 regulator-state-standby {
349 regulator-suspend-voltage = <1800000>;
350 regulator-on-in-suspend;
353 regulator-state-mem {
354 regulator-off-in-suspend;
363 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
367 pinctrl-names = "default";
368 pinctrl-0 = <&pinctrl_flx3_default>;
374 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
378 pinctrl-names = "default";
379 pinctrl-0 = <&pinctrl_flx4_default>;
385 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
389 pinctrl-names = "default";
390 pinctrl-0 = <&pinctrl_flx7_default>;
396 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
400 pinctrl-names = "default";
401 pinctrl-0 = <&pinctrl_i2c8_default>;
404 i2c-digital-filter-width-ns = <35>;
410 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
414 pinctrl-names = "default";
415 pinctrl-0 = <&pinctrl_i2c9_default>;
418 i2c-digital-filter-width-ns = <35>;
424 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_SPI>;
428 pinctrl-names = "default";
429 pinctrl-0 = <&pinctrl_mikrobus1_spi &pinctrl_mikrobus1_spi_cs>;
435 #address-cells = <1>;
437 pinctrl-names = "default";
438 pinctrl-0 = <&pinctrl_gmac0_default
439 &pinctrl_gmac0_mdio_default
440 &pinctrl_gmac0_txck_default
441 &pinctrl_gmac0_phy_irq>;
442 phy-mode = "rgmii-id";
447 interrupt-parent = <&pioA>;
448 interrupts = <PIN_PA31 IRQ_TYPE_LEVEL_LOW>;
453 #address-cells = <1>;
455 pinctrl-names = "default";
456 pinctrl-0 = <&pinctrl_gmac1_default
457 &pinctrl_gmac1_mdio_default
458 &pinctrl_gmac1_phy_irq>;
460 status = "okay"; /* Conflict with pdmc0. */
464 interrupt-parent = <&pioA>;
465 interrupts = <PIN_PA21 IRQ_TYPE_LEVEL_LOW>;
470 pinctrl-names = "default";
471 pinctrl-0 = <&pinctrl_i2s0_default>;
475 #sound-dai-cells = <0>;
476 microchip,mic-pos = <MCHP_PDMC_DS0 MCHP_PDMC_CLK_NEGATIVE>, /* MIC 1 */
477 <MCHP_PDMC_DS1 MCHP_PDMC_CLK_NEGATIVE>, /* MIC 2 */
478 <MCHP_PDMC_DS0 MCHP_PDMC_CLK_POSITIVE>, /* MIC 3 */
479 <MCHP_PDMC_DS1 MCHP_PDMC_CLK_POSITIVE>; /* MIC 4 */
480 status = "disabled"; /* Conflict with gmac1. */
481 pinctrl-names = "default";
482 pinctrl-0 = <&pinctrl_pdmc0_default>;
487 pinctrl_can0_default: can0_default {
488 pinmux = <PIN_PD12__CANTX0>,
493 pinctrl_can1_default: can1_default {
494 pinmux = <PIN_PD14__CANTX1>,
499 pinctrl_flx0_default: flx0_default {
500 pinmux = <PIN_PE3__FLEXCOM0_IO0>,
501 <PIN_PE4__FLEXCOM0_IO1>,
502 <PIN_PE6__FLEXCOM0_IO3>,
503 <PIN_PE7__FLEXCOM0_IO4>;
507 pinctrl_flx3_default: flx3_default {
508 pinmux = <PIN_PD16__FLEXCOM3_IO0>,
509 <PIN_PD17__FLEXCOM3_IO1>;
513 pinctrl_flx4_default: flx4_default {
514 pinmux = <PIN_PD18__FLEXCOM4_IO0>,
515 <PIN_PD19__FLEXCOM4_IO1>;
519 pinctrl_flx7_default: flx7_default {
520 pinmux = <PIN_PC23__FLEXCOM7_IO0>,
521 <PIN_PC24__FLEXCOM7_IO1>;
525 pinctrl_gmac0_default: gmac0_default {
526 pinmux = <PIN_PA16__G0_TX0>,
537 <PIN_PA25__G0_125CK>;
542 pinctrl_gmac0_mdio_default: gmac0_mdio_default {
543 pinmux = <PIN_PA22__G0_MDC>,
548 pinctrl_gmac0_txck_default: gmac0_txck_default {
549 pinmux = <PIN_PA24__G0_TXCK>;
554 pinctrl_gmac0_phy_irq: gmac0_phy_irq {
555 pinmux = <PIN_PA31__GPIO>;
559 pinctrl_gmac1_default: gmac1_default {
560 pinmux = <PIN_PD30__G1_TXCK>,
572 pinctrl_gmac1_mdio_default: gmac1_mdio_default {
573 pinmux = <PIN_PD28__G1_MDC>,
578 pinctrl_gmac1_phy_irq: gmac1_phy_irq {
579 pinmux = <PIN_PA21__GPIO>;
583 pinctrl_i2c1_default: i2c1_default {
584 pinmux = <PIN_PC9__FLEXCOM1_IO0>,
585 <PIN_PC10__FLEXCOM1_IO1>;
589 pinctrl_i2c8_default: i2c8_default {
590 pinmux = <PIN_PC14__FLEXCOM8_IO0>,
591 <PIN_PC13__FLEXCOM8_IO1>;
595 pinctrl_i2c9_default: i2c9_default {
596 pinmux = <PIN_PC18__FLEXCOM9_IO0>,
597 <PIN_PC19__FLEXCOM9_IO1>;
601 pinctrl_i2s0_default: i2s0_default {
602 pinmux = <PIN_PB23__I2SMCC0_CK>,
603 <PIN_PB24__I2SMCC0_WS>,
604 <PIN_PB25__I2SMCC0_DOUT1>,
605 <PIN_PB26__I2SMCC0_DOUT0>,
606 <PIN_PB27__I2SMCC0_MCK>;
610 pinctrl_key_gpio_default: key_gpio_default {
611 pinmux = <PIN_PA12__GPIO>;
615 pinctrl_led_gpio_default: led_gpio_default {
616 pinmux = <PIN_PA13__GPIO>,
622 pinctrl_mikrobus1_an_default: mikrobus1_an_default {
623 pinmux = <PIN_PD0__GPIO>;
627 pinctrl_mikrobus2_an_default: mikrobus2_an_default {
628 pinmux = <PIN_PD1__GPIO>;
632 pinctrl_mikrobus1_pwm2_default: mikrobus1_pwm2_default {
633 pinmux = <PIN_PA13__PWMH2>;
637 pinctrl_mikrobus2_pwm3_default: mikrobus2_pwm3_default {
638 pinmux = <PIN_PD20__PWMH3>;
642 pinctrl_mikrobus1_spi_cs: mikrobus1_spi_cs {
643 pinmux = <PIN_PB6__FLEXCOM11_IO3>;
647 pinctrl_mikrobus1_spi: mikrobus1_spi {
648 pinmux = <PIN_PB3__FLEXCOM11_IO0>,
649 <PIN_PB4__FLEXCOM11_IO1>,
650 <PIN_PB5__FLEXCOM11_IO2>;
654 pinctrl_pdmc0_default: pdmc0_default {
655 pinmux = <PIN_PD23__PDMC0_DS0>,
656 <PIN_PD24__PDMC0_DS1>,
657 <PIN_PD22__PDMC0_CLK>;
662 pinmux = <PIN_PB12__QSPI0_IO0>,
663 <PIN_PB11__QSPI0_IO1>,
664 <PIN_PB10__QSPI0_IO2>,
665 <PIN_PB9__QSPI0_IO3>,
666 <PIN_PB16__QSPI0_IO4>,
667 <PIN_PB17__QSPI0_IO5>,
668 <PIN_PB18__QSPI0_IO6>,
669 <PIN_PB19__QSPI0_IO7>,
670 <PIN_PB13__QSPI0_CS>,
671 <PIN_PB14__QSPI0_SCK>,
672 <PIN_PB15__QSPI0_SCKN>,
673 <PIN_PB20__QSPI0_DQS>,
674 <PIN_PB21__QSPI0_INT>;
677 atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
680 pinctrl_sdmmc0_default: sdmmc0_default {
682 pinmux = <PIN_PA1__SDMMC0_CMD>,
683 <PIN_PA3__SDMMC0_DAT0>,
684 <PIN_PA4__SDMMC0_DAT1>,
685 <PIN_PA5__SDMMC0_DAT2>,
686 <PIN_PA6__SDMMC0_DAT3>,
687 <PIN_PA7__SDMMC0_DAT4>,
688 <PIN_PA8__SDMMC0_DAT5>,
689 <PIN_PA9__SDMMC0_DAT6>,
690 <PIN_PA10__SDMMC0_DAT7>;
696 pinmux = <PIN_PA0__SDMMC0_CK>,
697 <PIN_PA2__SDMMC0_RSTN>,
698 <PIN_PA11__SDMMC0_DS>;
704 pinctrl_sdmmc1_default: sdmmc1_default {
706 pinmux = <PIN_PB29__SDMMC1_CMD>,
707 <PIN_PB31__SDMMC1_DAT0>,
708 <PIN_PC0__SDMMC1_DAT1>,
709 <PIN_PC1__SDMMC1_DAT2>,
710 <PIN_PC2__SDMMC1_DAT3>;
716 pinmux = <PIN_PB30__SDMMC1_CK>,
717 <PIN_PB28__SDMMC1_RSTN>,
718 <PIN_PC5__SDMMC1_1V8SEL>,
719 <PIN_PC4__SDMMC1_CD>;
725 pinctrl_sdmmc2_default: sdmmc2_default {
727 pinmux = <PIN_PD3__SDMMC2_CMD>,
728 <PIN_PD5__SDMMC2_DAT0>,
729 <PIN_PD6__SDMMC2_DAT1>,
730 <PIN_PD7__SDMMC2_DAT2>,
731 <PIN_PD8__SDMMC2_DAT3>;
737 pinmux = <PIN_PD4__SDMMC2_CK>;
743 pinctrl_spdifrx_default: spdifrx_default {
744 pinmux = <PIN_PB0__SPDIF_RX>;
748 pinctrl_spdiftx_default: spdiftx_default {
749 pinmux = <PIN_PB1__SPDIF_TX>;
755 pinctrl-names = "default";
756 pinctrl-0 = <&pinctrl_mikrobus1_pwm2_default &pinctrl_mikrobus2_pwm3_default>;
757 status = "disabled"; /* Conflict with leds. */
761 atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
767 sdhci-caps-mask = <0x0 0x00200000>;
768 vmmc-supply = <&vdd_3v3>;
769 vqmmc-supply = <&vldo1>;
770 pinctrl-names = "default";
771 pinctrl-0 = <&pinctrl_sdmmc0_default>;
778 sdhci-caps-mask = <0x0 0x00200000>;
779 vmmc-supply = <&vdd_3v3>;
780 vqmmc-supply = <&vdd_3v3>;
781 pinctrl-names = "default";
782 pinctrl-0 = <&pinctrl_sdmmc1_default>;
789 sdhci-caps-mask = <0x0 0x00200000>;
790 pinctrl-names = "default";
791 pinctrl-0 = <&pinctrl_sdmmc2_default>;
795 debounce-delay-us = <976>;
804 pinctrl-names = "default";
805 pinctrl-0 = <&pinctrl_spdifrx_default>;
810 pinctrl-names = "default";
811 pinctrl-0 = <&pinctrl_spdiftx_default>;
817 compatible = "atmel,tcb-timer";
822 compatible = "atmel,tcb-timer";
832 vin-supply = <&vdd_3v3>;