Bin Meng | 2ff6b79 | 2021-06-04 13:51:09 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) |
| 2 | |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 3 | /dts-v1/; |
| 4 | |
Bin Meng | cc269e1 | 2021-05-10 20:23:40 +0800 | [diff] [blame] | 5 | #include "binman.dtsi" |
| 6 | |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 7 | / { |
| 8 | #address-cells = <1>; |
| 9 | #size-cells = <1>; |
| 10 | compatible = "andestech,a25"; |
| 11 | model = "andestech,a25"; |
| 12 | |
| 13 | aliases { |
| 14 | uart0 = &serial0; |
| 15 | spi0 = &spi; |
| 16 | }; |
| 17 | |
| 18 | chosen { |
Bin Meng | 5c267e0 | 2021-06-04 13:51:10 +0800 | [diff] [blame] | 19 | bootargs = "console=ttyS0,38400n8 debug loglevel=7"; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 20 | stdout-path = "uart0:38400n8"; |
| 21 | }; |
| 22 | |
| 23 | cpus { |
| 24 | #address-cells = <1>; |
| 25 | #size-cells = <0>; |
| 26 | timebase-frequency = <60000000>; |
| 27 | CPU0: cpu@0 { |
| 28 | device_type = "cpu"; |
| 29 | reg = <0>; |
| 30 | status = "okay"; |
| 31 | compatible = "riscv"; |
| 32 | riscv,isa = "rv32imafdc"; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 33 | riscv,priv-major = <1>; |
| 34 | riscv,priv-minor = <10>; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 35 | mmu-type = "riscv,sv32"; |
| 36 | clock-frequency = <60000000>; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 37 | i-cache-size = <0x8000>; |
| 38 | i-cache-line-size = <32>; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 39 | d-cache-size = <0x8000>; |
| 40 | d-cache-line-size = <32>; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 41 | next-level-cache = <&L2>; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 42 | CPU0_intc: interrupt-controller { |
| 43 | #interrupt-cells = <1>; |
| 44 | interrupt-controller; |
| 45 | compatible = "riscv,cpu-intc"; |
| 46 | }; |
| 47 | }; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 48 | CPU1: cpu@1 { |
| 49 | device_type = "cpu"; |
| 50 | reg = <1>; |
| 51 | status = "okay"; |
| 52 | compatible = "riscv"; |
| 53 | riscv,isa = "rv32imafdc"; |
| 54 | riscv,priv-major = <1>; |
| 55 | riscv,priv-minor = <10>; |
| 56 | mmu-type = "riscv,sv32"; |
| 57 | clock-frequency = <60000000>; |
| 58 | i-cache-size = <0x8000>; |
| 59 | i-cache-line-size = <32>; |
| 60 | d-cache-size = <0x8000>; |
| 61 | d-cache-line-size = <32>; |
| 62 | next-level-cache = <&L2>; |
| 63 | CPU1_intc: interrupt-controller { |
| 64 | #interrupt-cells = <1>; |
| 65 | interrupt-controller; |
| 66 | compatible = "riscv,cpu-intc"; |
| 67 | }; |
| 68 | }; |
Rick Chen | f05b656 | 2019-11-14 13:52:28 +0800 | [diff] [blame] | 69 | CPU2: cpu@2 { |
| 70 | device_type = "cpu"; |
| 71 | reg = <2>; |
| 72 | status = "okay"; |
| 73 | compatible = "riscv"; |
| 74 | riscv,isa = "rv32imafdc"; |
| 75 | riscv,priv-major = <1>; |
| 76 | riscv,priv-minor = <10>; |
| 77 | mmu-type = "riscv,sv32"; |
| 78 | clock-frequency = <60000000>; |
| 79 | i-cache-size = <0x8000>; |
| 80 | i-cache-line-size = <32>; |
| 81 | d-cache-size = <0x8000>; |
| 82 | d-cache-line-size = <32>; |
| 83 | next-level-cache = <&L2>; |
| 84 | CPU2_intc: interrupt-controller { |
| 85 | #interrupt-cells = <1>; |
| 86 | interrupt-controller; |
| 87 | compatible = "riscv,cpu-intc"; |
| 88 | }; |
| 89 | }; |
| 90 | CPU3: cpu@3 { |
| 91 | device_type = "cpu"; |
| 92 | reg = <3>; |
| 93 | status = "okay"; |
| 94 | compatible = "riscv"; |
| 95 | riscv,isa = "rv32imafdc"; |
| 96 | riscv,priv-major = <1>; |
| 97 | riscv,priv-minor = <10>; |
| 98 | mmu-type = "riscv,sv32"; |
| 99 | clock-frequency = <60000000>; |
| 100 | i-cache-size = <0x8000>; |
| 101 | i-cache-line-size = <32>; |
| 102 | d-cache-size = <0x8000>; |
| 103 | d-cache-line-size = <32>; |
| 104 | next-level-cache = <&L2>; |
| 105 | CPU3_intc: interrupt-controller { |
| 106 | #interrupt-cells = <1>; |
| 107 | interrupt-controller; |
| 108 | compatible = "riscv,cpu-intc"; |
| 109 | }; |
| 110 | }; |
Rick Chen | cf6ee11 | 2019-08-28 18:46:10 +0800 | [diff] [blame] | 111 | }; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 112 | |
Rick Chen | cf6ee11 | 2019-08-28 18:46:10 +0800 | [diff] [blame] | 113 | L2: l2-cache@e0500000 { |
| 114 | compatible = "v5l2cache"; |
| 115 | cache-level = <2>; |
| 116 | cache-size = <0x40000>; |
| 117 | reg = <0xe0500000 0x40000>; |
| 118 | andes,inst-prefetch = <3>; |
| 119 | andes,data-prefetch = <3>; |
| 120 | /* The value format is <XRAMOCTL XRAMICTL> */ |
| 121 | andes,tag-ram-ctl = <0 0>; |
| 122 | andes,data-ram-ctl = <0 0>; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 123 | }; |
| 124 | |
| 125 | memory@0 { |
| 126 | device_type = "memory"; |
| 127 | reg = <0x00000000 0x40000000>; |
| 128 | }; |
| 129 | |
| 130 | soc { |
| 131 | #address-cells = <1>; |
| 132 | #size-cells = <1>; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 133 | compatible = "simple-bus"; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 134 | ranges; |
| 135 | |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 136 | plic0: interrupt-controller@e4000000 { |
| 137 | compatible = "riscv,plic0"; |
Bin Meng | 048aff6 | 2021-06-04 13:51:12 +0800 | [diff] [blame^] | 138 | #interrupt-cells = <2>; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 139 | interrupt-controller; |
| 140 | reg = <0xe4000000 0x2000000>; |
| 141 | riscv,ndev=<71>; |
Rick Chen | f05b656 | 2019-11-14 13:52:28 +0800 | [diff] [blame] | 142 | interrupts-extended = <&CPU0_intc 11 &CPU0_intc 9 |
| 143 | &CPU1_intc 11 &CPU1_intc 9 |
| 144 | &CPU2_intc 11 &CPU2_intc 9 |
| 145 | &CPU3_intc 11 &CPU3_intc 9>; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 146 | }; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 147 | |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 148 | plic1: interrupt-controller@e6400000 { |
| 149 | compatible = "riscv,plic1"; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 150 | #interrupt-cells = <1>; |
| 151 | interrupt-controller; |
| 152 | reg = <0xe6400000 0x400000>; |
| 153 | riscv,ndev=<2>; |
Rick Chen | f05b656 | 2019-11-14 13:52:28 +0800 | [diff] [blame] | 154 | interrupts-extended = <&CPU0_intc 3 |
| 155 | &CPU1_intc 3 |
| 156 | &CPU2_intc 3 |
| 157 | &CPU3_intc 3>; |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 158 | }; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 159 | |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 160 | plmt0@e6000000 { |
| 161 | compatible = "riscv,plmt0"; |
Rick Chen | f05b656 | 2019-11-14 13:52:28 +0800 | [diff] [blame] | 162 | interrupts-extended = <&CPU0_intc 7 |
| 163 | &CPU1_intc 7 |
| 164 | &CPU2_intc 7 |
| 165 | &CPU3_intc 7>; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 166 | reg = <0xe6000000 0x100000>; |
| 167 | }; |
| 168 | }; |
| 169 | |
| 170 | spiclk: virt_100mhz { |
| 171 | #clock-cells = <0>; |
| 172 | compatible = "fixed-clock"; |
| 173 | clock-frequency = <100000000>; |
| 174 | }; |
| 175 | |
| 176 | timer0: timer@f0400000 { |
| 177 | compatible = "andestech,atcpit100"; |
| 178 | reg = <0xf0400000 0x1000>; |
| 179 | clock-frequency = <60000000>; |
| 180 | interrupts = <3 4>; |
| 181 | interrupt-parent = <&plic0>; |
| 182 | }; |
| 183 | |
| 184 | serial0: serial@f0300000 { |
| 185 | compatible = "andestech,uart16550", "ns16550a"; |
| 186 | reg = <0xf0300000 0x1000>; |
| 187 | interrupts = <9 4>; |
| 188 | clock-frequency = <19660800>; |
| 189 | reg-shift = <2>; |
| 190 | reg-offset = <32>; |
| 191 | no-loopback-test = <1>; |
| 192 | interrupt-parent = <&plic0>; |
| 193 | }; |
| 194 | |
| 195 | mac0: mac@e0100000 { |
| 196 | compatible = "andestech,atmac100"; |
| 197 | reg = <0xe0100000 0x1000>; |
| 198 | interrupts = <19 4>; |
| 199 | interrupt-parent = <&plic0>; |
| 200 | }; |
| 201 | |
| 202 | mmc0: mmc@f0e00000 { |
| 203 | compatible = "andestech,atfsdc010"; |
| 204 | max-frequency = <100000000>; |
| 205 | clock-freq-min-max = <400000 100000000>; |
| 206 | fifo-depth = <0x10>; |
| 207 | reg = <0xf0e00000 0x1000>; |
| 208 | interrupts = <18 4>; |
| 209 | cap-sd-highspeed; |
| 210 | interrupt-parent = <&plic0>; |
| 211 | }; |
| 212 | |
| 213 | dma0: dma@f0c00000 { |
| 214 | compatible = "andestech,atcdmac300"; |
| 215 | reg = <0xf0c00000 0x1000>; |
| 216 | interrupts = <10 4 64 4 65 4 66 4 67 4 68 4 69 4 70 4 71 4>; |
| 217 | dma-channels = <8>; |
| 218 | interrupt-parent = <&plic0>; |
| 219 | }; |
| 220 | |
| 221 | lcd0: lcd@e0200000 { |
| 222 | compatible = "andestech,atflcdc100"; |
| 223 | reg = <0xe0200000 0x1000>; |
| 224 | interrupts = <20 4>; |
| 225 | interrupt-parent = <&plic0>; |
| 226 | }; |
| 227 | |
| 228 | smc0: smc@e0400000 { |
| 229 | compatible = "andestech,atfsmc020"; |
| 230 | reg = <0xe0400000 0x1000>; |
| 231 | }; |
| 232 | |
| 233 | snd0: snd@f0d00000 { |
| 234 | compatible = "andestech,atfac97"; |
| 235 | reg = <0xf0d00000 0x1000>; |
| 236 | interrupts = <17 4>; |
| 237 | interrupt-parent = <&plic0>; |
| 238 | }; |
| 239 | |
Rick Chen | a1ce531 | 2019-04-02 15:56:43 +0800 | [diff] [blame] | 240 | pmu { |
| 241 | compatible = "riscv,base-pmu"; |
| 242 | }; |
| 243 | |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 244 | virtio_mmio@fe007000 { |
| 245 | interrupts = <0x17 0x4>; |
| 246 | interrupt-parent = <0x2>; |
| 247 | reg = <0xfe007000 0x1000>; |
| 248 | compatible = "virtio,mmio"; |
| 249 | }; |
| 250 | |
| 251 | virtio_mmio@fe006000 { |
| 252 | interrupts = <0x16 0x4>; |
| 253 | interrupt-parent = <0x2>; |
| 254 | reg = <0xfe006000 0x1000>; |
| 255 | compatible = "virtio,mmio"; |
| 256 | }; |
| 257 | |
| 258 | virtio_mmio@fe005000 { |
| 259 | interrupts = <0x15 0x4>; |
| 260 | interrupt-parent = <0x2>; |
| 261 | reg = <0xfe005000 0x1000>; |
| 262 | compatible = "virtio,mmio"; |
| 263 | }; |
| 264 | |
| 265 | virtio_mmio@fe004000 { |
| 266 | interrupts = <0x14 0x4>; |
| 267 | interrupt-parent = <0x2>; |
| 268 | reg = <0xfe004000 0x1000>; |
| 269 | compatible = "virtio,mmio"; |
| 270 | }; |
| 271 | |
| 272 | virtio_mmio@fe003000 { |
| 273 | interrupts = <0x13 0x4>; |
| 274 | interrupt-parent = <0x2>; |
| 275 | reg = <0xfe003000 0x1000>; |
| 276 | compatible = "virtio,mmio"; |
| 277 | }; |
| 278 | |
| 279 | virtio_mmio@fe002000 { |
| 280 | interrupts = <0x12 0x4>; |
| 281 | interrupt-parent = <0x2>; |
| 282 | reg = <0xfe002000 0x1000>; |
| 283 | compatible = "virtio,mmio"; |
| 284 | }; |
| 285 | |
| 286 | virtio_mmio@fe001000 { |
| 287 | interrupts = <0x11 0x4>; |
| 288 | interrupt-parent = <0x2>; |
| 289 | reg = <0xfe001000 0x1000>; |
| 290 | compatible = "virtio,mmio"; |
| 291 | }; |
| 292 | |
| 293 | virtio_mmio@fe000000 { |
| 294 | interrupts = <0x10 0x4>; |
| 295 | interrupt-parent = <0x2>; |
| 296 | reg = <0xfe000000 0x1000>; |
| 297 | compatible = "virtio,mmio"; |
| 298 | }; |
| 299 | |
| 300 | nor@0,0 { |
Rick Chen | cca8b1e | 2019-11-14 13:52:29 +0800 | [diff] [blame] | 301 | #address-cells = <1>; |
| 302 | #size-cells = <1>; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 303 | compatible = "cfi-flash"; |
Rick Chen | cca8b1e | 2019-11-14 13:52:29 +0800 | [diff] [blame] | 304 | reg = <0x88000000 0x4000000>; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 305 | bank-width = <2>; |
| 306 | device-width = <1>; |
| 307 | }; |
| 308 | |
| 309 | spi: spi@f0b00000 { |
| 310 | compatible = "andestech,atcspi200"; |
| 311 | reg = <0xf0b00000 0x1000>; |
| 312 | #address-cells = <1>; |
| 313 | #size-cells = <0>; |
| 314 | num-cs = <1>; |
| 315 | clocks = <&spiclk>; |
| 316 | interrupts = <4 4>; |
| 317 | interrupt-parent = <&plic0>; |
| 318 | flash@0 { |
Neil Armstrong | ffd4c7c | 2019-02-10 10:16:20 +0000 | [diff] [blame] | 319 | compatible = "jedec,spi-nor"; |
Rick Chen | bae2d72 | 2018-11-13 16:33:29 +0800 | [diff] [blame] | 320 | spi-max-frequency = <50000000>; |
| 321 | reg = <0>; |
| 322 | spi-cpol; |
| 323 | spi-cpha; |
| 324 | }; |
| 325 | }; |
| 326 | }; |