blob: ec99c4deeb69e5061da01d74fc9e7cdc15376c43 [file] [log] [blame]
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +08001// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
4 * Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com>
5 */
6
7#include <dt-bindings/interrupt-controller/irq.h>
8
9/ {
10 #address-cells = <1>;
11 #size-cells = <1>;
12
13 cpus: cpus {
14 #address-cells = <1>;
15 #size-cells = <0>;
16 timebase-frequency = <25000000>;
17
18 cpu0: cpu@0 {
19 compatible = "thead,c906", "riscv";
20 device_type = "cpu";
21 reg = <0>;
22 d-cache-block-size = <64>;
23 d-cache-sets = <512>;
24 d-cache-size = <65536>;
25 i-cache-block-size = <64>;
26 i-cache-sets = <128>;
27 i-cache-size = <32768>;
28 mmu-type = "riscv,sv39";
29 riscv,isa = "rv64imafdc";
30 riscv,isa-base = "rv64i";
31 riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
32 "zifencei", "zihpm";
33
34 cpu0_intc: interrupt-controller {
35 compatible = "riscv,cpu-intc";
36 interrupt-controller;
37 #interrupt-cells = <1>;
38 };
39 };
40 };
41
42 osc: oscillator {
43 compatible = "fixed-clock";
44 clock-output-names = "osc_25m";
45 #clock-cells = <0>;
46 };
47
Kongyang Liu86814422024-03-10 01:51:56 +080048 sdhci_clk: sdhci-clock {
49 compatible = "fixed-clock";
50 clock-frequency = <375000000>;
51 clock-output-names = "sdhci_clk";
52 #clock-cells = <0>;
53 };
54
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +080055 soc {
56 compatible = "simple-bus";
57 interrupt-parent = <&plic>;
58 #address-cells = <1>;
59 #size-cells = <1>;
60 dma-noncoherent;
61 ranges;
62
Kongyang Liu86814422024-03-10 01:51:56 +080063 clk: clock-controller@3002000 {
64 reg = <0x03002000 0x1000>;
65 clocks = <&osc>;
66 #clock-cells = <1>;
67 };
68
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +080069 gpio0: gpio@3020000 {
70 compatible = "snps,dw-apb-gpio";
71 reg = <0x3020000 0x1000>;
72 #address-cells = <1>;
73 #size-cells = <0>;
74
75 porta: gpio-controller@0 {
76 compatible = "snps,dw-apb-gpio-port";
77 gpio-controller;
78 #gpio-cells = <2>;
79 ngpios = <32>;
80 reg = <0>;
81 interrupt-controller;
82 #interrupt-cells = <2>;
83 interrupts = <60 IRQ_TYPE_LEVEL_HIGH>;
84 };
85 };
86
87 gpio1: gpio@3021000 {
88 compatible = "snps,dw-apb-gpio";
89 reg = <0x3021000 0x1000>;
90 #address-cells = <1>;
91 #size-cells = <0>;
92
93 portb: gpio-controller@0 {
94 compatible = "snps,dw-apb-gpio-port";
95 gpio-controller;
96 #gpio-cells = <2>;
97 ngpios = <32>;
98 reg = <0>;
99 interrupt-controller;
100 #interrupt-cells = <2>;
101 interrupts = <61 IRQ_TYPE_LEVEL_HIGH>;
102 };
103 };
104
105 gpio2: gpio@3022000 {
106 compatible = "snps,dw-apb-gpio";
107 reg = <0x3022000 0x1000>;
108 #address-cells = <1>;
109 #size-cells = <0>;
110
111 portc: gpio-controller@0 {
112 compatible = "snps,dw-apb-gpio-port";
113 gpio-controller;
114 #gpio-cells = <2>;
115 ngpios = <32>;
116 reg = <0>;
117 interrupt-controller;
118 #interrupt-cells = <2>;
119 interrupts = <62 IRQ_TYPE_LEVEL_HIGH>;
120 };
121 };
122
123 gpio3: gpio@3023000 {
124 compatible = "snps,dw-apb-gpio";
125 reg = <0x3023000 0x1000>;
126 #address-cells = <1>;
127 #size-cells = <0>;
128
129 portd: gpio-controller@0 {
130 compatible = "snps,dw-apb-gpio-port";
131 gpio-controller;
132 #gpio-cells = <2>;
133 ngpios = <32>;
134 reg = <0>;
135 interrupt-controller;
136 #interrupt-cells = <2>;
137 interrupts = <63 IRQ_TYPE_LEVEL_HIGH>;
138 };
139 };
140
141 uart0: serial@4140000 {
142 compatible = "snps,dw-apb-uart";
143 reg = <0x04140000 0x100>;
144 interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
145 clocks = <&osc>;
146 reg-shift = <2>;
147 reg-io-width = <4>;
148 status = "disabled";
149 };
150
151 uart1: serial@4150000 {
152 compatible = "snps,dw-apb-uart";
153 reg = <0x04150000 0x100>;
154 interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
155 clocks = <&osc>;
156 reg-shift = <2>;
157 reg-io-width = <4>;
158 status = "disabled";
159 };
160
161 uart2: serial@4160000 {
162 compatible = "snps,dw-apb-uart";
163 reg = <0x04160000 0x100>;
164 interrupts = <46 IRQ_TYPE_LEVEL_HIGH>;
165 clocks = <&osc>;
166 reg-shift = <2>;
167 reg-io-width = <4>;
168 status = "disabled";
169 };
170
171 uart3: serial@4170000 {
172 compatible = "snps,dw-apb-uart";
173 reg = <0x04170000 0x100>;
174 interrupts = <47 IRQ_TYPE_LEVEL_HIGH>;
175 clocks = <&osc>;
176 reg-shift = <2>;
177 reg-io-width = <4>;
178 status = "disabled";
179 };
180
181 uart4: serial@41c0000 {
182 compatible = "snps,dw-apb-uart";
183 reg = <0x041c0000 0x100>;
184 interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
185 clocks = <&osc>;
186 reg-shift = <2>;
187 reg-io-width = <4>;
188 status = "disabled";
189 };
190
Kongyang Liu86814422024-03-10 01:51:56 +0800191 sdhci0: mmc@4310000 {
192 compatible = "sophgo,cv1800b-dwcmshc";
193 reg = <0x4310000 0x1000>;
194 interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
195 clocks = <&sdhci_clk>;
196 clock-names = "core";
197 status = "disabled";
198 };
199
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800200 plic: interrupt-controller@70000000 {
201 reg = <0x70000000 0x4000000>;
202 interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
203 interrupt-controller;
204 #address-cells = <0>;
205 #interrupt-cells = <2>;
206 riscv,ndev = <101>;
207 };
208
209 clint: timer@74000000 {
210 reg = <0x74000000 0x10000>;
211 interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
212 };
213 };
214};