lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPtUBGowNkBB5DRR@alb3rt0-ThinkPad-P15-Gen-1>
Date: Fri, 24 Oct 2025 12:25:08 +0200
From: Alberto Merciai <alb3rt0.m3rciai@...il.com>
To: Primoz Fiser <primoz.fiser@...ik.com>
Cc: Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, imx@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, upstream@...ts.phytec.de
Subject: Re: [PATCH 2/2] arm64: dts: freescale: imx93-phyboard-nash: Add
 pwm-fan overlay

On Tue, Oct 07, 2025 at 10:40:28AM +0200, Primoz Fiser wrote:
> Add overlay to support PWM fan on the phyBOARD-Nash-i.MX93 board. Fan
> can be connected to the FAN (X48) connector on the board and will be
> controlled according to the following CPU temperature trips table:
> 
>  - bellow 50 degrees - fan is off (<1% duty cycle)
>  - between 50 and 58 degrees - low fan speed (~35% duty cycle)
>  - between 58 and 65 degrees - fan medium speed (~60% duty cycle)
>  - above 65 degrees - fan at full speed (>99% duty cycle)
> 
> The output frequency of PWM signal is set to 25 kHz.
> 
> Signed-off-by: Primoz Fiser <primoz.fiser@...ik.com>
> ---
>  arch/arm64/boot/dts/freescale/Makefile        |  2 +
>  .../imx93-phyboard-nash-pwm-fan.dtso          | 75 +++++++++++++++++++
>  2 files changed, 77 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso
> 
> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
> index c72a6fdc5412..9807eb878916 100644
> --- a/arch/arm64/boot/dts/freescale/Makefile
> +++ b/arch/arm64/boot/dts/freescale/Makefile
> @@ -358,11 +358,13 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
>  
>  imx93-phyboard-nash-jtag-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-jtag.dtbo
>  imx93-phyboard-nash-peb-wlbt-07-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-peb-wlbt-07.dtbo
> +imx93-phyboard-nash-pwm-fan-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-pwm-fan.dtbo
>  imx93-phyboard-segin-peb-eval-01-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-eval-01.dtbo
>  imx93-phyboard-segin-peb-wlbt-05-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-wlbt-05.dtbo
>  imx93-phycore-rpmsg-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-segin.dtb imx93-phycore-rpmsg.dtbo
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-jtag.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-peb-wlbt-07.dtb
> +dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-pwm-fan.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-eval-01.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-wlbt-05.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phycore-rpmsg.dtb
> diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso
> new file mode 100644
> index 000000000000..d1adf04d56d9
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso
> @@ -0,0 +1,75 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2025 PHYTEC Messtechnik GmbH
> + * Author: Primoz Fiser <primoz.fiser@...ik.com>
> + */
> +
> +#include <dt-bindings/pwm/pwm.h>
> +#include "imx93-pinfunc.h"
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&{/} {
> +	fan0: pwm-fan {
> +		compatible = "pwm-fan";
> +		#cooling-cells = <2>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_fan>;
> +		cooling-levels = <1 90 150 200 255>;
> +		pwms = <&tpm6 1 40000 PWM_POLARITY_INVERTED>;
> +	};
> +
> +	thermal-zones {
> +		cpu-thermal {
> +			trips {
> +				cpu_low: cpu-low {
> +					hysteresis = <3000>;
> +					temperature = <50000>;
> +					type = "active";
> +				};
> +
> +				cpu_med: cpu-med {
> +					hysteresis = <3000>;
> +					temperature = <58000>;
> +					type = "active";
> +				};
> +
> +				cpu_high: cpu-high {
> +					hysteresis = <3000>;
> +					temperature = <65000>;
> +					type = "active";
> +				};
> +			};
> +
> +			cooling-maps {
> +				map1 {
> +					cooling-device = <&fan0 1 1>;
> +					trip = <&cpu_low>;
> +				};
> +
> +				map2 {
> +					cooling-device = <&fan0 2 2>;
> +					trip = <&cpu_med>;
> +				};
> +
> +				map3 {
> +					cooling-device = <&fan0 4 4>;
> +					trip = <&cpu_high>;
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&tpm6 {
> +	status = "okay";
> +};
> +
> +&iomuxc {
> +	pinctrl_fan: fangrp {
> +		fsl,pins = <
> +			MX93_PAD_GPIO_IO23__TPM6_CH1	0x31e
> +		>;
> +	};
> +};
> -- 
> 2.34.1
> 
> 
Reviewed-by: Alberto Merciai <alb3rt0.m3rciai@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