blob: 6fac247e7ac7bdba3e2dc3dd34e06b514400447d [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>
Kongyang Liu891acfc2024-06-11 17:41:16 +08008#include <dt-bindings/clock/sophgo,cv1800.h>
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +08009
10/ {
11 #address-cells = <1>;
12 #size-cells = <1>;
13
14 cpus: cpus {
15 #address-cells = <1>;
16 #size-cells = <0>;
17 timebase-frequency = <25000000>;
18
19 cpu0: cpu@0 {
20 compatible = "thead,c906", "riscv";
21 device_type = "cpu";
22 reg = <0>;
23 d-cache-block-size = <64>;
24 d-cache-sets = <512>;
25 d-cache-size = <65536>;
26 i-cache-block-size = <64>;
27 i-cache-sets = <128>;
28 i-cache-size = <32768>;
29 mmu-type = "riscv,sv39";
30 riscv,isa = "rv64imafdc";
31 riscv,isa-base = "rv64i";
32 riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
33 "zifencei", "zihpm";
34
35 cpu0_intc: interrupt-controller {
36 compatible = "riscv,cpu-intc";
37 interrupt-controller;
38 #interrupt-cells = <1>;
39 };
40 };
41 };
42
43 osc: oscillator {
44 compatible = "fixed-clock";
45 clock-output-names = "osc_25m";
46 #clock-cells = <0>;
47 };
48
49 soc {
50 compatible = "simple-bus";
51 interrupt-parent = <&plic>;
52 #address-cells = <1>;
53 #size-cells = <1>;
54 dma-noncoherent;
55 ranges;
56
Kongyang Liu86814422024-03-10 01:51:56 +080057 clk: clock-controller@3002000 {
58 reg = <0x03002000 0x1000>;
59 clocks = <&osc>;
60 #clock-cells = <1>;
61 };
62
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +080063 gpio0: gpio@3020000 {
64 compatible = "snps,dw-apb-gpio";
65 reg = <0x3020000 0x1000>;
66 #address-cells = <1>;
67 #size-cells = <0>;
68
69 porta: gpio-controller@0 {
70 compatible = "snps,dw-apb-gpio-port";
71 gpio-controller;
72 #gpio-cells = <2>;
73 ngpios = <32>;
74 reg = <0>;
75 interrupt-controller;
76 #interrupt-cells = <2>;
77 interrupts = <60 IRQ_TYPE_LEVEL_HIGH>;
78 };
79 };
80
81 gpio1: gpio@3021000 {
82 compatible = "snps,dw-apb-gpio";
83 reg = <0x3021000 0x1000>;
84 #address-cells = <1>;
85 #size-cells = <0>;
86
87 portb: gpio-controller@0 {
88 compatible = "snps,dw-apb-gpio-port";
89 gpio-controller;
90 #gpio-cells = <2>;
91 ngpios = <32>;
92 reg = <0>;
93 interrupt-controller;
94 #interrupt-cells = <2>;
95 interrupts = <61 IRQ_TYPE_LEVEL_HIGH>;
96 };
97 };
98
99 gpio2: gpio@3022000 {
100 compatible = "snps,dw-apb-gpio";
101 reg = <0x3022000 0x1000>;
102 #address-cells = <1>;
103 #size-cells = <0>;
104
105 portc: gpio-controller@0 {
106 compatible = "snps,dw-apb-gpio-port";
107 gpio-controller;
108 #gpio-cells = <2>;
109 ngpios = <32>;
110 reg = <0>;
111 interrupt-controller;
112 #interrupt-cells = <2>;
113 interrupts = <62 IRQ_TYPE_LEVEL_HIGH>;
114 };
115 };
116
117 gpio3: gpio@3023000 {
118 compatible = "snps,dw-apb-gpio";
119 reg = <0x3023000 0x1000>;
120 #address-cells = <1>;
121 #size-cells = <0>;
122
123 portd: gpio-controller@0 {
124 compatible = "snps,dw-apb-gpio-port";
125 gpio-controller;
126 #gpio-cells = <2>;
127 ngpios = <32>;
128 reg = <0>;
129 interrupt-controller;
130 #interrupt-cells = <2>;
131 interrupts = <63 IRQ_TYPE_LEVEL_HIGH>;
132 };
133 };
134
Kongyang Liuaf32b892024-04-20 15:00:28 +0800135 ethernet0: ethernet@4070000 {
136 compatible = "sophgo,cv1800b-dwmac";
137 reg = <0x04070000 0x10000>;
138 interrupts = <31 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800139 clocks = <&clk CLK_ETH0_500M>, <&clk CLK_AXI4_ETH0>;
140 clock-names = "stmmaceth", "pclk";
Kongyang Liuaf32b892024-04-20 15:00:28 +0800141 status = "disabled";
142 };
143
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800144 uart0: serial@4140000 {
145 compatible = "snps,dw-apb-uart";
146 reg = <0x04140000 0x100>;
147 interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800148 clocks = <&clk CLK_UART0>, <&clk CLK_APB_UART0>;
149 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800150 reg-shift = <2>;
151 reg-io-width = <4>;
152 status = "disabled";
153 };
154
155 uart1: serial@4150000 {
156 compatible = "snps,dw-apb-uart";
157 reg = <0x04150000 0x100>;
158 interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800159 clocks = <&clk CLK_UART4>, <&clk CLK_APB_UART4>;
160 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800161 reg-shift = <2>;
162 reg-io-width = <4>;
163 status = "disabled";
164 };
165
166 uart2: serial@4160000 {
167 compatible = "snps,dw-apb-uart";
168 reg = <0x04160000 0x100>;
169 interrupts = <46 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800170 clocks = <&clk CLK_UART2>, <&clk CLK_APB_UART2>;
171 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800172 reg-shift = <2>;
173 reg-io-width = <4>;
174 status = "disabled";
175 };
176
177 uart3: serial@4170000 {
178 compatible = "snps,dw-apb-uart";
179 reg = <0x04170000 0x100>;
180 interrupts = <47 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800181 clocks = <&clk CLK_UART3>, <&clk CLK_APB_UART3>;
182 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800183 reg-shift = <2>;
184 reg-io-width = <4>;
185 status = "disabled";
186 };
187
188 uart4: serial@41c0000 {
189 compatible = "snps,dw-apb-uart";
190 reg = <0x041c0000 0x100>;
191 interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800192 clocks = <&clk CLK_UART4>, <&clk CLK_APB_UART4>;
193 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800194 reg-shift = <2>;
195 reg-io-width = <4>;
196 status = "disabled";
197 };
198
Kongyang Liu86814422024-03-10 01:51:56 +0800199 sdhci0: mmc@4310000 {
200 compatible = "sophgo,cv1800b-dwcmshc";
201 reg = <0x4310000 0x1000>;
202 interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800203 clocks = <&clk CLK_AXI4_SD0>, <&clk CLK_SD0>;
204 clock-names = "core", "bus";
Kongyang Liu86814422024-03-10 01:51:56 +0800205 status = "disabled";
206 };
207
Kongyang Liu60455d6f2024-04-20 15:08:24 +0800208 spif: spi-nor@10000000 {
209 compatible = "sophgo,cv1800b-spif";
210 reg = <0x10000000 0x10000000>;
211 #address-cells = <1>;
212 #size-cells = <0>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800213 clocks = <&clk CLK_AHB_SF>;
Kongyang Liu60455d6f2024-04-20 15:08:24 +0800214 interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
215 status = "disabled";
216 };
217
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800218 plic: interrupt-controller@70000000 {
219 reg = <0x70000000 0x4000000>;
220 interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
221 interrupt-controller;
222 #address-cells = <0>;
223 #interrupt-cells = <2>;
224 riscv,ndev = <101>;
225 };
226
227 clint: timer@74000000 {
228 reg = <0x74000000 0x10000>;
229 interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
230 };
231 };
232};