|
7 | 7 | #include <dt-bindings/clock/sophgo,cv1800.h>
|
8 | 8 | #include <dt-bindings/gpio/gpio.h>
|
9 | 9 | #include <dt-bindings/interrupt-controller/irq.h>
|
| 10 | +#include "cv18xx-reset.h" |
10 | 11 |
|
11 | 12 | / {
|
12 | 13 | #address-cells = <1>;
|
|
24 | 25 | #size-cells = <1>;
|
25 | 26 | ranges;
|
26 | 27 |
|
| 28 | + rst: reset-controller@3003000 { |
| 29 | + compatible = "sophgo,cv1800b-reset"; |
| 30 | + reg = <0x3003000 0x1000>; |
| 31 | + #reset-cells = <1>; |
| 32 | + }; |
| 33 | + |
| 34 | + mdio: mdio-mux@3009800 { |
| 35 | + compatible = "mdio-mux-mmioreg", "mdio-mux"; |
| 36 | + reg = <0x3009800 0x4>; |
| 37 | + #address-cells = <1>; |
| 38 | + #size-cells = <0>; |
| 39 | + mdio-parent-bus = <&gmac0_mdio>; |
| 40 | + mux-mask = <0x80>; |
| 41 | + status = "disabled"; |
| 42 | + |
| 43 | + internal_mdio: mdio@0 { |
| 44 | + #address-cells = <1>; |
| 45 | + #size-cells = <0>; |
| 46 | + reg = <0>; |
| 47 | + |
| 48 | + internal_ephy: phy@0 { |
| 49 | + compatible = "ethernet-phy-ieee802.3-c22"; |
| 50 | + reg = <1>; |
| 51 | + }; |
| 52 | + }; |
| 53 | + |
| 54 | + external_mdio: mdio@80 { |
| 55 | + #address-cells = <1>; |
| 56 | + #size-cells = <0>; |
| 57 | + reg = <0x80>; |
| 58 | + }; |
| 59 | + }; |
| 60 | + |
27 | 61 | gpio0: gpio@3020000 {
|
28 | 62 | compatible = "snps,dw-apb-gpio";
|
29 | 63 | reg = <0x3020000 0x1000>;
|
30 | 64 | #address-cells = <1>;
|
31 | 65 | #size-cells = <0>;
|
| 66 | + resets = <&rst RST_GPIO0>; |
32 | 67 |
|
33 | 68 | porta: gpio-controller@0 {
|
34 | 69 | compatible = "snps,dw-apb-gpio-port";
|
|
47 | 82 | reg = <0x3021000 0x1000>;
|
48 | 83 | #address-cells = <1>;
|
49 | 84 | #size-cells = <0>;
|
| 85 | + resets = <&rst RST_GPIO1>; |
50 | 86 |
|
51 | 87 | portb: gpio-controller@0 {
|
52 | 88 | compatible = "snps,dw-apb-gpio-port";
|
|
65 | 101 | reg = <0x3022000 0x1000>;
|
66 | 102 | #address-cells = <1>;
|
67 | 103 | #size-cells = <0>;
|
| 104 | + resets = <&rst RST_GPIO2>; |
68 | 105 |
|
69 | 106 | portc: gpio-controller@0 {
|
70 | 107 | compatible = "snps,dw-apb-gpio-port";
|
|
83 | 120 | reg = <0x3023000 0x1000>;
|
84 | 121 | #address-cells = <1>;
|
85 | 122 | #size-cells = <0>;
|
| 123 | + resets = <&rst RST_GPIO3>; |
86 | 124 |
|
87 | 125 | portd: gpio-controller@0 {
|
88 | 126 | compatible = "snps,dw-apb-gpio-port";
|
|
126 | 164 | clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C0>;
|
127 | 165 | clock-names = "ref", "pclk";
|
128 | 166 | interrupts = <SOC_PERIPHERAL_IRQ(33) IRQ_TYPE_LEVEL_HIGH>;
|
| 167 | + resets = <&rst RST_I2C0>; |
129 | 168 | status = "disabled";
|
130 | 169 | };
|
131 | 170 |
|
|
137 | 176 | clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C1>;
|
138 | 177 | clock-names = "ref", "pclk";
|
139 | 178 | interrupts = <SOC_PERIPHERAL_IRQ(34) IRQ_TYPE_LEVEL_HIGH>;
|
| 179 | + resets = <&rst RST_I2C1>; |
140 | 180 | status = "disabled";
|
141 | 181 | };
|
142 | 182 |
|
|
148 | 188 | clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C2>;
|
149 | 189 | clock-names = "ref", "pclk";
|
150 | 190 | interrupts = <SOC_PERIPHERAL_IRQ(35) IRQ_TYPE_LEVEL_HIGH>;
|
| 191 | + resets = <&rst RST_I2C2>; |
151 | 192 | status = "disabled";
|
152 | 193 | };
|
153 | 194 |
|
|
159 | 200 | clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C3>;
|
160 | 201 | clock-names = "ref", "pclk";
|
161 | 202 | interrupts = <SOC_PERIPHERAL_IRQ(36) IRQ_TYPE_LEVEL_HIGH>;
|
| 203 | + resets = <&rst RST_I2C3>; |
162 | 204 | status = "disabled";
|
163 | 205 | };
|
164 | 206 |
|
|
170 | 212 | clocks = <&clk CLK_I2C>, <&clk CLK_APB_I2C4>;
|
171 | 213 | clock-names = "ref", "pclk";
|
172 | 214 | interrupts = <SOC_PERIPHERAL_IRQ(37) IRQ_TYPE_LEVEL_HIGH>;
|
| 215 | + resets = <&rst RST_I2C4>; |
173 | 216 | status = "disabled";
|
174 | 217 | };
|
175 | 218 |
|
| 219 | + gmac0: ethernet@4070000 { |
| 220 | + compatible = "sophgo,cv1800b-dwmac", "snps,dwmac-3.70a"; |
| 221 | + reg = <0x04070000 0x10000>; |
| 222 | + clocks = <&clk CLK_AXI4_ETH0>, <&clk CLK_ETH0_500M>; |
| 223 | + clock-names = "stmmaceth", "ptp_ref"; |
| 224 | + interrupts = <SOC_PERIPHERAL_IRQ(15) IRQ_TYPE_LEVEL_HIGH>; |
| 225 | + interrupt-names = "macirq"; |
| 226 | + phy-handle = <&internal_ephy>; |
| 227 | + phy-mode = "internal"; |
| 228 | + resets = <&rst RST_ETH0>; |
| 229 | + reset-names = "stmmaceth"; |
| 230 | + rx-fifo-depth = <8192>; |
| 231 | + tx-fifo-depth = <8192>; |
| 232 | + snps,multicast-filter-bins = <0>; |
| 233 | + snps,perfect-filter-entries = <1>; |
| 234 | + snps,aal; |
| 235 | + snps,txpbl = <8>; |
| 236 | + snps,rxpbl = <8>; |
| 237 | + snps,mtl-rx-config = <&gmac0_mtl_rx_setup>; |
| 238 | + snps,mtl-tx-config = <&gmac0_mtl_tx_setup>; |
| 239 | + snps,axi-config = <&gmac0_stmmac_axi_setup>; |
| 240 | + status = "disabled"; |
| 241 | + |
| 242 | + gmac0_mdio: mdio { |
| 243 | + compatible = "snps,dwmac-mdio"; |
| 244 | + #address-cells = <1>; |
| 245 | + #size-cells = <0>; |
| 246 | + }; |
| 247 | + |
| 248 | + gmac0_mtl_rx_setup: rx-queues-config { |
| 249 | + snps,rx-queues-to-use = <1>; |
| 250 | + queue0 {}; |
| 251 | + }; |
| 252 | + |
| 253 | + gmac0_mtl_tx_setup: tx-queues-config { |
| 254 | + snps,tx-queues-to-use = <1>; |
| 255 | + queue0 {}; |
| 256 | + }; |
| 257 | + |
| 258 | + gmac0_stmmac_axi_setup: stmmac-axi-config { |
| 259 | + snps,blen = <16 8 4 0 0 0 0>; |
| 260 | + snps,rd_osr_lmt = <2>; |
| 261 | + snps,wr_osr_lmt = <1>; |
| 262 | + }; |
| 263 | + }; |
| 264 | + |
176 | 265 | uart0: serial@4140000 {
|
177 | 266 | compatible = "snps,dw-apb-uart";
|
178 | 267 | reg = <0x04140000 0x100>;
|
|
181 | 270 | clock-names = "baudclk", "apb_pclk";
|
182 | 271 | reg-shift = <2>;
|
183 | 272 | reg-io-width = <4>;
|
| 273 | + resets = <&rst RST_UART0>; |
184 | 274 | status = "disabled";
|
185 | 275 | };
|
186 | 276 |
|
|
192 | 282 | clock-names = "baudclk", "apb_pclk";
|
193 | 283 | reg-shift = <2>;
|
194 | 284 | reg-io-width = <4>;
|
| 285 | + resets = <&rst RST_UART1>; |
195 | 286 | status = "disabled";
|
196 | 287 | };
|
197 | 288 |
|
|
203 | 294 | clock-names = "baudclk", "apb_pclk";
|
204 | 295 | reg-shift = <2>;
|
205 | 296 | reg-io-width = <4>;
|
| 297 | + resets = <&rst RST_UART2>; |
206 | 298 | status = "disabled";
|
207 | 299 | };
|
208 | 300 |
|
|
214 | 306 | clock-names = "baudclk", "apb_pclk";
|
215 | 307 | reg-shift = <2>;
|
216 | 308 | reg-io-width = <4>;
|
| 309 | + resets = <&rst RST_UART3>; |
217 | 310 | status = "disabled";
|
218 | 311 | };
|
219 | 312 |
|
|
225 | 318 | clocks = <&clk CLK_SPI>, <&clk CLK_APB_SPI0>;
|
226 | 319 | clock-names = "ssi_clk", "pclk";
|
227 | 320 | interrupts = <SOC_PERIPHERAL_IRQ(38) IRQ_TYPE_LEVEL_HIGH>;
|
| 321 | + resets = <&rst RST_SPI0>; |
228 | 322 | status = "disabled";
|
229 | 323 | };
|
230 | 324 |
|
|
236 | 330 | clocks = <&clk CLK_SPI>, <&clk CLK_APB_SPI1>;
|
237 | 331 | clock-names = "ssi_clk", "pclk";
|
238 | 332 | interrupts = <SOC_PERIPHERAL_IRQ(39) IRQ_TYPE_LEVEL_HIGH>;
|
| 333 | + resets = <&rst RST_SPI1>; |
239 | 334 | status = "disabled";
|
240 | 335 | };
|
241 | 336 |
|
|
247 | 342 | clocks = <&clk CLK_SPI>, <&clk CLK_APB_SPI2>;
|
248 | 343 | clock-names = "ssi_clk", "pclk";
|
249 | 344 | interrupts = <SOC_PERIPHERAL_IRQ(40) IRQ_TYPE_LEVEL_HIGH>;
|
| 345 | + resets = <&rst RST_SPI2>; |
250 | 346 | status = "disabled";
|
251 | 347 | };
|
252 | 348 |
|
|
258 | 354 | clocks = <&clk CLK_SPI>, <&clk CLK_APB_SPI3>;
|
259 | 355 | clock-names = "ssi_clk", "pclk";
|
260 | 356 | interrupts = <SOC_PERIPHERAL_IRQ(41) IRQ_TYPE_LEVEL_HIGH>;
|
| 357 | + resets = <&rst RST_SPI3>; |
261 | 358 | status = "disabled";
|
262 | 359 | };
|
263 | 360 |
|
|
269 | 366 | clock-names = "baudclk", "apb_pclk";
|
270 | 367 | reg-shift = <2>;
|
271 | 368 | reg-io-width = <4>;
|
| 369 | + resets = <&rst RST_UART4>; |
272 | 370 | status = "disabled";
|
273 | 371 | };
|
274 | 372 |
|
|
307 | 405 | snps,data-width = <2>;
|
308 | 406 | status = "disabled";
|
309 | 407 | };
|
| 408 | + |
| 409 | + rtc@5025000 { |
| 410 | + compatible = "sophgo,cv1800b-rtc", "syscon"; |
| 411 | + reg = <0x5025000 0x2000>; |
| 412 | + interrupts = <SOC_PERIPHERAL_IRQ(1) IRQ_TYPE_LEVEL_HIGH>, |
| 413 | + <SOC_PERIPHERAL_IRQ(2) IRQ_TYPE_LEVEL_HIGH>, |
| 414 | + <SOC_PERIPHERAL_IRQ(3) IRQ_TYPE_LEVEL_HIGH>; |
| 415 | + interrupt-names = "alarm", "longpress", "vbat"; |
| 416 | + clocks = <&clk CLK_RTC_25M>, |
| 417 | + <&clk CLK_SRC_RTC_SYS_0>; |
| 418 | + clock-names = "rtc", "mcu"; |
| 419 | + }; |
310 | 420 | };
|
311 | 421 | };
|
0 commit comments