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