1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
5 #define STRINGIZE(s) #s
6 #define LAN_LABEL(p, s) STRINGIZE(p ## s)
7 #define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
9 #define INTERNAL_PHY(n) \
10 phy##n: ethernet-phy@##n { \
12 compatible = "ethernet-phy-ieee802.3-c22"; \
16 #define EXTERNAL_PHY(n) \
17 phy##n: ethernet-phy@##n { \
19 compatible = "ethernet-phy-ieee802.3-c22"; \
22 #define EXTERNAL_SFP_PHY(n) \
23 phy##n: ethernet-phy@##n { \
24 compatible = "ethernet-phy-ieee802.3-c22"; \
30 #define SWITCH_PORT(n, s, m) \
33 label = SWITCH_PORT_LABEL(s) ; \
34 phy-handle = <&phy##n>; \
38 #define SWITCH_SFP_PORT(n, s, m) \
41 label = SWITCH_PORT_LABEL(s) ; \
42 phy-handle = <&phy##n>; \
54 compatible = "realtek,rtl838x-soc";
59 frequency = <500000000>;
62 compatible = "mips,mips4KEc";
68 bootargs = "console=ttyS0,38400";
73 #interrupt-cells = <1>;
75 compatible = "mti,cpu-interrupt-controller";
80 #interrupt-cells = <1>;
82 compatible = "realtek,rt8380-intc";
83 reg = <0xb8003000 0x20>;
89 compatible = "realtek,rtl838x-nor";
90 reg = <0xb8001200 0x100>;
96 uart0: uart@b8002000 {
99 compatible = "ns16550a";
100 reg = <0xb8002000 0x100>;
102 clock-frequency = <200000000>;
104 interrupt-parent = <&intc>;
113 uart1: uart@b8002100 {
114 pinctrl-names = "default";
115 pinctrl-0 = <&enable_uart1>;
119 compatible = "ns16550a";
120 reg = <0xb8002100 0x100>;
122 clock-frequency = <200000000>;
124 interrupt-parent = <&intc>;
133 gpio0: gpio-controller@b8003500 {
134 compatible = "realtek,rtl838x-gpio";
135 reg = <0xb8003500 0x20>;
138 interrupt-parent = <&intc>;
142 gpio1: rtl8231-gpio {
144 compatible = "realtek,rtl8231-gpio";
146 indirect-access-bus-id = <0>;
150 pinmux: pinmux@bb001000 {
151 compatible = "pinctrl-single";
152 reg = <0xbb001000 0x4>;
154 pinctrl-single,bit-per-mux;
155 pinctrl-single,register-width = <32>;
156 pinctrl-single,function-mask = <0x1>;
157 #pinctrl-cells = <2>;
159 enable_uart1: pinmux_enable_uart1 {
160 pinctrl-single,bits = <0x0 0x10 0x10>;
164 ethernet0: ethernet@bb00a300 {
167 compatible = "realtek,rtl838x-eth";
168 reg = <0xbb00a300 0x100>;
169 interrupt-parent = <&intc>;
171 #interrupt-cells = <1>;
172 phy-mode = "internal";
180 switch0: switch@bb000000 {
183 interrupt-parent = <&intc>;
186 compatible = "realtek,rtl83xx-switch";