Signed-off-by: Paul Fertser <fercer...@gmail.com>
---
 .../rtl8380_d-link_dgs-1210-10-f1.dts         |  8 +++
 .../rtl8380_d-link_dgs-1210-10-f1.dtsi        | 61 +++++++++++++++++++
 .../rtl8380_d-link_dgs-1210-10p-f1.dts        | 60 +-----------------
 target/linux/realtek/image/Makefile           | 10 ++-
 4 files changed, 78 insertions(+), 61 deletions(-)
 create mode 100644 
target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dts
 create mode 100644 
target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dtsi

diff --git a/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dts 
b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dts
new file mode 100644
index 000000000000..39e76bf470ea
--- /dev/null
+++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "rtl8380_d-link_dgs-1210-10-f1.dtsi"
+
+/ {
+       compatible = "d-link,dgs-1210-10-f1", "realtek,rtl838x-soc";
+       model = "D-Link DGS-1210-10 F1";
+};
diff --git a/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dtsi 
b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dtsi
new file mode 100644
index 000000000000..c9dd5e77deb6
--- /dev/null
+++ b/target/linux/realtek/dts-5.10/rtl8380_d-link_dgs-1210-10-f1.dtsi
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "rtl8380_d-link_dgs-1210-10.dtsi"
+
+/ {
+       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/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
index 9a301adb935c..a59dc6b60cc7 100644
--- 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
@@ -1,66 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "rtl8380_d-link_dgs-1210-10.dtsi"
+#include "rtl8380_d-link_dgs-1210-10-f1.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 c1e47f719f3a..903ad3815690 100644
--- a/target/linux/realtek/image/Makefile
+++ b/target/linux/realtek/image/Makefile
@@ -53,11 +53,17 @@ define Device/d-link_dgs-1210
   DEVICE_VENDOR := D-Link
 endef
 
-define Device/d-link_dgs-1210-10p-f1
+define Device/d-link_dgs-1210-10-f1
   $(Device/d-link_dgs-1210)
   SOC := rtl8380
-  DEVICE_MODEL := DGS-1210-10P
+  DEVICE_MODEL := DGS-1210-10
   DEVICE_VARIANT := F1
+endef
+TARGET_DEVICES += d-link_dgs-1210-10-f1
+
+define Device/d-link_dgs-1210-10p-f1
+  $(Device/d-link_dgs-1210-10-f1)
+  DEVICE_MODEL := DGS-1210-10P
   SUPPORTED_DEVICES += d-link,dgs-1210-10p
   DEVICE_PACKAGES += lua-rs232
 endef
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to