1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * at91-sama5d2_xplained.dts - Device Tree file for SAMA5D2 Xplained board
5 * Copyright (C) 2015 Atmel,
6 * 2015 Nicolas Ferre <nicolas.ferre@atmel.com>
9 #include "sama5d2.dtsi"
10 #include "sama5d2-pinfunc.h"
11 #include <dt-bindings/mfd/atmel-flexcom.h>
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/regulator/active-semi,8945a-regulator.h>
16 model = "Atmel SAMA5D2 Xplained";
17 compatible = "atmel,sama5d2-xplained", "atmel,sama5d2", "atmel,sama5";
20 serial0 = &uart1; /* DBGU */
23 i2c2 = &i2c2; /* XPRO EXT2 */
27 stdout-path = "serial0:115200n8";
32 clock-frequency = <32768>;
36 clock-frequency = <12000000>;
42 atmel,vbus-gpio = <&pioA PIN_PA31 GPIO_ACTIVE_HIGH>;
43 pinctrl-names = "default";
44 pinctrl-0 = <&pinctrl_usba_vbus>;
50 atmel,vbus-gpio = <0 /* &pioA PIN_PB9 GPIO_ACTIVE_HIGH */
51 &pioA PIN_PB10 GPIO_ACTIVE_HIGH
54 pinctrl-names = "default";
55 pinctrl-0 = <&pinctrl_usb_default>;
63 sdmmc0: sdio-host@a0000000 {
65 pinctrl-names = "default";
66 pinctrl-0 = <&pinctrl_sdmmc0_default>;
72 sdmmc1: sdio-host@b0000000 {
74 pinctrl-names = "default";
75 pinctrl-0 = <&pinctrl_sdmmc1_default>;
76 status = "okay"; /* conflict with qspi0 */
77 vqmmc-supply = <&vdd_3v3_reg>;
78 vmmc-supply = <&vdd_3v3_reg>;
83 pinctrl-names = "default";
84 pinctrl-0 = <&pinctrl_qspi0_default>;
85 status = "disabled"; /* conflict with sdmmc1 */
90 compatible = "jedec,spi-nor";
92 spi-max-frequency = <80000000>;
93 spi-tx-bus-width = <4>;
94 spi-rx-bus-width = <4>;
97 at91bootstrap@00000000 {
98 label = "at91bootstrap";
99 reg = <0x00000000 0x00040000>;
102 bootloader@00040000 {
103 label = "bootloader";
104 reg = <0x00040000 0x000c0000>;
107 bootloaderenvred@00100000 {
108 label = "bootloader env redundant";
109 reg = <0x00100000 0x00040000>;
112 bootloaderenv@00140000 {
113 label = "bootloader env";
114 reg = <0x00140000 0x00040000>;
118 label = "device tree";
119 reg = <0x00180000 0x00080000>;
124 reg = <0x00200000 0x00600000>;
129 reg = <0x00800000 0x00000000>;
135 pinctrl-names = "default";
136 pinctrl-0 = <&pinctrl_spi0_default>;
140 compatible = "atmel,at25df321a";
142 spi-max-frequency = <50000000>;
146 macb0: ethernet@f8008000 {
147 pinctrl-names = "default";
148 pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq>;
154 interrupt-parent = <&pioA>;
155 interrupts = <PIN_PC9 IRQ_TYPE_LEVEL_LOW>;
159 tcb0: timer@f800c000 {
161 compatible = "atmel,tcb-timer";
166 compatible = "atmel,tcb-timer";
172 pinctrl-names = "default";
173 pinctrl-0 = <&pinctrl_pdmic_default>;
174 atmel,model = "PDMIC @ sama5d2_xplained";
175 atmel,mic-min-freq = <1000000>;
176 atmel,mic-max-freq = <3246000>;
177 atmel,mic-offset = <0x0>;
181 uart1: serial@f8020000 {
182 pinctrl-names = "default";
183 pinctrl-0 = <&pinctrl_uart1_default>;
191 pinctrl-names = "default", "gpio";
192 pinctrl-0 = <&pinctrl_i2c0_default>;
193 pinctrl-1 = <&pinctrl_i2c0_gpio>;
194 sda-gpios = <&pioA PIN_PD21 GPIO_ACTIVE_HIGH>;
195 scl-gpios = <&pioA PIN_PD22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
196 i2c-sda-hold-time-ns = <350>;
200 compatible = "active-semi,act8945a";
202 active-semi,vsel-high;
206 vdd_1v35_reg: REG_DCDC1 {
207 regulator-name = "VDD_1V35";
208 regulator-min-microvolt = <1350000>;
209 regulator-max-microvolt = <1350000>;
210 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
211 <ACT8945A_REGULATOR_MODE_LOWPOWER>;
212 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;
215 regulator-state-mem {
216 regulator-on-in-suspend;
217 regulator-suspend-min-microvolt=<1400000>;
218 regulator-suspend-max-microvolt=<1400000>;
219 regulator-changeable-in-suspend;
220 regulator-mode=<ACT8945A_REGULATOR_MODE_LOWPOWER>;
224 vdd_1v2_reg: REG_DCDC2 {
225 regulator-name = "VDD_1V2";
226 regulator-min-microvolt = <1100000>;
227 regulator-max-microvolt = <1300000>;
228 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
229 <ACT8945A_REGULATOR_MODE_LOWPOWER>;
230 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;
233 regulator-state-mem {
234 regulator-off-in-suspend;
238 vdd_3v3_reg: REG_DCDC3 {
239 regulator-name = "VDD_3V3";
240 regulator-min-microvolt = <3300000>;
241 regulator-max-microvolt = <3300000>;
242 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
243 <ACT8945A_REGULATOR_MODE_LOWPOWER>;
244 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;
247 regulator-state-mem {
248 regulator-off-in-suspend;
252 vdd_fuse_reg: REG_LDO1 {
253 regulator-name = "VDD_FUSE";
254 regulator-min-microvolt = <2500000>;
255 regulator-max-microvolt = <2500000>;
256 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
257 <ACT8945A_REGULATOR_MODE_LOWPOWER>;
258 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
261 regulator-state-mem {
262 regulator-off-in-suspend;
266 vdd_3v3_lp_reg: REG_LDO2 {
267 regulator-name = "VDD_3V3_LP";
268 regulator-min-microvolt = <3300000>;
269 regulator-max-microvolt = <3300000>;
270 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
271 <ACT8945A_REGULATOR_MODE_LOWPOWER>;
272 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
275 regulator-state-mem {
276 regulator-off-in-suspend;
280 vdd_led_reg: REG_LDO3 {
281 regulator-name = "VDD_LED";
282 regulator-min-microvolt = <3300000>;
283 regulator-max-microvolt = <3300000>;
284 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
285 <ACT8945A_REGULATOR_MODE_LOWPOWER>;
286 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
289 regulator-state-mem {
290 regulator-off-in-suspend;
294 vdd_sdhc_1v8_reg: REG_LDO4 {
295 regulator-name = "VDD_SDHC_1V8";
296 regulator-min-microvolt = <1800000>;
297 regulator-max-microvolt = <1800000>;
298 regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
299 <ACT8945A_REGULATOR_MODE_LOWPOWER>;
300 regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
303 regulator-state-mem {
304 regulator-off-in-suspend;
310 compatible = "active-semi,act8945a-charger";
311 pinctrl-names = "default";
312 pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
313 interrupt-parent = <&pioA>;
314 interrupts = <PIN_PB13 IRQ_TYPE_EDGE_RISING>;
316 active-semi,chglev-gpios = <&pioA PIN_PA12 GPIO_ACTIVE_HIGH>;
317 active-semi,lbo-gpios = <&pioA PIN_PC8 GPIO_ACTIVE_LOW>;
318 active-semi,input-voltage-threshold-microvolt = <6600>;
319 active-semi,precondition-timeout = <40>;
320 active-semi,total-timeout = <3>;
327 pinctrl-names = "default";
328 pinctrl-0 = <&pinctrl_pwm0_pwm2_default>;
329 status = "disabled"; /* conflict with leds */
332 flx0: flexcom@f8034000 {
333 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
334 status = "disabled"; /* conflict with ISC_D2 & ISC_D3 data pins */
338 pinctrl-names = "default";
339 pinctrl-0 = <&pinctrl_flx0_default>;
345 pinctrl-names = "default", "gpio";
346 pinctrl-0 = <&pinctrl_flx0_default>;
347 pinctrl-1 = <&pinctrl_i2c2_gpio>;
348 sda-gpios = <&pioA PIN_PB28 GPIO_ACTIVE_HIGH>;
349 scl-gpios = <&pioA PIN_PB29 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
350 i2c-sda-hold-time-ns = <350>;
353 i2c-digital-filter-width-ns = <35>;
354 status = "disabled"; /* conflict with ISC_D2 & ISC_D3 data pins */
359 atmel,shdwc-debouncer = <976>;
360 atmel,wakeup-rtc-timer;
364 atmel,wakeup-type = "low";
373 pinctrl-names = "default";
374 pinctrl-0 = <&pinctrl_i2s0_default>;
375 status = "disabled"; /* conflict with can0 */
379 pinctrl-names = "default";
380 pinctrl-0 = <&pinctrl_can0_default>;
384 uart3: serial@fc008000 {
387 pinctrl-names = "default";
388 pinctrl-0 = <&pinctrl_uart3_default>;
392 flx4: flexcom@fc018000 {
393 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
398 pinctrl-names = "default", "gpio";
399 pinctrl-0 = <&pinctrl_flx4_default>;
400 pinctrl-1 = <&pinctrl_flx4_gpio>;
401 sda-gpios = <&pioA PIN_PD12 GPIO_ACTIVE_HIGH>;
402 scl-gpios = <&pioA PIN_PD13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
405 i2c-digital-filter-width-ns = <35>;
412 pinctrl-names = "default", "gpio";
413 pinctrl-0 = <&pinctrl_i2c1_default>;
416 i2c-digital-filter-width-ns = <35>;
417 pinctrl-1 = <&pinctrl_i2c1_gpio>;
418 sda-gpios = <&pioA PIN_PD4 GPIO_ACTIVE_HIGH>;
419 scl-gpios = <&pioA PIN_PD5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
423 compatible = "atmel,24c02";
430 vddana-supply = <&vdd_3v3_lp_reg>;
431 vref-supply = <&vdd_3v3_lp_reg>;
432 pinctrl-names = "default";
433 pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
439 * There is no real pinmux for ADC, if the pin
440 * is not requested by another peripheral then
441 * the muxing is done when channel is enabled.
442 * Requesting pins for ADC is GPIO is
443 * encouraged to prevent conflicts and to
444 * disable bias in order to be in the same
445 * state when the pin is not muxed to the adc.
447 pinctrl_adc_default: adc_default {
448 pinmux = <PIN_PD23__GPIO>;
452 pinctrl_can0_default: can0_default {
453 pinmux = <PIN_PC10__CANTX0>,
458 pinctrl_can1_default: can1_default {
459 pinmux = <PIN_PC26__CANTX1>,
465 * The ADTRG pin can work on any edge type.
466 * In here it's being pulled up, so need to
467 * connect it to ground to get an edge e.g.
468 * Trigger can be configured on falling, rise
469 * or any edge, and the pull-up can be changed
470 * to pull-down or left floating according to
473 pinctrl_adtrg_default: adtrg_default {
474 pinmux = <PIN_PD31__ADTRG>;
478 pinctrl_charger_chglev: charger_chglev {
479 pinmux = <PIN_PA12__GPIO>;
483 pinctrl_charger_irq: charger_irq {
484 pinmux = <PIN_PB13__GPIO>;
488 pinctrl_charger_lbo: charger_lbo {
489 pinmux = <PIN_PC8__GPIO>;
493 pinctrl_classd_default: classd_default {
494 pinmux = <PIN_PB1__CLASSD_R0>,
495 <PIN_PB2__CLASSD_R1>,
496 <PIN_PB3__CLASSD_R2>,
497 <PIN_PB4__CLASSD_R3>;
501 pinctrl_flx0_default: flx0_default {
502 pinmux = <PIN_PB28__FLEXCOM0_IO0>,
503 <PIN_PB29__FLEXCOM0_IO1>;
507 pinctrl_flx4_default: flx4_default {
508 pinmux = <PIN_PD12__FLEXCOM4_IO0>,
509 <PIN_PD13__FLEXCOM4_IO1>;
513 pinctrl_flx4_gpio: flx4_gpio {
514 pinmux = <PIN_PD12__GPIO>,
519 pinctrl_i2c0_default: i2c0_default {
520 pinmux = <PIN_PD21__TWD0>,
525 pinctrl_i2c0_gpio: i2c0_gpio {
526 pinmux = <PIN_PD21__GPIO>,
531 pinctrl_i2c1_default: i2c1_default {
532 pinmux = <PIN_PD4__TWD1>,
537 pinctrl_i2c1_gpio: i2c1_gpio {
538 pinmux = <PIN_PD4__GPIO>,
543 pinctrl_i2c2_gpio: i2c2_gpio {
544 pinmux = <PIN_PB28__GPIO>,
549 pinctrl_i2s0_default: i2s0_default {
550 pinmux = <PIN_PC1__I2SC0_CK>,
551 <PIN_PC2__I2SC0_MCK>,
553 <PIN_PC4__I2SC0_DI0>,
554 <PIN_PC5__I2SC0_DO0>;
558 pinctrl_i2s1_default: i2s1_default {
559 pinmux = <PIN_PA15__I2SC1_CK>,
560 <PIN_PA14__I2SC1_MCK>,
561 <PIN_PA16__I2SC1_WS>,
562 <PIN_PA17__I2SC1_DI0>,
563 <PIN_PA18__I2SC1_DO0>;
567 pinctrl_key_gpio_default: key_gpio_default {
568 pinmux = <PIN_PB9__GPIO>;
572 pinctrl_led_gpio_default: led_gpio_default {
573 pinmux = <PIN_PB0__GPIO>,
579 pinctrl_macb0_default: macb0_default {
580 pinmux = <PIN_PB14__GTXCK>,
593 pinctrl_macb0_phy_irq: macb0_phy_irq {
594 pinmux = <PIN_PC9__GPIO>;
598 pinctrl_pdmic_default: pdmic_default {
599 pinmux = <PIN_PB26__PDMIC_DAT>,
600 <PIN_PB27__PDMIC_CLK>;
604 pinctrl_qspi0_default: qspi0_default {
606 pinmux = <PIN_PA22__QSPI0_SCK>,
607 <PIN_PA23__QSPI0_CS>;
612 pinmux = <PIN_PA24__QSPI0_IO0>,
613 <PIN_PA25__QSPI0_IO1>,
614 <PIN_PA26__QSPI0_IO2>,
615 <PIN_PA27__QSPI0_IO3>;
620 pinctrl_sdmmc0_default: sdmmc0_default {
622 pinmux = <PIN_PA1__SDMMC0_CMD>,
623 <PIN_PA2__SDMMC0_DAT0>,
624 <PIN_PA3__SDMMC0_DAT1>,
625 <PIN_PA4__SDMMC0_DAT2>,
626 <PIN_PA5__SDMMC0_DAT3>,
627 <PIN_PA6__SDMMC0_DAT4>,
628 <PIN_PA7__SDMMC0_DAT5>,
629 <PIN_PA8__SDMMC0_DAT6>,
630 <PIN_PA9__SDMMC0_DAT7>;
635 pinmux = <PIN_PA0__SDMMC0_CK>,
636 <PIN_PA10__SDMMC0_RSTN>,
637 <PIN_PA11__SDMMC0_VDDSEL>,
638 <PIN_PA13__SDMMC0_CD>;
643 pinctrl_sdmmc1_default: sdmmc1_default {
645 pinmux = <PIN_PA28__SDMMC1_CMD>,
646 <PIN_PA18__SDMMC1_DAT0>,
647 <PIN_PA19__SDMMC1_DAT1>,
648 <PIN_PA20__SDMMC1_DAT2>,
649 <PIN_PA21__SDMMC1_DAT3>;
654 pinmux = <PIN_PA22__SDMMC1_CK>,
655 <PIN_PA30__SDMMC1_CD>;
660 pinctrl_spi0_default: spi0_default {
661 pinmux = <PIN_PA14__SPI0_SPCK>,
662 <PIN_PA15__SPI0_MOSI>,
663 <PIN_PA16__SPI0_MISO>,
664 <PIN_PA17__SPI0_NPCS0>;
668 pinctrl_uart1_default: uart1_default {
669 pinmux = <PIN_PD2__URXD1>,
674 pinctrl_uart3_default: uart3_default {
675 pinmux = <PIN_PB11__URXD3>,
680 pinctrl_usb_default: usb_default {
681 pinmux = <PIN_PB10__GPIO>;
685 pinctrl_usba_vbus: usba_vbus {
686 pinmux = <PIN_PA31__GPIO>;
690 pinctrl_pwm0_pwm2_default: pwm0_pwm2_default {
691 pinmux = <PIN_PB5__PWMH2>,
697 classd: classd@fc048000 {
698 pinctrl-names = "default";
699 pinctrl-0 = <&pinctrl_classd_default>;
700 atmel,pwm-type = "diff";
701 atmel,non-overlap-time = <10>;
706 pinctrl-names = "default";
707 pinctrl-0 = <&pinctrl_i2s1_default>;
708 status = "disabled"; /* conflict with spi0, sdmmc1 */
712 pinctrl-names = "default";
713 pinctrl-0 = <&pinctrl_can1_default>;
720 compatible = "gpio-keys";
722 pinctrl-names = "default";
723 pinctrl-0 = <&pinctrl_key_gpio_default>;
727 gpios = <&pioA PIN_PB9 GPIO_ACTIVE_LOW>;
728 linux,code = <0x104>;
734 compatible = "gpio-leds";
735 pinctrl-names = "default";
736 pinctrl-0 = <&pinctrl_led_gpio_default>;
737 status = "okay"; /* conflict with pwm0 */
741 gpios = <&pioA PIN_PB6 GPIO_ACTIVE_LOW>;
747 gpios = <&pioA PIN_PB5 GPIO_ACTIVE_LOW>;
752 gpios = <&pioA PIN_PB0 GPIO_ACTIVE_LOW>;
753 linux,default-trigger = "heartbeat";