public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v3] arm64: dts: rockchip: add pwm-fan for NanoPC-T6
@ 2026-01-25 18:10 Hugh Cole-Baker
  2026-01-25 18:45 ` Dragan Simic
  2026-02-22 22:39 ` Heiko Stuebner
  0 siblings, 2 replies; 3+ messages in thread
From: Hugh Cole-Baker @ 2026-01-25 18:10 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
  Cc: Dragan Simic, Alexey Charkov, Hugh Cole-Baker, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

FriendlyELEC offers an optional heatsink and fan addon [1] for the
NanoPC-T6 and T6 LTS, which plugs in to the fan connector on the board
driven by pwm1. Add the fan as an active cooling device for the SoC package.
The PWM duty cycle values are taken from the vendor's source [2].

Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com>

[1]: https://www.friendlyelec.com/index.php?route=product/product&product_id=305
[2]: https://github.com/friendlyarm/kernel-rockchip/blob/4944602540b62f5aad139fe602a76cf7c3176128/arch/arm64/boot/dts/rockchip/rk3588-nanopi6-rev01.dts#L75-L90
---
Changes from v2: https://lore.kernel.org/linux-rockchip/20251109192128.72527-1-sigmaris@gmail.com/
* Set trip points to 55 and 65°C (Dragan)

Changes from v1: https://lore.kernel.org/linux-rockchip/20251026194858.92461-1-sigmaris@gmail.com/
* add the fan to the base board dtsi instead of overlay (Heiko)
* just use 2 trip points for warm and hot temperatures (Dragan, Alexey)

 .../boot/dts/rockchip/rk3588-nanopc-t6.dtsi   | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
index 90e7fe254491b..84b6b53f016ab 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
@@ -11,6 +11,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/rockchip.h>
 #include <dt-bindings/soc/rockchip,vop2.h>
+#include <dt-bindings/thermal/thermal.h>
 #include <dt-bindings/usb/pd.h>
 #include "rk3588.dtsi"
 
@@ -89,6 +90,14 @@ usr_led: led-1 {
 		};
 	};
 
