1 // SPDX-License-Identifier: GPL-2.0-or-later
3 #include "rtl838x.dtsi"
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
9 compatible = "tplink,sg2008p-v1", "realtek,rtl838x-soc";
10 model = "TP-Link SG2008P v1";
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
20 device_type = "memory";
21 reg = <0x0 0x10000000>;
25 compatible = "gpio-keys";
29 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
35 compatible = "gpio-restart";
36 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
40 compatible = "gpio-leds";
43 label = "green:power";
44 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
49 compatible = "i2c-gpio";
50 scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
51 sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
52 i2c-gpio,delay-us = <2>;
57 compatible = "ti,tps23861";
59 shunt-resistor-micro-ohms = <255000>;
64 compatible = "linux,wdt-gpio";
65 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
67 /* SGM706 specs: typical 1.6s, but minimum 1.0s. */
68 hw_margin_ms = <1000>;
72 compatible = "mtd-concat";
74 devices = <&syspart &usrpart>;
77 compatible = "fixed-partitions";
82 compatible = "denx,uimage";
84 reg = <0x0 0x1a00000>;
93 gpios = <14 GPIO_ACTIVE_LOW>;
95 line-name = "watchdog-enable";
103 compatible = "jedec,spi-nor";
105 spi-max-frequency = <10000000>;
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
118 label = "u-boot-env";
119 reg = <0xe0000 0x20000>;
121 syspart: partition@100000 {
123 reg = <0x100000 0x600000>;
125 usrpart: partition@700000 {
127 reg = <0x700000 0x1400000>;
131 reg = <0x1b00000 0x400000>;
135 reg = <0x1f00000 0x100000>;
144 compatible = "realtek,rtl838x-mdio";
145 #address-cells = <1>;
161 #address-cells = <1>;
164 SWITCH_PORT(8, 1, internal)
165 SWITCH_PORT(9, 2, internal)
166 SWITCH_PORT(10, 3, internal)
167 SWITCH_PORT(11, 4, internal)
168 SWITCH_PORT(12, 5, internal)
169 SWITCH_PORT(13, 6, internal)
170 SWITCH_PORT(14, 7, internal)
171 SWITCH_PORT(15, 8, internal)
174 ethernet = <ðernet0>;
176 phy-mode = "internal";