realtek: drop redundant label with new LED color/function format
[openwrt/staging/jow.git] / target / linux / realtek / dts-5.15 / rtl8382_iodata_bsh-g24mb.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "rtl838x.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "iodata,bsh-g24mb", "realtek,rtl838x-soc";
11 model = "I-O DATA BSH-G24MB";
12
13 aliases {
14 led-boot = &led_sys_loop;
15 led-failsafe = &led_sys_loop;
16 led-upgrade = &led_sys_loop;
17 };
18
19 memory@0 {
20 device_type = "memory";
21 reg = <0x0 0x8000000>;
22 };
23
24 leds {
25 pinctrl-names = "default";
26 pinctrl-0 = <&pinmux_disable_sys_led>;
27 compatible = "gpio-leds";
28
29 led_sys_loop: led {
30 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
31 color = <LED_COLOR_ID_RED>;
32 function = LED_FUNCTION_STATUS;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys-polled";
38 poll-interval = <20>;
39
40 reset {
41 label = "reset";
42 gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45 };
46
47 gpio1: rtl8231-gpio {
48 compatible = "realtek,rtl8231-gpio";
49 #gpio-cells = <2>;
50 gpio-controller;
51 indirect-access-bus-id = <0>;
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 flash@0 {
59 compatible = "jedec,spi-nor";
60 reg = <0>;
61 spi-max-frequency = <10000000>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "u-boot";
70 reg = <0x0 0x80000>;
71 read-only;
72 };
73
74 partition@80000 {
75 label = "u-boot-env";
76 reg = <0x80000 0x10000>;
77 read-only;
78 };
79
80 partition@90000 {
81 label = "u-boot-env2";
82 reg = <0x90000 0x10000>;
83 };
84
85 partition@a0000 {
86 label = "jffs2_cfg";
87 reg = <0xa0000 0x100000>;
88 read-only;
89 };
90
91 partition@1a0000 {
92 label = "jffs2_log";
93 reg = <0x1a0000 0x100000>;
94 read-only;
95 };
96
97 /*
98 * use 2x OS partitions in OpenWrt
99 *
100 * 0x2A0000-0x94FFFF: RUNTIME
101 * 0x950000-0xFFFFFF: RUNTIME2 (not used in stock)
102 */
103 partition@2a0000 {
104 compatible = "openwrt,uimage", "denx,uimage";
105 label = "firmware";
106 reg = <0x2a0000 0xd60000>;
107 openwrt,ih-magic = <0x83800013>;
108 };
109 };
110 };
111 };
112
113 &ethernet0 {
114 mdio-bus {
115 compatible = "realtek,rtl838x-mdio";
116 regmap = <&ethernet0>;
117 #address-cells = <1>;
118 #size-cells = <0>;
119
120 EXTERNAL_PHY(0)
121 EXTERNAL_PHY(1)
122 EXTERNAL_PHY(2)
123 EXTERNAL_PHY(3)
124 EXTERNAL_PHY(4)
125 EXTERNAL_PHY(5)
126 EXTERNAL_PHY(6)
127 EXTERNAL_PHY(7)
128
129 INTERNAL_PHY(8)
130 INTERNAL_PHY(9)
131 INTERNAL_PHY(10)
132 INTERNAL_PHY(11)
133 INTERNAL_PHY(12)
134 INTERNAL_PHY(13)
135 INTERNAL_PHY(14)
136 INTERNAL_PHY(15)
137
138 EXTERNAL_PHY(16)
139 EXTERNAL_PHY(17)
140 EXTERNAL_PHY(18)
141 EXTERNAL_PHY(19)
142 EXTERNAL_PHY(20)
143 EXTERNAL_PHY(21)
144 EXTERNAL_PHY(22)
145 EXTERNAL_PHY(23)
146 };
147 };
148
149 &switch0 {
150 ports {
151 #address-cells = <1>;
152 #size-cells = <0>;
153
154 SWITCH_PORT(0, 1, qsgmii)
155 SWITCH_PORT(1, 2, qsgmii)
156 SWITCH_PORT(2, 3, qsgmii)
157 SWITCH_PORT(3, 4, qsgmii)
158 SWITCH_PORT(4, 5, qsgmii)
159 SWITCH_PORT(5, 6, qsgmii)
160 SWITCH_PORT(6, 7, qsgmii)
161 SWITCH_PORT(7, 8, qsgmii)
162
163 SWITCH_PORT(8, 9, internal)
164 SWITCH_PORT(9, 10, internal)
165 SWITCH_PORT(10, 11, internal)
166 SWITCH_PORT(11, 12, internal)
167 SWITCH_PORT(12, 13, internal)
168 SWITCH_PORT(13, 14, internal)
169 SWITCH_PORT(14, 15, internal)
170 SWITCH_PORT(15, 16, internal)
171
172 SWITCH_PORT(16, 17, qsgmii)
173 SWITCH_PORT(17, 18, qsgmii)
174 SWITCH_PORT(18, 19, qsgmii)
175 SWITCH_PORT(19, 20, qsgmii)
176 SWITCH_PORT(20, 21, qsgmii)
177 SWITCH_PORT(21, 22, qsgmii)
178 SWITCH_PORT(22, 23, qsgmii)
179 SWITCH_PORT(23, 24, qsgmii)
180
181 port@28 {
182 ethernet = <&ethernet0>;
183 reg = <28>;
184 phy-mode = "internal";
185
186 fixed-link {
187 speed = <1000>;
188 full-duplex;
189 };
190 };
191 };
192 };