|
| 1 | +/* |
| 2 | + * Copyright (c) 2021 Argentum Systems Ltd. |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +#include <mem.h> |
| 8 | +#include <arm/armv6-m.dtsi> |
| 9 | +#include <dt-bindings/gpio/gpio.h> |
| 10 | +#include <dt-bindings/i2c/i2c.h> |
| 11 | +#include <dt-bindings/pwm/pwm.h> |
| 12 | + |
| 13 | +/ { |
| 14 | + aliases { |
| 15 | + watchdog0 = &wdog; |
| 16 | + }; |
| 17 | + |
| 18 | + chosen { |
| 19 | + zephyr,flash-controller = &nvmctrl; |
| 20 | + zephyr,entropy = &trng; |
| 21 | + }; |
| 22 | + |
| 23 | + cpus { |
| 24 | + #address-cells = <1>; |
| 25 | + #size-cells = <0>; |
| 26 | + |
| 27 | + cpu0: cpu@0 { |
| 28 | + device_type = "cpu"; |
| 29 | + compatible = "arm,cortex-m0+"; |
| 30 | + reg = <0>; |
| 31 | + }; |
| 32 | + }; |
| 33 | + |
| 34 | + sram0: memory@20000000 { |
| 35 | + compatible = "mmio-sram"; |
| 36 | + reg = <0x20000000 0x8000>; |
| 37 | + }; |
| 38 | + |
| 39 | + id: device_id@80a00c { |
| 40 | + compatible = "atmel,sam0-id"; |
| 41 | + reg = <0x0080A00C 0x4>, |
| 42 | + <0x0080A040 0x4>, |
| 43 | + <0x0080A044 0x4>, |
| 44 | + <0x0080A048 0x4>; |
| 45 | + }; |
| 46 | + |
| 47 | + soc { |
| 48 | + nvmctrl: nvmctrl@41004000 { |
| 49 | + compatible = "atmel,sam0-nvmctrl"; |
| 50 | + label = "FLASH_CTRL"; |
| 51 | + reg = <0x41004000 0x22>; |
| 52 | + interrupts = <4 0>; |
| 53 | + lock-regions = <16>; |
| 54 | + |
| 55 | + #address-cells = <1>; |
| 56 | + #size-cells = <1>; |
| 57 | + |
| 58 | + flash0: flash@0 { |
| 59 | + compatible = "soc-nv-flash"; |
| 60 | + label = "FLASH_0"; |
| 61 | + reg = <0 0x40000>; |
| 62 | + write-block-size = <4>; |
| 63 | + }; |
| 64 | + }; |
| 65 | + |
| 66 | + pm: pm@40000400 { |
| 67 | + compatible = "atmel,saml2x-pm"; |
| 68 | + reg = <0x40000400 0x400>; |
| 69 | + interrupts = <0 0>; |
| 70 | + #clock-cells = <2>; |
| 71 | + }; |
| 72 | + |
| 73 | + mclk: mclk@40000400 { |
| 74 | + compatible = "atmel,saml2x-mclk"; |
| 75 | + reg = <0x40000400 0x400>; |
| 76 | + #clock-cells = <2>; |
| 77 | + }; |
| 78 | + |
| 79 | + gclk: gclk@40001800 { |
| 80 | + compatible = "atmel,saml2x-gclk"; |
| 81 | + reg = <0x40001800 0x400>; |
| 82 | + #clock-cells = <1>; |
| 83 | + }; |
| 84 | + |
| 85 | + dmac: dmac@44000400 { |
| 86 | + compatible = "atmel,sam0-dmac"; |
| 87 | + reg = <0x44000400 0x400>; |
| 88 | + interrupts = <5 0>; |
| 89 | + label = "DMA_0"; |
| 90 | + #dma-cells = <2>; |
| 91 | + }; |
| 92 | + |
| 93 | + eic: eic@40002400 { |
| 94 | + compatible = "atmel,sam0-eic"; |
| 95 | + reg = <0x40002400 0x24>; |
| 96 | + interrupts = <3 0>; |
| 97 | + label = "EIC"; |
| 98 | + }; |
| 99 | + |
| 100 | + wdog: watchdog@40001c00 { |
| 101 | + compatible = "atmel,sam0-watchdog"; |
| 102 | + reg = <0x40001c00 0x0c>; |
| 103 | + interrupts = <1 0>; |
| 104 | + label = "WATCHDOG_0"; |
| 105 | + }; |
| 106 | + |
| 107 | + sercom0: sercom@42000000 { |
| 108 | + compatible = "atmel,sam0-sercom"; |
| 109 | + reg = <0x42000000 0x40>; |
| 110 | + status = "disabled"; |
| 111 | + label = "SERCOM0"; |
| 112 | + }; |
| 113 | + |
| 114 | + sercom1: sercom@42000400 { |
| 115 | + compatible = "atmel,sam0-sercom"; |
| 116 | + reg = <0x42000400 0x40>; |
| 117 | + status = "disabled"; |
| 118 | + label = "SERCOM1"; |
| 119 | + }; |
| 120 | + |
| 121 | + sercom2: sercom@42000800 { |
| 122 | + compatible = "atmel,sam0-sercom"; |
| 123 | + reg = <0x42000800 0x40>; |
| 124 | + status = "disabled"; |
| 125 | + label = "SERCOM2"; |
| 126 | + }; |
| 127 | + |
| 128 | + sercom3: sercom@42000c00 { |
| 129 | + compatible = "atmel,sam0-sercom"; |
| 130 | + reg = <0x42000C00 0x40>; |
| 131 | + status = "disabled"; |
| 132 | + label = "SERCOM3"; |
| 133 | + }; |
| 134 | + |
| 135 | + sercom4: sercom@42001000 { |
| 136 | + compatible = "atmel,sam0-sercom"; |
| 137 | + reg = <0x42001000 0x40>; |
| 138 | + status = "disabled"; |
| 139 | + label = "SERCOM4"; |
| 140 | + }; |
| 141 | + |
| 142 | + sercom5: sercom@43000400 { |
| 143 | + compatible = "atmel,sam0-sercom"; |
| 144 | + reg = <0x43000400 0x40>; |
| 145 | + status = "disabled"; |
| 146 | + label = "SERCOM5"; |
| 147 | + }; |
| 148 | + |
| 149 | + tc4: tc@43000800 { |
| 150 | + compatible = "atmel,sam0-tc32"; |
| 151 | + reg = <0x43000800 0x34>; |
| 152 | + label = "TIMER_4"; |
| 153 | + }; |
| 154 | + |
| 155 | + pinctrl: pinctrl@40002800 { |
| 156 | + compatible = "atmel,sam0-pinctrl"; |
| 157 | + #address-cells = <1>; |
| 158 | + #size-cells = <1>; |
| 159 | + ranges = <0x40002800 0x40002800 0x100>; |
| 160 | + |
| 161 | + porta: gpio@40002800 { |
| 162 | + compatible = "atmel,sam0-gpio"; |
| 163 | + reg = <0x40002800 0x80>; |
| 164 | + label = "PORTA"; |
| 165 | + gpio-controller; |
| 166 | + #gpio-cells = <2>; |
| 167 | + #atmel,pin-cells = <2>; |
| 168 | + |
| 169 | + }; |
| 170 | + |
| 171 | + portb: gpio@40002880 { |
| 172 | + compatible = "atmel,sam0-gpio"; |
| 173 | + reg = <0x40002880 0x80>; |
| 174 | + label = "PORTB"; |
| 175 | + gpio-controller; |
| 176 | + #gpio-cells = <2>; |
| 177 | + #atmel,pin-cells = <2>; |
| 178 | + }; |
| 179 | + }; |
| 180 | + |
| 181 | + rtc: rtc@40002000 { |
| 182 | + compatible = "atmel,sam0-rtc"; |
| 183 | + reg = <0x40002000 0x1c>; |
| 184 | + interrupts = <2 0>; |
| 185 | + clock-generator = <0>; |
| 186 | + status = "disabled"; |
| 187 | + label = "RTC"; |
| 188 | + }; |
| 189 | + |
| 190 | + adc: adc@43000c00 { |
| 191 | + compatible = "atmel,sam0-adc"; |
| 192 | + reg = <0x43000c00 0x30>; |
| 193 | + label = "ADC_0"; |
| 194 | + |
| 195 | + /* |
| 196 | + * 16 MHz max, so clock it with the |
| 197 | + * 48 MHz DFLL / 2 / 2 = 12 MHz |
| 198 | + */ |
| 199 | + gclk = <3>; |
| 200 | + prescaler = <2>; |
| 201 | + #io-channel-cells = <1>; |
| 202 | + }; |
| 203 | + |
| 204 | + dac: dac@42003000 { |
| 205 | + compatible = "atmel,sam0-dac"; |
| 206 | + status = "disabled"; |
| 207 | + reg = <0x42003000 0x1a>; |
| 208 | + label = "DAC_0"; |
| 209 | + #io-channel-cells = <0>; |
| 210 | + }; |
| 211 | + |
| 212 | + trng: random@42003800 { |
| 213 | + compatible = "atmel,sam-trng"; |
| 214 | + reg = <0x42003800 0x24>; |
| 215 | + peripheral-id = <0>; |
| 216 | + interrupts = <27 0>; |
| 217 | + label = "ENTROPY_0"; |
| 218 | + }; |
| 219 | + }; |
| 220 | +}; |
| 221 | + |
| 222 | +&nvic { |
| 223 | + arm,num-irq-priority-bits = <2>; |
| 224 | +}; |
0 commit comments