1 // SPDX-License-Identifier: GPL-2.0-or-later
4 #include "rtl930x.dtsi"
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/leds/common.h>
9 #include <dt-bindings/thermal/thermal.h>
12 compatible = "zyxel,xgs1250-12", "realtek,rtl838x-soc";
13 model = "Zyxel XGS1250-12 Switch";
16 led-boot = &led_pwr_sys;
17 led-failsafe = &led_pwr_sys;
18 led-running = &led_pwr_sys;
19 led-upgrade = &led_pwr_sys;
23 compatible = "gpio-keys";
27 gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
32 /* i2c of the SFP cage: port 12 */
33 i2c0: i2c-rtl9300@1b00036c {
34 compatible = "realtek,rtl9300-i2c";
35 reg = <0x1b00036c 0x3c>;
40 clock-frequency = <100000>;
44 compatible = "gpio-leds";
46 pinctrl-names = "default";
47 pinctrl-0 = <&pinmux_disable_sys_led>;
50 color = <LED_COLOR_ID_GREEN>;
51 function = LED_FUNCTION_POWER;
52 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
57 compatible = "sff,sfp";
59 los-gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
60 tx-fault-gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>;
61 mod-def0-gpio = <&gpio0 16 GPIO_ACTIVE_LOW>;
62 tx-disable-gpio = <&gpio0 15 GPIO_ACTIVE_HIGH>;
66 compatible = "realtek,rtl9300-leds";
69 led_set0 = <0x0a20 0x0b80>; // LED set 0: 1000Mbps, 10/100Mbps
70 led_set1 = <0x0a0b 0x0a28 0x0a82 0x0a0b>; // LED set 1: (10G, 5G, 2.5G) (2.5G, 1G)
71 // (5G, 10/100) (10G, 5G, 2.5G)
72 led_set2 = <0x0a20 0x0a01>; // LED set 2: 1000MBit, 10GBit
77 /* Poll every 10 seconds */
78 polling-delay-passive = <10000>;
79 polling-delay = <10000>;
80 thermal-sensors = <&phy24>;
83 phy24_trip0: phy24-trip0 {
84 /* At 80 degrees turn on fan */
85 temperature = <80000>;
90 phy24_trip1: phy24-trip1 {
91 /* At 108 degrees phys exceed spec */
92 temperature = <108000>;
100 trip = <&phy24_trip0>;
101 cooling-device = <&chassis_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
107 /* Poll every 10 seconds */
108 polling-delay-passive = <10000>;
109 polling-delay = <10000>;
110 thermal-sensors = <&phy25>;
113 phy25_trip0: phy25-trip0 {
114 /* At 80 degrees turn on fan */
115 temperature = <80000>;
120 phy25_trip1: phy25-trip1 {
121 /* At 108 degrees phys exceed spec */
122 temperature = <108000>;
130 trip = <&phy25_trip0>;
131 cooling-device = <&chassis_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
137 /* Poll every 10 seconds */
138 polling-delay-passive = <10000>;
139 polling-delay = <10000>;
140 thermal-sensors = <&phy26>;
143 phy26_trip0: phy26-trip0 {
144 /* At 80 degrees turn on fan */
145 temperature = <80000>;
150 phy26_trip1: phy26-trip1 {
151 /* At 108 degrees phys exceed spec */
152 temperature = <108000>;
160 trip = <&phy26_trip0>;
161 cooling-device = <&chassis_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
167 /* YEN SUN TECHNOLOGY FD122510LL-N fan */
168 chassis_fan: gpio-fan {
169 compatible = "gpio-fan";
170 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
171 gpio-fan,speed-map = <0 0
173 #cooling-cells = <2>;
180 compatible = "jedec,spi-nor";
182 spi-max-frequency = <10000000>;
185 compatible = "fixed-partitions";
186 #address-cells = <1>;
195 label = "u-boot-env";
196 reg = <0xe0000 0x10000>;
199 label = "u-boot-env2";
200 reg = <0xf0000 0x10000>;
205 reg = <0x100000 0x100000>;
209 reg = <0x200000 0x100000>;
213 reg = <0x300000 0xce0000>;
214 compatible = "openwrt,uimage", "denx,uimage";
215 openwrt,ih-magic = <0x93001250>;
219 reg = <0xfe0000 0x20000>;
227 compatible = "realtek,rtl838x-mdio";
228 regmap = <ðernet0>;
229 #address-cells = <1>;
232 /* External RTL8218D PHY */
233 phy0: ethernet-phy@0 {
235 compatible = "ethernet-phy-ieee802.3-c22";
236 rtl9300,smi-address = <0 0>;
238 // Disabled because we do not know how to bring up again
239 // reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
241 phy1: ethernet-phy@1 {
243 compatible = "ethernet-phy-ieee802.3-c22";
244 rtl9300,smi-address = <0 1>;
246 phy2: ethernet-phy@2 {
248 compatible = "ethernet-phy-ieee802.3-c22";
249 rtl9300,smi-address = <0 2>;
251 phy3: ethernet-phy@3 {
253 compatible = "ethernet-phy-ieee802.3-c22";
254 rtl9300,smi-address = <0 3>;
256 phy4: ethernet-phy@4 {
258 compatible = "ethernet-phy-ieee802.3-c22";
259 rtl9300,smi-address = <0 4>;
261 phy5: ethernet-phy@5 {
263 compatible = "ethernet-phy-ieee802.3-c22";
264 rtl9300,smi-address = <0 5>;
266 phy6: ethernet-phy@6 {
268 compatible = "ethernet-phy-ieee802.3-c22";
269 rtl9300,smi-address = <0 6>;
271 phy7: ethernet-phy@7 {
273 compatible = "ethernet-phy-ieee802.3-c22";
274 rtl9300,smi-address = <0 7>;
277 /* External Aquantia 113C PHYs */
278 phy24: ethernet-phy@24 {
280 compatible = "ethernet-phy-ieee802.3-c45";
281 rtl9300,smi-address = <1 8>;
283 // Disabled because we do not know how to bring up again
284 // reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
285 #thermal-sensor-cells = <0>;
288 phy25: ethernet-phy@25 {
290 compatible = "ethernet-phy-ieee802.3-c45";
291 rtl9300,smi-address = <2 8>;
293 // Disabled because we do not know how to bring up again
294 // reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
295 #thermal-sensor-cells = <0>;
298 phy26: ethernet-phy@26 {
300 compatible = "ethernet-phy-ieee802.3-c45";
301 rtl9300,smi-address = <3 8>;
303 // Disabled because we do not know how to bring up again
304 // reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
305 #thermal-sensor-cells = <0>;
309 phy27: ethernet-phy@27 {
310 compatible = "ethernet-phy-ieee802.3-c22";
313 rtl9300,smi-address = <4 0>;
322 #address-cells = <1>;
328 phy-handle = <&phy0>;
335 phy-handle = <&phy1>;
342 phy-handle = <&phy2>;
349 phy-handle = <&phy3>;
356 phy-handle = <&phy4>;
363 phy-handle = <&phy5>;
370 phy-handle = <&phy6>;
377 phy-handle = <&phy7>;
385 phy-mode = "usxgmii";
386 phy-handle = <&phy24>;
392 phy-mode = "usxgmii";
393 phy-handle = <&phy25>;
399 phy-mode = "usxgmii";
400 phy-handle = <&phy26>;
407 phy-mode = "1000base-x";
408 phy-handle = <&phy27>;
411 managed = "in-band-status";
415 ethernet = <ðernet0>;
417 phy-mode = "internal";