blob: 8a7386b76e66597655439588b803e0812f475fea [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
Kongyang Liuaf32b892024-04-20 15:00:28 +080049 eth_csrclk: eth-csrclk {
50 compatible = "fixed-clock";
51 clock-frequency = <250000000>;
52 clock-output-names = "eth_csrclk";
53 #clock-cells = <0x0>;
54 };
55
56 eth_ptpclk: eth-ptpclk {
57 compatible = "fixed-clock";
58 clock-frequency = <50000000>;
59 clock-output-names = "eth_ptpclk";
60 #clock-cells = <0x0>;
61 };
62
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +080063 soc {
64 compatible = "simple-bus";
65 interrupt-parent = <&plic>;
66 #address-cells = <1>;
67 #size-cells = <1>;
68 dma-noncoherent;
69 ranges;
70
Kongyang Liu86814422024-03-10 01:51:56 +080071 clk: clock-controller@3002000 {
72 reg = <0x03002000 0x1000>;
73 clocks = <&osc>;
74 #clock-cells = <1>;
75 };
76
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +080077 gpio0: gpio@3020000 {
78 compatible = "snps,dw-apb-gpio";
79 reg = <0x3020000 0x1000>;
80 #address-cells = <1>;
81 #size-cells = <0>;
82
83 porta: gpio-controller@0 {
84 compatible = "snps,dw-apb-gpio-port";
85 gpio-controller;
86 #gpio-cells = <2>;
87 ngpios = <32>;
88 reg = <0>;
89 interrupt-controller;
90 #interrupt-cells = <2>;
91 interrupts = <60 IRQ_TYPE_LEVEL_HIGH>;
92 };
93 };
94
95 gpio1: gpio@3021000 {
96 compatible = "snps,dw-apb-gpio";
97 reg = <0x3021000 0x1000>;
98 #address-cells = <1>;
99 #size-cells = <0>;
100
101 portb: gpio-controller@0 {
102 compatible = "snps,dw-apb-gpio-port";
103 gpio-controller;
104 #gpio-cells = <2>;
105 ngpios = <32>;
106 reg = <0>;
107 interrupt-controller;
108 #interrupt-cells = <2>;
109 interrupts = <61 IRQ_TYPE_LEVEL_HIGH>;
110 };
111 };
112
113 gpio2: gpio@3022000 {
114 compatible = "snps,dw-apb-gpio";
115 reg = <0x3022000 0x1000>;
116 #address-cells = <1>;
117 #size-cells = <0>;
118
119 portc: gpio-controller@0 {
120 compatible = "snps,dw-apb-gpio-port";
121 gpio-controller;
122 #gpio-cells = <2>;
123 ngpios = <32>;
124 reg = <0>;
125 interrupt-controller;
126 #interrupt-cells = <2>;
127 interrupts = <62 IRQ_TYPE_LEVEL_HIGH>;
128 };
129 };
130
131 gpio3: gpio@3023000 {
132 compatible = "snps,dw-apb-gpio";
133 reg = <0x3023000 0x1000>;
134 #address-cells = <1>;
135 #size-cells = <0>;
136
137 portd: gpio-controller@0 {
138 compatible = "snps,dw-apb-gpio-port";
139 gpio-controller;
140 #gpio-cells = <2>;
141 ngpios = <32>;
142 reg = <0>;
143 interrupt-controller;
144 #interrupt-cells = <2>;
145 interrupts = <63 IRQ_TYPE_LEVEL_HIGH>;
146 };
147 };
148
Kongyang Liuaf32b892024-04-20 15:00:28 +0800149 ethernet0: ethernet@4070000 {
150 compatible = "sophgo,cv1800b-dwmac";
151 reg = <0x04070000 0x10000>;
152 interrupts = <31 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800153 clocks = <&clk CLK_ETH0_500M>, <&clk CLK_AXI4_ETH0>;
154 clock-names = "stmmaceth", "pclk";
Kongyang Liuaf32b892024-04-20 15:00:28 +0800155 status = "disabled";
156 };
157
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800158 uart0: serial@4140000 {
159 compatible = "snps,dw-apb-uart";
160 reg = <0x04140000 0x100>;
161 interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800162 clocks = <&clk CLK_UART0>, <&clk CLK_APB_UART0>;
163 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800164 reg-shift = <2>;
165 reg-io-width = <4>;
166 status = "disabled";
167 };
168
169 uart1: serial@4150000 {
170 compatible = "snps,dw-apb-uart";
171 reg = <0x04150000 0x100>;
172 interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800173 clocks = <&clk CLK_UART4>, <&clk CLK_APB_UART4>;
174 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800175 reg-shift = <2>;
176 reg-io-width = <4>;
177 status = "disabled";
178 };
179
180 uart2: serial@4160000 {
181 compatible = "snps,dw-apb-uart";
182 reg = <0x04160000 0x100>;
183 interrupts = <46 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800184 clocks = <&clk CLK_UART2>, <&clk CLK_APB_UART2>;
185 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800186 reg-shift = <2>;
187 reg-io-width = <4>;
188 status = "disabled";
189 };
190
191 uart3: serial@4170000 {
192 compatible = "snps,dw-apb-uart";
193 reg = <0x04170000 0x100>;
194 interrupts = <47 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800195 clocks = <&clk CLK_UART3>, <&clk CLK_APB_UART3>;
196 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800197 reg-shift = <2>;
198 reg-io-width = <4>;
199 status = "disabled";
200 };
201
202 uart4: serial@41c0000 {
203 compatible = "snps,dw-apb-uart";
204 reg = <0x041c0000 0x100>;
205 interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800206 clocks = <&clk CLK_UART4>, <&clk CLK_APB_UART4>;
207 clock-names = "baudclk", "apb_pclk";
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800208 reg-shift = <2>;
209 reg-io-width = <4>;
210 status = "disabled";
211 };
212
Kongyang Liu86814422024-03-10 01:51:56 +0800213 sdhci0: mmc@4310000 {
214 compatible = "sophgo,cv1800b-dwcmshc";
215 reg = <0x4310000 0x1000>;
216 interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800217 clocks = <&clk CLK_AXI4_SD0>, <&clk CLK_SD0>;
218 clock-names = "core", "bus";
Kongyang Liu86814422024-03-10 01:51:56 +0800219 status = "disabled";
220 };
221
Kongyang Liu60455d6f2024-04-20 15:08:24 +0800222 spif: spi-nor@10000000 {
223 compatible = "sophgo,cv1800b-spif";
224 reg = <0x10000000 0x10000000>;
225 #address-cells = <1>;
226 #size-cells = <0>;
Kongyang Liu891acfc2024-06-11 17:41:16 +0800227 clocks = <&clk CLK_AHB_SF>;
Kongyang Liu60455d6f2024-04-20 15:08:24 +0800228 interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
229 status = "disabled";
230 };
231
Kongyang Liu8b2b5fd2024-01-28 15:05:24 +0800232 plic: interrupt-controller@70000000 {
233 reg = <0x70000000 0x4000000>;
234 interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
235 interrupt-controller;
236 #address-cells = <0>;
237 #interrupt-cells = <2>;
238 riscv,ndev = <101>;
239 };
240
241 clint: timer@74000000 {
242 reg = <0x74000000 0x10000>;
243 interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
244 };
245 };
246};