[openwrt/openwrt] realtek: engenius_ews2910p: support multiple hardware versions
LEDE Commits
lede-commits at lists.infradead.org
Sat May 31 14:19:14 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e5625fb4485b6e937fa52b4e47a60ec2a871e3c9
commit e5625fb4485b6e937fa52b4e47a60ec2a871e3c9
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
AuthorDate: Tue Apr 16 21:28:23 2024 -0500
realtek: engenius_ews2910p: support multiple hardware versions
When the Engenius EWS-2910P was added, only v1 was known. Move the
common parts to a dtsi, and split up the support to acccount for the
hardware version.
On v3, for example, the root partition uses a different uImage magic.
Add a "engenius,ews2910p-v1" compatible, while leaving the legacy
"engenius,ews2910p" to also mean v1.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15217
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
target/linux/realtek/base-files/etc/board.d/02_network | 2 +-
.../linux/realtek/dts/rtl8380_engenius_ews2910p-v1.dts | 13 +++++++++++++
...enius_ews2910p.dts => rtl8380_engenius_ews2910p.dtsi} | 9 ++-------
target/linux/realtek/image/common.mk | 12 ++++++++++++
target/linux/realtek/image/rtl838x.mk | 16 +++++-----------
5 files changed, 33 insertions(+), 19 deletions(-)
diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network
index 16642c273a..c3951b591e 100644
--- a/target/linux/realtek/base-files/etc/board.d/02_network
+++ b/target/linux/realtek/base-files/etc/board.d/02_network
@@ -91,7 +91,7 @@ d-link,dgs-1210-28p-f)
ucidef_set_poe 193 "lan8 lan7 lan6 lan5 lan4 lan3 lan2 lan1 lan16 lan15 lan14 lan13 lan12 lan11 lan10 lan9 lan24 lan23
lan22 lan21 lan20 lan19 lan18 lan17"
;;
-engenius,ews2910p)
+engenius,ews2910p-v1)
ucidef_set_poe 60 "$(filter_port_list "$lan_list" "lan9 lan10")"
;;
hpe,1920-8g-poe-65w)
diff --git a/target/linux/realtek/dts/rtl8380_engenius_ews2910p-v1.dts b/target/linux/realtek/dts/rtl8380_engenius_ews2910p-v1.dts
new file mode 100644
index 0000000000..72f9ea7a90
--- /dev/null
+++ b/target/linux/realtek/dts/rtl8380_engenius_ews2910p-v1.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "rtl8380_engenius_ews2910p.dtsi"
+
+/ {
+ compatible = "engenius,ews2910p-v1", "realtek,rtl838x-soc";
+ model = "EnGenius EWS2910P v1";
+};
+
+&firmware_partition_1 {
+ compatible = "openwrt,uimage";
+ openwrt,ih-magic = <0x03802910>;
+};
diff --git a/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dts b/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dtsi
similarity index 95%
rename from target/linux/realtek/dts/rtl8380_engenius_ews2910p.dts
rename to target/linux/realtek/dts/rtl8380_engenius_ews2910p.dtsi
index b0f1e9b538..e8cc9d7b60 100644
--- a/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dts
+++ b/target/linux/realtek/dts/rtl8380_engenius_ews2910p.dtsi
@@ -7,9 +7,6 @@
#include <dt-bindings/gpio/gpio.h>
/ {
- compatible = "engenius,ews2910p", "realtek,rtl838x-soc";
- model = "EnGenius EWS2910P";
-
aliases {
led-boot = &led_power;
led-failsafe = &led_fault;
@@ -165,13 +162,11 @@
label = "jffs2-log";
reg = <0xe00000 0x200000>;
};
- partition at 1000000 {
- compatible = "openwrt,uimage";
+ firmware_partition_1: partition at 1000000 {
label = "firmware";
reg = <0x1000000 0x800000>;
- openwrt,ih-magic = <0x03802910>;
};
- partition at 1800000 {
+ firmware_partition_2: partition at 1800000 {
label = "firmware2";
reg = <0x1800000 0x800000>;
};
diff --git a/target/linux/realtek/image/common.mk b/target/linux/realtek/image/common.mk
index e600b2347d..d68915ea90 100644
--- a/target/linux/realtek/image/common.mk
+++ b/target/linux/realtek/image/common.mk
@@ -31,6 +31,18 @@ define Device/d-link_dgs-1210
CAMEO_BOARD_VERSION := 32
endef
+# The "IMG-" uImage name allows flashing the iniramfs from the vendor Web UI.
+# Avoided for sysupgrade, as the vendor FW would do an incomplete flash.
+define Device/engenius_ews2910p
+ IMAGE_SIZE := 8192k
+ DEVICE_VENDOR := EnGenius
+ KERNEL_INITRAMFS := \
+ kernel-bin | \
+ append-dtb | \
+ libdeflate-gzip | \
+ uImage gzip -n 'IMG-0.00.00-c0.0.00'
+endef
+
define Device/hpe_1920
DEVICE_VENDOR := HPE
IMAGE_SIZE := 29632k
diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk
index a090390a50..6e43317148 100644
--- a/target/linux/realtek/image/rtl838x.mk
+++ b/target/linux/realtek/image/rtl838x.mk
@@ -91,22 +91,16 @@ define Device/d-link_dgs-1210-28p-f
endef
TARGET_DEVICES += d-link_dgs-1210-28p-f
-# The "IMG-" uImage name allows flashing the iniramfs from the vendor Web UI.
-# Avoided for sysupgrade, as the vendor FW would do an incomplete flash.
-define Device/engenius_ews2910p
+define Device/engenius_ews2910p-v1
+ $(Device/engenius_ews2910p)
SOC := rtl8380
- IMAGE_SIZE := 8192k
- DEVICE_VENDOR := EnGenius
DEVICE_MODEL := EWS2910P
+ DEVICE_VARIANT := v1
DEVICE_PACKAGES += realtek-poe
UIMAGE_MAGIC := 0x03802910
- KERNEL_INITRAMFS := \
- kernel-bin | \
- append-dtb | \
- libdeflate-gzip | \
- uImage gzip -n 'IMG-0.00.00-c0.0.00'
+ SUPPORTED_DEVICES += engenius,ews2910p
endef
-TARGET_DEVICES += engenius_ews2910p
+TARGET_DEVICES += engenius_ews2910p-v1
define Device/hpe_1920-8g
$(Device/hpe_1920)
More information about the lede-commits
mailing list