0001 // SPDX-License-Identifier: (GPL-2.0+ OR X11)
0002 /*
0003 * at91-sama5d2_ptc_ek.dts - Device Tree file for SAMA5D2 PTC EK board
0004 *
0005 * Copyright (C) 2017 Microchip/Atmel,
0006 * 2017 Wenyou Yang <wenyou.yang@microchip.com>
0007 * 2017 Ludovic Desroches <ludovic.desroches@microchip.com>
0008 */
0009 /dts-v1/;
0010 #include "sama5d2.dtsi"
0011 #include "sama5d2-pinfunc.h"
0012 #include <dt-bindings/mfd/atmel-flexcom.h>
0013 #include <dt-bindings/gpio/gpio.h>
0014 #include <dt-bindings/input/input.h>
0015 #include <dt-bindings/pinctrl/at91.h>
0016
0017 / {
0018 model = "Atmel SAMA5D2 PTC EK";
0019 compatible = "atmel,sama5d2-ptc_ek", "atmel,sama5d2", "atmel,sama5";
0020
0021 aliases {
0022 serial0 = &uart0; /* DBGU */
0023 i2c0 = &i2c0; /* mikroBUS 1 */
0024 i2c1 = &i2c1; /* XPRO EXT1 */
0025 i2c2 = &i2c2;
0026 };
0027
0028 chosen {
0029 stdout-path = "serial0:115200n8";
0030 };
0031
0032 clocks {
0033 slow_xtal {
0034 clock-frequency = <32768>;
0035 };
0036
0037 main_xtal {
0038 clock-frequency = <24000000>;
0039 };
0040 };
0041
0042 ahb {
0043 usb0: gadget@300000 {
0044 atmel,vbus-gpio = <&pioA PIN_PB11 GPIO_ACTIVE_HIGH>;
0045 pinctrl-names = "default";
0046 pinctrl-0 = <&pinctrl_usba_vbus>;
0047 status = "okay";
0048 };
0049
0050 usb1: ohci@400000 {
0051 num-ports = <3>;
0052 atmel,vbus-gpio = <0
0053 &pioA PIN_PB12 GPIO_ACTIVE_HIGH
0054 0
0055 >;
0056 pinctrl-names = "default";
0057 pinctrl-0 = <&pinctrl_usb_default>;
0058 status = "okay";
0059 };
0060
0061 usb2: ehci@500000 {
0062 status = "okay";
0063 };
0064
0065 ebi: ebi@10000000 {
0066 pinctrl-names = "default";
0067 pinctrl-0 = <&pinctrl_nand_default>;
0068 status = "okay"; /* conflicts with sdmmc1 and qspi0 */
0069
0070 nand_controller: nand-controller {
0071 status = "okay";
0072
0073 nand@3 {
0074 reg = <0x3 0x0 0x2>;
0075 atmel,rb = <0>;
0076 nand-bus-width = <8>;
0077 nand-ecc-mode = "hw";
0078 nand-on-flash-bbt;
0079 label = "atmel_nand";
0080
0081 partitions {
0082 compatible = "fixed-partitions";
0083 #address-cells = <1>;
0084 #size-cells = <1>;
0085
0086 at91bootstrap@0 {
0087 label = "bootstrap";
0088 reg = <0x0 0x40000>;
0089 };
0090
0091 bootloader@40000 {
0092 label = "bootloader";
0093 reg = <0x40000 0xc0000>;
0094 };
0095
0096 bootloaderenvred@100000 {
0097 label = "bootloader env redundant";
0098 reg = <0x100000 0x40000>;
0099 };
0100
0101 bootloaderenv@140000 {
0102 label = "bootloader env";
0103 reg = <0x140000 0x40000>;
0104 };
0105
0106 dtb@180000 {
0107 label = "device tree";
0108 reg = <0x180000 0x80000>;
0109 };
0110
0111 kernel@200000 {
0112 label = "kernel";
0113 reg = <0x200000 0x600000>;
0114 };
0115
0116 rootfs@800000 {
0117 label = "rootfs";
0118 reg = <0x800000 0x1f800000>;
0119 };
0120 };
0121 };
0122 };
0123 };
0124
0125 sdmmc0: sdio-host@a0000000 {
0126 bus-width = <8>;
0127 pinctrl-names = "default";
0128 pinctrl-0 = <&pinctrl_sdmmc0_default>;
0129 status = "okay";
0130 };
0131
0132 apb {
0133 spi0: spi@f8000000 {
0134 pinctrl-names = "default";
0135 pinctrl-0 = <&pinctrl_spi0_default>;
0136 status = "okay";
0137 };
0138
0139 macb0: ethernet@f8008000 {
0140 pinctrl-names = "default";
0141 pinctrl-0 = <&pinctrl_macb0_default &pinctrl_macb0_phy_irq>;
0142 #address-cells = <1>;
0143 #size-cells = <0>;
0144 phy-mode = "rmii";
0145 status = "okay";
0146
0147 ethernet-phy@1 {
0148 reg = <0x1>;
0149 interrupt-parent = <&pioA>;
0150 interrupts = <56 IRQ_TYPE_LEVEL_LOW>;
0151 };
0152 };
0153
0154 tcb0: timer@f800c000 {
0155 timer0: timer@0 {
0156 compatible = "atmel,tcb-timer";
0157 reg = <0>;
0158 };
0159
0160 timer1: timer@1 {
0161 compatible = "atmel,tcb-timer";
0162 reg = <1>;
0163 };
0164 };
0165
0166 uart0: serial@f801c000 {
0167 pinctrl-names = "default";
0168 pinctrl-0 = <&pinctrl_uart0_default>;
0169 atmel,use-dma-rx;
0170 atmel,use-dma-tx;
0171 status = "okay";
0172 };
0173
0174 uart2: serial@f8024000 {
0175 pinctrl-names = "default";
0176 pinctrl-0 = <&pinctrl_uart2_default>;
0177 atmel,use-dma-rx;
0178 atmel,use-dma-tx;
0179 status = "okay";
0180 };
0181
0182 i2c0: i2c@f8028000 {
0183 dmas = <0>, <0>;
0184 pinctrl-names = "default", "gpio";
0185 pinctrl-0 = <&pinctrl_i2c0_default>;
0186 pinctrl-1 = <&pinctrl_i2c0_gpio>;
0187 sda-gpios = <&pioA PIN_PD21 GPIO_ACTIVE_HIGH>;
0188 scl-gpios = <&pioA PIN_PD22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0189 status = "okay";
0190 };
0191
0192 flx0: flexcom@f8034000 {
0193 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
0194 status = "okay";
0195
0196 i2c2: i2c@600 {
0197 dmas = <0>, <0>;
0198 pinctrl-names = "default", "gpio";
0199 pinctrl-0 = <&pinctrl_flx0_default>;
0200 pinctrl-1 = <&pinctrl_flx0_gpio>;
0201 sda-gpios = <&pioA PIN_PB28 GPIO_ACTIVE_HIGH>;
0202 scl-gpios = <&pioA PIN_PB29 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0203 status = "okay";
0204 };
0205 };
0206
0207 shdwc@f8048010 {
0208 debounce-delay-us = <976>;
0209
0210 input@0 {
0211 reg = <0>;
0212 };
0213 };
0214
0215 watchdog@f8048040 {
0216 status = "okay";
0217 };
0218
0219 spi1: spi@fc000000 {
0220 pinctrl-names = "default";
0221 pinctrl-0 = <&pinctrl_spi1_default>;
0222 status = "okay";
0223 };
0224
0225 i2c1: i2c@fc028000 {
0226 dmas = <0>, <0>;
0227 pinctrl-names = "default", "gpio";
0228 pinctrl-0 = <&pinctrl_i2c1_default>;
0229 pinctrl-1 = <&pinctrl_i2c1_gpio>;
0230 sda-gpios = <&pioA PIN_PC6 GPIO_ACTIVE_HIGH>;
0231 scl-gpios = <&pioA PIN_PC7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0232 status = "okay";
0233
0234 at24@50 {
0235 compatible = "atmel,24c02";
0236 reg = <0x50>;
0237 pagesize = <8>;
0238 };
0239 };
0240
0241 pinctrl@fc038000 {
0242 pinctrl_flx0_default: flx0_default {
0243 pinmux = <PIN_PB28__FLEXCOM0_IO0>,
0244 <PIN_PB29__FLEXCOM0_IO1>;
0245 bias-disable;
0246 };
0247
0248 pinctrl_flx0_gpio: flx0_gpio {
0249 pinmux = <PIN_PB28__GPIO>,
0250 <PIN_PB29__GPIO>;
0251 bias-disable;
0252 };
0253
0254 pinctrl_i2c0_default: i2c0_default {
0255 pinmux = <PIN_PD21__TWD0>,
0256 <PIN_PD22__TWCK0>;
0257 bias-disable;
0258 };
0259
0260 pinctrl_i2c0_gpio: i2c0_gpio {
0261 pinmux = <PIN_PD21__GPIO>,
0262 <PIN_PD22__GPIO>;
0263 bias-disable;
0264 };
0265
0266 pinctrl_i2c1_default: i2c1_default {
0267 pinmux = <PIN_PC6__TWD1>,
0268 <PIN_PC7__TWCK1>;
0269 bias-disable;
0270 };
0271
0272 pinctrl_i2c1_gpio: i2c1_gpio {
0273 pinmux = <PIN_PC6__GPIO>,
0274 <PIN_PC7__GPIO>;
0275 bias-disable;
0276 };
0277
0278 pinctrl_key_gpio_default: key_gpio_default {
0279 pinmux = <PIN_PA10__GPIO>;
0280 bias-pull-up;
0281 };
0282
0283 pinctrl_led_gpio_default: led_gpio_default {
0284 pinmux = <PIN_PB6__GPIO>,
0285 <PIN_PB8__GPIO>,
0286 <PIN_PB10__GPIO>;
0287 bias-pull-up;
0288 };
0289
0290 pinctrl_macb0_default: macb0_default {
0291 pinmux = <PIN_PB14__GTXCK>,
0292 <PIN_PB15__GTXEN>,
0293 <PIN_PB16__GRXDV>,
0294 <PIN_PB17__GRXER>,
0295 <PIN_PB18__GRX0>,
0296 <PIN_PB19__GRX1>,
0297 <PIN_PB20__GTX0>,
0298 <PIN_PB21__GTX1>,
0299 <PIN_PB22__GMDC>,
0300 <PIN_PB23__GMDIO>;
0301 bias-disable;
0302 };
0303
0304 pinctrl_macb0_phy_irq: macb0_phy_irq {
0305 pinmux = <PIN_PB24__GPIO>;
0306 bias-disable;
0307 };
0308
0309 pinctrl_nand_default: nand_default {
0310 re_we_data {
0311 pinmux = <PIN_PA22__D0>,
0312 <PIN_PA23__D1>,
0313 <PIN_PA24__D2>,
0314 <PIN_PA25__D3>,
0315 <PIN_PA26__D4>,
0316 <PIN_PA27__D5>,
0317 <PIN_PA28__D6>,
0318 <PIN_PA29__D7>,
0319 <PIN_PA30__NWE_NANDWE>,
0320 <PIN_PB2__NRD_NANDOE>;
0321 bias-pull-up;
0322 atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
0323 };
0324
0325 ale_cle_rdy_cs {
0326 pinmux = <PIN_PB0__A21_NANDALE>,
0327 <PIN_PB1__A22_NANDCLE>,
0328 <PIN_PC8__NANDRDY>,
0329 <PIN_PA31__NCS3>;
0330 bias-pull-up;
0331 };
0332 };
0333
0334 pinctrl_sdmmc0_default: sdmmc0_default {
0335 cmd_data {
0336 pinmux = <PIN_PA1__SDMMC0_CMD>,
0337 <PIN_PA2__SDMMC0_DAT0>,
0338 <PIN_PA3__SDMMC0_DAT1>,
0339 <PIN_PA4__SDMMC0_DAT2>,
0340 <PIN_PA5__SDMMC0_DAT3>,
0341 <PIN_PA6__SDMMC0_DAT4>,
0342 <PIN_PA7__SDMMC0_DAT5>,
0343 <PIN_PA8__SDMMC0_DAT6>,
0344 <PIN_PA9__SDMMC0_DAT7>;
0345 bias-pull-up;
0346 };
0347
0348 ck_cd_vddsel {
0349 pinmux = <PIN_PA0__SDMMC0_CK>,
0350 <PIN_PA11__SDMMC0_VDDSEL>,
0351 <PIN_PA13__SDMMC0_CD>;
0352 bias-disable;
0353 };
0354 };
0355
0356 pinctrl_spi0_default: spi0_default {
0357 pinmux = <PIN_PA14__SPI0_SPCK>,
0358 <PIN_PA15__SPI0_MOSI>,
0359 <PIN_PA16__SPI0_MISO>,
0360 <PIN_PA17__SPI0_NPCS0>;
0361 bias-disable;
0362 };
0363
0364 pinctrl_spi1_default: spi1_default {
0365 pinmux = <PIN_PC1__SPI1_SPCK>,
0366 <PIN_PC2__SPI1_MOSI>,
0367 <PIN_PC3__SPI1_MISO>,
0368 <PIN_PC4__SPI1_NPCS0>;
0369 bias-disable;
0370 };
0371
0372 pinctrl_uart0_default: uart0_default {
0373 pinmux = <PIN_PB26__URXD0>,
0374 <PIN_PB27__UTXD0>;
0375 bias-disable;
0376 };
0377
0378 pinctrl_uart2_default: uart2_default {
0379 pinmux = <PIN_PD23__URXD2>,
0380 <PIN_PD24__UTXD2>;
0381 bias-disable;
0382 };
0383
0384 pinctrl_usb_default: usb_default {
0385 pinmux = <PIN_PB12__GPIO>;
0386 bias-disable;
0387 };
0388
0389 pinctrl_usba_vbus: usba_vbus {
0390 pinmux = <PIN_PB11__GPIO>;
0391 bias-disable;
0392 };
0393
0394 };
0395
0396 };
0397 };
0398
0399 gpio-keys {
0400 compatible = "gpio-keys";
0401
0402 pinctrl-names = "default";
0403 pinctrl-0 = <&pinctrl_key_gpio_default>;
0404
0405 button-1 {
0406 label = "PB_USER";
0407 gpios = <&pioA PIN_PA10 GPIO_ACTIVE_LOW>;
0408 linux,code = <KEY_PROG1>;
0409 wakeup-source;
0410 };
0411 };
0412
0413 leds {
0414 compatible = "gpio-leds";
0415 pinctrl-names = "default";
0416 pinctrl-0 = <&pinctrl_led_gpio_default>;
0417 status = "okay";
0418
0419 red {
0420 label = "red";
0421 gpios = <&pioA PIN_PB10 GPIO_ACTIVE_HIGH>;
0422 };
0423
0424 green {
0425 label = "green";
0426 gpios = <&pioA PIN_PB8 GPIO_ACTIVE_HIGH>;
0427 };
0428
0429 blue {
0430 label = "blue";
0431 gpios = <&pioA PIN_PB6 GPIO_ACTIVE_HIGH>;
0432 linux,default-trigger = "heartbeat";
0433 };
0434 };
0435 };