@@ -6,9 +6,6 @@ board_config_update
board=$(board_name)
case "$board" in
-hpe,1920-8g-poe-180w)
- ucidef_add_gpio_switch "fan_ctrl" "Fan control" "456" "0"
- ;;
esac
board_config_flush
new file mode 100644
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+ hpe,1920-8g-poe-180w)
+ ucidef_set_compat_version "1.1"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
+
@@ -5,6 +5,23 @@
/ {
compatible = "hpe,1920-8g-poe-180w", "realtek,rtl838x-soc";
model = "HPE 1920-8G-PoE+ 180W (JG922A)";
+
+ 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>;
+ };
+};
+
+//set initial GPIO state for fan as it is reset by rtl8231 init.
+&gpio1 {
+ gpio-output-pin-state = <5 1>;
};
&uart1 {
@@ -123,6 +123,9 @@ define Device/hpe_1920-8g-poe-180w
SOC := rtl8380
DEVICE_MODEL := 1920-8G-PoE+ 180W (JG922A)
DEVICE_PACKAGES += realtek-poe
+ DEVICE_COMPAT_MESSAGE := \
+ Fan control switched to hwmon. Default fan behaviour fixed. Your fans will run at max speed unless configured otherwise.
+ DEVICE_COMPAT_VERSION := 1.1
H3C_DEVICE_ID := 0x00010025
SUPPORTED_DEVICES += hpe_1920-8g-poe
endef
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Moving the fans to hwmon. After rtl8231 init changes this also will fix the default fan behaviour. Update device compat to notify users that their fan behaviour is about to change. Signed-off-by: Evan Jobling <evan.jobling@mslsc.com.au> --- .../base-files/etc/board.d/03_gpio_switches | 3 --- .../base-files/etc/board.d/05_compat-version | 17 +++++++++++++++++ .../dts/rtl8380_hpe_1920-8g-poe-180w.dts | 17 +++++++++++++++++ target/linux/realtek/image/rtl838x.mk | 3 +++ 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 target/linux/realtek/base-files/etc/board.d/05_compat-version