From: Neil Armstrong <neil.armstrong@linaro.org>
To: iav@iav.lv, Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-amlogic@lists.infradead.org,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] arm64: dts: amlogic: meson-sm1-odroid-hc4: add the fan tachometer
Date: Wed, 7 Oct 2026 14:33:20 +0200 [thread overview]
Message-ID: <15a6f5d5-fdf2-43e2-94bc-3e87c4eea122@linaro.org> (raw)
In-Reply-To: <20261006-hc4-fan-tach-v2-1-e27ad96e92a2@iav.lv>
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
next prev parent reply other threads:[~2026-10-07 12:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 16:36 Igor Velkov via B4 Relay
2026-10-07 12:33 ` Neil Armstrong [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15a6f5d5-fdf2-43e2-94bc-3e87c4eea122@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=iav@iav.lv \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®