From 13c54cd9b377b0c9142186e7e46ee28022776ed5 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Wed, 15 Apr 2026 13:01:29 +0200 Subject: [PATCH] qualcommax: ipq807x: ax9000: wire up the fan Now that we have a proper driver support for the onboard EMC2301 lets wire up the fan as a cooling device on the Xiaomi AX9000. Link: https://github.com/openwrt/openwrt/pull/22942 Signed-off-by: Robert Marko --- .../linux/qualcommax/dts/ipq8072-ax9000.dts | 100 ++++++++++++++++++ target/linux/qualcommax/image/ipq807x.mk | 2 +- 2 files changed, 101 insertions(+), 1 deletion(-) diff --git a/target/linux/qualcommax/dts/ipq8072-ax9000.dts b/target/linux/qualcommax/dts/ipq8072-ax9000.dts index 54c1388597..b44eaa4c42 100644 --- a/target/linux/qualcommax/dts/ipq8072-ax9000.dts +++ b/target/linux/qualcommax/dts/ipq8072-ax9000.dts @@ -9,6 +9,7 @@ #include #include #include +#include / { model = "Xiaomi AX9000"; @@ -121,6 +122,20 @@ pinctrl-0 = <&i2c_pins>; pinctrl-names = "default"; + + fan_controller: fan-controller@2f { + compatible = "microchip,emc2301", "microchip,emc2305"; + reg = <0x2f>; + #address-cells = <1>; + #size-cells = <0>; + #pwm-cells = <3>; + + fan: fan@0 { + reg = <0>; + pwms = <&fan_controller 26000 0 1>; + #cooling-cells = <2>; + }; + }; }; &prng { @@ -576,3 +591,88 @@ qcom,ath11k-calibration-variant = "Xiaomi-AX9000"; }; + +&cpu0_thermal { + trips { + cpu0_active: cpu-active { + temperature = <70000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map2 { + trip = <&cpu0_active>; + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +&cpu1_thermal { + trips { + cpu1_active: cpu-active { + temperature = <70000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map2 { + trip = <&cpu1_active>; + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +&cpu2_thermal { + trips { + cpu2_active: cpu-active { + temperature = <70000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map2 { + trip = <&cpu2_active>; + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +&cpu3_thermal { + trips { + cpu3_active: cpu-active { + temperature = <70000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map2 { + trip = <&cpu3_active>; + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +&cluster_thermal { + trips { + cluster_active: cluster-active { + temperature = <70000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map2 { + trip = <&cluster_active>; + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; diff --git a/target/linux/qualcommax/image/ipq807x.mk b/target/linux/qualcommax/image/ipq807x.mk index 747123fe20..d1f42dd617 100644 --- a/target/linux/qualcommax/image/ipq807x.mk +++ b/target/linux/qualcommax/image/ipq807x.mk @@ -539,7 +539,7 @@ define Device/xiaomi_ax9000 SOC := ipq8072 KERNEL_SIZE := 57344k DEVICE_PACKAGES := ipq-wifi-xiaomi_ax9000 kmod-ath11k-pci ath11k-firmware-qcn9074 \ - kmod-ath10k-ct ath10k-firmware-qca9887-ct + kmod-ath10k-ct ath10k-firmware-qca9887-ct kmod-hwmon-emc2305 ifeq ($(IB),) ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) ARTIFACTS := initramfs-factory.ubi