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