blob: ef110c54aec7db0954bb22d4d9d1a5bd4a293d58 [file] [log] [blame]
Bin Meng2ff6b792021-06-04 13:51:09 +08001// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2
Rick Chenbae2d722018-11-13 16:33:29 +08003/dts-v1/;
4
Bin Mengcc269e12021-05-10 20:23:40 +08005#include "binman.dtsi"
6
Rick Chenbae2d722018-11-13 16:33:29 +08007/ {
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 {
19 bootargs = "console=ttyS0,38400n8 debug loglevel=7";
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 Chena1ce5312019-04-02 15:56:43 +080033 riscv,priv-major = <1>;
34 riscv,priv-minor = <10>;
Rick Chenbae2d722018-11-13 16:33:29 +080035 mmu-type = "riscv,sv32";
36 clock-frequency = <60000000>;
Rick Chena1ce5312019-04-02 15:56:43 +080037 i-cache-size = <0x8000>;
38 i-cache-line-size = <32>;
Rick Chenbae2d722018-11-13 16:33:29 +080039 d-cache-size = <0x8000>;
40 d-cache-line-size = <32>;
Rick Chena1ce5312019-04-02 15:56:43 +080041 next-level-cache = <&L2>;
Rick Chenbae2d722018-11-13 16:33:29 +080042 CPU0_intc: interrupt-controller {
43 #interrupt-cells = <1>;
44 interrupt-controller;
45 compatible = "riscv,cpu-intc";
46 };
47 };
Rick Chena1ce5312019-04-02 15:56:43 +080048 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 Chenf05b6562019-11-14 13:52:28 +080069 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 Chencf6ee112019-08-28 18:46:10 +0800111 };
Rick Chena1ce5312019-04-02 15:56:43 +0800112
Rick Chencf6ee112019-08-28 18:46:10 +0800113 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 Chenbae2d722018-11-13 16:33:29 +0800123 };
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 Chena1ce5312019-04-02 15:56:43 +0800133 compatible = "simple-bus";
Rick Chenbae2d722018-11-13 16:33:29 +0800134 ranges;
135
Rick Chena1ce5312019-04-02 15:56:43 +0800136 plic0: interrupt-controller@e4000000 {
137 compatible = "riscv,plic0";
138 #address-cells = <1>;
139 #interrupt-cells = <1>;
140 interrupt-controller;
141 reg = <0xe4000000 0x2000000>;
142 riscv,ndev=<71>;
Rick Chenf05b6562019-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 Chena1ce5312019-04-02 15:56:43 +0800147 };
Rick Chenbae2d722018-11-13 16:33:29 +0800148
Rick Chena1ce5312019-04-02 15:56:43 +0800149 plic1: interrupt-controller@e6400000 {
150 compatible = "riscv,plic1";
151 #address-cells = <1>;
152 #interrupt-cells = <1>;
153 interrupt-controller;
154 reg = <0xe6400000 0x400000>;
155 riscv,ndev=<2>;
Rick Chenf05b6562019-11-14 13:52:28 +0800156 interrupts-extended = <&CPU0_intc 3
157 &CPU1_intc 3
158 &CPU2_intc 3
159 &CPU3_intc 3>;
Rick Chena1ce5312019-04-02 15:56:43 +0800160 };
Rick Chenbae2d722018-11-13 16:33:29 +0800161
Rick Chena1ce5312019-04-02 15:56:43 +0800162 plmt0@e6000000 {
163 compatible = "riscv,plmt0";
Rick Chenf05b6562019-11-14 13:52:28 +0800164 interrupts-extended = <&CPU0_intc 7
165 &CPU1_intc 7
166 &CPU2_intc 7
167 &CPU3_intc 7>;
Rick Chenbae2d722018-11-13 16:33:29 +0800168 reg = <0xe6000000 0x100000>;
169 };
170 };
171
172 spiclk: virt_100mhz {
173 #clock-cells = <0>;
174 compatible = "fixed-clock";
175 clock-frequency = <100000000>;
176 };
177
178 timer0: timer@f0400000 {
179 compatible = "andestech,atcpit100";
180 reg = <0xf0400000 0x1000>;
181 clock-frequency = <60000000>;
182 interrupts = <3 4>;
183 interrupt-parent = <&plic0>;
184 };
185
186 serial0: serial@f0300000 {
187 compatible = "andestech,uart16550", "ns16550a";
188 reg = <0xf0300000 0x1000>;
189 interrupts = <9 4>;
190 clock-frequency = <19660800>;
191 reg-shift = <2>;
192 reg-offset = <32>;
193 no-loopback-test = <1>;
194 interrupt-parent = <&plic0>;
195 };
196
197 mac0: mac@e0100000 {
198 compatible = "andestech,atmac100";
199 reg = <0xe0100000 0x1000>;
200 interrupts = <19 4>;
201 interrupt-parent = <&plic0>;
202 };
203
204 mmc0: mmc@f0e00000 {
205 compatible = "andestech,atfsdc010";
206 max-frequency = <100000000>;
207 clock-freq-min-max = <400000 100000000>;
208 fifo-depth = <0x10>;
209 reg = <0xf0e00000 0x1000>;
210 interrupts = <18 4>;
211 cap-sd-highspeed;
212 interrupt-parent = <&plic0>;
213 };
214
215 dma0: dma@f0c00000 {
216 compatible = "andestech,atcdmac300";
217 reg = <0xf0c00000 0x1000>;
218 interrupts = <10 4 64 4 65 4 66 4 67 4 68 4 69 4 70 4 71 4>;
219 dma-channels = <8>;
220 interrupt-parent = <&plic0>;
221 };
222
223 lcd0: lcd@e0200000 {
224 compatible = "andestech,atflcdc100";
225 reg = <0xe0200000 0x1000>;
226 interrupts = <20 4>;
227 interrupt-parent = <&plic0>;
228 };
229
230 smc0: smc@e0400000 {
231 compatible = "andestech,atfsmc020";
232 reg = <0xe0400000 0x1000>;
233 };
234
235 snd0: snd@f0d00000 {
236 compatible = "andestech,atfac97";
237 reg = <0xf0d00000 0x1000>;
238 interrupts = <17 4>;
239 interrupt-parent = <&plic0>;
240 };
241
Rick Chena1ce5312019-04-02 15:56:43 +0800242 pmu {
243 compatible = "riscv,base-pmu";
244 };
245
Rick Chenbae2d722018-11-13 16:33:29 +0800246 virtio_mmio@fe007000 {
247 interrupts = <0x17 0x4>;
248 interrupt-parent = <0x2>;
249 reg = <0xfe007000 0x1000>;
250 compatible = "virtio,mmio";
251 };
252
253 virtio_mmio@fe006000 {
254 interrupts = <0x16 0x4>;
255 interrupt-parent = <0x2>;
256 reg = <0xfe006000 0x1000>;
257 compatible = "virtio,mmio";
258 };
259
260 virtio_mmio@fe005000 {
261 interrupts = <0x15 0x4>;
262 interrupt-parent = <0x2>;
263 reg = <0xfe005000 0x1000>;
264 compatible = "virtio,mmio";
265 };
266
267 virtio_mmio@fe004000 {
268 interrupts = <0x14 0x4>;
269 interrupt-parent = <0x2>;
270 reg = <0xfe004000 0x1000>;
271 compatible = "virtio,mmio";
272 };
273
274 virtio_mmio@fe003000 {
275 interrupts = <0x13 0x4>;
276 interrupt-parent = <0x2>;
277 reg = <0xfe003000 0x1000>;
278 compatible = "virtio,mmio";
279 };
280
281 virtio_mmio@fe002000 {
282 interrupts = <0x12 0x4>;
283 interrupt-parent = <0x2>;
284 reg = <0xfe002000 0x1000>;
285 compatible = "virtio,mmio";
286 };
287
288 virtio_mmio@fe001000 {
289 interrupts = <0x11 0x4>;
290 interrupt-parent = <0x2>;
291 reg = <0xfe001000 0x1000>;
292 compatible = "virtio,mmio";
293 };
294
295 virtio_mmio@fe000000 {
296 interrupts = <0x10 0x4>;
297 interrupt-parent = <0x2>;
298 reg = <0xfe000000 0x1000>;
299 compatible = "virtio,mmio";
300 };
301
302 nor@0,0 {
Rick Chencca8b1e2019-11-14 13:52:29 +0800303 #address-cells = <1>;
304 #size-cells = <1>;
Rick Chenbae2d722018-11-13 16:33:29 +0800305 compatible = "cfi-flash";
Rick Chencca8b1e2019-11-14 13:52:29 +0800306 reg = <0x88000000 0x4000000>;
Rick Chenbae2d722018-11-13 16:33:29 +0800307 bank-width = <2>;
308 device-width = <1>;
309 };
310
311 spi: spi@f0b00000 {
312 compatible = "andestech,atcspi200";
313 reg = <0xf0b00000 0x1000>;
314 #address-cells = <1>;
315 #size-cells = <0>;
316 num-cs = <1>;
317 clocks = <&spiclk>;
318 interrupts = <4 4>;
319 interrupt-parent = <&plic0>;
320 flash@0 {
Neil Armstrongffd4c7c2019-02-10 10:16:20 +0000321 compatible = "jedec,spi-nor";
Rick Chenbae2d722018-11-13 16:33:29 +0800322 spi-max-frequency = <50000000>;
323 reg = <0>;
324 spi-cpol;
325 spi-cpha;
326 };
327 };
328};