linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: freescale: imx8mp-toradex-smarc: add fan cooling levels
@ 2025-06-13 16:35 João Paulo Gonçalves
  2025-06-13 21:37 ` Frank Li
  2025-07-02 10:09 ` Shawn Guo
  0 siblings, 2 replies; 4+ messages in thread
From: João Paulo Gonçalves @ 2025-06-13 16:35 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, imx, linux-arm-kernel, linux-kernel,
	João Paulo Gonçalves

From: João Paulo Gonçalves <joao.goncalves@toradex.com>

The fan controller on this board cannot work in automatic mode, and
requires software control, the reason is that it has no temperature
sensor connected.

Given that this board is a development kit and does not have any
specific fan, add a default single cooling level that would enable the
fan to spin with a 100% duty cycle, enabling a safe default.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
---
 arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts b/arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts
index 55b8c5c14fb4f3e7407243760ac01b0aca0dacf5..5f233304cea747d3f04a748265f96696668c9d6b 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts
@@ -213,6 +213,7 @@ fan_controller: fan@18 {
 		#pwm-cells = <2>;
 
 		fan {
+			cooling-levels = <255>;
 			pwms = <&fan_controller 40000 PWM_POLARITY_INVERTED>;
 		};
 	};

---
base-commit: 1a2ad59da68dd294f994efbf68c5d671f6b42fad
change-id: 20250613-tdx-smarc-imx8mp-fan-cooling-level-b67265ae2c49

Best regards,
-- 
João Paulo Gonçalves <joao.goncalves@toradex.com>


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

* Re: [PATCH] arm64: dts: freescale: imx8mp-toradex-smarc: add fan cooling levels
  2025-06-13 16:35 [PATCH] arm64: dts: freescale: imx8mp-toradex-smarc: add fan cooling levels João Paulo Gonçalves
@ 2025-06-13 21:37 ` Frank Li
  2025-06-15 10:10   ` Francesco Dolcini
  2025-07-02 10:09 ` Shawn Guo
  1 sibling, 1 reply; 4+ messages in thread
From: Frank Li @ 2025-06-13 21:37 UTC (permalink / raw)
  To: João Paulo Gonçalves
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, devicetree,
	imx, linux-arm-kernel, linux-kernel,
	João Paulo Gonçalves

On Fri, Jun 13, 2025 at 01:35:04PM -0300, João Paulo Gonçalves wrote:
> From: João Paulo Gonçalves <joao.goncalves@toradex.com>
>
> The fan controller on this board cannot work in automatic mode, and
> requires software control, the reason is that it has no temperature
> sensor connected.

why not use built-in temperature sensor

tmu: tmu@30260000 {
                                compatible = "fsl,imx8mp-tmu";
                                reg = <0x30260000 0x10000>;
                                clocks = <&clk IMX8MP_CLK_TSENSOR_ROOT>;
                                nvmem-cells = <&tmu_calib>;
                                nvmem-cell-names = "calib";
                                #thermal-sensor-cells = <1>;
                        };

Frank

>
> Given that this board is a development kit and does not have any
> specific fan, add a default single cooling level that would enable the
> fan to spin with a 100% duty cycle, enabling a safe default.
>
> Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
> ---
>  arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts b/arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts
> index 55b8c5c14fb4f3e7407243760ac01b0aca0dacf5..5f233304cea747d3f04a748265f96696668c9d6b 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-toradex-smarc-dev.dts
> @@ -213,6 +213,7 @@ fan_controller: fan@18 {
>  		#pwm-cells = <2>;
>
>  		fan {
> +			cooling-levels = <255>;
>  			pwms = <&fan_controller 40000 PWM_POLARITY_INVERTED>;
>  		};
>  	};
>
> ---
> base-commit: 1a2ad59da68dd294f994efbf68c5d671f6b42fad
> change-id: 20250613-tdx-smarc-imx8mp-fan-cooling-level-b67265ae2c49
>
> Best regards,
> --
> João Paulo Gonçalves <joao.goncalves@toradex.com>
>

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

* Re: [PATCH] arm64: dts: freescale: imx8mp-toradex-smarc: add fan cooling levels
  2025-06-13 21:37 ` Frank Li
@ 2025-06-15 10:10   ` Francesco Dolcini
  0 siblings, 0 replies; 4+ messages in thread
From: Francesco Dolcini @ 2025-06-15 10:10 UTC (permalink / raw)
  To: Frank Li
  Cc: João Paulo Gonçalves, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, devicetree, imx, linux-arm-kernel, linux-kernel,
	João Paulo Gonçalves

On Fri, Jun 13, 2025 at 05:37:56PM -0400, Frank Li wrote:
> On Fri, Jun 13, 2025 at 01:35:04PM -0300, João Paulo Gonçalves wrote:
> > From: João Paulo Gonçalves <joao.goncalves@toradex.com>
> >
> > The fan controller on this board cannot work in automatic mode, and
> > requires software control, the reason is that it has no temperature
> > sensor connected.
> 
> why not use built-in temperature sensor

This comment is about the amc6821 temperature sensor input, it's about
the way the HW is designed and it's specific of the amc6821 fan
controller.

Francesco


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

* Re: [PATCH] arm64: dts: freescale: imx8mp-toradex-smarc: add fan cooling levels
  2025-06-13 16:35 [PATCH] arm64: dts: freescale: imx8mp-toradex-smarc: add fan cooling levels João Paulo Gonçalves
  2025-06-13 21:37 ` Frank Li
@ 2025-07-02 10:09 ` Shawn Guo
  1 sibling, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2025-07-02 10:09 UTC (permalink / raw)
  To: João Paulo Gonçalves
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, devicetree,
	imx, linux-arm-kernel, linux-kernel,
	João Paulo Gonçalves

On Fri, Jun 13, 2025 at 01:35:04PM -0300, João Paulo Gonçalves wrote:
> From: João Paulo Gonçalves <joao.goncalves@toradex.com>
> 
> The fan controller on this board cannot work in automatic mode, and
> requires software control, the reason is that it has no temperature
> sensor connected.
> 
> Given that this board is a development kit and does not have any
> specific fan, add a default single cooling level that would enable the
> fan to spin with a 100% duty cycle, enabling a safe default.
> 
> Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>

Applied, thanks!


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

end of thread, other threads:[~2025-07-02 10:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 16:35 [PATCH] arm64: dts: freescale: imx8mp-toradex-smarc: add fan cooling levels João Paulo Gonçalves
2025-06-13 21:37 ` Frank Li
2025-06-15 10:10   ` Francesco Dolcini
2025-07-02 10:09 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).