1/* 2 * Copyright (c) 2017 Piotr Mienkowski 3 * Copyright (c) 2017 Justin Watson 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8#include <arm/armv7-m.dtsi> 9#include <zephyr/dt-bindings/adc/adc.h> 10#include <zephyr/dt-bindings/i2c/i2c.h> 11#include <zephyr/dt-bindings/gpio/gpio.h> 12#include <zephyr/dt-bindings/pwm/pwm.h> 13#include <zephyr/dt-bindings/clock/atmel_sam_pmc.h> 14 15/ { 16 aliases { 17 watchdog0 = &wdt; 18 }; 19 20 chosen { 21 zephyr,flash-controller = &eefc; 22 }; 23 24 chosen { 25 zephyr,entropy = &trng; 26 }; 27 28 cpus { 29 #address-cells = <1>; 30 #size-cells = <0>; 31 32 cpu0: cpu@0 { 33 device_type = "cpu"; 34 compatible = "arm,cortex-m7"; 35 reg = <0>; 36 #address-cells = <1>; 37 #size-cells = <1>; 38 39 mpu: mpu@e000ed90 { 40 compatible = "arm,armv7m-mpu"; 41 reg = <0xe000ed90 0x40>; 42 arm,num-mpu-regions = <16>; 43 }; 44 }; 45 }; 46 47 sram0: memory@20400000 { 48 compatible = "mmio-sram"; 49 }; 50 51 soc { 52 pmc: pmc@400e0600 { 53 compatible = "atmel,sam-pmc"; 54 reg = <0x400e0600 0x200>; 55 interrupts = <5 0>; 56 #clock-cells = <2>; 57 status = "okay"; 58 }; 59 60 eefc: flash-controller@400e0c00 { 61 compatible = "atmel,sam-flash-controller"; 62 reg = <0x400e0c00 0x200>; 63 interrupts = <6 0>; 64 clocks = <&pmc PMC_TYPE_PERIPHERAL 6>; 65 66 #address-cells = <1>; 67 #size-cells = <1>; 68 69 flash0: flash@400000 { 70 compatible = "soc-nv-flash"; 71 72 write-block-size = <16>; 73 erase-block-size = <8192>; 74 }; 75 76 }; 77 78 wdt: watchdog@400e1850 { 79 compatible = "atmel,sam-watchdog"; 80 reg = <0x400e1850 0xc>; 81 interrupts = <4 0>; 82 clocks = <&pmc PMC_TYPE_PERIPHERAL 4>; 83 status = "disabled"; 84 }; 85 86 twihs0: i2c@40018000 { 87 compatible = "atmel,sam-i2c-twihs"; 88 clock-frequency = <I2C_BITRATE_STANDARD>; 89 #address-cells = <1>; 90 #size-cells = <0>; 91 reg = <0x40018000 0x12B>; 92 interrupts = <19 0>; 93 clocks = <&pmc PMC_TYPE_PERIPHERAL 19>; 94 status = "disabled"; 95 }; 96 97 twihs1: i2c@4001c000 { 98 compatible = "atmel,sam-i2c-twihs"; 99 clock-frequency = <I2C_BITRATE_STANDARD>; 100 #address-cells = <1>; 101 #size-cells = <0>; 102 reg = <0x4001c000 0x12B>; 103 interrupts = <20 0>; 104 clocks = <&pmc PMC_TYPE_PERIPHERAL 20>; 105 status = "disabled"; 106 }; 107 108 twihs2: i2c@40060000 { 109 compatible = "atmel,sam-i2c-twihs"; 110 clock-frequency = <I2C_BITRATE_STANDARD>; 111 #address-cells = <1>; 112 #size-cells = <0>; 113 reg = <0x40060000 0x12B>; 114 interrupts = <41 0>; 115 clocks = <&pmc PMC_TYPE_PERIPHERAL 41>; 116 status = "disabled"; 117 }; 118 119 spi0: spi@40008000 { 120 compatible = "atmel,sam-spi"; 121 #address-cells = <1>; 122 #size-cells = <0>; 123 reg = <0x40008000 0x4000>; 124 interrupts = <21 0>; 125 clocks = <&pmc PMC_TYPE_PERIPHERAL 21>; 126 status = "disabled"; 127 }; 128 129 spi1: spi@40058000 { 130 compatible = "atmel,sam-spi"; 131 #address-cells = <1>; 132 #size-cells = <0>; 133 reg = <0x40058000 0x4000>; 134 interrupts = <42 0>; 135 clocks = <&pmc PMC_TYPE_PERIPHERAL 42>; 136 status = "disabled"; 137 }; 138 139 uart0: uart@400e0800 { 140 compatible = "atmel,sam-uart"; 141 reg = <0x400e0800 0x100>; 142 interrupts = <7 1>; 143 clocks = <&pmc PMC_TYPE_PERIPHERAL 7>; 144 status = "disabled"; 145 }; 146 147 uart1: uart@400e0a00 { 148 compatible = "atmel,sam-uart"; 149 reg = <0x400e0a00 0x100>; 150 interrupts = <8 1>; 151 clocks = <&pmc PMC_TYPE_PERIPHERAL 8>; 152 status = "disabled"; 153 }; 154 155 uart2: uart@400e1a00 { 156 compatible = "atmel,sam-uart"; 157 reg = <0x400e1a00 0x100>; 158 interrupts = <44 1>; 159 clocks = <&pmc PMC_TYPE_PERIPHERAL 44>; 160 status = "disabled"; 161 }; 162 163 uart3: uart@400e1c00 { 164 compatible = "atmel,sam-uart"; 165 reg = <0x400e1c00 0x100>; 166 interrupts = <45 1>; 167 clocks = <&pmc PMC_TYPE_PERIPHERAL 45>; 168 status = "disabled"; 169 }; 170 171 uart4: uart@400e1e00 { 172 compatible = "atmel,sam-uart"; 173 reg = <0x400e1e00 0x100>; 174 interrupts = <46 1>; 175 clocks = <&pmc PMC_TYPE_PERIPHERAL 46>; 176 status = "disabled"; 177 }; 178 179 usart0: usart@40024000 { 180 compatible = "atmel,sam-usart"; 181 reg = <0x40024000 0x100>; 182 interrupts = <13 0>; 183 clocks = <&pmc PMC_TYPE_PERIPHERAL 13>; 184 status = "disabled"; 185 }; 186 187 usart1: usart@40028000 { 188 compatible = "atmel,sam-usart"; 189 reg = <0x40028000 0x100>; 190 interrupts = <14 0>; 191 clocks = <&pmc PMC_TYPE_PERIPHERAL 14>; 192 status = "disabled"; 193 }; 194 195 usart2: usart@4002c000 { 196 compatible = "atmel,sam-usart"; 197 reg = <0x4002c000 0x100>; 198 interrupts = <15 0>; 199 clocks = <&pmc PMC_TYPE_PERIPHERAL 15>; 200 status = "disabled"; 201 }; 202 203 afec0: adc@4003c000 { 204 compatible = "atmel,sam-afec"; 205 reg = <0x4003c000 0x100>; 206 interrupts = <29 0>; 207 clocks = <&pmc PMC_TYPE_PERIPHERAL 29>; 208 status = "disabled"; 209 #io-channel-cells = <1>; 210 }; 211 212 afec1: adc@40064000 { 213 compatible = "atmel,sam-afec"; 214 reg = <0x40064000 0x100>; 215 interrupts = <40 0>; 216 clocks = <&pmc PMC_TYPE_PERIPHERAL 40>; 217 status = "disabled"; 218 #io-channel-cells = <1>; 219 }; 220 221 dacc: dacc@40040000 { 222 compatible = "atmel,sam-dac"; 223 reg = <0x40040000 0x100>; 224 interrupts = <30 0>; 225 clocks = <&pmc PMC_TYPE_PERIPHERAL 30>; 226 status = "disabled"; 227 #io-channel-cells = <1>; 228 }; 229 230 pinctrl: pinctrl@400e0e00 { 231 compatible = "atmel,sam-pinctrl"; 232 #address-cells = <1>; 233 #size-cells = <1>; 234 ranges = <0x400e0e00 0x400e0e00 0xa00>; 235 236 pioa: gpio@400e0e00 { 237 compatible = "atmel,sam-gpio"; 238 reg = <0x400e0e00 0x190>; 239 interrupts = <10 1>; 240 clocks = <&pmc PMC_TYPE_PERIPHERAL 10>; 241 gpio-controller; 242 #gpio-cells = <2>; 243 #atmel,pin-cells = <2>; 244 }; 245 246 piob: gpio@400e1000 { 247 compatible = "atmel,sam-gpio"; 248 reg = <0x400e1000 0x190>; 249 interrupts = <11 1>; 250 clocks = <&pmc PMC_TYPE_PERIPHERAL 11>; 251 gpio-controller; 252 #gpio-cells = <2>; 253 #atmel,pin-cells = <2>; 254 }; 255 256 pioc: gpio@400e1200 { 257 compatible = "atmel,sam-gpio"; 258 reg = <0x400e1200 0x190>; 259 interrupts = <12 1>; 260 clocks = <&pmc PMC_TYPE_PERIPHERAL 12>; 261 gpio-controller; 262 #gpio-cells = <2>; 263 #atmel,pin-cells = <2>; 264 }; 265 266 piod: gpio@400e1400 { 267 compatible = "atmel,sam-gpio"; 268 reg = <0x400e1400 0x190>; 269 interrupts = <16 1>; 270 clocks = <&pmc PMC_TYPE_PERIPHERAL 16>; 271 gpio-controller; 272 #gpio-cells = <2>; 273 #atmel,pin-cells = <2>; 274 }; 275 276 pioe: gpio@400e1600 { 277 compatible = "atmel,sam-gpio"; 278 reg = <0x400e1600 0x190>; 279 interrupts = <17 1>; 280 clocks = <&pmc PMC_TYPE_PERIPHERAL 17>; 281 gpio-controller; 282 #gpio-cells = <2>; 283 #atmel,pin-cells = <2>; 284 }; 285 }; 286 287 pwm0: pwm0@40020000 { 288 compatible = "atmel,sam-pwm"; 289 reg = <0x40020000 0x4000>; 290 interrupts = <31 0>; 291 clocks = <&pmc PMC_TYPE_PERIPHERAL 31>; 292 status = "disabled"; 293 prescaler = <10>; 294 divider = <1>; 295 #pwm-cells = <3>; 296 }; 297 298 pwm1: pwm1@4005c000 { 299 compatible = "atmel,sam-pwm"; 300 reg = <0x4005c000 0x4000>; 301 interrupts = <60 0>; 302 clocks = <&pmc PMC_TYPE_PERIPHERAL 60>; 303 status = "disabled"; 304 prescaler = <10>; 305 divider = <1>; 306 #pwm-cells = <3>; 307 }; 308 309 usbhs: usbd@40038000 { 310 compatible = "atmel,sam-usbhs"; 311 #address-cells = <1>; 312 #size-cells = <0>; 313 reg = <0x40038000 0x4000>; 314 interrupts = <34 0>; 315 interrupt-names = "usbhs"; 316 maximum-speed = "high-speed"; 317 num-bidir-endpoints = <10>; 318 clocks = <&pmc PMC_TYPE_PERIPHERAL 34>; 319 status = "disabled"; 320 }; 321 322 gmac: ethernet@40050000 { 323 compatible = "atmel,sam-gmac"; 324 reg = <0x40050000 0x4000>; 325 clocks = <&pmc PMC_TYPE_PERIPHERAL 39>; 326 interrupts = <39 0>, <66 0>, <67 0>; 327 interrupt-names = "gmac", "q1", "q2"; 328 num-queues = <3>; 329 local-mac-address = [00 00 00 00 00 00]; 330 status = "disabled"; 331 }; 332 333 mdio: mdio@40050000 { 334 compatible = "atmel,sam-mdio"; 335 reg = <0x40050000 0x4000>; 336 status = "disabled"; 337 #address-cells = <1>; 338 #size-cells = <0>; 339 }; 340 341 tc0: tc@4000c000 { 342 compatible = "atmel,sam-tc"; 343 reg = <0x4000c000 0x100>; 344 interrupts = <23 0 345 24 0 346 25 0>; 347 clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, 348 <&pmc PMC_TYPE_PERIPHERAL 24>, 349 <&pmc PMC_TYPE_PERIPHERAL 25>; 350 status = "disabled"; 351 }; 352 353 tc1: tc@40010000 { 354 compatible = "atmel,sam-tc"; 355 reg = <0x40010000 0x100>; 356 interrupts = <26 0 357 27 0 358 28 0>; 359 clocks = <&pmc PMC_TYPE_PERIPHERAL 26>, 360 <&pmc PMC_TYPE_PERIPHERAL 27>, 361 <&pmc PMC_TYPE_PERIPHERAL 28>; 362 status = "disabled"; 363 }; 364 365 tc2: tc@40014000 { 366 compatible = "atmel,sam-tc"; 367 reg = <0x40014000 0x100>; 368 interrupts = <47 0 369 48 0 370 49 0>; 371 clocks = <&pmc PMC_TYPE_PERIPHERAL 47>, 372 <&pmc PMC_TYPE_PERIPHERAL 48>, 373 <&pmc PMC_TYPE_PERIPHERAL 49>; 374 status = "disabled"; 375 }; 376 377 tc3: tc@40054000 { 378 compatible = "atmel,sam-tc"; 379 reg = <0x40054000 0x100>; 380 interrupts = <50 0 381 51 0 382 52 0>; 383 clocks = <&pmc PMC_TYPE_PERIPHERAL 50>, 384 <&pmc PMC_TYPE_PERIPHERAL 51>, 385 <&pmc PMC_TYPE_PERIPHERAL 52>; 386 status = "disabled"; 387 }; 388 389 trng: random@40070000 { 390 compatible = "atmel,sam-trng"; 391 reg = <0x40070000 0x4000>; 392 interrupts = <57 0>; 393 clocks = <&pmc PMC_TYPE_PERIPHERAL 57>; 394 status = "okay"; 395 }; 396 397 xdmac: dma0: dma-controller@40078000 { 398 compatible = "atmel,sam-xdmac"; 399 reg = <0x40078000 0x400>; 400 interrupts = <58 0>; 401 clocks = <&pmc PMC_TYPE_PERIPHERAL 58>; 402 #dma-cells = <2>; 403 status = "disabled"; 404 }; 405 406 ssc: ssc@40004000 { 407 compatible = "atmel,sam-ssc"; 408 reg = <0x40004000 0x4000>; 409 interrupts = <22 0>; 410 clocks = <&pmc PMC_TYPE_PERIPHERAL 22>; 411 status = "disabled"; 412 }; 413 414 can0: can@40030000 { 415 compatible = "atmel,sam-can"; 416 reg = <0x40030000 0x100>; 417 interrupts = <35 0>, <36 0>; 418 interrupt-names = "LINE_0", "LINE_1"; 419 clocks = <&pmc PMC_TYPE_PERIPHERAL 35>; 420 divider = <6>; 421 bosch,mram-cfg = <0x0 28 8 3 3 0 1 1>; 422 sample-point = <875>; 423 sample-point-data = <875>; 424 status = "disabled"; 425 }; 426 427 can1: can@40034000 { 428 compatible = "atmel,sam-can"; 429 reg = <0x40034000 0x100>; 430 interrupts = <37 0>, <38 0>; 431 interrupt-names = "LINE_0", "LINE_1"; 432 clocks = <&pmc PMC_TYPE_PERIPHERAL 37>; 433 divider = <6>; 434 bosch,mram-cfg = <0x0 28 8 3 3 0 1 1>; 435 sample-point = <875>; 436 sample-point-data = <875>; 437 status = "disabled"; 438 }; 439 440 rstc: rstc@400e1800 { 441 compatible = "atmel,sam-rstc"; 442 reg = <0x400e1800 0x10>; 443 clocks = <&pmc PMC_TYPE_PERIPHERAL 1>; 444 user-nrst; 445 }; 446 }; 447}; 448 449&nvic { 450 arm,num-irq-priority-bits = <3>; 451}; 452