+	fan: pwm-fan {
+		compatible = "pwm-fan";
+		cooling-levels = <0 35 64 100 150 255>;
+		fan-supply = <&vcc5v0_sys>;
+		pwms = <&pwm1 0 50000 0>;
+		#cooling-cells = <2>;
+	};
+
 	sound {
 		compatible = "simple-audio-card";
 		pinctrl-names = "default";
@@ -590,6 +599,36 @@ &i2s6_8ch {
 	status = "okay";
 };
 
+&package_thermal {
+	polling-delay = <1000>;
+
+	trips {
+		package_warm: package-warm {
+			temperature = <55000>;
+			hysteresis = <2000>;
+			type = "active";
+		};
+
+		package_hot: package-hot {
+			temperature = <65000>;
+			hysteresis = <2000>;
+			type = "active";
+		};
+	};
+
+	cooling-maps {
+		map0 {
+			trip = <&package_warm>;
+			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
+		};
+
+		map1 {
+			trip = <&package_hot>;
+			cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
+		};
+	};
+};
+
 &pcie2x1l0 {
 	reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
 	vpcie3v3-supply = <&vcc_3v3_pcie20>;
-- 
2.50.1 (Apple Git-155)



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

* Re: [PATCH v3] arm64: dts: rockchip: add pwm-fan for NanoPC-T6
  2026-01-25 18:10 [PATCH v3] arm64: dts: rockchip: add pwm-fan for NanoPC-T6 Hugh Cole-Baker
@ 2026-01-25 18:45 ` Dragan Simic
  2026-02-22 22:39 ` Heiko Stuebner
  1 sibling, 0 replies; 3+ messages in thread
From: Dragan Simic @ 2026-01-25 18:45 UTC (permalink / raw)
  To: Hugh Cole-Baker
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Alexey Charkov, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel

Hello Hugh,

On Sunday, January 25, 2026 19:10 CET, Hugh Cole-Baker <sigmaris@gmail.com> wrote:
> FriendlyELEC offers an optional heatsink and fan addon [1] for the
> NanoPC-T6 and T6 LTS, which plugs in to the fan connector on the board
> driven by pwm1. Add the fan as an active cooling device for the SoC package.
> The PWM duty cycle values are taken from the vendor's source [2].
> 
> Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com>
> 
> [1]: https://www.friendlyelec.com/index.php?route=product/product&product_id=305
> [2]: https://github.com/friendlyarm/kernel-rockchip/blob/4944602540b62f5aad139fe602a76cf7c3176128/arch/arm64/boot/dts/rockchip/rk3588-nanopi6-rev01.dts#L75-L90
> ---
> Changes from v2: https://lore.kernel.org/linux-rockchip/20251109192128.72527-1-sigmaris@gmail.com/
> * Set trip points to 55 and 65°C (Dragan)
> 
> Changes from v1: https://lore.kernel.org/linux-rockchip/20251026194858.92461-1-sigmaris@gmail.com/
> * add the fan to the base board dtsi instead of overlay (Heiko)
> * just use 2 trip points for warm and hot temperatures (Dragan, Alexey)
> 
>  .../boot/dts/rockchip/rk3588-nanopc-t6.dtsi   | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
> index 90e7fe254491b..84b6b53f016ab 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
> @@ -11,6 +11,7 @@
>  #include <dt-bindings/input/input.h>
>  #include <dt-bindings/pinctrl/rockchip.h>
>  #include <dt-bindings/soc/rockchip,vop2.h>
> +#include <dt-bindings/thermal/thermal.h>
>  #include <dt-bindings/usb/pd.h>
>  #include "rk3588.dtsi"
>  
> @@ -89,6 +90,14 @@ usr_led: led-1 {
>  		};
>  	};
>  
> +	fan: pwm-fan {
> +		compatible = "pwm-fan";
> +		cooling-levels = <0 35 64 100 150 255>;
> +		fan-supply = <&vcc5v0_sys>;
> +		pwms = <&pwm1 0 50000 0>;
> +		#cooling-cells = <2>;
> +	};
> +
>  	sound {
>  		compatible = "simple-audio-card";
>  		pinctrl-names = "default";
> @@ -590,6 +599,36 @@ &i2s6_8ch {
>  	status = "okay";
>  };
>  
> +&package_thermal {
> +	polling-delay = <1000>;
> +
> +	trips {
> +		package_warm: package-warm {
> +			temperature = <55000>;
> +			hysteresis = <2000>;
> +			type = "active";
> +		};
> +
> +		package_hot: package-hot {
> +			temperature = <65000>;
> +			hysteresis = <2000>;
> +			type = "active";
> +		};
> +	};
> +
> +	cooling-maps {
> +		map0 {
> +			trip = <&package_warm>;
> +			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
> +		};
> +
> +		map1 {
> +			trip = <&package_hot>;
> +			cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
> +		};
> +	};
> +};
> +
>  &pcie2x1l0 {
>  	reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
>  	vpcie3v3-supply = <&vcc_3v3_pcie20>;

Thanks for the v3 of this patch, it's looking good to me, as explained
further in my comments on the v1 and v2.

Please feel free to include

Reviewed-by: Dragan Simic <dsimic@manjaro.org>



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

* Re: [PATCH v3] arm64: dts: rockchip: add pwm-fan for NanoPC-T6
  2026-01-25 18:10 [PATCH v3] arm64: dts: rockchip: add pwm-fan for NanoPC-T6 Hugh Cole-Baker
  2026-01-25 18:45 ` Dragan Simic
@ 2026-02-22 22:39 ` Heiko Stuebner
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2026-02-22 22:39 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Hugh Cole-Baker
  Cc: Heiko Stuebner, Dragan Simic, Alexey Charkov, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel


On Sun, 25 Jan 2026 18:10:14 +0000, Hugh Cole-Baker wrote:
> FriendlyELEC offers an optional heatsink and fan addon [1] for the
> NanoPC-T6 and T6 LTS, which plugs in to the fan connector on the board
> driven by pwm1. Add the fan as an active cooling device for the SoC package.
> The PWM duty cycle values are taken from the vendor's source [2].
> 
> Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com>
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: rockchip: add pwm-fan for NanoPC-T6
      commit: 0c02a103908b8c55633013deb9c76843db879bd6

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>


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

end of thread, other threads:[~2026-02-22 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-25 18:10 [PATCH v3] arm64: dts: rockchip: add pwm-fan for NanoPC-T6 Hugh Cole-Baker
2026-01-25 18:45 ` Dragan Simic
2026-02-22 22:39 ` Heiko Stuebner

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