[PATCH] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer
From: Igor Velkov via B4 Relay
Date: Tue Oct 06 2026 - 00:08:27 EST
From: Igor Velkov <iav@xxxxxx>
The fan connector routes the fan's tachometer output to GPIOX_7, but
the fan node does not describe it. pwm-fan therefore registers no
fan1_input, and the fan speed cannot be read.
Describe the line as the fan's interrupt.
Tested on ODROID-HC4: fan1_input reads 0 with the fan stopped and
rises with the duty cycle, to about 4400 rpm at full speed.
Assisted-by: LLM
Signed-off-by: Igor Velkov <iav@xxxxxx>
---
arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
index 5f15c2299509..261a42560a5e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
@@ -21,6 +21,8 @@ fan0: pwm-fan {
#cooling-cells = <2>;
cooling-levels = <0 120 170 220>;
pwms = <&pwm_cd 1 40000 0>;
+ interrupt-parent = <&gpio_intc>;
+ interrupts = <IRQID_GPIOX_7 IRQ_TYPE_EDGE_FALLING>;
};
leds {
---
base-commit: b44e2be772f866985cafdf90355285069ea68495
change-id: 20261006-hc4-fan-tach-440c1b874a04
Best regards,
--
Igor Velkov <iav@xxxxxx>