realtek: update soc dtsi in 5.10 for backported drivers
[openwrt/staging/981213.git] / target / linux / realtek / dts-5.10 / rtl930x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #define STRINGIZE(s) #s
6 #define LAN_LABEL(p, s) STRINGIZE(p ## s)
7 #define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
8
9 #define INTERNAL_PHY(n) \
10 phy##n: ethernet-phy@##n { \
11 reg = <##n>; \
12 compatible = "ethernet-phy-ieee802.3-c22"; \
13 phy-is-integrated; \
14 };
15
16 #define EXTERNAL_PHY(n) \
17 phy##n: ethernet-phy@##n { \
18 reg = <##n>; \
19 compatible = "ethernet-phy-ieee802.3-c22"; \
20 };
21
22 #define EXTERNAL_SFP_PHY(n) \
23 phy##n: ethernet-phy@##n { \
24 compatible = "ethernet-phy-ieee802.3-c22"; \
25 sfp; \
26 media = "fibre"; \
27 reg = <##n>; \
28 };
29
30 #define SWITCH_PORT(n, s, m) \
31 port@##n { \
32 reg = <##n>; \
33 label = SWITCH_PORT_LABEL(s) ; \
34 phy-handle = <&phy##n>; \
35 phy-mode = #m ; \
36 };
37
38 #define SWITCH_SFP_PORT(n, s, m) \
39 port@##n { \
40 reg = <##n>; \
41 label = SWITCH_PORT_LABEL(s) ; \
42 phy-handle = <&phy##n>; \
43 phy-mode = #m ; \
44 fixed-link { \
45 speed = <1000>; \
46 full-duplex; \
47 }; \
48 };
49
50 / {
51 #address-cells = <1>;
52 #size-cells = <1>;
53
54 compatible = "realtek,rtl838x-soc";
55
56 cpus {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 frequency = <800000000>;
60
61 cpu@0 {
62 compatible = "mips,mips34Kc";
63 reg = <0>;
64 };
65 };
66
67 memory@0 {
68 device_type = "memory";
69 reg = <0x0 0x8000000>;
70 };
71
72 chosen {
73 bootargs = "console=ttyS0,38400";
74 };
75
76 cpuintc: cpuintc {
77 compatible = "mti,cpu-interrupt-controller";
78 #address-cells = <0>;
79 #interrupt-cells = <1>;
80 interrupt-controller;
81 };
82
83 intc: rtlintc {
84 compatible = "realtek,rtl-intc";
85 reg = <0xb8003000 0x20>;
86 #address-cells = <0>;
87 #interrupt-cells = <1>;
88 interrupt-controller;
89 interrupt-map =
90 <31 &cpuintc 1>, /* UART1 */
91 <30 &cpuintc 2>, /* UART0 */
92 <28 &cpuintc 1>, /* USB_H2 */
93 <24 &cpuintc 4>, /* NIC */
94 <23 &cpuintc 3>, /* SWCORE */
95 <13 &cpuintc 4>, /* GPIO_ABCD */
96 <11 &cpuintc 1>, /* TC4 */
97 <10 &cpuintc 1>, /* TC3 */
98 <9 &cpuintc 1>, /* TC2 */
99 <8 &cpuintc 1>, /* TC1 */
100 <7 &cpuintc 5>; /* TC0 */
101 };
102
103 osc: oscillator {
104 compatible = "fixed-clock";
105 #clock-cells = <1>;
106 clock-frequency = <175000000>;
107 clock-output-names = "osc";
108 };
109
110 timer: timer@b8003200 {
111 compatible = "realtek,rtl9300-timer";
112 reg = <0xb8003200 0x60>;
113 interrupt-parent = <&intc>;
114 interrupts = <8>;
115 interrupt-names = "ostimer";
116 clocks = <&osc 0>;
117 };
118
119 spi0: spi@b8001200 {
120 compatible = "realtek,rtl8380-spi";
121 reg = <0xb8001200 0x100>;
122
123 #address-cells = <1>;
124 #size-cells = <0>;
125 };
126
127 uart0: uart@b8002000 {
128 compatible = "ns16550a";
129 reg = <0xb8002000 0x100>;
130
131 clock-frequency = <175000000>;
132
133 interrupt-parent = <&intc>;
134 interrupts = <30>;
135
136 reg-io-width = <1>;
137 reg-shift = <2>;
138 fifo-size = <1>;
139 no-loopback-test;
140 };
141
142 uart1: uart@b8002100 {
143 compatible = "ns16550a";
144 reg = <0xb8002100 0x100>;
145
146 clock-frequency = <175000000>;
147
148 interrupt-parent = <&intc>;
149 interrupts = <31>;
150
151 reg-io-width = <1>;
152 reg-shift = <2>;
153 fifo-size = <1>;
154 no-loopback-test;
155 };
156
157 gpio0: gpio-controller@b8003500 {
158 compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
159 reg = <0xb8003500 0x20>;
160 gpio-controller;
161 #gpio-cells = <2>;
162 ngpios = <32>;
163 interrupt-parent = <&intc>;
164 interrupts = <31>;
165
166 /*
167 * currently, RTL930x GPIO is not supported in
168 * upstreamed driver (gpio-realtek-otto)
169 */
170 status = "disabled";
171 };
172
173 ethernet0: ethernet@bb00a300 {
174 compatible = "realtek,rtl838x-eth";
175 reg = <0xbb00a300 0x100>;
176 interrupt-parent = <&intc>;
177 interrupts = <24>;
178 #interrupt-cells = <1>;
179 phy-mode = "internal";
180
181 fixed-link {
182 speed = <1000>;
183 full-duplex;
184 };
185 };
186
187 switch0: switch@bb000000 {
188 compatible = "realtek,rtl83xx-switch";
189
190 interrupt-parent = <&intc>;
191 interrupts = <20>;
192 };
193 };