realtek: add pinmux node of LED_GLB_CTRL to rtl838x.dtsi in dts-5.10
[openwrt/staging/noltari.git] / target / linux / realtek / dts-5.10 / rtl838x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #define STRINGIZE(s) #s
6 #define LAN_LABEL(p, s) STRINGIZE(p ## s)
7 #define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
8
9 #define INTERNAL_PHY(n) \
10 phy##n: ethernet-phy@##n { \
11 reg = <##n>; \
12 compatible = "ethernet-phy-ieee802.3-c22"; \
13 phy-is-integrated; \
14 };
15
16 #define EXTERNAL_PHY(n) \
17 phy##n: ethernet-phy@##n { \
18 reg = <##n>; \
19 compatible = "ethernet-phy-ieee802.3-c22"; \
20 };
21
22 #define EXTERNAL_SFP_PHY(n) \
23 phy##n: ethernet-phy@##n { \
24 compatible = "ethernet-phy-ieee802.3-c22"; \
25 sfp; \
26 media = "fibre"; \
27 reg = <##n>; \
28 };
29
30 #define SWITCH_PORT(n, s, m) \
31 port@##n { \
32 reg = <##n>; \
33 label = SWITCH_PORT_LABEL(s) ; \
34 phy-handle = <&phy##n>; \
35 phy-mode = #m ; \
36 };
37
38 #define SWITCH_SFP_PORT(n, s, m) \
39 port@##n { \
40 reg = <##n>; \
41 label = SWITCH_PORT_LABEL(s) ; \
42 phy-handle = <&phy##n>; \
43 phy-mode = #m ; \
44 fixed-link { \
45 speed = <1000>; \
46 full-duplex; \
47 }; \
48 };
49
50 / {
51 #address-cells = <1>;
52 #size-cells = <1>;
53
54 compatible = "realtek,rtl838x-soc";
55
56 cpus {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 frequency = <500000000>;
60
61 cpu@0 {
62 compatible = "mips,mips4KEc";
63 reg = <0>;
64 };
65 };
66
67 chosen {
68 bootargs = "console=ttyS0,38400";
69 };
70
71 cpuintc: cpuintc {
72 compatible = "mti,cpu-interrupt-controller";
73 #address-cells = <0>;
74 #interrupt-cells = <1>;
75 interrupt-controller;
76 };
77
78 soc: soc {
79 compatible = "simple-bus";
80 #address-cells = <1>;
81 #size-cells = <1>;
82 ranges = <0x0 0xb8000000 0x10000>;
83
84 intc: rtlintc@3000 {
85 compatible = "realtek,rtl-intc";
86 reg = <0x3000 0x20>;
87 #address-cells = <0>;
88 #interrupt-cells = <1>;
89 interrupt-controller;
90 interrupt-map =
91 <31 &cpuintc 2>, /* UART0 */
92 <30 &cpuintc 1>, /* UART1 */
93 <29 &cpuintc 5>, /* TC0 */
94 <28 &cpuintc 1>, /* TC1 */
95 <27 &cpuintc 1>, /* OCPTO */
96 <26 &cpuintc 1>, /* HLXTO */
97 <25 &cpuintc 1>, /* SLXTO */
98 <24 &cpuintc 4>, /* NIC */
99 <23 &cpuintc 4>, /* GPIO_ABCD */
100 <22 &cpuintc 4>, /* GPIO_EFGH */
101 <21 &cpuintc 4>, /* RTC */
102 <20 &cpuintc 3>, /* SWCORE */
103 <19 &cpuintc 4>, /* WDT_IP1 */
104 <18 &cpuintc 5>; /* WDT_IP2 */
105 };
106
107 spi0: spi@1200 {
108 compatible = "realtek,rtl8380-spi";
109 reg = <0x1200 0x100>;
110
111 #address-cells = <1>;
112 #size-cells = <0>;
113 };
114
115 uart0: uart@2000 {
116 compatible = "ns16550a";
117 reg = <0x2000 0x100>;
118
119 clock-frequency = <200000000>;
120
121 interrupt-parent = <&intc>;
122 interrupts = <31>;
123
124 reg-io-width = <1>;
125 reg-shift = <2>;
126 fifo-size = <1>;
127 no-loopback-test;
128 };
129
130 uart1: uart@2100 {
131 pinctrl-names = "default";
132 pinctrl-0 = <&enable_uart1>;
133
134 compatible = "ns16550a";
135 reg = <0x2100 0x100>;
136
137 clock-frequency = <200000000>;
138
139 interrupt-parent = <&intc>;
140 interrupts = <30>;
141
142 reg-io-width = <1>;
143 reg-shift = <2>;
144 fifo-size = <1>;
145 no-loopback-test;
146
147 status = "disabled";
148 };
149
150 gpio0: gpio-controller@3500 {
151 compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
152 reg = <0x3500 0x20>;
153 gpio-controller;
154 #gpio-cells = <2>;
155 ngpios = <24>;
156 interrupt-parent = <&intc>;
157 interrupts = <23>;
158 };
159 };
160
161 gpio1: rtl8231-gpio {
162 compatible = "realtek,rtl8231-gpio";
163 #gpio-cells = <2>;
164 indirect-access-bus-id = <0>;
165 gpio-controller;
166
167 status = "disabled";
168 };
169
170 pinmux: pinmux@bb001000 {
171 compatible = "pinctrl-single";
172 reg = <0xbb001000 0x4>;
173
174 pinctrl-single,bit-per-mux;
175 pinctrl-single,register-width = <32>;
176 pinctrl-single,function-mask = <0x1>;
177 #pinctrl-cells = <2>;
178
179 enable_uart1: pinmux_enable_uart1 {
180 pinctrl-single,bits = <0x0 0x10 0x10>;
181 };
182 };
183
184 /* LED_GLB_CTRL */
185 pinmux_led: pinmux@bb00a000 {
186 compatible = "pinctrl-single";
187 reg = <0xbb00a000 0x4>;
188
189 pinctrl-single,bit-per-mux;
190 pinctrl-single,register-width = <32>;
191 pinctrl-single,function-mask = <0x1>;
192 #pinctrl-cells = <2>;
193
194 /* enable GPIO 0 */
195 pinmux_disable_sys_led: disable_sys_led {
196 pinctrl-single,bits = <0x0 0x0 0x8000>;
197 };
198 };
199
200 ethernet0: ethernet@bb00a300 {
201 compatible = "realtek,rtl838x-eth";
202 reg = <0xbb00a300 0x100>;
203 interrupt-parent = <&intc>;
204 interrupts = <24>;
205 #interrupt-cells = <1>;
206 phy-mode = "internal";
207
208 fixed-link {
209 speed = <1000>;
210 full-duplex;
211 };
212 };
213
214 switch0: switch@bb000000 {
215 compatible = "realtek,rtl83xx-switch";
216
217 interrupt-parent = <&intc>;
218 interrupts = <20>;
219 };
220 };