]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: rtl930x: use common DTSI for Zyxel XGS1010-12
authorShine <4c.fce2@proton.me>
Fri, 19 Jun 2026 14:09:27 +0000 (16:09 +0200)
committerMarkus Stockhausen <markus.stockhausen@gmx.de>
Sat, 20 Jun 2026 13:26:36 +0000 (15:26 +0200)
In preparation for adding support for the B1 revision of this model,
introduce a common DTSI and image recipe.

Signed-off-by: Shine <4c.fce2@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23882
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
target/linux/realtek/dts/rtl9302_zyxel_xgs1010-12-a1.dts
target/linux/realtek/dts/rtl9302_zyxel_xgs1010-12-common.dtsi [new file with mode: 0644]
target/linux/realtek/image/common.mk
target/linux/realtek/image/rtl930x.mk

index 7a5d2f4b3dc1897065f899e28c71e9d9ba72933b..a1f19a9aa646b953f11dd51be60e3a6c88805e80 100644 (file)
 // SPDX-License-Identifier: GPL-2.0-or-later
 /dts-v1/;
 
-#include "rtl9302_zyxel_xgs1x10-12-common.dtsi"
+#include "rtl9302_zyxel_xgs1010-12-common.dtsi"
 
 / {
        compatible = "zyxel,xgs1010-12-a1", "realtek,rtl930x-soc";
        model = "Zyxel XGS1010-12 A1";
-
-       virtual_flash {
-               compatible = "mtd-concat";
-
-               devices = <&fwconcat0 &fwconcat1 &fwconcat2>;
-
-               partitions {
-                       compatible = "fixed-partitions";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-
-                       partition@0 {
-                               label = "firmware";
-                               reg = <0x0 0x0>;
-                               compatible = "openwrt,uimage", "denx,uimage";
-                               openwrt,ih-magic = <0x93001010>;
-                       };
-               };
-       };
-};
-
-&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 = <0x0 0xe0000>;
-                               read-only;
-                       };
-
-                       partition@e0000 {
-                               label = "u-boot-env";
-                               reg = <0xe0000 0x10000>;
-                       };
-
-                       partition@f0000 {
-                               label = "u-boot-env2";
-                               reg = <0xf0000 0x10000>;
-                               read-only;
-                       };
-
-                       /*
-                        * If additional space is needed in the future, the JFFS2 partitions could
-                        * be added to the concatenated firmware partition. They are only reserved
-                        * for now to allow running the XGS1210-12 firmware, which can be useful
-                        * as a reference during development.
-                        */
-
-                       partition@100000 {
-                               label = "jffs2-cfg";
-                               reg = <0x100000 0x100000>;
-                       };
-
-                       partition@200000 {
-                               label = "jffs2-log";
-                               reg = <0x200000 0x100000>;
-                       };
-
-                       fwconcat1: partition@300000 {
-                               label = "fwconcat1";
-                               reg = <0x300000 0x510000>;
-                       };
-
-                       partition@810000 {
-                               reg = <0x810000 0x10000>;
-                               label = "htp-log";
-                               read-only;
-                       };
-
-                       fwconcat2: partition@820000 {
-                               label = "fwconcat2";
-                               reg = <0x820000 0xd0000>;
-                       };
-
-                       partition@8f0000 {
-                               reg = <0x8f0000 0x10000>;
-                               label = "htp-flash-test";
-                               read-only;
-                       };
-
-                       fwconcat0: partition@900000 {
-                               label = "fwconcat0";
-                               reg = <0x900000 0x700000>;
-                       };
-               };
-       };
 };
 
 &mdio_bus1 {
diff --git a/target/linux/realtek/dts/rtl9302_zyxel_xgs1010-12-common.dtsi b/target/linux/realtek/dts/rtl9302_zyxel_xgs1010-12-common.dtsi
new file mode 100644 (file)
index 0000000..bb510c3
--- /dev/null
@@ -0,0 +1,101 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/dts-v1/;
+
+#include "rtl9302_zyxel_xgs1x10-12-common.dtsi"
+
+/ {
+       virtual_flash {
+               compatible = "mtd-concat";
+
+               devices = <&fwconcat0 &fwconcat1 &fwconcat2>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "firmware";
+                               reg = <0x0 0x0>;
+                               compatible = "openwrt,uimage", "denx,uimage";
+                               openwrt,ih-magic = <0x93001010>;
+                       };
+               };
+       };
+};
+
+&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 = <0x0 0xe0000>;
+                               read-only;
+                       };
+
+                       partition@e0000 {
+                               label = "u-boot-env";
+                               reg = <0xe0000 0x10000>;
+                       };
+
+                       partition@f0000 {
+                               label = "u-boot-env2";
+                               reg = <0xf0000 0x10000>;
+                               read-only;
+                       };
+
+                       /*
+                        * If additional space is needed in the future, the JFFS2 partitions could
+                        * be added to the concatenated firmware partition. They are only reserved
+                        * for now to allow running the XGS1210-12 firmware, which can be useful
+                        * as a reference during development.
+                        */
+
+                       partition@100000 {
+                               label = "jffs2-cfg";
+                               reg = <0x100000 0x100000>;
+                       };
+
+                       partition@200000 {
+                               label = "jffs2-log";
+                               reg = <0x200000 0x100000>;
+                       };
+
+                       fwconcat1: partition@300000 {
+                               label = "fwconcat1";
+                               reg = <0x300000 0x510000>;
+                       };
+
+                       partition@810000 {
+                               reg = <0x810000 0x10000>;
+                               label = "htp-log";
+                               read-only;
+                       };
+
+                       fwconcat2: partition@820000 {
+                               label = "fwconcat2";
+                               reg = <0x820000 0xd0000>;
+                       };
+
+                       partition@8f0000 {
+                               reg = <0x8f0000 0x10000>;
+                               label = "htp-flash-test";
+                               read-only;
+                       };
+
+                       fwconcat0: partition@900000 {
+                               label = "fwconcat0";
+                               reg = <0x900000 0x700000>;
+                       };
+               };
+       };
+};
index 3a820fec4312fbc5e8240b42377488f5ec685c60..6975654395ca33af91afb98b1500c52faff06d18 100644 (file)
@@ -101,6 +101,16 @@ define Device/zyxel_gs1900
        check-size 6976k
 endef
 
+define Device/zyxel_xgs1010-12
+  SOC := rtl9302
+  UIMAGE_MAGIC := 0x93001010
+  DEVICE_VENDOR := Zyxel
+  DEVICE_MODEL := XGS1010-12
+  KERNEL_SIZE := 7168k
+  IMAGE_SIZE := 13184k
+  $(Device/kernel-lzma)
+endef
+
 define Device/zyxel_xgs1210-12
   SOC := rtl9302
   UIMAGE_MAGIC := 0x93001210
index f4b7a67effa251517efc3c400bd6c176617d3ad4..b1a2602fa13fd0546c964052c9d9a0f6f81e99db 100644 (file)
@@ -272,14 +272,8 @@ endef
 TARGET_DEVICES += xikestor_sks8310-8x
 
 define Device/zyxel_xgs1010-12-a1
-  SOC := rtl9302
-  UIMAGE_MAGIC := 0x93001010
-  DEVICE_VENDOR := Zyxel
-  DEVICE_MODEL := XGS1010-12
+  $(Device/zyxel_xgs1010-12)
   DEVICE_VARIANT := A1
-  KERNEL_SIZE := 7168k
-  IMAGE_SIZE := 13184k
-  $(Device/kernel-lzma)
 endef
 TARGET_DEVICES += zyxel_xgs1010-12-a1