1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * at91-sam9x60_curiosity.dts - Device Tree file for Microchip SAM9X60 Curiosity board 4 * 5 * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries 6 * 7 * Author: Durai Manickam KR <durai.manickamkr@microchip.com> 8 */ 9/dts-v1/; 10#include "sam9x60.dtsi" 11#include <dt-bindings/input/input.h> 12 13/ { 14 model = "Microchip SAM9X60 Curiosity"; 15 compatible = "microchip,sam9x60-curiosity", "microchip,sam9x60", "atmel,at91sam9"; 16 17 aliases { 18 i2c0 = &i2c0; 19 i2c1 = &i2c6; 20 serial2 = &uart7; 21 }; 22 23 chosen { 24 stdout-path = "serial0:115200n8"; 25 }; 26 27 memory@20000000 { 28 reg = <0x20000000 0x8000000>; 29 }; 30 31 clocks { 32 slow_xtal { 33 clock-frequency = <32768>; 34 }; 35 36 main_xtal { 37 clock-frequency = <24000000>; 38 }; 39 }; 40 41 gpio-keys { 42 compatible = "gpio-keys"; 43 pinctrl-names = "default"; 44 pinctrl-0 = <&pinctrl_key_gpio_default>; 45 46 button-user { 47 label = "PB_USER"; 48 gpios = <&pioA 29 GPIO_ACTIVE_LOW>; 49 linux,code = <KEY_PROG1>; 50 wakeup-source; 51 }; 52 }; 53 54 leds { 55 compatible = "gpio-leds"; 56 pinctrl-names = "default"; 57 pinctrl-0 = <&pinctrl_gpio_leds>; 58 59 led-red { 60 label = "red"; 61 gpios = <&pioD 17 GPIO_ACTIVE_HIGH>; 62 }; 63 64 led-green { 65 label = "green"; 66 gpios = <&pioD 19 GPIO_ACTIVE_HIGH>; 67 }; 68 69 led-blue { 70 label = "blue"; 71 gpios = <&pioD 21 GPIO_ACTIVE_HIGH>; 72 linux,default-trigger = "heartbeat"; 73 }; 74 }; 75 76 77 vdd_1v8: regulator-0 { 78 compatible = "regulator-fixed"; 79 regulator-always-on; 80 regulator-max-microvolt = <1800000>; 81 regulator-min-microvolt = <1800000>; 82 regulator-name = "VDD_1V8"; 83 }; 84 85 vdd_1v15: regulator-1 { 86 compatible = "regulator-fixed"; 87 regulator-always-on; 88 regulator-max-microvolt = <1150000>; 89 regulator-min-microvolt = <1150000>; 90 regulator-name = "VDD_1V15"; 91 }; 92 93 vdd1_3v3: regulator-2 { 94 compatible = "regulator-fixed"; 95 regulator-always-on; 96 regulator-max-microvolt = <3300000>; 97 regulator-min-microvolt = <3300000>; 98 regulator-name = "VDD1_3V3"; 99 }; 100}; 101 102&adc { 103 vddana-supply = <&vdd1_3v3>; 104 vref-supply = <&vdd1_3v3>; 105 pinctrl-names = "default"; 106 pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>; 107 status = "okay"; 108}; 109 110&can0 { 111 pinctrl-names = "default"; 112 pinctrl-0 = <&pinctrl_can0_rx_tx>; 113 status = "disabled"; /* Conflict with dbgu. */ 114}; 115 116&can1 { 117 pinctrl-names = "default"; 118 pinctrl-0 = <&pinctrl_can1_rx_tx>; 119 status = "okay"; 120}; 121 122&dbgu { 123 pinctrl-names = "default"; 124 pinctrl-0 = <&pinctrl_dbgu>; 125 status = "okay"; /* Conflict with can0. */ 126}; 127 128&ebi { 129 pinctrl-names = "default"; 130 pinctrl-0 = <&pinctrl_ebi_addr_nand &pinctrl_ebi_data_lsb>; 131 status = "okay"; 132 133 nand_controller: nand-controller { 134 pinctrl-names = "default"; 135 pinctrl-0 = <&pinctrl_nand_oe_we &pinctrl_nand_cs &pinctrl_nand_rb>; 136 status = "okay"; 137 138 nand@3 { 139 reg = <0x3 0x0 0x800000>; 140 rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>; 141 cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>; 142 nand-bus-width = <8>; 143 nand-ecc-mode = "hw"; 144 nand-ecc-strength = <8>; 145 nand-ecc-step-size = <512>; 146 nand-on-flash-bbt; 147 label = "atmel_nand"; 148 149 partitions { 150 compatible = "fixed-partitions"; 151 #address-cells = <1>; 152 #size-cells = <1>; 153 154 at91bootstrap@0 { 155 label = "at91bootstrap"; 156 reg = <0x0 0x40000>; 157 }; 158 159 uboot@40000 { 160 label = "u-boot"; 161 reg = <0x40000 0xc0000>; 162 }; 163 164 ubootenvred@100000 { 165 label = "U-Boot Env Redundant"; 166 reg = <0x100000 0x40000>; 167 }; 168 169 ubootenv@140000 { 170 label = "U-Boot Env"; 171 reg = <0x140000 0x40000>; 172 }; 173 174 dtb@180000 { 175 label = "device tree"; 176 reg = <0x180000 0x80000>; 177 }; 178 179 kernel@200000 { 180 label = "kernel"; 181 reg = <0x200000 0x600000>; 182 }; 183 184 rootfs@800000 { 185 label = "rootfs"; 186 reg = <0x800000 0x1f800000>; 187 }; 188 }; 189 }; 190 }; 191}; 192 193&flx0 { 194 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>; 195 status = "okay"; 196 197 i2c0: i2c@600 { 198 dmas = <0>, <0>; 199 pinctrl-names = "default"; 200 pinctrl-0 = <&pinctrl_flx0_default>; 201 #address-cells = <1>; 202 #size-cells = <0>; 203 i2c-analog-filter; 204 i2c-digital-filter; 205 i2c-digital-filter-width-ns = <35>; 206 status = "okay"; 207 208 eeprom@53 { 209 compatible = "atmel,24c02"; 210 reg = <0x53>; 211 pagesize = <16>; 212 }; 213 }; 214}; 215 216&flx6 { 217 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>; 218 status = "okay"; 219 220 i2c6: i2c@600 { 221 dmas = <0>, <0>; 222 pinctrl-names = "default"; 223 pinctrl-0 = <&pinctrl_flx6_default>; 224 i2c-analog-filter; 225 i2c-digital-filter; 226 i2c-digital-filter-width-ns = <35>; 227 status = "disabled"; 228 }; 229}; 230 231&flx7 { 232 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>; 233 status = "okay"; 234 235 uart7: serial@200 { 236 pinctrl-names = "default"; 237 pinctrl-0 = <&pinctrl_flx7_default>; 238 status = "okay"; 239 }; 240}; 241 242&macb0 { 243 phy-mode = "rmii"; 244 #address-cells = <1>; 245 #size-cells = <0>; 246 pinctrl-names = "default"; 247 pinctrl-0 = <&pinctrl_macb0_rmii>; 248 status = "okay"; 249 250 ethernet-phy@0 { 251 reg = <0x0>; 252 interrupt-parent = <&pioB>; 253 interrupts = <8 IRQ_TYPE_LEVEL_LOW>; 254 }; 255}; 256 257&pinctrl { 258 adc { 259 pinctrl_adc_default: adc-default { 260 atmel,pins = <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_NONE>; 261 }; 262 263 pinctrl_adtrg_default: adtrg-default { 264 atmel,pins = <AT91_PIOB 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; 265 }; 266 }; 267 268 can0 { 269 pinctrl_can0_rx_tx: can0-rx-tx { 270 atmel,pins = 271 <AT91_PIOA 9 AT91_PERIPH_B AT91_PINCTRL_NONE /* CANRX0 */ 272 AT91_PIOA 10 AT91_PERIPH_B AT91_PINCTRL_NONE /* CANTX0 */ 273 AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN>; /* Enable CAN Transceivers */ 274 }; 275 }; 276 277 can1 { 278 pinctrl_can1_rx_tx: can1-rx-tx { 279 atmel,pins = 280 <AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_NONE /* CANRX1 */ 281 AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_NONE /* CANTX1 */ 282 AT91_PIOB 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_DOWN>; /* Enable CAN Transceivers */ 283 }; 284 }; 285 286 dbgu { 287 pinctrl_dbgu: dbgu-0 { 288 atmel,pins = <AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_PULL_UP 289 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; 290 }; 291 }; 292 293 ebi { 294 pinctrl_ebi_data_lsb: ebi-data-lsb { 295 atmel,pins = 296 <AT91_PIOD 6 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS) 297 AT91_PIOD 7 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS) 298 AT91_PIOD 8 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS) 299 AT91_PIOD 9 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS) 300 AT91_PIOD 10 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS) 301 AT91_PIOD 11 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS) 302 AT91_PIOD 12 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS) 303 AT91_PIOD 13 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>; 304 }; 305 306 pinctrl_ebi_addr_nand: ebi-addr-nand { 307 atmel,pins = 308 <AT91_PIOD 2 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS) 309 AT91_PIOD 3 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>; 310 }; 311 }; 312 313 flexcom { 314 pinctrl_flx0_default: flx0-twi { 315 atmel,pins = 316 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP 317 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; 318 }; 319 320 pinctrl_flx6_default: flx6-twi { 321 atmel,pins = 322 <AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP 323 AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; 324 }; 325 326 pinctrl_flx7_default: flx7-usart { 327 atmel,pins = 328 <AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE 329 AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>; 330 }; 331 }; 332 333 gpio-keys { 334 pinctrl_key_gpio_default: pinctrl-key-gpio { 335 atmel,pins = <AT91_PIOA 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; 336 }; 337 }; 338 339 leds { 340 pinctrl_gpio_leds: gpio-leds { 341 atmel,pins = <AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_NONE 342 AT91_PIOD 19 AT91_PERIPH_GPIO AT91_PINCTRL_NONE 343 AT91_PIOD 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; 344 }; 345 }; 346 347 macb0 { 348 pinctrl_macb0_rmii: macb0-rmii-0 { 349 atmel,pins = 350 <AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB0 periph A */ 351 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB1 periph A */ 352 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB2 periph A */ 353 AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB3 periph A */ 354 AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB4 periph A */ 355 AT91_PIOB 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB5 periph A */ 356 AT91_PIOB 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB6 periph A */ 357 AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB7 periph A */ 358 AT91_PIOB 8 AT91_PERIPH_GPIO AT91_PINCTRL_NONE /* PB8 IRQ GPIO */ 359 AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PB9 periph A */ 360 AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PB10 periph A */ 361 }; 362 }; 363 364 nand { 365 pinctrl_nand_oe_we: nand-oe-we-0 { 366 atmel,pins = 367 <AT91_PIOD 0 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS) 368 AT91_PIOD 1 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>; 369 }; 370 371 pinctrl_nand_rb: nand-rb-0 { 372 atmel,pins = 373 <AT91_PIOD 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; 374 }; 375 376 pinctrl_nand_cs: nand-cs-0 { 377 atmel,pins = 378 <AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>; 379 }; 380 }; 381 382 pwm0 { 383 pinctrl_pwm0_0: pwm0-0 { 384 atmel,pins = <AT91_PIOB 12 AT91_PERIPH_B AT91_PINCTRL_NONE>; 385 }; 386 387 pinctrl_pwm0_1: pwm0-1 { 388 atmel,pins = <AT91_PIOB 13 AT91_PERIPH_B AT91_PINCTRL_NONE>; 389 }; 390 391 pinctrl_pwm0_2: pwm0-2 { 392 atmel,pins = <AT91_PIOD 16 AT91_PERIPH_B AT91_PINCTRL_NONE>; 393 }; 394 }; 395 396 sdmmc0 { 397 pinctrl_sdmmc0_default: sdmmc0 { 398 atmel,pins = 399 <AT91_PIOA 17 AT91_PERIPH_A (AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA17 CK periph A with pullup */ 400 AT91_PIOA 16 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA16 CMD periph A with pullup */ 401 AT91_PIOA 15 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA15 DAT0 periph A */ 402 AT91_PIOA 18 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA18 DAT1 periph A with pullup */ 403 AT91_PIOA 19 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA19 DAT2 periph A with pullup */ 404 AT91_PIOA 20 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)>; /* PA20 DAT3 periph A with pullup */ 405 }; 406 407 pinctrl_sdmmc0_cd: sdmmc0-cd { 408 atmel,pins = 409 <AT91_PIOA 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; 410 }; 411 }; 412 413 sdmmc1 { 414 pinctrl_sdmmc1_default: sdmmc1 { 415 atmel,pins = 416 <AT91_PIOA 13 AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA13 CK periph B */ 417 AT91_PIOA 12 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA12 CMD periph B with pullup */ 418 AT91_PIOA 11 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA11 DAT0 periph B with pullup */ 419 AT91_PIOA 2 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA2 DAT1 periph B with pullup */ 420 AT91_PIOA 3 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA3 DAT2 periph B with pullup */ 421 AT91_PIOA 4 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)>; /* PA4 DAT3 periph B with pullup */ 422 }; 423 }; 424 425 usb0 { 426 pinctrl_usba_vbus: usba-vbus { 427 atmel,pins = <AT91_PIOA 27 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; 428 }; 429 }; 430 431 usb1 { 432 pinctrl_usb_default: usb-default { 433 atmel,pins = <AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_NONE 434 AT91_PIOD 15 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; 435 }; 436 }; 437}; /* pinctrl */ 438 439&pwm0 { 440 pinctrl-names = "default"; 441 pinctrl-0 = <&pinctrl_pwm0_0 &pinctrl_pwm0_1 &pinctrl_pwm0_2>; 442 status = "okay"; 443}; 444 445&rtt { 446 atmel,rtt-rtc-time-reg = <&gpbr 0x0>; 447}; 448 449&sdmmc0 { 450 bus-width = <4>; 451 pinctrl-names = "default"; 452 pinctrl-0 = <&pinctrl_sdmmc0_default &pinctrl_sdmmc0_cd>; 453 cd-gpios = <&pioA 25 GPIO_ACTIVE_LOW>; 454 disable-wp; 455 status = "okay"; 456}; 457 458&sdmmc1 { 459 bus-width = <4>; 460 pinctrl-names = "default"; 461 pinctrl-0 = <&pinctrl_sdmmc1_default>; 462 disable-wp; 463 status = "okay"; 464}; 465 466&shutdown_controller { 467 debounce-delay-us = <976>; 468 status = "okay"; 469 470 input@0 { 471 reg = <0>; 472 }; 473}; 474 475&tcb0 { 476 timer0: timer@0 { 477 compatible = "atmel,tcb-timer"; 478 reg = <0>; 479 }; 480 481 timer1: timer@1 { 482 compatible = "atmel,tcb-timer"; 483 reg = <1>; 484 }; 485}; 486 487&usb0 { 488 atmel,vbus-gpio = <&pioA 27 GPIO_ACTIVE_HIGH>; 489 pinctrl-names = "default"; 490 pinctrl-0 = <&pinctrl_usba_vbus>; 491 status = "okay"; 492}; 493 494&usb1 { 495 num-ports = <3>; 496 atmel,vbus-gpio = <0 497 &pioD 18 GPIO_ACTIVE_HIGH 498 &pioD 15 GPIO_ACTIVE_HIGH>; 499 pinctrl-names = "default"; 500 pinctrl-0 = <&pinctrl_usb_default>; 501 status = "okay"; 502}; 503 504&usb2 { 505 status = "okay"; 506}; 507 508&watchdog { 509 status = "okay"; 510}; 511