1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
3 #include <dt-bindings/clock/rtl83xx-clk.h>
7 #define STRINGIZE(s) #s
8 #define LAN_LABEL(p, s) STRINGIZE(p ## s)
9 #define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
11 #define INTERNAL_PHY(n) \
12 phy##n: ethernet-phy@##n { \
14 compatible = "ethernet-phy-ieee802.3-c22"; \
18 #define EXTERNAL_PHY(n) \
19 phy##n: ethernet-phy@##n { \
21 compatible = "ethernet-phy-ieee802.3-c22"; \
24 #define EXTERNAL_SFP_PHY(n) \
25 phy##n: ethernet-phy@##n { \
26 compatible = "ethernet-phy-ieee802.3-c22"; \
32 #define EXTERNAL_SFP_PHY_FULL(n, s) \
33 phy##n: ethernet-phy@##n { \
34 compatible = "ethernet-phy-ieee802.3-c22"; \
39 #define SWITCH_PORT(n, s, m) \
42 label = SWITCH_PORT_LABEL(s) ; \
43 phy-handle = <&phy##n>; \
47 #define SWITCH_SFP_PORT(n, s, m) \
50 label = SWITCH_PORT_LABEL(s) ; \
51 phy-handle = <&phy##n>; \
63 compatible = "realtek,rtl838x-soc";
65 ccu: clock-controller {
66 compatible = "realtek,rtl8380-clock";
75 compatible = "mips,mips4KEc";
77 clocks = <&ccu CLK_CPU>;
78 operating-points-v2 = <&cpu_opp_table>;
82 cpu_opp_table: opp-table-0 {
83 compatible = "operating-points-v2";
87 opp-hz = /bits/ 64 <325000000>;
90 opp-hz = /bits/ 64 <350000000>;
93 opp-hz = /bits/ 64 <375000000>;
96 opp-hz = /bits/ 64 <400000000>;
99 opp-hz = /bits/ 64 <425000000>;
102 opp-hz = /bits/ 64 <450000000>;
105 opp-hz = /bits/ 64 <475000000>;
108 opp-hz = /bits/ 64 <500000000>;
113 bootargs = "console=ttyS0,115200";
117 compatible = "mti,cpu-interrupt-controller";
118 #address-cells = <0>;
119 #interrupt-cells = <1>;
120 interrupt-controller;
124 compatible = "simple-bus";
125 #address-cells = <1>;
127 ranges = <0x0 0x18000000 0x10000>;
129 intc: interrupt-controller@3000 {
130 compatible = "realtek,rtl8380-intc", "realtek,rtl-intc";
132 interrupt-controller;
133 #interrupt-cells = <2>;
135 interrupt-parent = <&cpuintc>;
136 interrupts = <2>, <3>, <4>, <5>, <6>;
140 compatible = "realtek,rtl8380-spi";
141 reg = <0x1200 0x100>;
143 #address-cells = <1>;
148 compatible = "realtek,rtl8380-timer", "realtek,otto-timer";
149 reg = <0x3100 0x10>, <0x3110 0x10>, <0x3120 0x10>,
150 <0x3130 0x10>, <0x3140 0x10>;
152 interrupt-parent = <&intc>;
153 interrupts = <29 4>, <28 4>, <17 4>, <16 4>, <15 4>;
154 clocks = <&ccu CLK_LXB>;
158 compatible = "ns16550a";
159 reg = <0x2000 0x100>;
161 clocks = <&ccu CLK_LXB>;
163 interrupt-parent = <&intc>;
173 pinctrl-names = "default";
174 pinctrl-0 = <&enable_uart1>;
176 compatible = "ns16550a";
177 reg = <0x2100 0x100>;
179 clocks = <&ccu CLK_LXB>;
181 interrupt-parent = <&intc>;
192 watchdog0: watchdog@3150 {
193 compatible = "realtek,rtl8380-wdt";
196 realtek,reset-mode = "soc";
198 clocks = <&ccu CLK_LXB>;
201 interrupt-parent = <&intc>;
202 interrupt-names = "phase1", "phase2";
203 interrupts = <19 3>, <18 4>;
206 gpio0: gpio-controller@3500 {
207 compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
214 interrupt-controller;
215 #interrupt-cells = <2>;
216 interrupt-parent = <&intc>;
221 pinmux: pinmux@1b001000 {
222 compatible = "pinctrl-single";
223 reg = <0x1b001000 0x4>;
225 pinctrl-single,bit-per-mux;
226 pinctrl-single,register-width = <32>;
227 pinctrl-single,function-mask = <0x1>;
228 #pinctrl-cells = <2>;
230 enable_uart1: pinmux_enable_uart1 {
231 pinctrl-single,bits = <0x0 0x10 0x10>;
236 pinmux_led: pinmux@1b00a000 {
237 compatible = "pinctrl-single";
238 reg = <0x1b00a000 0x4>;
240 pinctrl-single,bit-per-mux;
241 pinctrl-single,register-width = <32>;
242 pinctrl-single,function-mask = <0x1>;
243 #pinctrl-cells = <2>;
246 pinmux_disable_sys_led: disable_sys_led {
247 pinctrl-single,bits = <0x0 0x0 0x8000>;
251 ethernet0: ethernet@1b00a300 {
252 compatible = "realtek,rtl838x-eth";
253 reg = <0x1b00a300 0x100>;
254 interrupt-parent = <&intc>;
256 #interrupt-cells = <1>;
257 phy-mode = "internal";
265 sram0: sram@9f000000 {
266 compatible = "mmio-sram";
267 reg = <0x9f000000 0x20000>;
268 #address-cells = <1>;
270 ranges = <0 0x9f000000 0x20000>;
273 switch0: switch@1b000000 {
274 compatible = "realtek,rtl83xx-switch";
276 interrupt-parent = <&intc>;