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 power-monitor@1f { 190 compatible = "microchip,pac1934"; 191 reg = <0x1f>; 192 #address-cells = <1>; 193 #size-cells = <0>; 194 195 channel@1 { 196 reg = <0x1>; 197 shunt-resistor-micro-ohms = <47000>; 198 label = "VDD3V3"; 199 }; 200 201 channel@2 { 202 reg = <0x2>; 203 shunt-resistor-micro-ohms = <47000>; 204 label = "VDDIODDR"; 205 }; 206 207 channel@3 { 208 reg = <0x3>; 209 shunt-resistor-micro-ohms = <47000>; 210 label = "VDDCORE"; 211 }; 212 213 channel@4 { 214 reg = <0x4>; 215 shunt-resistor-micro-ohms = <47000>; 216 label = "VDDCPU"; 217 }; 218 }; 219 220 eeprom@51 { 221 compatible = "atmel,24c02"; 222 reg = <0x51>; 223 pagesize = <16>; 224 size = <256>; 225 vcc-supply = <&vdd_3v3>; 226 }; 227 228 pmic@5b { 229 compatible = "microchip,mcp16502"; 230 reg = <0x5b>; 231 lvin-supply = <®_5v>; 232 pvin1-supply = <®_5v>; 233 pvin2-supply = <®_5v>; 234 pvin3-supply = <®_5v>; 235 pvin4-supply = <®_5v>; 236 237 regulators { 238 vdd_3v3: VDD_IO { 239 regulator-name = "VDD_IO"; 240 regulator-min-microvolt = <3300000>; 241 regulator-max-microvolt = <3300000>; 242 regulator-initial-mode = <2>; 243 regulator-allowed-modes = <2>, <4>; 244 regulator-always-on; 245 246 regulator-state-standby { 247 regulator-on-in-suspend; 248 regulator-suspend-microvolt = <3300000>; 249 regulator-mode = <4>; 250 }; 251 252 regulator-state-mem { 253 regulator-off-in-suspend; 254 regulator-mode = <4>; 255 }; 256 }; 257 258 vddioddr: VDD_DDR { 259 regulator-name = "VDD_DDR"; 260 regulator-min-microvolt = <1350000>; 261 regulator-max-microvolt = <1350000>; 262 regulator-initial-mode = <2>; 263 regulator-allowed-modes = <2>, <4>; 264 regulator-always-on; 265 266 regulator-state-standby { 267 regulator-on-in-suspend; 268 regulator-suspend-microvolt = <1350000>; 269 regulator-mode = <4>; 270 }; 271 272 regulator-state-mem { 273 regulator-on-in-suspend; 274 regulator-suspend-microvolt = <1350000>; 275 regulator-mode = <4>; 276 }; 277 }; 278 279 vddcore: VDD_CORE { 280 regulator-name = "VDD_CORE"; 281 regulator-min-microvolt = <1150000>; 282 regulator-max-microvolt = <1150000>; 283 regulator-initial-mode = <2>; 284 regulator-allowed-modes = <2>, <4>; 285 regulator-always-on; 286 287 regulator-state-standby { 288 regulator-on-in-suspend; 289 regulator-suspend-microvolt = <1150000>; 290 regulator-mode = <4>; 291 }; 292 293 regulator-state-mem { 294 regulator-off-in-suspend; 295 regulator-mode = <4>; 296 }; 297 }; 298 299 vddcpu: VDD_OTHER { 300 regulator-name = "VDD_OTHER"; 301 regulator-min-microvolt = <1050000>; 302 regulator-max-microvolt = <1250000>; 303 regulator-initial-mode = <2>; 304 regulator-allowed-modes = <2>, <4>; 305 regulator-ramp-delay = <3125>; 306 regulator-always-on; 307 308 regulator-state-standby { 309 regulator-on-in-suspend; 310 regulator-suspend-microvolt = <1050000>; 311 regulator-mode = <4>; 312 }; 313 314 regulator-state-mem { 315 regulator-off-in-suspend; 316 regulator-mode = <4>; 317 }; 318 }; 319 320 vldo1: LDO1 { 321 regulator-name = "LDO1"; 322 regulator-min-microvolt = <1800000>; 323 regulator-max-microvolt = <1800000>; 324 regulator-always-on; 325 326 regulator-state-standby { 327 regulator-suspend-microvolt = <1800000>; 328 regulator-on-in-suspend; 329 }; 330 331 regulator-state-mem { 332 regulator-off-in-suspend; 333 }; 334 }; 335 336 vldo2: LDO2 { 337 regulator-name = "LDO2"; 338 regulator-min-microvolt = <3300000>; 339 regulator-max-microvolt = <3300000>; 340 regulator-always-on; 341 342 regulator-state-standby { 343 regulator-suspend-microvolt = <3300000>; 344 regulator-on-in-suspend; 345 }; 346 347 regulator-state-mem { 348 regulator-off-in-suspend; 349 }; 350 }; 351 }; 352 }; 353 }; 354}; 355 356&main_xtal { 357 clock-frequency = <24000000>; 358}; 359 360&qspi1 { 361 pinctrl-names = "default"; 362 pinctrl-0 = <&pinctrl_qspi1_default>; 363 status = "okay"; 364 365 flash@0 { 366 compatible = "jedec,spi-nor"; 367 reg = <0x0>; 368 spi-max-frequency = <100000000>; 369 spi-tx-bus-width = <4>; 370 spi-rx-bus-width = <4>; 371 m25p,fast-read; 372 label = "at91-qspi"; 373 374 partitions { 375 compatible = "fixed-partitions"; 376 #address-cells = <1>; 377 #size-cells = <1>; 378 379 at91bootstrap@0 { 380 label = "qspi1: at91bootstrap"; 381 reg = <0x0 0x40000>; 382 }; 383 384 bootloader@40000 { 385 label = "qspi1: u-boot"; 386 reg = <0x40000 0x100000>; 387 }; 388 389 bootloaderenv@140000 { 390 label = "qspi1: u-boot env"; 391 reg = <0x140000 0x40000>; 392 }; 393 394 dtb@180000 { 395 label = "qspi1: device tree"; 396 reg = <0x180000 0x80000>; 397 }; 398 399 kernel@200000 { 400 label = "qspi1: kernel"; 401 reg = <0x200000 0x600000>; 402 }; 403 }; 404 }; 405}; 406 407&pioA { 408 pinctrl_flx3_default: flx3-default { 409 pinmux = <PIN_PD16__FLEXCOM3_IO0>, 410 <PIN_PD17__FLEXCOM3_IO1>; 411 bias-pull-up; 412 }; 413 414 pinctrl_flx10_default: flx10-default { 415 pinmux = <PIN_PC30__FLEXCOM10_IO0>, 416 <PIN_PC31__FLEXCOM10_IO1>; 417 bias-pull-up; 418 }; 419 420 pinctrl_key_gpio_default: key-gpio-default { 421 pinmux = <PIN_PD19__GPIO>; 422 bias-pull-up; 423 }; 424 425 pinctrl_led_gpio_default: led-gpio-default { 426 pinmux = <PIN_PD13__GPIO>, 427 <PIN_PD14__GPIO>, 428 <PIN_PB15__GPIO>; 429 bias-pull-up; 430 }; 431 432 pinctrl_mikrobus1_an_default: mikrobus1-an-default { 433 pinmux = <PIN_PC15__GPIO>; 434 bias-disable; 435 }; 436 437 pinctrl_mikrobus2_an_default: mikrobus2-an-default { 438 pinmux = <PIN_PC13__GPIO>; 439 bias-disable; 440 }; 441 442 pinctrl_nand_default: nand-default { 443 pinmux = <PIN_PD9__D0>, 444 <PIN_PD10__D1>, 445 <PIN_PD11__D2>, 446 <PIN_PC21__D3>, 447 <PIN_PC22__D4>, 448 <PIN_PC23__D5>, 449 <PIN_PC24__D6>, 450 <PIN_PD2__D7>, 451 <PIN_PD3__NANDRDY>, 452 <PIN_PD4__NCS3_NANDCS>, 453 <PIN_PD5__NWE_NWR0_NANDWE>, 454 <PIN_PD6__NRD_NANDOE>, 455 <PIN_PD7__A21_NANDALE>, 456 <PIN_PD8__A22_NANDCLE>; 457 bias-disable; 458 slew-rate = <0>; 459 }; 460 461 pinctrl_qspi1_default: qspi1-default { 462 pinmux = <PIN_PB22__QSPI1_IO3>, 463 <PIN_PB23__QSPI1_IO2>, 464 <PIN_PB24__QSPI1_IO1>, 465 <PIN_PB25__QSPI1_IO0>, 466 <PIN_PB26__QSPI1_CS>, 467 <PIN_PB27__QSPI1_SCK>; 468 bias-pull-up; 469 slew-rate = <0>; 470 }; 471 472 pinctrl_sdmmc0_default: sdmmc0-default { 473 pinmux = <PIN_PA0__SDMMC0_CK>, 474 <PIN_PA1__SDMMC0_CMD>, 475 <PIN_PA2__SDMMC0_RSTN>, 476 <PIN_PA3__SDMMC0_DAT0>, 477 <PIN_PA4__SDMMC0_DAT1>, 478 <PIN_PA5__SDMMC0_DAT2>, 479 <PIN_PA6__SDMMC0_DAT3>; 480 bias-pull-up; 481 slew-rate = <0>; 482 }; 483 484 pinctrl_sdmmc1_default: sdmmc1-default { 485 pinmux = <PIN_PB29__SDMMC1_CMD>, 486 <PIN_PB30__SDMMC1_CK>, 487 <PIN_PB31__SDMMC1_DAT0>, 488 <PIN_PC0__SDMMC1_DAT1>, 489 <PIN_PC1__SDMMC1_DAT2>, 490 <PIN_PC2__SDMMC1_DAT3>, 491 <PIN_PC4__SDMMC1_CD>; 492 bias-pull-up; 493 slew-rate = <0>; 494 }; 495}; 496 497&rtt { 498 atmel,rtt-rtc-time-reg = <&gpbr 0x0>; 499}; 500 501/* M.2 slot for wireless card */ 502&sdmmc0 { 503 bus-width = <4>; 504 cd-gpios = <&pioA 31 GPIO_ACTIVE_LOW>; 505 disable-wp; 506 sdhci-caps-mask = <0x0 0x00200000>; 507 vmmc-supply = <&vdd_3v3>; 508 vqmmc-supply = <&vdd_3v3>; 509 pinctrl-names = "default"; 510 pinctrl-0 = <&pinctrl_sdmmc0_default>; 511 status = "okay"; 512}; 513 514/* micro SD socket */ 515&sdmmc1 { 516 bus-width = <4>; 517 disable-wp; 518 sdhci-caps-mask = <0x0 0x00200000>; 519 vmmc-supply = <&vdd_3v3>; 520 vqmmc-supply = <&vdd_3v3>; 521 pinctrl-names = "default"; 522 pinctrl-0 = <&pinctrl_sdmmc1_default>; 523 status = "okay"; 524}; 525 526&slow_xtal { 527 clock-frequency = <32768>; 528}; 529 530&shdwc { 531 debounce-delay-us = <976>; 532 status = "okay"; 533 534 input@0 { 535 reg = <0>; 536 }; 537}; 538 539&tcb0 { 540 timer0: timer@0 { 541 compatible = "atmel,tcb-timer"; 542 reg = <0>; 543 }; 544 545 timer1: timer@1 { 546 compatible = "atmel,tcb-timer"; 547 reg = <1>; 548 }; 549}; 550 551&trng { 552 status = "okay"; 553}; 554 555&vddout25 { 556 vin-supply = <&vdd_3v3>; 557 status = "okay"; 558}; 559