ath25: switch default kernel to 5.15
[openwrt/staging/wigyori.git] / target / linux / realtek / dts-5.10 / rtl839x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/clock/rtl83xx-clk.h>
4
5 /dts-v1/;
6
7 #define STRINGIZE(s) #s
8 #define LAN_LABEL(p, s) STRINGIZE(p ## s)
9 #define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
10
11 #define INTERNAL_PHY(n) \
12 phy##n: ethernet-phy@##n { \
13 reg = <##n>; \
14 compatible = "ethernet-phy-ieee802.3-c22"; \
15 phy-is-integrated; \
16 };
17
18 #define EXTERNAL_PHY(n) \
19 phy##n: ethernet-phy@##n { \
20 reg = <##n>; \
21 compatible = "ethernet-phy-ieee802.3-c22"; \
22 };
23
24 #define EXTERNAL_SFP_PHY(n) \
25 phy##n: ethernet-phy@##n { \
26 compatible = "ethernet-phy-ieee802.3-c22"; \
27 sfp; \
28 media = "fibre"; \
29 reg = <##n>; \
30 };
31
32 #define EXTERNAL_SFP_PHY_FULL(n, s) \
33 phy##n: ethernet-phy@##n { \
34 compatible = "ethernet-phy-ieee802.3-c22"; \
35 sfp = <&sfp##s>; \
36 reg = <##n>; \
37 };
38
39 #define SWITCH_PORT(n, s, m) \
40 port@##n { \
41 reg = <##n>; \
42 label = SWITCH_PORT_LABEL(s) ; \
43 phy-handle = <&phy##n>; \
44 phy-mode = #m ; \
45 };
46
47 #define SWITCH_SFP_PORT(n, s, m) \
48 port@##n { \
49 reg = <##n>; \
50 label = SWITCH_PORT_LABEL(s) ; \
51 phy-handle = <&phy##n>; \
52 phy-mode = #m ; \
53 fixed-link { \
54 speed = <1000>; \
55 full-duplex; \
56 }; \
57 };
58
59 / {
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 compatible = "realtek,rtl839x-soc";
64
65 osc: oscillator {
66 compatible = "fixed-clock";
67 #clock-cells = <0>;
68 clock-frequency = <25000000>;
69 };
70
71 ccu: clock-controller {
72 compatible = "realtek,rtl8390-clock";
73 #clock-cells = <1>;
74 clocks = <&osc>;
75 clock-names = "ref_clk";
76 };
77
78 cpus {
79 #address-cells = <1>;
80 #size-cells = <0>;
81
82 cpu@0 {
83 compatible = "mips,mips34Kc";
84 reg = <0>;
85 clocks = <&ccu CLK_CPU>;
86 operating-points-v2 = <&cpu_opp_table>;
87 };
88
89 cpu@1 {
90 compatible = "mips,mips34Kc";
91 reg = <1>;
92 clocks = <&ccu CLK_CPU>;
93 operating-points-v2 = <&cpu_opp_table>;
94 };
95 };
96
97 cpu_opp_table: opp-table-0 {
98 compatible = "operating-points-v2";
99 opp-shared;
100
101 opp00 {
102 opp-hz = /bits/ 64 <425000000>;
103 };
104 opp01 {
105 opp-hz = /bits/ 64 <450000000>;
106 };
107 opp02 {
108 opp-hz = /bits/ 64 <475000000>;
109 };
110 opp03 {
111 opp-hz = /bits/ 64 <500000000>;
112 };
113 opp04 {
114 opp-hz = /bits/ 64 <525000000>;
115 };
116 opp05 {
117 opp-hz = /bits/ 64 <550000000>;
118 };
119 opp06 {
120 opp-hz = /bits/ 64 <575000000>;
121 };
122 opp07 {
123 opp-hz = /bits/ 64 <600000000>;
124 };
125 opp08 {
126 opp-hz = /bits/ 64 <625000000>;
127 };
128 opp09 {
129 opp-hz = /bits/ 64 <650000000>;
130 };
131 opp10 {
132 opp-hz = /bits/ 64 <675000000>;
133 };
134 opp11 {
135 opp-hz = /bits/ 64 <700000000>;
136 };
137 opp12 {
138 opp-hz = /bits/ 64 <725000000>;
139 };
140 opp13 {
141 opp-hz = /bits/ 64 <750000000>;
142 };
143 };
144
145 chosen {
146 bootargs = "console=ttyS0,115200";
147 };
148
149 cpuintc: cpuintc {
150 compatible = "mti,cpu-interrupt-controller";
151 #address-cells = <0>;
152 #interrupt-cells = <1>;
153 interrupt-controller;
154 };
155
156 soc: soc {
157 compatible = "simple-bus";
158 #address-cells = <1>;
159 #size-cells = <1>;
160 ranges = <0x0 0x18000000 0x10000>;
161
162 intc: interrupt-controller@3000 {
163 compatible = "realtek,rtl8390-intc", "realtek,rtl-intc";
164 reg = <0x3000 0x18>, <0x3018 0x18>;
165 interrupt-controller;
166 #interrupt-cells = <2>;
167
168 interrupt-parent = <&cpuintc>;
169 interrupts = <2>, <3>, <4>, <5>, <6>;
170 };
171
172 spi0: spi@1200 {
173 compatible = "realtek,rtl8380-spi";
174 reg = <0x1200 0x100>;
175
176 #address-cells = <1>;
177 #size-cells = <0>;
178 };
179
180 timer0: timer@3100 {
181 compatible = "realtek,rtl8390-timer", "realtek,otto-timer";
182 reg = <0x3100 0x10>, <0x3110 0x10>, <0x3120 0x10>,
183 <0x3130 0x10>, <0x3140 0x10>;
184
185 interrupt-parent = <&intc>;
186 interrupts = <29 4>, <28 4>, <17 4>, <16 4>, <15 4>;
187 clocks = <&ccu CLK_LXB>;
188 };
189
190 uart0: uart@2000 {
191 compatible = "ns16550a";
192 reg = <0x2000 0x100>;
193
194 clocks = <&ccu CLK_LXB>;
195
196 interrupt-parent = <&intc>;
197 interrupts = <31 1>;
198
199 reg-io-width = <1>;
200 reg-shift = <2>;
201 fifo-size = <1>;
202 no-loopback-test;
203 };
204
205 uart1: uart@2100 {
206 pinctrl-names = "default";
207 pinctrl-0 = <&enable_uart1>;
208
209 compatible = "ns16550a";
210 reg = <0x2100 0x100>;
211
212 clocks = <&ccu CLK_LXB>;
213
214 interrupt-parent = <&intc>;
215 interrupts = <30 2>;
216
217 reg-io-width = <1>;
218 reg-shift = <2>;
219 fifo-size = <1>;
220 no-loopback-test;
221
222 status = "disabled";
223 };
224
225 gpio0: gpio-controller@3500 {
226 compatible = "realtek,rtl8390-gpio", "realtek,otto-gpio";
227 reg = <0x3500 0x20>;
228
229 gpio-controller;
230 #gpio-cells = <2>;
231 ngpios = <24>;
232
233 interrupt-controller;
234 #interrupt-cells = <2>;
235 interrupt-parent = <&intc>;
236 interrupts = <23 2>;
237 };
238
239 watchdog0: watchdog@3150 {
240 compatible = "realtek,rtl8390-wdt";
241 reg = <0x3150 0xc>;
242
243 realtek,reset-mode = "soc";
244
245 clocks = <&ccu CLK_LXB>;
246 timeout-sec = <30>;
247
248 interrupt-parent = <&intc>;
249 interrupt-names = "phase1", "phase2";
250 interrupts = <19 4>, <18 4>;
251 };
252
253 };
254
255 pinmux@1b000004 {
256 compatible = "pinctrl-single";
257 reg = <0x1b000004 0x4>;
258
259 pinctrl-single,bit-per-mux;
260 pinctrl-single,register-width = <32>;
261 pinctrl-single,function-mask = <0x1>;
262 #pinctrl-cells = <2>;
263
264 enable_uart1: pinmux_enable_uart1 {
265 pinctrl-single,bits = <0x0 0x1 0x3>;
266 };
267
268 disable_jtag: pinmux_disable_jtag {
269 pinctrl-single,bits = <0x0 0x2 0x3>;
270 };
271 };
272
273 /* LED_GLB_CTRL */
274 pinmux@1b0000e4 {
275 compatible = "pinctrl-single";
276 reg = <0x1b0000e4 0x4>;
277
278 pinctrl-single,bit-per-mux;
279 pinctrl-single,register-width = <32>;
280 pinctrl-single,function-mask = <0x1>;
281 #pinctrl-cells = <2>;
282
283 /* enable GPIO 0 */
284 pinmux_disable_sys_led: disable_sys_led {
285 pinctrl-single,bits = <0x0 0x0 0x4000>;
286 };
287 };
288
289 ethernet0: ethernet@1b00a300 {
290 compatible = "realtek,rtl838x-eth";
291 reg = <0x1b00a300 0x100>;
292
293 interrupt-parent = <&intc>;
294 interrupts = <24 3>;
295
296 phy-mode = "internal";
297
298 fixed-link {
299 speed = <1000>;
300 full-duplex;
301 };
302 };
303
304 sram0: sram@9f000000 {
305 compatible = "mmio-sram";
306 reg = <0x9f000000 0x18000>;
307 #address-cells = <1>;
308 #size-cells = <1>;
309 ranges = <0 0x9f000000 0x18000>;
310 };
311
312 switch0: switch@1b000000 {
313 status = "okay";
314 compatible = "realtek,rtl83xx-switch";
315
316 interrupt-parent = <&intc>;
317 interrupts = <20 2>;
318 };
319 };