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 = "allnet,all-sg8208m", "realtek,rtl838x-soc";
10 model = "ALLNET ALL-SG8208M";
14 led-failsafe = &led_sys;
15 led-running = &led_sys;
16 led-upgrade = &led_sys;
20 bootargs = "console=ttyS0,115200";
24 device_type = "memory";
25 reg = <0x0 0x8000000>;
29 compatible = "gpio-keys-polled";
34 gpios = <&gpio0 67 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
40 compatible = "gpio-leds";
44 gpios = <&gpio0 47 GPIO_ACTIVE_HIGH>;
46 // GPIO 25: power on/off all port leds
51 indirect-access-bus-id = <0>;
58 compatible = "jedec,spi-nor";
60 spi-max-frequency = <10000000>;
63 compatible = "fixed-partitions";
75 reg = <0x80000 0x10000>;
80 label = "u-boot-env2";
81 reg = <0x90000 0x10000>;
87 reg = <0xa0000 0x100000>;
92 reg = <0x1a0000 0x100000>;
97 reg = <0x2a0000 0xd60000>;
98 compatible = "openwrt,uimage", "denx,uimage";
99 openwrt,ih-magic = <0x00000006>;
107 compatible = "realtek,rtl838x-mdio";
108 regmap = <ðernet0>;
109 #address-cells = <1>;
125 #address-cells = <1>;
128 SWITCH_PORT(8, 1, internal)
129 SWITCH_PORT(9, 2, internal)
130 SWITCH_PORT(10, 3, internal)
131 SWITCH_PORT(11, 4, internal)
132 SWITCH_PORT(12, 5, internal)
133 SWITCH_PORT(13, 6, internal)
134 SWITCH_PORT(14, 7, internal)
135 SWITCH_PORT(15, 8, internal)
138 ethernet = <ðernet0>;
140 phy-mode = "internal";