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

From: Igor Velkov <iav@iav.lv>

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, and mux the pin as a GPIO
input without bias: R109 on the board pulls the line up to VDDAO_3V3
(schematic rev1.0, sheet 31).

Tested on ODROID-HC4: fan1_input reads 0 with the fan stopped and
rises with the duty cycle, to about 4200 rpm at full speed.

Assisted-by: LLM
Signed-off-by: Igor Velkov <iav@iav.lv>
---
Changes in v2:
- Mux GPIOX_7 as a GPIO input without bias (Neil).
- Link to v1: https://lore.kernel.org/r/20261006-hc4-fan-tach-v1-1-4e7cecf0b45b@iav.lv
---
 arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 15 +++++++++++++++
 1 file changed, 15 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..64602aff1d81 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,10 @@ 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>;
+		pinctrl-0 = <&fan_tach_pins>;
+		pinctrl-names = "default";
 	};
 
 	leds {
@@ -114,6 +118,17 @@ &pcie {
 	reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
 };
 
+&periphs_pinctrl {
+	fan_tach_pins: fan-tach {
+		mux {
+			groups = "GPIOX_7";
+			function = "gpio_periphs";
+			bias-disable;
+			output-disable;
+		};
+	};
+};
+
 &pwm_cd {
 	status = "okay";
 	pinctrl-names = "default";

---
base-commit: b44e2be772f866985cafdf90355285069ea68495
change-id: 20261006-hc4-fan-tach-440c1b874a04

Best regards,
-- 
Igor Velkov <iav@iav.lv>



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer
  2026-10-06 16:36 [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer Igor Velkov via B4 Relay
@ 2026-10-07 12:33 ` Neil Armstrong
  2026-11-02 18:20 ` Igor Velkov
  2026-11-03  9:54 ` Neil Armstrong
  2 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2026-10-07 12:33 UTC (permalink / raw)
  To: iav, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
  Cc: Rob Herring, Conor Dooley, devicetree, linux-kernel,
	linux-amlogic, Krzysztof Kozlowski, linux-arm-kernel

On 10/6/26 18:36, Igor Velkov via B4 Relay wrote:
> From: Igor Velkov <iav@iav.lv>
> 
> 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, and mux the pin as a GPIO
> input without bias: R109 on the board pulls the line up to VDDAO_3V3
> (schematic rev1.0, sheet 31).
> 
> Tested on ODROID-HC4: fan1_input reads 0 with the fan stopped and
> rises with the duty cycle, to about 4200 rpm at full speed.
> 
> Assisted-by: LLM
> Signed-off-by: Igor Velkov <iav@iav.lv>
> ---
> Changes in v2:
> - Mux GPIOX_7 as a GPIO input without bias (Neil).
> - Link to v1: https://lore.kernel.org/r/20261006-hc4-fan-tach-v1-1-4e7cecf0b45b@iav.lv
> ---
>   arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 15 +++++++++++++++
>   1 file changed, 15 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..64602aff1d81 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,10 @@ 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>;
> +		pinctrl-0 = <&fan_tach_pins>;
> +		pinctrl-names = "default";
>   	};
>   
>   	leds {
> @@ -114,6 +118,17 @@ &pcie {
>   	reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
>   };
>   
> +&periphs_pinctrl {
> +	fan_tach_pins: fan-tach {
> +		mux {
> +			groups = "GPIOX_7";
> +			function = "gpio_periphs";
> +			bias-disable;
> +			output-disable;
> +		};
> +	};
> +};
> +
>   &pwm_cd {
>   	status = "okay";
>   	pinctrl-names = "default";
> 
> ---
> base-commit: b44e2be772f866985cafdf90355285069ea68495
> change-id: 20261006-hc4-fan-tach-440c1b874a04
> 
> Best regards,

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer
  2026-10-06 16:36 [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer Igor Velkov via B4 Relay
  2026-10-07 12:33 ` Neil Armstrong
@ 2026-11-02 18:20 ` Igor Velkov
  2026-11-02 21:25   ` Martin Blumenstingl
  2026-11-03  8:52   ` Neil Armstrong
  2026-11-03  9:54 ` Neil Armstrong
  2 siblings, 2 replies; 6+ messages in thread
From: Igor Velkov @ 2026-11-02 18:20 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
  Cc: Rob Herring, Conor Dooley, devicetree, linux-kernel, Igor Velkov,
	linux-amlogic, Krzysztof Kozlowski, linux-arm-kernel

Hi Neil,

Gentle ping: this has your Reviewed-by from Oct 7, but I don't see
it in for-next. Could you pick it up for v7.5?

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer
  2026-11-02 18:20 ` Igor Velkov
@ 2026-11-02 21:25   ` Martin Blumenstingl
  2026-11-03  8:52   ` Neil Armstrong
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2026-11-02 21:25 UTC (permalink / raw)
  To: Igor Velkov
  Cc: Neil Armstrong, Conor Dooley, Rob Herring, Kevin Hilman,
	linux-kernel, devicetree, linux-amlogic, Krzysztof Kozlowski,
	linux-arm-kernel, Jerome Brunet

Hi Igor,

On Mon, Nov 2, 2026 at 7:47 PM Igor Velkov <iav@iav.lv> wrote:
>
> Hi Neil,
>
> Gentle ping: this has your Reviewed-by from Oct 7, but I don't see
> it in for-next. Could you pick it up for v7.5?
I'm sure it's still on Neil's list. Your patch came in around ~7.3-rc6
which is when the batch of Amlogic .dts changes has to be sent to the
soc maintainers.
Please give him a few more days as 7.4-rc1 has just been released. The
normal approach is to go through the list of not-yet-merged topics
chronologically.


Best regards,
Martin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer
  2026-11-02 18:20 ` Igor Velkov
  2026-11-02 21:25   ` Martin Blumenstingl
@ 2026-11-03  8:52   ` Neil Armstrong
  1 sibling, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2026-11-03  8:52 UTC (permalink / raw)
  To: Igor Velkov, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
  Cc: Rob Herring, Conor Dooley, devicetree, linux-kernel,
	linux-amlogic, Krzysztof Kozlowski, linux-arm-kernel

On 11/2/26 19:20, Igor Velkov wrote:
> Hi Neil,
> 
> Gentle ping: this has your Reviewed-by from Oct 7, but I don't see
> it in for-next. Could you pick it up for v7.5?

Yes

Neil

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer
  2026-10-06 16:36 [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer Igor Velkov via B4 Relay
  2026-10-07 12:33 ` Neil Armstrong
  2026-11-02 18:20 ` Igor Velkov
@ 2026-11-03  9:54 ` Neil Armstrong
  2 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2026-11-03  9:54 UTC (permalink / raw)
  To: Kevin Hilman, Jerome Brunet, Martin Blumenstingl, Igor Velkov
  Cc: Rob Herring, Conor Dooley, devicetree, linux-kernel,
	linux-amlogic, Krzysztof Kozlowski, linux-arm-kernel

Hi,

On Tue, 06 Oct 2026 19:36:17 +0300, Igor Velkov wrote:
> 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, and mux the pin as a GPIO
> input without bias: R109 on the board pulls the line up to VDDAO_3V3
> (schematic rev1.0, sheet 31).
> 
> [...]

Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v7.5/arm64-dt)

[1/1] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer
      https://git.kernel.org/amlogic/c/81e55899e134541583a4e611ff750e1868671c67

These changes has been applied on the intermediate git tree [1].

The v7.5/arm64-dt branch will then be sent via a formal Pull Request to the Linux SoC maintainers
for inclusion in their intermediate git branches in order to be sent to Linus during
the next merge window, or sooner if it's a set of fixes.

In the cases of fixes, those will be merged in the current release candidate
kernel and as soon they appear on the Linux master branch they will be
backported to the previous Stable and Long-Stable kernels [2].

The intermediate git branches are merged daily in the linux-next tree [3],
people are encouraged testing these pre-release kernels and report issues on the
relevant mailing-lists.

If problems are discovered on those changes, please submit a signed-off-by revert
patch followed by a corrective changeset.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

-- 
Neil


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2026-11-03  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06 16:36 [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer Igor Velkov via B4 Relay
2026-10-07 12:33 ` Neil Armstrong
2026-11-02 18:20 ` Igor Velkov
2026-11-02 21:25   ` Martin Blumenstingl
2026-11-03  8:52   ` Neil Armstrong
2026-11-03  9:54 ` Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®