In preparations to add support for more similar boards the common part is split into a DTSI.
The model that's currently supported is known to be revision F1 so mark it accordingly and provide appropriate compatible string for sysupgrade to work. Signed-off-by: Paul Fertser <fercer...@gmail.com> --- ...0p.dts => rtl8380_d-link_dgs-1210-10.dtsi} | 60 ----------------- .../rtl8380_d-link_dgs-1210-10p-f1.dts | 66 +++++++++++++++++++ target/linux/realtek/image/Makefile | 7 +- 3 files changed, 71 insertions(+), 62 deletions(-) rename target/linux/realtek/dts-5.10/{rtl8382_d-link_dgs-1210-10p.dts => rtl8380_d-link_dgs-1210-10.dtsi} (60%) create mode 100644 target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi similarity index 60% rename from target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts rename to target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi index 119eaadc16e6..c465e7354872 100644 --- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts +++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10.dtsi @@ -6,9 +6,6 @@ #include <dt-bindings/gpio/gpio.h> / { - compatible = "d-link,dgs-1210-10p", "realtek,rtl838x-soc"; - model = "D-Link DGS-1210-10P"; - aliases { led-boot = &led_power; led-failsafe = &led_power; @@ -20,11 +17,6 @@ bootargs = "console=ttyS0,115200"; }; - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; - leds { pinctrl-names = "default"; pinctrl-0 = <&pinmux_disable_sys_led>; @@ -50,58 +42,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/rtl8380_d-link_dgs-1210-10p-f1.dts b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts new file mode 100644 index 000000000000..9a301adb935c --- /dev/null +++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10p-f1.dts @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rtl8380_d-link_dgs-1210-10.dtsi" + +/ { + compatible = "d-link,dgs-1210-10p-f1", "realtek,rtl838x-soc"; + model = "D-Link DGS-1210-10P F1"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; +}; + + +&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>; + }; + }; + }; +}; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 5e4b4cde800d..c1e47f719f3a 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -53,12 +53,15 @@ define Device/d-link_dgs-1210 DEVICE_VENDOR := D-Link endef -define Device/d-link_dgs-1210-10p +define Device/d-link_dgs-1210-10p-f1 $(Device/d-link_dgs-1210) + SOC := rtl8380 DEVICE_MODEL := DGS-1210-10P + DEVICE_VARIANT := F1 + SUPPORTED_DEVICES += d-link,dgs-1210-10p DEVICE_PACKAGES += lua-rs232 endef -TARGET_DEVICES += d-link_dgs-1210-10p +TARGET_DEVICES += d-link_dgs-1210-10p-f1 define Device/d-link_dgs-1210-16 $(Device/d-link_dgs-1210) -- 2.17.1 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel