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