[RFC 4/4] realtek: add support for HPE 1920-24G-PoE-370w

Evan Jobling evan.jobling at mslsc.com.au
Tue Oct 22 03:22:45 PDT 2024


Hardware information:
---------------------

The HPE 1920-24G-PoE+ (370W) (JG926A) is a switch that is
part of the 1920 family which features 370W nominal PoE+ support.

Common with HPE 1920-24G:
  - RTL8382 SoC
  - 24 Gigabit RJ45 ports (built-in RTL8218B, 2 external RTL8218D)
  - 4 SFP ports (external RTL8214FC)
  - RJ45 RS232 port on front panel
  - 32 MiB NOR Flash
  - 128 MiB DDR3 DRAM
  - PT7A7514 watchdog

HPE 1920-24G-PoE+ (370W):
  - PoE chip
  - 3 fans (40mm)

Known issues:
---------------------
- PoE LEDs are uncontrolled.

(Manual should be taken from f2f09bc)
   Example PoE config file (/etc/config/poe):
    ---------------------
config global
        option budget   '370'

config port
        option enable   '1'
        option id       '1'
        option name     'lan8'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '2'
        option name     'lan7'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '3'
        option name     'lan6'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '4'
        option name     'lan5'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '5'
        option name     'lan4'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '6'
        option name     'lan3'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '7'
        option name     'lan2'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '8'
        option name     'lan1'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '9'
        option name     'lan16'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '10'
        option name     'lan15'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '11'
        option name     'lan14'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '12'
        option name     'lan13'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '13'
        option name     'lan12'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '14'
        option name     'lan11'
        option poe_plus '1'
        option priority '2'
onfig port
        option enable   '1'
        option id       '15'
        option name     'lan10'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '16'
        option name     'lan9'
        option poe_plus '1'
        option priority '2'

config port
        option enable   '1'
        option id       '17'
        option name     'lan24'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '18'
        option name     'lan23'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '19'
        option name     'lan22'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '20'
        option name     'lan21'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '21'
        option name     'lan20'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '22'
        option name     'lan19'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '23'
        option name     'lan18'
        option poe_plus '1'
        option priority '2'
config port
        option enable   '1'
        option id       '24'
        option name     'lan17'
        option poe_plus '1'
        option priority '2'

Signed-off-by: Evan Jobling <evan.jobling at mslsc.com.au>
---
 .../realtek/base-files/etc/board.d/02_network |  5 ++++
 .../dts/rtl8382_hpe_1920-24g-poe-370w.dts     | 30 +++++++++++++++++++
 target/linux/realtek/image/rtl838x.mk         |  9 ++++++
 3 files changed, 44 insertions(+)
 create mode 100644 target/linux/realtek/dts/rtl8382_hpe_1920-24g-poe-370w.dts

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 5073dbcc31..7da20eec6f 100644
--- a/target/linux/realtek/base-files/etc/board.d/02_network
+++ b/target/linux/realtek/base-files/etc/board.d/02_network
@@ -36,6 +36,7 @@ hpe,1920-8g-poe-65w|\
 hpe,1920-8g-poe-180w|\
 hpe,1920-16g|\
 hpe,1920-24g|\
+hpe,1920-24g-poe-370w|\
 hpe,1920-48g|\
 hpe,1920-48g-poe)
 	label_mac=$(mtd_get_mac_binary factory 0x68)
@@ -95,6 +96,10 @@ hpe,1920-8g-poe-65w)
 hpe,1920-8g-poe-180w)
 	ucidef_set_poe 180 "$(filter_port_list_reverse "$lan_list" "lan9 lan10")"
 	;;
+hpe,1920-24g-poe-370w)
+	ucidef_set_poe 370 "lan8 lan7 lan6 lan5 lan4 lan3 lan2 lan1 lan16 lan15 lan14 lan13 lan12 lan11 lan10 lan9 lan24 lan23
+			lan22 lan21 lan20 lan19 lan18 lan17"
+	;;
 hpe,1920-48g-poe)
 	ucidef_set_poe 370 "lan8 lan7 lan6 lan5 lan4 lan3 lan2 lan1 lan16 lan15 lan14 lan13 lan12 lan11 lan10 lan9 lan24 lan23
 			lan22 lan21 lan20 lan19 lan18 lan17 lan32 lan31 lan30 lan29 lan28 lan27 lan26 lan25 lan40 lan39 lan38 lan37
diff --git a/target/linux/realtek/dts/rtl8382_hpe_1920-24g-poe-370w.dts b/target/linux/realtek/dts/rtl8382_hpe_1920-24g-poe-370w.dts
new file mode 100644
index 0000000000..0d7811ca89
--- /dev/null
+++ b/target/linux/realtek/dts/rtl8382_hpe_1920-24g-poe-370w.dts
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "rtl8382_hpe_1920-24g.dtsi"
+
+/ {
+	compatible = "hpe,1920-24g-poe-370w", "realtek,rtl838x-soc";
+	model = "HPE 1920-24G-PoE+ 370W (JG926A)";
+
+        gpio_fan_array {
+                compatible = "gpio-fan";
+                target-rpm = <10000>;
+
+                gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+                gpio-fan,speed-map =    <5000 0>,
+                                        <8200 1>;
+
+                alarm-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+                #cooling-cells = <2>;
+        };
+};
+
+/* workaround for rtl8231 init having to wipe bootloader GPIO fan state*/
+&gpio1 {
+        gpio-output-pin-state  =  <5 1>;
+};
+
+&uart1 {
+        status = "okay";
+};
+
diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk
index cea459c4c7..13e08ecfad 100644
--- a/target/linux/realtek/image/rtl838x.mk
+++ b/target/linux/realtek/image/rtl838x.mk
@@ -147,6 +147,15 @@ define Device/hpe_1920-24g
 endef
 TARGET_DEVICES += hpe_1920-24g
 
+define Device/hpe_1920-24g-poe-370w
+  $(Device/hpe_1920)
+  SOC := rtl8382
+  DEVICE_MODEL := 1920-24G-PoE+ 370W (JG926A)
+  DEVICE_PACKAGES += realtek-poe
+  H3C_DEVICE_ID := 0x00010029
+endef
+TARGET_DEVICES += hpe_1920-24g-poe-370w
+
 define Device/inaba_aml2-17gp
   SOC := rtl8382
   IMAGE_SIZE := 13504k
-- 
2.39.5




More information about the openwrt-devel mailing list