]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: filogic: comfast cf-wr632ax: add fan tachometer & increase PWM period 24314/head
authorRyan Leung <untilscour@protonmail.com>
Sat, 25 Jul 2026 16:35:43 +0000 (00:35 +0800)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Sat, 25 Jul 2026 22:24:02 +0000 (00:24 +0200)
Add fan tachometer reading - 2 pulses per revolution, open drain, GPIO pin 4.

Increase PWM period from 10000 ns to 40000 ns (reduce PWM frequency from 100 kHz to 25 kHz) to
reduce audible friction noise.

Signed-off-by: Ryan Leung <untilscour@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/24314
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/mediatek/dts/mt7981b-comfast-cf-wr632ax-common.dtsi

index b418c15e7eb9b6983bef1b890a4b963d08fa907f..7a926d90f628b1ac9cabab292fbda2062d7a0900 100644 (file)
@@ -80,7 +80,9 @@
 };
 
 &fan {
-       pwms = <&pwm 0 10000>;
+       interrupts-extended = <&pio 4 IRQ_TYPE_EDGE_FALLING>;
+       pulses-per-revolution = <2>;
+       pwms = <&pwm 0 40000>;
        status = "okay";
 };