1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * at91-sama7g54_curiosity.dts - Device Tree file for SAMA7G54 Curiosity Board 4 * 5 * Copyright (C) 2024 Microchip Technology Inc. and its subsidiaries 6 * 7 * Author: Mihai Sain <mihai.sain@microchip.com> 8 * 9 */ 10/dts-v1/; 11#include "sama7g5-pinfunc.h" 12#include "sama7g5.dtsi" 13#include <dt-bindings/input/input.h> 14#include <dt-bindings/leds/common.h> 15#include <dt-bindings/mfd/atmel-flexcom.h> 16#include <dt-bindings/pinctrl/at91.h> 17 18/ { 19 model = "Microchip SAMA7G54 Curiosity"; 20 compatible = "microchip,sama7g54-curiosity", "microchip,sama7g5", "microchip,sama7"; 21 22 aliases { 23 serial0 = &uart3; 24 i2c0 = &i2c10; 25 }; 26 27 chosen { 28 stdout-path = "serial0:115200n8"; 29 }; 30 31 gpio-keys { 32 compatible = "gpio-keys"; 33 pinctrl-names = "default"; 34 pinctrl-0 = <&pinctrl_key_gpio_default>; 35 36 button-user { 37 label = "user-button"; 38 gpios = <&pioA PIN_PD19 GPIO_ACTIVE_LOW>; 39 linux,code = <KEY_PROG1>; 40 wakeup-source; 41 }; 42 }; 43 44 leds { 45 compatible = "gpio-leds"; 46 pinctrl-names = "default"; 47 pinctrl-0 = <&pinctrl_led_gpio_default>; 48 49 led-red { 50 color = <LED_COLOR_ID_RED>; 51 function = LED_FUNCTION_POWER; 52 gpios = <&pioA PIN_PD13 GPIO_ACTIVE_HIGH>; 53 default-state = "off"; 54 }; 55 56 led-green { 57 color = <LED_COLOR_ID_GREEN>; 58 function = LED_FUNCTION_BOOT; 59 gpios = <&pioA PIN_PD14 GPIO_ACTIVE_HIGH>; 60 default-state = "off"; 61 }; 62 63 led-blue { 64 color = <LED_COLOR_ID_BLUE>; 65 function = LED_FUNCTION_CPU; 66 gpios = <&pioA PIN_PB15 GPIO_ACTIVE_HIGH>; 67 linux,default-trigger = "heartbeat"; 68 }; 69 }; 70 71 memory@60000000 { 72 device_type = "memory"; 73 reg = <0x60000000 0x10000000>; /* 256 MiB DDR3L-1066 16-bit */ 74 }; 75 76 reg_5v: regulator-5v { 77 compatible = "regulator-fixed"; 78 regulator-name = "5V_MAIN"; 79 regulator-min-microvolt = <5000000>; 80 regulator-max-microvolt = <5000000>; 81 regulator-always-on; 82 }; 83}; 84 85&adc { 86 vddana-supply = <&vddout25>; 87 vref-supply = <&vddout25>; 88 pinctrl-names = "default"; 89 pinctrl-0 = <&pinctrl_mikrobus1_an_default &pinctrl_mikrobus2_an_default>; 90 status = "okay"; 91}; 92 93&cpu0 { 94 cpu-supply = <&vddcpu>; 95}; 96 97&dma0 { 98 status = "okay"; 99}; 100 101&dma1 { 102 status = "okay"; 103}; 104 105&dma2 { 106 status = "okay"; 107}; 108 109&ebi { 110 pinctrl-names = "default"; 111 pinctrl-0 = <&pinctrl_nand_default>; 112 status = "okay"; 113 114 nand_controller: nand-controller { 115 status = "okay"; 116 117 nand@3 { 118 reg = <0x3 0x0 0x800000>; 119 atmel,rb = <0>; 120 nand-bus-width = <8>; 121 nand-ecc-mode = "hw"; 122 nand-ecc-strength = <8>; 123 nand-ecc-step-size = <512>; 124 nand-on-flash-bbt; 125 label = "nand"; 126 127 partitions { 128 compatible = "fixed-partitions"; 129 #address-cells = <1>; 130 #size-cells = <1>; 131 132 at91bootstrap@0 { 133 label = "nand: at91bootstrap"; 134 reg = <0x0 0x40000>; 135 }; 136 137 bootloader@40000 { 138 label = "nand: u-boot"; 139 reg = <0x40000 0x100000>; 140 }; 141 142 bootloaderenv@140000 { 143 label = "nand: u-boot env"; 144 reg = <0x140000 0x40000>; 145 }; 146 147 dtb@180000 { 148 label = "nand: device tree"; 149 reg = <0x180000 0x80000>; 150 }; 151 152 kernel@200000 { 153 label = "nand: kernel"; 154 reg = <0x200000 0x600000>; 155 }; 156 157 rootfs@800000 { 158 label = "nand: rootfs"; 159 reg = <0x800000 0x1f800000>; 160 }; 161 }; 162 }; 163 }; 164}; 165 166&flx3 { 167 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>; 168 status = "okay"; 169 170 uart3: serial@200 { 171 pinctrl-names = "default"; 172 pinctrl-0 = <&pinctrl_flx3_default>; 173 status = "okay"; 174 }; 175}; 176 177&flx10 { 178 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>; 179 status = "okay"; 180 181 i2c10: i2c@600 { 182 pinctrl-names = "default"; 183 pinctrl-0 = <&pinctrl_flx10_default>; 184 i2c-analog-filter; 185 i2c-digital-filter; 186 i2c-digital-filter-width-ns = <35>; 187 status = "okay"; 188 189 eeprom@51 { 190 compatible = "atmel,24c02"; 191 reg = <0x51>; 192 pagesize = <16>; 193 size = <256>; 194 vcc-supply = <&vdd_3v3>; 195 }; 196 197 pmic@5b { 198 compatible = "microchip,mcp16502"; 199 reg = <0x5b>; 200 lvin-supply = <®_5v>; 201 pvin1-supply = <®_5v>; 202 pvin2-supply = <®_5v>; 203 pvin3-supply = <®_5v>; 204 pvin4-supply = <®_5v>; 205 206 regulators { 207 vdd_3v3: VDD_IO { 208 regulator-name = "VDD_IO"; 209 regulator-min-microvolt = <3300000>; 210 regulator-max-microvolt = <3300000>; 211 regulator-initial-mode = <2>; 212 regulator-allowed-modes = <2>, <4>; 213 regulator-always-on; 214 215 regulator-state-standby { 216 regulator-on-in-suspend; 217 regulator-suspend-microvolt = <3300000>; 218 regulator-mode = <4>; 219 }; 220 221 regulator-state-mem { 222 regulator-off-in-suspend; 223 regulator-mode = <4>; 224 }; 225 }; 226 227 vddioddr: VDD_DDR { 228 regulator-name = "VDD_DDR"; 229 regulator-min-microvolt = <1350000>; 230 regulator-max-microvolt = <1350000>; 231 regulator-initial-mode = <2>; 232 regulator-allowed-modes = <2>, <4>; 233 regulator-always-on; 234 235 regulator-state-standby { 236 regulator-on-in-suspend; 237 regulator-suspend-microvolt = <1350000>; 238 regulator-mode = <4>; 239 }; 240 241 regulator-state-mem { 242 regulator-on-in-suspend; 243 regulator-suspend-microvolt = <1350000>; 244 regulator-mode = <4>; 245 }; 246 }; 247 248 vddcore: VDD_CORE { 249 regulator-name = "VDD_CORE"; 250 regulator-min-microvolt = <1150000>; 251 regulator-max-microvolt = <1150000>; 252 regulator-initial-mode = <2>; 253 regulator-allowed-modes = <2>, <4>; 254 regulator-always-on; 255 256 regulator-state-standby { 257 regulator-on-in-suspend; 258 regulator-suspend-microvolt = <1150000>; 259 regulator-mode = <4>; 260 }; 261 262 regulator-state-mem { 263 regulator-off-in-suspend; 264 regulator-mode = <4>; 265 }; 266 }; 267 268 vddcpu: VDD_OTHER { 269 regulator-name = "VDD_OTHER"; 270 regulator-min-microvolt = <1050000>; 271 regulator-max-microvolt = <1250000>; 272 regulator-initial-mode = <2>; 273 regulator-allowed-modes = <2>, <4>; 274 regulator-ramp-delay = <3125>; 275 regulator-always-on; 276 277 regulator-state-standby { 278 regulator-on-in-suspend; 279 regulator-suspend-microvolt = <1050000>; 280 regulator-mode = <4>; 281 }; 282 283 regulator-state-mem { 284 regulator-off-in-suspend; 285 regulator-mode = <4>; 286 }; 287 }; 288 289 vldo1: LDO1 { 290 regulator-name = "LDO1"; 291 regulator-min-microvolt = <1800000>; 292 regulator-max-microvolt = <1800000>; 293 regulator-always-on; 294 295 regulator-state-standby { 296 regulator-suspend-microvolt = <1800000>; 297 regulator-on-in-suspend; 298 }; 299 300 regulator-state-mem { 301 regulator-off-in-suspend; 302 }; 303 }; 304 305 vldo2: LDO2 { 306 regulator-name = "LDO2"; 307 regulator-min-microvolt = <3300000>; 308 regulator-max-microvolt = <3300000>; 309 regulator-always-on; 310 311 regulator-state-standby { 312 regulator-suspend-microvolt = <3300000>; 313 regulator-on-in-suspend; 314 }; 315 316 regulator-state-mem { 317 regulator-off-in-suspend; 318 }; 319 }; 320 }; 321 }; 322 }; 323}; 324 325&main_xtal { 326 clock-frequency = <24000000>; 327}; 328 329&qspi1 { 330 pinctrl-names = "default"; 331 pinctrl-0 = <&pinctrl_qspi1_default>; 332 status = "okay"; 333 334 flash@0 { 335 compatible = "jedec,spi-nor"; 336 reg = <0x0>; 337 spi-max-frequency = <100000000>; 338 spi-tx-bus-width = <4>; 339 spi-rx-bus-width = <4>; 340 m25p,fast-read; 341 }; 342}; 343 344&pioA { 345 pinctrl_flx3_default: flx3-default { 346 pinmux = <PIN_PD16__FLEXCOM3_IO0>, 347 <PIN_PD17__FLEXCOM3_IO1>; 348 bias-pull-up; 349 }; 350 351 pinctrl_flx10_default: flx10-default { 352 pinmux = <PIN_PC30__FLEXCOM10_IO0>, 353 <PIN_PC31__FLEXCOM10_IO1>; 354 bias-pull-up; 355 }; 356 357 pinctrl_key_gpio_default: key-gpio-default { 358 pinmux = <PIN_PD19__GPIO>; 359 bias-pull-up; 360 }; 361 362 pinctrl_led_gpio_default: led-gpio-default { 363 pinmux = <PIN_PD13__GPIO>, 364 <PIN_PD14__GPIO>, 365 <PIN_PB15__GPIO>; 366 bias-pull-up; 367 }; 368 369 pinctrl_mikrobus1_an_default: mikrobus1-an-default { 370 pinmux = <PIN_PC15__GPIO>; 371 bias-disable; 372 }; 373 374 pinctrl_mikrobus2_an_default: mikrobus2-an-default { 375 pinmux = <PIN_PC13__GPIO>; 376 bias-disable; 377 }; 378 379 pinctrl_nand_default: nand-default { 380 pinmux = <PIN_PD9__D0>, 381 <PIN_PD10__D1>, 382 <PIN_PD11__D2>, 383 <PIN_PC21__D3>, 384 <PIN_PC22__D4>, 385 <PIN_PC23__D5>, 386 <PIN_PC24__D6>, 387 <PIN_PD2__D7>, 388 <PIN_PD3__NANDRDY>, 389 <PIN_PD4__NCS3_NANDCS>, 390 <PIN_PD5__NWE_NWR0_NANDWE>, 391 <PIN_PD6__NRD_NANDOE>, 392 <PIN_PD7__A21_NANDALE>, 393 <PIN_PD8__A22_NANDCLE>; 394 bias-disable; 395 slew-rate = <0>; 396 }; 397 398 pinctrl_qspi1_default: qspi1-default { 399 pinmux = <PIN_PB22__QSPI1_IO3>, 400 <PIN_PB23__QSPI1_IO2>, 401 <PIN_PB24__QSPI1_IO1>, 402 <PIN_PB25__QSPI1_IO0>, 403 <PIN_PB26__QSPI1_CS>, 404 <PIN_PB27__QSPI1_SCK>; 405 bias-pull-up; 406 slew-rate = <0>; 407 }; 408 409 pinctrl_sdmmc0_default: sdmmc0-default { 410 pinmux = <PIN_PA0__SDMMC0_CK>, 411 <PIN_PA1__SDMMC0_CMD>, 412 <PIN_PA2__SDMMC0_RSTN>, 413 <PIN_PA3__SDMMC0_DAT0>, 414 <PIN_PA4__SDMMC0_DAT1>, 415 <PIN_PA5__SDMMC0_DAT2>, 416 <PIN_PA6__SDMMC0_DAT3>; 417 bias-pull-up; 418 slew-rate = <0>; 419 }; 420 421 pinctrl_sdmmc1_default: sdmmc1-default { 422 pinmux = <PIN_PB29__SDMMC1_CMD>, 423 <PIN_PB30__SDMMC1_CK>, 424 <PIN_PB31__SDMMC1_DAT0>, 425 <PIN_PC0__SDMMC1_DAT1>, 426 <PIN_PC1__SDMMC1_DAT2>, 427 <PIN_PC2__SDMMC1_DAT3>, 428 <PIN_PC4__SDMMC1_CD>; 429 bias-pull-up; 430 slew-rate = <0>; 431 }; 432}; 433 434&rtt { 435 atmel,rtt-rtc-time-reg = <&gpbr 0x0>; 436}; 437 438/* M.2 slot for wireless card */ 439&sdmmc0 { 440 bus-width = <4>; 441 cd-gpios = <&pioA 31 GPIO_ACTIVE_LOW>; 442 disable-wp; 443 sdhci-caps-mask = <0x0 0x00200000>; 444 vmmc-supply = <&vdd_3v3>; 445 vqmmc-supply = <&vdd_3v3>; 446 pinctrl-names = "default"; 447 pinctrl-0 = <&pinctrl_sdmmc0_default>; 448 status = "okay"; 449}; 450 451/* micro SD socket */ 452&sdmmc1 { 453 bus-width = <4>; 454 disable-wp; 455 sdhci-caps-mask = <0x0 0x00200000>; 456 vmmc-supply = <&vdd_3v3>; 457 vqmmc-supply = <&vdd_3v3>; 458 pinctrl-names = "default"; 459 pinctrl-0 = <&pinctrl_sdmmc1_default>; 460 status = "okay"; 461}; 462 463&slow_xtal { 464 clock-frequency = <32768>; 465}; 466 467&shdwc { 468 debounce-delay-us = <976>; 469 status = "okay"; 470 471 input@0 { 472 reg = <0>; 473 }; 474}; 475 476&tcb0 { 477 timer0: timer@0 { 478 compatible = "atmel,tcb-timer"; 479 reg = <0>; 480 }; 481 482 timer1: timer@1 { 483 compatible = "atmel,tcb-timer"; 484 reg = <1>; 485 }; 486}; 487 488&trng { 489 status = "okay"; 490}; 491 492&vddout25 { 493 vin-supply = <&vdd_3v3>; 494 status = "okay"; 495}; 496