1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
3 #include "rtl839x.dtsi"
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/leds/common.h>
10 compatible = "tplink,sg2452p-v4", "realtek,rtl8393-soc";
11 model = "TP-Link SG2452P v4";
14 device_type = "memory";
15 reg = <0x0 0x10000000>;
20 led-failsafe = &led_sys;
21 led-running = &led_sys;
22 led-upgrade = &led_sys;
26 bootargs = "console=ttyS0,38400";
30 compatible = "gpio-keys";
34 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
40 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
46 compatible = "gpio-fan";
47 alarm-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
51 pinctrl-names = "default";
52 pinctrl-0 = <&disable_jtag>;
53 compatible = "gpio-fan";
55 alarm-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
56 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
57 /* the actual speeds (rpm) are unknown, just use dummy values */
58 gpio-fan,speed-map = <1 0>, <2 1>;
63 /* This fan runs in parallel to PSU1 fan, but has a separate
64 * alarm GPIO. This is not (yet) supported by the gpio-fan driver,
65 * so a separate instance is added
67 compatible = "gpio-fan";
68 alarm-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
72 pinctrl-names = "default";
73 compatible = "gpio-leds";
76 label = "green:speed";
77 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
78 color = <LED_COLOR_ID_GREEN>;
79 function = LED_FUNCTION_INDICATOR;
84 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
85 color = <LED_COLOR_ID_GREEN>;
86 function = LED_FUNCTION_INDICATOR;
91 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
92 color = <LED_COLOR_ID_GREEN>;
93 function = LED_FUNCTION_STATUS;
98 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
99 color = <LED_COLOR_ID_GREEN>;
100 function = LED_FUNCTION_STATUS;
105 gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
106 color = <LED_COLOR_ID_AMBER>;
107 function = "fault-fan";
111 label = "green:poe-max";
112 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
113 color = <LED_COLOR_ID_GREEN>;
114 function = "alarm-poe";
119 compatible = "i2c-gpio";
120 sda-gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
121 scl-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
122 i2c-gpio,delay-us = <2>;
123 #address-cells = <1>;
128 compatible = "ti,tps23861";
134 compatible = "ti,tps23861";
140 compatible = "ti,tps23861";
146 compatible = "ti,tps23861";
152 compatible = "ti,tps23861";
158 compatible = "ti,tps23861";
164 compatible = "ti,tps23861";
170 compatible = "ti,tps23861";
176 compatible = "ti,tps23861";
182 compatible = "ti,tps23861";
188 compatible = "ti,tps23861";
194 compatible = "ti,tps23861";
200 compatible = "gpio-restart";
201 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
208 gpios = <23 GPIO_ACTIVE_HIGH>;
210 line-name = "poe-enable";
217 compatible = "jedec,spi-nor";
219 spi-max-frequency = <10000000>;
222 compatible = "fixed-partitions";
223 #address-cells = <1>;
232 label = "u-boot-env";
233 reg = <0xe0000 0x20000>;
236 /* We use the "sys", "usrimg1" and "usrimg2" partitions
237 * as firmware since the kernel needs to be in "sys", but the
238 * partition is too small to hold the "rootfs" as well.
239 * The original partition map contains:
243 * reg = <0x100000 0x600000>;
247 * reg = <0x700000 0xa00000>;
249 * partition@1100000 {
251 * reg = <0x1100000 0xa00000>;
257 reg = <0x100000 0x1a00000>;
261 reg = <0x1b00000 0x400000>;
265 reg = <0x1f00000 0x100000>;
274 compatible = "realtek,rtl838x-mdio";
275 #address-cells = <1>;
278 /* External phy RTL8218B #1 */
288 /* External phy RTL8218B #2 */
298 /* External phy RTL8218B #3 */
308 /* External phy RTL8218B #4 */
318 /* External phy RTL8218B #5 */
328 /* External phy RTL8218B #6 */
342 #address-cells = <1>;
345 SWITCH_PORT(0, 01, qsgmii)
346 SWITCH_PORT(1, 02, qsgmii)
347 SWITCH_PORT(2, 03, qsgmii)
348 SWITCH_PORT(3, 04, qsgmii)
349 SWITCH_PORT(4, 05, qsgmii)
350 SWITCH_PORT(5, 06, qsgmii)
351 SWITCH_PORT(6, 07, qsgmii)
352 SWITCH_PORT(7, 08, qsgmii)
354 SWITCH_PORT(8, 09, qsgmii)
355 SWITCH_PORT(9, 10, qsgmii)
356 SWITCH_PORT(10, 11, qsgmii)
357 SWITCH_PORT(11, 12, qsgmii)
358 SWITCH_PORT(12, 13, qsgmii)
359 SWITCH_PORT(13, 14, qsgmii)
360 SWITCH_PORT(14, 15, qsgmii)
361 SWITCH_PORT(15, 16, qsgmii)
363 SWITCH_PORT(16, 17, qsgmii)
364 SWITCH_PORT(17, 18, qsgmii)
365 SWITCH_PORT(18, 19, qsgmii)
366 SWITCH_PORT(19, 20, qsgmii)
367 SWITCH_PORT(20, 21, qsgmii)
368 SWITCH_PORT(21, 22, qsgmii)
369 SWITCH_PORT(22, 23, qsgmii)
370 SWITCH_PORT(23, 24, qsgmii)
372 SWITCH_PORT(24, 25, qsgmii)
373 SWITCH_PORT(25, 26, qsgmii)
374 SWITCH_PORT(26, 27, qsgmii)
375 SWITCH_PORT(27, 28, qsgmii)
376 SWITCH_PORT(28, 29, qsgmii)
377 SWITCH_PORT(29, 30, qsgmii)
378 SWITCH_PORT(30, 31, qsgmii)
379 SWITCH_PORT(31, 32, qsgmii)
381 SWITCH_PORT(32, 33, qsgmii)
382 SWITCH_PORT(33, 34, qsgmii)
383 SWITCH_PORT(34, 35, qsgmii)
384 SWITCH_PORT(35, 36, qsgmii)
385 SWITCH_PORT(36, 37, qsgmii)
386 SWITCH_PORT(37, 38, qsgmii)
387 SWITCH_PORT(38, 39, qsgmii)
388 SWITCH_PORT(39, 40, qsgmii)
390 SWITCH_PORT(40, 41, qsgmii)
391 SWITCH_PORT(41, 42, qsgmii)
392 SWITCH_PORT(42, 43, qsgmii)
393 SWITCH_PORT(43, 44, qsgmii)
394 SWITCH_PORT(44, 45, qsgmii)
395 SWITCH_PORT(45, 46, qsgmii)
396 SWITCH_PORT(46, 47, qsgmii)
397 SWITCH_PORT(47, 48, qsgmii)
401 ethernet = <ðernet0>;
403 phy-mode = "internal";