1 // SPDX-License-Identifier: (GPL-2.0+ OR X11)
3 * at91-sama5d2_ptc_ek.dts - Device Tree file for SAMA5D2 PTC EK board
5 * Copyright (C) 2017 Microchip/Atmel,
6 * 2017 Wenyou Yang <wenyou.yang@microchip.com>
7 * 2017 Ludovic Desroches <ludovic.desroches@microchip.com>
10 #include "sama5d2.dtsi"
11 #include "sama5d2-pinfunc.h"
12 #include <dt-bindings/mfd/atmel-flexcom.h>
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/input/input.h>
15 #include <dt-bindings/pinctrl/at91.h>
18 model = "Atmel SAMA5D2 PTC EK";
19 compatible = "atmel,sama5d2-ptc_ek", "atmel,sama5d2", "atmel,sama5";
22 serial0 = &uart0; /* DBGU */
23 i2c0 = &i2c0; /* mikroBUS 1 */
24 i2c1 = &i2c1; /* XPRO EXT1 */
29 stdout-path = "serial0:115200n8";
34 clock-frequency = <32768>;
38 clock-frequency = <24000000>;
44 atmel,vbus-gpio = <&pioA PIN_PB11 GPIO_ACTIVE_HIGH>;
45 pinctrl-names = "default";
46 pinctrl-0 = <&pinctrl_usba_vbus>;
53 &pioA PIN_PB12 GPIO_ACTIVE_HIGH
56 pinctrl-names = "default";
57 pinctrl-0 = <&pinctrl_usb_default>;
66 pinctrl-names = "default";
67 pinctrl-0 = <&pinctrl_nand_default>;
68 status = "okay"; /* conflicts with sdmmc1 and qspi0 */
70 nand_controller: nand-controller {
82 compatible = "fixed-partitions";
93 reg = <0x40000 0xc0000>;
96 bootloaderenvred@100000 {
97 label = "bootloader env redundant";
98 reg = <0x100000 0x40000>;
101 bootloaderenv@140000 {
102 label = "bootloader env";
103 reg = <0x140000 0x40000>;
107 label = "device tree";
108 reg = <0x180000 0x80000>;
113 reg = <0x200000 0x600000>;
118 reg = <0x800000 0x1f800000>;
125 sdmmc0: sdio-host@a0000000 {
127 pinctrl-names = "default";
128 pinctrl-0 = <&pinctrl_sdmmc0_default>;
134 pinctrl-names = "default";
135 pinctrl-0 = <&pinctrl_spi0_default>;
139 macb0: ethernet@f8008000 {
140 pinctrl-names = "default";
141 pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq>;
147 interrupt-parent = <&pioA>;
148 interrupts = <56 IRQ_TYPE_LEVEL_LOW>;
152 tcb0: timer@f800c000 {
154 compatible = "atmel,tcb-timer";
159 compatible = "atmel,tcb-timer";
164 uart0: serial@f801c000 {
165 pinctrl-names = "default";
166 pinctrl-0 = <&pinctrl_uart0_default>;
172 uart2: serial@f8024000 {
173 pinctrl-names = "default";
174 pinctrl-0 = <&pinctrl_uart2_default>;
182 pinctrl-names = "default", "gpio";
183 pinctrl-0 = <&pinctrl_i2c0_default>;
184 pinctrl-1 = <&pinctrl_i2c0_gpio>;
185 sda-gpios = <&pioA PIN_PD21 GPIO_ACTIVE_HIGH>;
186 scl-gpios = <&pioA PIN_PD22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
190 flx0: flexcom@f8034000 {
191 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
196 pinctrl-names = "default", "gpio";
197 pinctrl-0 = <&pinctrl_flx0_default>;
198 pinctrl-1 = <&pinctrl_flx0_gpio>;
199 sda-gpios = <&pioA PIN_PB28 GPIO_ACTIVE_HIGH>;
200 scl-gpios = <&pioA PIN_PB29 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
206 debounce-delay-us = <976>;
218 pinctrl-names = "default";
219 pinctrl-0 = <&pinctrl_spi1_default>;
225 pinctrl-names = "default", "gpio";
226 pinctrl-0 = <&pinctrl_i2c1_default>;
227 pinctrl-1 = <&pinctrl_i2c1_gpio>;
228 sda-gpios = <&pioA PIN_PC6 GPIO_ACTIVE_HIGH>;
229 scl-gpios = <&pioA PIN_PC7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
233 compatible = "atmel,24c02";
240 pinctrl_flx0_default: flx0_default {
241 pinmux = <PIN_PB28__FLEXCOM0_IO0>,
242 <PIN_PB29__FLEXCOM0_IO1>;
246 pinctrl_flx0_gpio: flx0_gpio {
247 pinmux = <PIN_PB28__GPIO>,
252 pinctrl_i2c0_default: i2c0_default {
253 pinmux = <PIN_PD21__TWD0>,
258 pinctrl_i2c0_gpio: i2c0_gpio {
259 pinmux = <PIN_PD21__GPIO>,
264 pinctrl_i2c1_default: i2c1_default {
265 pinmux = <PIN_PC6__TWD1>,
270 pinctrl_i2c1_gpio: i2c1_gpio {
271 pinmux = <PIN_PC6__GPIO>,
276 pinctrl_key_gpio_default: key_gpio_default {
277 pinmux = <PIN_PA10__GPIO>;
281 pinctrl_led_gpio_default: led_gpio_default {
282 pinmux = <PIN_PB6__GPIO>,
288 pinctrl_macb0_default: macb0_default {
289 pinmux = <PIN_PB14__GTXCK>,
302 pinctrl_macb0_phy_irq: macb0_phy_irq {
303 pinmux = <PIN_PB24__GPIO>;
307 pinctrl_nand_default: nand_default {
309 pinmux = <PIN_PA22__D0>,
317 <PIN_PA30__NWE_NANDWE>,
318 <PIN_PB2__NRD_NANDOE>;
320 atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
324 pinmux = <PIN_PB0__A21_NANDALE>,
325 <PIN_PB1__A22_NANDCLE>,
332 pinctrl_sdmmc0_default: sdmmc0_default {
334 pinmux = <PIN_PA1__SDMMC0_CMD>,
335 <PIN_PA2__SDMMC0_DAT0>,
336 <PIN_PA3__SDMMC0_DAT1>,
337 <PIN_PA4__SDMMC0_DAT2>,
338 <PIN_PA5__SDMMC0_DAT3>,
339 <PIN_PA6__SDMMC0_DAT4>,
340 <PIN_PA7__SDMMC0_DAT5>,
341 <PIN_PA8__SDMMC0_DAT6>,
342 <PIN_PA9__SDMMC0_DAT7>;
347 pinmux = <PIN_PA0__SDMMC0_CK>,
348 <PIN_PA11__SDMMC0_VDDSEL>,
349 <PIN_PA13__SDMMC0_CD>;
354 pinctrl_spi0_default: spi0_default {
355 pinmux = <PIN_PA14__SPI0_SPCK>,
356 <PIN_PA15__SPI0_MOSI>,
357 <PIN_PA16__SPI0_MISO>,
358 <PIN_PA17__SPI0_NPCS0>;
362 pinctrl_spi1_default: spi1_default {
363 pinmux = <PIN_PC1__SPI1_SPCK>,
364 <PIN_PC2__SPI1_MOSI>,
365 <PIN_PC3__SPI1_MISO>,
366 <PIN_PC4__SPI1_NPCS0>;
370 pinctrl_uart0_default: uart0_default {
371 pinmux = <PIN_PB26__URXD0>,
376 pinctrl_uart2_default: uart2_default {
377 pinmux = <PIN_PD23__URXD2>,
382 pinctrl_usb_default: usb_default {
383 pinmux = <PIN_PB12__GPIO>;
387 pinctrl_usba_vbus: usba_vbus {
388 pinmux = <PIN_PB11__GPIO>;
398 compatible = "gpio-keys";
400 pinctrl-names = "default";
401 pinctrl-0 = <&pinctrl_key_gpio_default>;
405 gpios = <&pioA PIN_PA10 GPIO_ACTIVE_LOW>;
406 linux,code = <KEY_PROG1>;
412 compatible = "gpio-leds";
413 pinctrl-names = "default";
414 pinctrl-0 = <&pinctrl_led_gpio_default>;
419 gpios = <&pioA PIN_PB10 GPIO_ACTIVE_HIGH>;
424 gpios = <&pioA PIN_PB8 GPIO_ACTIVE_HIGH>;
429 gpios = <&pioA PIN_PB6 GPIO_ACTIVE_HIGH>;
430 linux,default-trigger = "heartbeat";