All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer
@ 2026-10-06  4:07 ` Igor Velkov via B4 Relay
  0 siblings, 0 replies; 9+ messages in thread
From: Igor Velkov @ 2026-10-06  4:07 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Christian Hewitt,
	devicetree, linux-arm-kernel, linux-amlogic, linux-kernel,
	Igor Velkov

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@iav.lv>
---
 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@iav.lv>


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-10-06 13:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06  4:07 [PATCH] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer Igor Velkov
2026-10-06  4:07 ` Igor Velkov via B4 Relay
2026-10-06  4:07 ` Igor Velkov via B4 Relay
2026-10-06  4:17 ` sashiko-bot
2026-10-06  4:17   ` sashiko-bot
2026-10-06  4:29   ` Igor Velkov
2026-10-06  4:29     ` Igor Velkov
2026-10-06 13:03     ` Neil Armstrong
2026-10-06 13:03       ` Neil Armstrong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.