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";
30 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
31 color = <LED_COLOR_ID_GREEN>;
32 function = LED_FUNCTION_POWER;
37 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
38 color = <LED_COLOR_ID_RED>;
39 function = LED_FUNCTION_FAULT;
42 /* LED chip is soldered, but no hole on the case */
44 label = "green:unused";
45 gpios = <&gpio1 36 GPIO_ACTIVE_LOW>;
46 color = <LED_COLOR_ID_GREEN>;
51 compatible = "gpio-keys-polled";
56 gpios = <&gpio1 33 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
62 compatible = "gpio-restart";
63 gpios = <&gpio1 34 GPIO_ACTIVE_LOW>;
68 compatible = "realtek,rtl8231-gpio";
71 indirect-access-bus-id = <0>;
75 compatible = "i2c-gpio";
76 sda-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
77 scl-gpios = <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
78 i2c-gpio,delay-us = <2>;
84 compatible = "i2c-gpio";
85 sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
86 scl-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
87 i2c-gpio,delay-us = <2>;
93 compatible = "i2c-gpio";
94 sda-gpios = <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
95 scl-gpios = <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
96 i2c-gpio,delay-us = <2>;
102 compatible = "i2c-gpio";
103 sda-gpios = <&gpio1 22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
104 scl-gpios = <&gpio1 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
105 i2c-gpio,delay-us = <2>;
106 #address-cells = <1>;
110 /* 4x TX-Disable lines are provided by RTL8214FC */
112 compatible = "sff,sfp";
114 los-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
115 mod-def0-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
119 compatible = "sff,sfp";
121 los-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
122 mod-def0-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
126 compatible = "sff,sfp";
128 los-gpio = <&gpio1 25 GPIO_ACTIVE_HIGH>;
129 mod-def0-gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;
133 compatible = "sff,sfp";
135 los-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
136 mod-def0-gpio = <&gpio1 13 GPIO_ACTIVE_LOW>;
143 gpios = <1 GPIO_ACTIVE_HIGH>;
145 line-name = "rtl8231-reset";
153 compatible = "jedec,spi-nor";
155 spi-max-frequency = <10000000>;
158 compatible = "fixed-partitions";
159 #address-cells = <1>;
169 label = "u-boot-env";
170 reg = <0x80000 0x40000>;
174 label = "u-boot-env2";
175 reg = <0xc0000 0x40000>;
179 compatible = "openwrt,uimage", "denx,uimage";
181 reg = <0x100000 0xe80000>;
182 openwrt,ih-magic = <0x12345000>;
187 reg = <0xf80000 0xe80000>;
192 reg = <0x1e00000 0x200000>;
201 compatible = "realtek,rtl838x-mdio";
202 regmap = <ðernet0>;
203 #address-cells = <1>;
224 EXTERNAL_SFP_PHY_FULL(24, 0)
225 EXTERNAL_SFP_PHY_FULL(25, 1)
226 EXTERNAL_SFP_PHY_FULL(26, 2)
227 EXTERNAL_SFP_PHY_FULL(27, 3)
233 #address-cells = <1>;
236 SWITCH_PORT(0, 1, qsgmii)
237 SWITCH_PORT(1, 2, qsgmii)
238 SWITCH_PORT(2, 3, qsgmii)
239 SWITCH_PORT(3, 4, qsgmii)
240 SWITCH_PORT(4, 5, qsgmii)
241 SWITCH_PORT(5, 6, qsgmii)
242 SWITCH_PORT(6, 7, qsgmii)
243 SWITCH_PORT(7, 8, qsgmii)
245 SWITCH_PORT(8, 9, internal)
246 SWITCH_PORT(9, 10, internal)
247 SWITCH_PORT(10, 11, internal)
248 SWITCH_PORT(11, 12, internal)
249 SWITCH_PORT(12, 13, internal)
250 SWITCH_PORT(13, 14, internal)
251 SWITCH_PORT(14, 15, internal)
252 SWITCH_PORT(15, 16, internal)
254 SWITCH_PORT(24, 17, qsgmii)
255 SWITCH_PORT(25, 18, qsgmii)
256 SWITCH_PORT(26, 19, qsgmii)
257 SWITCH_PORT(27, 20, qsgmii)
260 ethernet = <ðernet0>;
262 phy-mode = "internal";