[PATCH] riscv: dts: sifive: unmatched: Add PWM controlled fans

Conor Dooley conor at kernel.org
Sun Nov 23 11:00:21 PST 2025


Hey,

On Sat, Nov 22, 2025 at 01:19:40PM +0100, René Rebe wrote:
> This adds the two PWM-controlled fans of the HiFive Unmatched board to
> the device tree.
> 
> Signed-off-by: René Rebe <rene at exactco.de>
> ---
> Tested on SiFive HiFive Unmatched A00 running T2/Linux.

Was this generated on top of a tree that includes 7dbc4432ea6b ("pwm:
sifive: Fix PWM algorithm and clarify inverted compare behavior")?
That'd be 6.17-rc1 or later.

If not, the polarity of the pwms will need to be switched because the
original driver author intentionally got it wrong and so 6.17-rc1 and
later have the correct polarity...

> ---
>  arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> index 03ce2cee4e97..850fa1d25be7 100644
> --- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> +++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> @@ -47,6 +47,16 @@ gpio-poweroff {
>  		gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
>  	};
>  
> +	fan1 {
> +		compatible = "pwm-fan";
> +		pwms = <&pwm1 2 7812500 0>;
> +	};
> +
> +	fan2 {
> +		compatible = "pwm-fan";
> +		pwms = <&pwm1 3 7812500 0>;
> +	};
> +
>  	led-controller-1 {
>  		compatible = "pwm-leds";
>  
> -- 
> 2.46.0
> 
> 
> -- 
> René Rebe, ExactCODE GmbH, Berlin, Germany
> https://exactco.dehttps://t2linux.comhttps://patreon.com/renerebe
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20251123/b5a20ea5/attachment.sig>


More information about the linux-riscv mailing list