ath25: switch default kernel to 5.15
[openwrt/staging/ldir.git] / target / linux / realtek / dts-5.10 / rtl838x.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: 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: 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,rtl838x-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,rtl8380-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,mips4KEc";
84 reg = <0>;
85 clocks = <&ccu CLK_CPU>;
86 operating-points-v2 = <&cpu_opp_table>;
87 };
88 };
89
90 cpu_opp_table: opp-table-0 {
91 compatible = "operating-points-v2";
92 opp-shared;
93
94 opp00 {
95 opp-hz = /bits/ 64 <325000000>;
96 };
97 opp01 {
98 opp-hz = /bits/ 64 <350000000>;
99 };
100 opp02 {
101 opp-hz = /bits/ 64 <375000000>;
102 };
103 opp03 {
104 opp-hz = /bits/ 64 <400000000>;
105 };
106 opp04 {
107 opp-hz = /bits/ 64 <425000000>;
108 };
109 opp05 {
110 opp-hz = /bits/ 64 <450000000>;
111 };
112 opp06 {
113 opp-hz = /bits/ 64 <475000000>;
114 };
115 opp07 {
116 opp-hz = /bits/ 64 <500000000>;
117 };
118 };
119
120 chosen {
121 bootargs = "console=ttyS0,115200";
122 };
123
124 cpuintc: cpuintc {
125 compatible = "mti,cpu-interrupt-controller";
126 #address-cells = <0>;
127 #interrupt-cells = <1>;
128 interrupt-controller;
129 };
130
131 soc: soc {
132 compatible = "simple-bus";
133 #address-cells = <1>;
134 #size-cells = <1>;
135 ranges = <0x0 0x18000000 0x10000>;
136
137 intc: interrupt-controller@3000 {
138 compatible = "realtek,rtl8380-intc", "realtek,rtl-intc";
139 reg = <0x3000 0x18>;
140 interrupt-controller;
141 #interrupt-cells = <2>;
142
143 interrupt-parent = <&cpuintc>;
144 interrupts = <2>, <3>, <4>, <5>, <6>;
145 };
146
147 spi0: spi@1200 {
148 compatible = "realtek,rtl8380-spi";
149 reg = <0x1200 0x100>;
150
151 #address-cells = <1>;
152 #size-cells = <0>;
153 };
154
155 timer0: timer@3100 {
156 compatible = "realtek,rtl8380-timer", "realtek,otto-timer";
157 reg = <0x3100 0x10>, <0x3110 0x10>, <0x3120 0x10>,
158 <0x3130 0x10>, <0x3140 0x10>;
159
160 interrupt-parent = <&intc>;
161 interrupts = <29 4>, <28 4>, <17 4>, <16 4>, <15 4>;
162 clocks = <&ccu CLK_LXB>;
163 };
164
165 uart0: uart@2000 {
166 compatible = "ns16550a";
167 reg = <0x2000 0x100>;
168
169 clocks = <&ccu CLK_LXB>;
170
171 interrupt-parent = <&intc>;
172 interrupts = <31 1>;
173
174 reg-io-width = <1>;
175 reg-shift = <2>;
176 fifo-size = <1>;
177 no-loopback-test;
178 };
179
180 uart1: uart@2100 {
181 pinctrl-names = "default";
182 pinctrl-0 = <&enable_uart1>;
183
184 compatible = "ns16550a";
185 reg = <0x2100 0x100>;
186
187 clocks = <&ccu CLK_LXB>;
188
189 interrupt-parent = <&intc>;
190 interrupts = <30 0>;
191
192 reg-io-width = <1>;
193 reg-shift = <2>;
194 fifo-size = <1>;
195 no-loopback-test;
196
197 status = "disabled";
198 };
199
200 watchdog0: watchdog@3150 {
201 compatible = "realtek,rtl8380-wdt";
202 reg = <0x3150 0xc>;
203
204 realtek,reset-mode = "soc";
205
206 clocks = <&ccu CLK_LXB>;
207 timeout-sec = <30>;
208
209 interrupt-parent = <&intc>;
210 interrupt-names = "phase1", "phase2";
211 interrupts = <19 3>, <18 4>;
212 };
213
214 gpio0: gpio-controller@3500 {
215 compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
216 reg = <0x3500 0x20>;
217
218 gpio-controller;
219 #gpio-cells = <2>;
220 ngpios = <24>;
221
222 interrupt-controller;
223 #interrupt-cells = <2>;
224 interrupt-parent = <&intc>;
225 interrupts = <23 3>;
226 };
227 };
228
229 pinmux: pinmux@1b001000 {
230 compatible = "pinctrl-single";
231 reg = <0x1b001000 0x4>;
232
233 pinctrl-single,bit-per-mux;
234 pinctrl-single,register-width = <32>;
235 pinctrl-single,function-mask = <0x1>;
236 #pinctrl-cells = <2>;
237
238 enable_uart1: pinmux_enable_uart1 {
239 pinctrl-single,bits = <0x0 0x10 0x10>;
240 };
241 };
242
243 /* LED_GLB_CTRL */
244 pinmux_led: pinmux@1b00a000 {
245 compatible = "pinctrl-single";
246 reg = <0x1b00a000 0x4>;
247
248 pinctrl-single,bit-per-mux;
249 pinctrl-single,register-width = <32>;
250 pinctrl-single,function-mask = <0x1>;
251 #pinctrl-cells = <2>;
252
253 /* enable GPIO 0 */
254 pinmux_disable_sys_led: disable_sys_led {
255 pinctrl-single,bits = <0x0 0x0 0x8000>;
256 };
257 };
258
259 ethernet0: ethernet@1b00a300 {
260 compatible = "realtek,rtl838x-eth";
261 reg = <0x1b00a300 0x100>;
262 interrupt-parent = <&intc>;
263 interrupts = <24 3>;
264 #interrupt-cells = <1>;
265 phy-mode = "internal";
266
267 fixed-link {
268 speed = <1000>;
269 full-duplex;
270 };
271 };
272
273 sram0: sram@9f000000 {
274 compatible = "mmio-sram";
275 reg = <0x9f000000 0x10000>;
276 #address-cells = <1>;
277 #size-cells = <1>;
278 ranges = <0 0x9f000000 0x10000>;
279 };
280
281 switch0: switch@1b000000 {
282 compatible = "realtek,rtl83xx-switch";
283
284 interrupt-parent = <&intc>;
285 interrupts = <20 2>;
286 };
287 };