Kongyang Liu | 8b2b5fd | 2024-01-28 15:05:24 +0800 | [diff] [blame] | 1 | // 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 Liu | 8681442 | 2024-03-10 01:51:56 +0800 | [diff] [blame] | 48 | 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 Liu | af32b89 | 2024-04-20 15:00:28 +0800 | [diff] [blame] | 55 | eth_csrclk: eth-csrclk { |
| 56 | compatible = "fixed-clock"; |
| 57 | clock-frequency = <250000000>; |
| 58 | clock-output-names = "eth_csrclk"; |
| 59 | #clock-cells = <0x0>; |
| 60 | }; |
| 61 | |
| 62 | eth_ptpclk: eth-ptpclk { |
| 63 | compatible = "fixed-clock"; |
| 64 | clock-frequency = <50000000>; |
| 65 | clock-output-names = "eth_ptpclk"; |
| 66 | #clock-cells = <0x0>; |
| 67 | }; |
| 68 | |
Kongyang Liu | 60455d6f | 2024-04-20 15:08:24 +0800 | [diff] [blame] | 69 | spif_clk: spi-flash-clock { |
| 70 | compatible = "fixed-clock"; |
| 71 | clock-frequency = <300000000>; |
| 72 | clock-output-names = "spif_clk"; |
| 73 | #clock-cells = <0>; |
| 74 | }; |
| 75 | |
Kongyang Liu | 8b2b5fd | 2024-01-28 15:05:24 +0800 | [diff] [blame] | 76 | soc { |
| 77 | compatible = "simple-bus"; |
| 78 | interrupt-parent = <&plic>; |
| 79 | #address-cells = <1>; |
| 80 | #size-cells = <1>; |
| 81 | dma-noncoherent; |
| 82 | ranges; |
| 83 | |
Kongyang Liu | 8681442 | 2024-03-10 01:51:56 +0800 | [diff] [blame] | 84 | clk: clock-controller@3002000 { |
| 85 | reg = <0x03002000 0x1000>; |
| 86 | clocks = <&osc>; |
| 87 | #clock-cells = <1>; |
| 88 | }; |
| 89 | |
Kongyang Liu | 8b2b5fd | 2024-01-28 15:05:24 +0800 | [diff] [blame] | 90 | gpio0: gpio@3020000 { |
| 91 | compatible = "snps,dw-apb-gpio"; |
| 92 | reg = <0x3020000 0x1000>; |
| 93 | #address-cells = <1>; |
| 94 | #size-cells = <0>; |
| 95 | |
| 96 | porta: gpio-controller@0 { |
| 97 | compatible = "snps,dw-apb-gpio-port"; |
| 98 | gpio-controller; |
| 99 | #gpio-cells = <2>; |
| 100 | ngpios = <32>; |
| 101 | reg = <0>; |
| 102 | interrupt-controller; |
| 103 | #interrupt-cells = <2>; |
| 104 | interrupts = <60 IRQ_TYPE_LEVEL_HIGH>; |
| 105 | }; |
| 106 | }; |
| 107 | |
| 108 | gpio1: gpio@3021000 { |
| 109 | compatible = "snps,dw-apb-gpio"; |
| 110 | reg = <0x3021000 0x1000>; |
| 111 | #address-cells = <1>; |
| 112 | #size-cells = <0>; |
| 113 | |
| 114 | portb: gpio-controller@0 { |
| 115 | compatible = "snps,dw-apb-gpio-port"; |
| 116 | gpio-controller; |
| 117 | #gpio-cells = <2>; |
| 118 | ngpios = <32>; |
| 119 | reg = <0>; |
| 120 | interrupt-controller; |
| 121 | #interrupt-cells = <2>; |
| 122 | interrupts = <61 IRQ_TYPE_LEVEL_HIGH>; |
| 123 | }; |
| 124 | }; |
| 125 | |
| 126 | gpio2: gpio@3022000 { |
| 127 | compatible = "snps,dw-apb-gpio"; |
| 128 | reg = <0x3022000 0x1000>; |
| 129 | #address-cells = <1>; |
| 130 | #size-cells = <0>; |
| 131 | |
| 132 | portc: gpio-controller@0 { |
| 133 | compatible = "snps,dw-apb-gpio-port"; |
| 134 | gpio-controller; |
| 135 | #gpio-cells = <2>; |
| 136 | ngpios = <32>; |
| 137 | reg = <0>; |
| 138 | interrupt-controller; |
| 139 | #interrupt-cells = <2>; |
| 140 | interrupts = <62 IRQ_TYPE_LEVEL_HIGH>; |
| 141 | }; |
| 142 | }; |
| 143 | |
| 144 | gpio3: gpio@3023000 { |
| 145 | compatible = "snps,dw-apb-gpio"; |
| 146 | reg = <0x3023000 0x1000>; |
| 147 | #address-cells = <1>; |
| 148 | #size-cells = <0>; |
| 149 | |
| 150 | portd: gpio-controller@0 { |
| 151 | compatible = "snps,dw-apb-gpio-port"; |
| 152 | gpio-controller; |
| 153 | #gpio-cells = <2>; |
| 154 | ngpios = <32>; |
| 155 | reg = <0>; |
| 156 | interrupt-controller; |
| 157 | #interrupt-cells = <2>; |
| 158 | interrupts = <63 IRQ_TYPE_LEVEL_HIGH>; |
| 159 | }; |
| 160 | }; |
| 161 | |
Kongyang Liu | af32b89 | 2024-04-20 15:00:28 +0800 | [diff] [blame] | 162 | ethernet0: ethernet@4070000 { |
| 163 | compatible = "sophgo,cv1800b-dwmac"; |
| 164 | reg = <0x04070000 0x10000>; |
| 165 | interrupts = <31 IRQ_TYPE_LEVEL_HIGH>; |
| 166 | clocks = <ð_csrclk>, <ð_ptpclk>; |
| 167 | clock-names = "stmmaceth", "ptp_ref"; |
| 168 | status = "disabled"; |
| 169 | }; |
| 170 | |
Kongyang Liu | 8b2b5fd | 2024-01-28 15:05:24 +0800 | [diff] [blame] | 171 | uart0: serial@4140000 { |
| 172 | compatible = "snps,dw-apb-uart"; |
| 173 | reg = <0x04140000 0x100>; |
| 174 | interrupts = <44 IRQ_TYPE_LEVEL_HIGH>; |
| 175 | clocks = <&osc>; |
| 176 | reg-shift = <2>; |
| 177 | reg-io-width = <4>; |
| 178 | status = "disabled"; |
| 179 | }; |
| 180 | |
| 181 | uart1: serial@4150000 { |
| 182 | compatible = "snps,dw-apb-uart"; |
| 183 | reg = <0x04150000 0x100>; |
| 184 | interrupts = <45 IRQ_TYPE_LEVEL_HIGH>; |
| 185 | clocks = <&osc>; |
| 186 | reg-shift = <2>; |
| 187 | reg-io-width = <4>; |
| 188 | status = "disabled"; |
| 189 | }; |
| 190 | |
| 191 | uart2: serial@4160000 { |
| 192 | compatible = "snps,dw-apb-uart"; |
| 193 | reg = <0x04160000 0x100>; |
| 194 | interrupts = <46 IRQ_TYPE_LEVEL_HIGH>; |
| 195 | clocks = <&osc>; |
| 196 | reg-shift = <2>; |
| 197 | reg-io-width = <4>; |
| 198 | status = "disabled"; |
| 199 | }; |
| 200 | |
| 201 | uart3: serial@4170000 { |
| 202 | compatible = "snps,dw-apb-uart"; |
| 203 | reg = <0x04170000 0x100>; |
| 204 | interrupts = <47 IRQ_TYPE_LEVEL_HIGH>; |
| 205 | clocks = <&osc>; |
| 206 | reg-shift = <2>; |
| 207 | reg-io-width = <4>; |
| 208 | status = "disabled"; |
| 209 | }; |
| 210 | |
| 211 | uart4: serial@41c0000 { |
| 212 | compatible = "snps,dw-apb-uart"; |
| 213 | reg = <0x041c0000 0x100>; |
| 214 | interrupts = <48 IRQ_TYPE_LEVEL_HIGH>; |
| 215 | clocks = <&osc>; |
| 216 | reg-shift = <2>; |
| 217 | reg-io-width = <4>; |
| 218 | status = "disabled"; |
| 219 | }; |
| 220 | |
Kongyang Liu | 8681442 | 2024-03-10 01:51:56 +0800 | [diff] [blame] | 221 | sdhci0: mmc@4310000 { |
| 222 | compatible = "sophgo,cv1800b-dwcmshc"; |
| 223 | reg = <0x4310000 0x1000>; |
| 224 | interrupts = <36 IRQ_TYPE_LEVEL_HIGH>; |
| 225 | clocks = <&sdhci_clk>; |
| 226 | clock-names = "core"; |
| 227 | status = "disabled"; |
| 228 | }; |
| 229 | |
Kongyang Liu | 60455d6f | 2024-04-20 15:08:24 +0800 | [diff] [blame] | 230 | spif: spi-nor@10000000 { |
| 231 | compatible = "sophgo,cv1800b-spif"; |
| 232 | reg = <0x10000000 0x10000000>; |
| 233 | #address-cells = <1>; |
| 234 | #size-cells = <0>; |
| 235 | clocks = <&spif_clk>; |
| 236 | interrupts = <95 IRQ_TYPE_LEVEL_HIGH>; |
| 237 | status = "disabled"; |
| 238 | }; |
| 239 | |
Kongyang Liu | 8b2b5fd | 2024-01-28 15:05:24 +0800 | [diff] [blame] | 240 | plic: interrupt-controller@70000000 { |
| 241 | reg = <0x70000000 0x4000000>; |
| 242 | interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>; |
| 243 | interrupt-controller; |
| 244 | #address-cells = <0>; |
| 245 | #interrupt-cells = <2>; |
| 246 | riscv,ndev = <101>; |
| 247 | }; |
| 248 | |
| 249 | clint: timer@74000000 { |
| 250 | reg = <0x74000000 0x10000>; |
| 251 | interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>; |
| 252 | }; |
| 253 | }; |
| 254 | }; |