1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
3 #include "rtl838x.dtsi"
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/leds/common.h>
10 compatible = "apresia,aplgs120gtss", "realtek,rtl8382-soc";
11 model = "APRESIA ApresiaLightGS120GT-SS";
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
21 device_type = "memory";
22 reg = <0x0 0x10000000>;
26 compatible = "gpio-leds";
29 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
30 color = <LED_COLOR_ID_GREEN>;
31 function = LED_FUNCTION_POWER;
35 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
36 color = <LED_COLOR_ID_RED>;
37 function = LED_FUNCTION_FAULT;
40 /* LED chip is soldered, but no hole on the case */
42 gpios = <&gpio1 36 GPIO_ACTIVE_LOW>;
43 color = <LED_COLOR_ID_GREEN>;
48 compatible = "gpio-keys-polled";
53 gpios = <&gpio1 33 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
59 compatible = "gpio-restart";
60 gpios = <&gpio1 34 GPIO_ACTIVE_LOW>;
65 compatible = "realtek,rtl8231-gpio";
68 indirect-access-bus-id = <0>;
72 compatible = "i2c-gpio";
73 sda-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
74 scl-gpios = <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
75 i2c-gpio,delay-us = <2>;
81 compatible = "i2c-gpio";
82 sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
83 scl-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
84 i2c-gpio,delay-us = <2>;
90 compatible = "i2c-gpio";
91 sda-gpios = <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
92 scl-gpios = <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
93 i2c-gpio,delay-us = <2>;
99 compatible = "i2c-gpio";
100 sda-gpios = <&gpio1 22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
101 scl-gpios = <&gpio1 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
102 i2c-gpio,delay-us = <2>;
103 #address-cells = <1>;
107 /* 4x TX-Disable lines are provided by RTL8214FC */
109 compatible = "sff,sfp";
111 los-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
112 mod-def0-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
116 compatible = "sff,sfp";
118 los-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
119 mod-def0-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
123 compatible = "sff,sfp";
125 los-gpio = <&gpio1 25 GPIO_ACTIVE_HIGH>;
126 mod-def0-gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;
130 compatible = "sff,sfp";
132 los-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
133 mod-def0-gpio = <&gpio1 13 GPIO_ACTIVE_LOW>;
140 gpios = <1 GPIO_ACTIVE_HIGH>;
142 line-name = "rtl8231-reset";
150 compatible = "jedec,spi-nor";
152 spi-max-frequency = <10000000>;
155 compatible = "fixed-partitions";
156 #address-cells = <1>;
166 label = "u-boot-env";
167 reg = <0x80000 0x40000>;
171 label = "u-boot-env2";
172 reg = <0xc0000 0x40000>;
176 compatible = "openwrt,uimage", "denx,uimage";
178 reg = <0x100000 0xe80000>;
179 openwrt,ih-magic = <0x12345000>;
184 reg = <0xf80000 0xe80000>;
189 reg = <0x1e00000 0x200000>;
198 compatible = "realtek,rtl838x-mdio";
199 regmap = <ðernet0>;
200 #address-cells = <1>;
221 EXTERNAL_SFP_PHY_FULL(24, 0)
222 EXTERNAL_SFP_PHY_FULL(25, 1)
223 EXTERNAL_SFP_PHY_FULL(26, 2)
224 EXTERNAL_SFP_PHY_FULL(27, 3)
230 #address-cells = <1>;
233 SWITCH_PORT(0, 1, qsgmii)
234 SWITCH_PORT(1, 2, qsgmii)
235 SWITCH_PORT(2, 3, qsgmii)
236 SWITCH_PORT(3, 4, qsgmii)
237 SWITCH_PORT(4, 5, qsgmii)
238 SWITCH_PORT(5, 6, qsgmii)
239 SWITCH_PORT(6, 7, qsgmii)
240 SWITCH_PORT(7, 8, qsgmii)
242 SWITCH_PORT(8, 9, internal)
243 SWITCH_PORT(9, 10, internal)
244 SWITCH_PORT(10, 11, internal)
245 SWITCH_PORT(11, 12, internal)
246 SWITCH_PORT(12, 13, internal)
247 SWITCH_PORT(13, 14, internal)
248 SWITCH_PORT(14, 15, internal)
249 SWITCH_PORT(15, 16, internal)
251 SWITCH_PORT(24, 17, qsgmii)
252 SWITCH_PORT(25, 18, qsgmii)
253 SWITCH_PORT(26, 19, qsgmii)
254 SWITCH_PORT(27, 20, qsgmii)
257 ethernet = <ðernet0>;
259 phy-mode = "internal";