diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts index 3321887c9a..e57197d55c 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts +++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts @@ -1,38 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "rtl838x.dtsi" - -#include -#include +#include "rtl838x_d-link_dgs-1210_common.dtsi" / { compatible = "d-link,dgs-1210-10p", "realtek,rtl838x-soc"; model = "D-Link DGS-1210-10P"; - aliases { - led-boot = &led_power; - led-failsafe = &led_power; - led-running = &led_power; - led-upgrade = &led_power; - }; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; - - leds { - pinctrl-names = "default"; - pinctrl-0 = <&pinmux_disable_sys_led>; - compatible = "gpio-leds"; - - led_power: power { - // GPIO 0 seems to provide power to the leds - label = "green:power"; - gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; - }; - }; - keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -53,58 +26,6 @@ }; }; - -&spi0 { - status = "okay"; - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x00000000 0x80000>; - read-only; - }; - partition@80000 { - label = "u-boot-env"; - reg = <0x00080000 0x40000>; - read-only; - }; - partition@c0000 { - label = "u-boot-env2"; - reg = <0x000c0000 0x40000>; - }; - partition@280000 { - label = "firmware"; - compatible = "denx,uimage"; - reg = <0x00100000 0xd80000>; - }; - partition@be80000 { - label = "kernel2"; - reg = <0x00e80000 0x180000>; - }; - partition@1000000 { - label = "sysinfo"; - reg = <0x01000000 0x40000>; - }; - partition@1040000 { - label = "rootfs2"; - reg = <0x01040000 0xc00000>; - }; - partition@1c40000 { - label = "jffs2"; - reg = <0x01c40000 0x3c0000>; - }; - }; - }; -}; - &uart1 { status = "okay"; }; diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-16.dts b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-16.dts index ac51185ed0..28c64c2ab4 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-16.dts +++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-16.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "rtl8382_d-link_dgs-1210.dtsi" +#include "rtl838x_d-link_dgs-1210_common.dtsi" / { compatible = "d-link,dgs-1210-16", "realtek,rtl838x-soc"; diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-20.dts b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-20.dts index cd495bc343..f96f08db29 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-20.dts +++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-20.dts @@ -1,34 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "rtl8382_d-link_dgs-1210.dtsi" +#include "rtl838x_d-link_dgs-1210_common.dtsi" +#include "rtl83xx_d-link_dgs-1210_gpio.dtsi" / { compatible = "d-link,dgs-1210-20", "realtek,rtl838x-soc"; model = "D-Link DGS-1210-20"; - - gpio-restart { - compatible = "gpio-restart"; - gpios = <&gpio1 34 GPIO_ACTIVE_LOW>; - open-source; - }; - - keys { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - - reset { - label = "reset"; - gpios = <&gpio1 33 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - gpio1: rtl8231-gpio { - compatible = "realtek,rtl8231-gpio"; - #gpio-cells = <2>; - gpio-controller; - indirect-access-bus-id = <0>; - }; }; ðernet0 { diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts index a73e19e16f..a4a450cc09 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts +++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-28.dts @@ -1,34 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "rtl8382_d-link_dgs-1210.dtsi" +#include "rtl838x_d-link_dgs-1210_common.dtsi" +#include "rtl83xx_d-link_dgs-1210_gpio.dtsi" / { compatible = "d-link,dgs-1210-28", "realtek,rtl838x-soc"; model = "D-Link DGS-1210-28"; - - gpio-restart { - compatible = "gpio-restart"; - gpios = <&gpio1 34 GPIO_ACTIVE_LOW>; - open-source; - }; - - keys { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - - reset { - label = "reset"; - gpios = <&gpio1 33 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - gpio1: rtl8231-gpio { - compatible = "realtek,rtl8231-gpio"; - #gpio-cells = <2>; - gpio-controller; - indirect-access-bus-id = <0>; - }; }; ðernet0 { diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi b/target/linux/realtek/dts-5.10/rtl838x_d-link_dgs-1210_common.dtsi similarity index 99% rename from target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi rename to target/linux/realtek/dts-5.10/rtl838x_d-link_dgs-1210_common.dtsi index 565ba45de6..c1deff4bba 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi +++ b/target/linux/realtek/dts-5.10/rtl838x_d-link_dgs-1210_common.dtsi @@ -18,10 +18,9 @@ reg = <0x0 0x8000000>; }; - leds { + leds: leds { pinctrl-names = "default"; pinctrl-0 = <&pinmux_disable_sys_led>; - compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/realtek/dts-5.10/rtl83xx_d-link_dgs-1210_gpio.dtsi b/target/linux/realtek/dts-5.10/rtl83xx_d-link_dgs-1210_gpio.dtsi new file mode 100644 index 0000000000..b1477aa182 --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl83xx_d-link_dgs-1210_gpio.dtsi @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/ { + gpio-restart { + compatible = "gpio-restart"; + gpios = <&gpio1 34 GPIO_ACTIVE_LOW>; + open-source; + }; + + keys: keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 33 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio1: rtl8231-gpio { + compatible = "realtek,rtl8231-gpio"; + #gpio-cells = <2>; + gpio-controller; + indirect-access-bus-id = <0>; + }; +};