Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 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 | }; |
Tom Rini | 9c8af15 | 2024-12-24 12:03:04 -0600 | [diff] [blame] | 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 | }; |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 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 | |
Tom Rini | 844493d | 2025-01-26 16:17:47 -0600 | [diff] [blame] | 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 | |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 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>; |
Tom Rini | 9c8af15 | 2024-12-24 12:03:04 -0600 | [diff] [blame] | 231 | lvin-supply = <®_5v>; |
| 232 | pvin1-supply = <®_5v>; |
| 233 | pvin2-supply = <®_5v>; |
| 234 | pvin3-supply = <®_5v>; |
| 235 | pvin4-supply = <®_5v>; |
Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame] | 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 | }; |
| 373 | }; |
| 374 | |
| 375 | &pioA { |
| 376 | pinctrl_flx3_default: flx3-default { |
| 377 | pinmux = <PIN_PD16__FLEXCOM3_IO0>, |
| 378 | <PIN_PD17__FLEXCOM3_IO1>; |
| 379 | bias-pull-up; |
| 380 | }; |
| 381 | |
| 382 | pinctrl_flx10_default: flx10-default { |
| 383 | pinmux = <PIN_PC30__FLEXCOM10_IO0>, |
| 384 | <PIN_PC31__FLEXCOM10_IO1>; |
| 385 | bias-pull-up; |
| 386 | }; |
| 387 | |
| 388 | pinctrl_key_gpio_default: key-gpio-default { |
| 389 | pinmux = <PIN_PD19__GPIO>; |
| 390 | bias-pull-up; |
| 391 | }; |
| 392 | |
| 393 | pinctrl_led_gpio_default: led-gpio-default { |
| 394 | pinmux = <PIN_PD13__GPIO>, |
| 395 | <PIN_PD14__GPIO>, |
| 396 | <PIN_PB15__GPIO>; |
| 397 | bias-pull-up; |
| 398 | }; |
| 399 | |
| 400 | pinctrl_mikrobus1_an_default: mikrobus1-an-default { |
| 401 | pinmux = <PIN_PC15__GPIO>; |
| 402 | bias-disable; |
| 403 | }; |
| 404 | |
| 405 | pinctrl_mikrobus2_an_default: mikrobus2-an-default { |
| 406 | pinmux = <PIN_PC13__GPIO>; |
| 407 | bias-disable; |
| 408 | }; |
| 409 | |
| 410 | pinctrl_nand_default: nand-default { |
| 411 | pinmux = <PIN_PD9__D0>, |
| 412 | <PIN_PD10__D1>, |
| 413 | <PIN_PD11__D2>, |
| 414 | <PIN_PC21__D3>, |
| 415 | <PIN_PC22__D4>, |
| 416 | <PIN_PC23__D5>, |
| 417 | <PIN_PC24__D6>, |
| 418 | <PIN_PD2__D7>, |
| 419 | <PIN_PD3__NANDRDY>, |
| 420 | <PIN_PD4__NCS3_NANDCS>, |
| 421 | <PIN_PD5__NWE_NWR0_NANDWE>, |
| 422 | <PIN_PD6__NRD_NANDOE>, |
| 423 | <PIN_PD7__A21_NANDALE>, |
| 424 | <PIN_PD8__A22_NANDCLE>; |
| 425 | bias-disable; |
| 426 | slew-rate = <0>; |
| 427 | }; |
| 428 | |
| 429 | pinctrl_qspi1_default: qspi1-default { |
| 430 | pinmux = <PIN_PB22__QSPI1_IO3>, |
| 431 | <PIN_PB23__QSPI1_IO2>, |
| 432 | <PIN_PB24__QSPI1_IO1>, |
| 433 | <PIN_PB25__QSPI1_IO0>, |
| 434 | <PIN_PB26__QSPI1_CS>, |
| 435 | <PIN_PB27__QSPI1_SCK>; |
| 436 | bias-pull-up; |
| 437 | slew-rate = <0>; |
| 438 | }; |
| 439 | |
| 440 | pinctrl_sdmmc0_default: sdmmc0-default { |
| 441 | pinmux = <PIN_PA0__SDMMC0_CK>, |
| 442 | <PIN_PA1__SDMMC0_CMD>, |
| 443 | <PIN_PA2__SDMMC0_RSTN>, |
| 444 | <PIN_PA3__SDMMC0_DAT0>, |
| 445 | <PIN_PA4__SDMMC0_DAT1>, |
| 446 | <PIN_PA5__SDMMC0_DAT2>, |
| 447 | <PIN_PA6__SDMMC0_DAT3>; |
| 448 | bias-pull-up; |
| 449 | slew-rate = <0>; |
| 450 | }; |
| 451 | |
| 452 | pinctrl_sdmmc1_default: sdmmc1-default { |
| 453 | pinmux = <PIN_PB29__SDMMC1_CMD>, |
| 454 | <PIN_PB30__SDMMC1_CK>, |
| 455 | <PIN_PB31__SDMMC1_DAT0>, |
| 456 | <PIN_PC0__SDMMC1_DAT1>, |
| 457 | <PIN_PC1__SDMMC1_DAT2>, |
| 458 | <PIN_PC2__SDMMC1_DAT3>, |
| 459 | <PIN_PC4__SDMMC1_CD>; |
| 460 | bias-pull-up; |
| 461 | slew-rate = <0>; |
| 462 | }; |
| 463 | }; |
| 464 | |
| 465 | &rtt { |
| 466 | atmel,rtt-rtc-time-reg = <&gpbr 0x0>; |
| 467 | }; |
| 468 | |
| 469 | /* M.2 slot for wireless card */ |
| 470 | &sdmmc0 { |
| 471 | bus-width = <4>; |
| 472 | cd-gpios = <&pioA 31 GPIO_ACTIVE_LOW>; |
| 473 | disable-wp; |
| 474 | sdhci-caps-mask = <0x0 0x00200000>; |
| 475 | vmmc-supply = <&vdd_3v3>; |
| 476 | vqmmc-supply = <&vdd_3v3>; |
| 477 | pinctrl-names = "default"; |
| 478 | pinctrl-0 = <&pinctrl_sdmmc0_default>; |
| 479 | status = "okay"; |
| 480 | }; |
| 481 | |
| 482 | /* micro SD socket */ |
| 483 | &sdmmc1 { |
| 484 | bus-width = <4>; |
| 485 | disable-wp; |
| 486 | sdhci-caps-mask = <0x0 0x00200000>; |
| 487 | vmmc-supply = <&vdd_3v3>; |
| 488 | vqmmc-supply = <&vdd_3v3>; |
| 489 | pinctrl-names = "default"; |
| 490 | pinctrl-0 = <&pinctrl_sdmmc1_default>; |
| 491 | status = "okay"; |
| 492 | }; |
| 493 | |
| 494 | &slow_xtal { |
| 495 | clock-frequency = <32768>; |
| 496 | }; |
| 497 | |
| 498 | &shdwc { |
| 499 | debounce-delay-us = <976>; |
| 500 | status = "okay"; |
| 501 | |
| 502 | input@0 { |
| 503 | reg = <0>; |
| 504 | }; |
| 505 | }; |
| 506 | |
| 507 | &tcb0 { |
| 508 | timer0: timer@0 { |
| 509 | compatible = "atmel,tcb-timer"; |
| 510 | reg = <0>; |
| 511 | }; |
| 512 | |
| 513 | timer1: timer@1 { |
| 514 | compatible = "atmel,tcb-timer"; |
| 515 | reg = <1>; |
| 516 | }; |
| 517 | }; |
| 518 | |
| 519 | &trng { |
| 520 | status = "okay"; |
| 521 | }; |
| 522 | |
| 523 | &vddout25 { |
| 524 | vin-supply = <&vdd_3v3>; |
| 525 | status = "okay"; |
| 526 | }; |