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";
66 compatible = "fixed-clock";
68 clock-frequency = <25000000>;
71 ccu: clock-controller {
72 compatible = "realtek,rtl8380-clock";
75 clock-names = "ref_clk";
83 compatible = "mips,mips4KEc";
85 clocks = <&ccu CLK_CPU>;
86 operating-points-v2 = <&cpu_opp_table>;
90 cpu_opp_table: opp-table-0 {
91 compatible = "operating-points-v2";
95 opp-hz = /bits/ 64 <325000000>;
98 opp-hz = /bits/ 64 <350000000>;
101 opp-hz = /bits/ 64 <375000000>;
104 opp-hz = /bits/ 64 <400000000>;
107 opp-hz = /bits/ 64 <425000000>;
110 opp-hz = /bits/ 64 <450000000>;
113 opp-hz = /bits/ 64 <475000000>;
116 opp-hz = /bits/ 64 <500000000>;
121 bootargs = "console=ttyS0,115200";
125 compatible = "mti,cpu-interrupt-controller";
126 #address-cells = <0>;
127 #interrupt-cells = <1>;
128 interrupt-controller;
132 compatible = "simple-bus";
133 #address-cells = <1>;
135 ranges = <0x0 0x18000000 0x10000>;
137 intc: interrupt-controller@3000 {
138 compatible = "realtek,rtl8380-intc", "realtek,rtl-intc";
140 interrupt-controller;
141 #interrupt-cells = <2>;
143 interrupt-parent = <&cpuintc>;
144 interrupts = <2>, <3>, <4>, <5>, <6>;
148 compatible = "realtek,rtl8380-spi";
149 reg = <0x1200 0x100>;
151 #address-cells = <1>;
156 compatible = "ns16550a";
157 reg = <0x2000 0x100>;
159 clocks = <&ccu CLK_LXB>;
161 interrupt-parent = <&intc>;
171 pinctrl-names = "default";
172 pinctrl-0 = <&enable_uart1>;
174 compatible = "ns16550a";
175 reg = <0x2100 0x100>;
177 clocks = <&ccu CLK_LXB>;
179 interrupt-parent = <&intc>;
190 watchdog0: watchdog@3150 {
191 compatible = "realtek,rtl8380-wdt";
194 realtek,reset-mode = "soc";
196 clocks = <&ccu CLK_LXB>;
199 interrupt-parent = <&intc>;
200 interrupt-names = "phase1", "phase2";
201 interrupts = <19 3>, <18 4>;
204 gpio0: gpio-controller@3500 {
205 compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
212 interrupt-controller;
213 #interrupt-cells = <2>;
214 interrupt-parent = <&intc>;
219 pinmux: pinmux@1b001000 {
220 compatible = "pinctrl-single";
221 reg = <0x1b001000 0x4>;
223 pinctrl-single,bit-per-mux;
224 pinctrl-single,register-width = <32>;
225 pinctrl-single,function-mask = <0x1>;
226 #pinctrl-cells = <2>;
228 enable_uart1: pinmux_enable_uart1 {
229 pinctrl-single,bits = <0x0 0x10 0x10>;
234 pinmux_led: pinmux@1b00a000 {
235 compatible = "pinctrl-single";
236 reg = <0x1b00a000 0x4>;
238 pinctrl-single,bit-per-mux;
239 pinctrl-single,register-width = <32>;
240 pinctrl-single,function-mask = <0x1>;
241 #pinctrl-cells = <2>;
244 pinmux_disable_sys_led: disable_sys_led {
245 pinctrl-single,bits = <0x0 0x0 0x8000>;
249 ethernet0: ethernet@1b00a300 {
250 compatible = "realtek,rtl838x-eth";
251 reg = <0x1b00a300 0x100>;
252 interrupt-parent = <&intc>;
254 #interrupt-cells = <1>;
255 phy-mode = "internal";
263 sram0: sram@9f000000 {
264 compatible = "mmio-sram";
265 reg = <0x9f000000 0x10000>;
266 #address-cells = <1>;
268 ranges = <0 0x9f000000 0x10000>;
271 switch0: switch@1b000000 {
272 compatible = "realtek,rtl83xx-switch";
274 interrupt-parent = <&intc>;