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;
23 label-mac-device = ðernet0;
27 bootargs = "console=ttyS0,38400";
31 compatible = "gpio-keys";
35 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
41 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
47 compatible = "gpio-fan";
48 alarm-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
52 pinctrl-names = "default";
53 pinctrl-0 = <&disable_jtag>;
54 compatible = "gpio-fan";
56 alarm-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
57 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
58 /* the actual speeds (rpm) are unknown, just use dummy values */
59 gpio-fan,speed-map = <1 0>, <2 1>;
64 /* This fan runs in parallel to PSU1 fan, but has a separate
65 * alarm GPIO. This is not (yet) supported by the gpio-fan driver,
66 * so a separate instance is added
68 compatible = "gpio-fan";
69 alarm-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
73 pinctrl-names = "default";
74 compatible = "gpio-leds";
77 label = "green:speed";
78 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
79 color = <LED_COLOR_ID_GREEN>;
80 function = LED_FUNCTION_INDICATOR;
85 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
86 color = <LED_COLOR_ID_GREEN>;
87 function = LED_FUNCTION_INDICATOR;
92 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
93 color = <LED_COLOR_ID_GREEN>;
94 function = LED_FUNCTION_STATUS;
99 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
100 color = <LED_COLOR_ID_GREEN>;
101 function = LED_FUNCTION_STATUS;
106 gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
107 color = <LED_COLOR_ID_AMBER>;
108 function = "fault-fan";
112 label = "green:poe-max";
113 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
114 color = <LED_COLOR_ID_GREEN>;
115 function = "alarm-poe";
120 compatible = "i2c-gpio";
121 sda-gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
122 scl-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
123 i2c-gpio,delay-us = <2>;
124 #address-cells = <1>;
129 compatible = "ti,tps23861";
135 compatible = "ti,tps23861";
141 compatible = "ti,tps23861";
147 compatible = "ti,tps23861";
153 compatible = "ti,tps23861";
159 compatible = "ti,tps23861";
165 compatible = "ti,tps23861";
171 compatible = "ti,tps23861";
177 compatible = "ti,tps23861";
183 compatible = "ti,tps23861";
189 compatible = "ti,tps23861";
195 compatible = "ti,tps23861";
201 compatible = "gpio-restart";
202 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
209 gpios = <23 GPIO_ACTIVE_HIGH>;
211 line-name = "poe-enable";
218 compatible = "jedec,spi-nor";
220 spi-max-frequency = <10000000>;
223 compatible = "fixed-partitions";
224 #address-cells = <1>;
233 label = "u-boot-env";
234 reg = <0xe0000 0x20000>;
237 /* We use the "sys", "usrimg1" and "usrimg2" partitions
238 * as firmware since the kernel needs to be in "sys", but the
239 * partition is too small to hold the "rootfs" as well.
240 * The original partition map contains:
244 * reg = <0x100000 0x600000>;
248 * reg = <0x700000 0xa00000>;
250 * partition@1100000 {
252 * reg = <0x1100000 0xa00000>;
258 reg = <0x100000 0x1a00000>;
262 reg = <0x1b00000 0x400000>;
265 compatible = "nvmem-cells";
267 reg = <0x1f00000 0x100000>;
268 #address-cells = <1>;
272 factory_macaddr: macaddr@fdff4 {
281 nvmem-cells = <&factory_macaddr>;
282 nvmem-cell-names = "mac-address";
285 compatible = "realtek,rtl838x-mdio";
286 #address-cells = <1>;
289 /* External phy RTL8218B #1 */
299 /* External phy RTL8218B #2 */
309 /* External phy RTL8218B #3 */
319 /* External phy RTL8218B #4 */
329 /* External phy RTL8218B #5 */
339 /* External phy RTL8218B #6 */
353 #address-cells = <1>;
356 SWITCH_PORT(0, 01, qsgmii)
357 SWITCH_PORT(1, 02, qsgmii)
358 SWITCH_PORT(2, 03, qsgmii)
359 SWITCH_PORT(3, 04, qsgmii)
360 SWITCH_PORT(4, 05, qsgmii)
361 SWITCH_PORT(5, 06, qsgmii)
362 SWITCH_PORT(6, 07, qsgmii)
363 SWITCH_PORT(7, 08, qsgmii)
365 SWITCH_PORT(8, 09, qsgmii)
366 SWITCH_PORT(9, 10, qsgmii)
367 SWITCH_PORT(10, 11, qsgmii)
368 SWITCH_PORT(11, 12, qsgmii)
369 SWITCH_PORT(12, 13, qsgmii)
370 SWITCH_PORT(13, 14, qsgmii)
371 SWITCH_PORT(14, 15, qsgmii)
372 SWITCH_PORT(15, 16, qsgmii)
374 SWITCH_PORT(16, 17, qsgmii)
375 SWITCH_PORT(17, 18, qsgmii)
376 SWITCH_PORT(18, 19, qsgmii)
377 SWITCH_PORT(19, 20, qsgmii)
378 SWITCH_PORT(20, 21, qsgmii)
379 SWITCH_PORT(21, 22, qsgmii)
380 SWITCH_PORT(22, 23, qsgmii)
381 SWITCH_PORT(23, 24, qsgmii)
383 SWITCH_PORT(24, 25, qsgmii)
384 SWITCH_PORT(25, 26, qsgmii)
385 SWITCH_PORT(26, 27, qsgmii)
386 SWITCH_PORT(27, 28, qsgmii)
387 SWITCH_PORT(28, 29, qsgmii)
388 SWITCH_PORT(29, 30, qsgmii)
389 SWITCH_PORT(30, 31, qsgmii)
390 SWITCH_PORT(31, 32, qsgmii)
392 SWITCH_PORT(32, 33, qsgmii)
393 SWITCH_PORT(33, 34, qsgmii)
394 SWITCH_PORT(34, 35, qsgmii)
395 SWITCH_PORT(35, 36, qsgmii)
396 SWITCH_PORT(36, 37, qsgmii)
397 SWITCH_PORT(37, 38, qsgmii)
398 SWITCH_PORT(38, 39, qsgmii)
399 SWITCH_PORT(39, 40, qsgmii)
401 SWITCH_PORT(40, 41, qsgmii)
402 SWITCH_PORT(41, 42, qsgmii)
403 SWITCH_PORT(42, 43, qsgmii)
404 SWITCH_PORT(43, 44, qsgmii)
405 SWITCH_PORT(44, 45, qsgmii)
406 SWITCH_PORT(45, 46, qsgmii)
407 SWITCH_PORT(46, 47, qsgmii)
408 SWITCH_PORT(47, 48, qsgmii)
412 ethernet = <ðernet0>;
414 phy-mode = "internal";