From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA83AC433FE for ; Sat, 29 Oct 2022 04:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6FlvjCsOCmd9oT5wJId8I/ozPOxwRFfRy73xJD7n6P0=; b=3vDweOD0G9Jr2+ xDBBfvAkg7aOBg/vKm3cNogMKXjw/3dkMEoP1s09yDgov1ZTyL/nX46+KimXxfGO96PREfZvU3bd9 B7bWdNQnKPsEZCFAEYJxxlU1z+IajoK6fSmG93oKK2G3L2sKDTdTSGITM3843qT+2T28PwcwDfiJ5 Ki8Rp1kPlRx+gqPA5Q/umawgEKQb6DveUjimU7zrN0f7yWCIKoqx3af9El9yaN91UmSASPPYnt6nm mcPDO7EAHWRY/WaihwQ+LrEty3Dqke4MnI4Hetnbj5FcdDfW7pY8f/s8kXPwT3VrCMYg+jrZdoiOC eA3b8b0MTUzIjzesMR1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ood2t-003x1f-0r; Sat, 29 Oct 2022 04:02:07 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ood2p-003wxH-MF for linux-arm-kernel@lists.infradead.org; Sat, 29 Oct 2022 04:02:05 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0E041B82D97; Sat, 29 Oct 2022 04:02:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C1E7C433D6; Sat, 29 Oct 2022 04:01:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667016120; bh=dHLI7VViNYscanQl9SvMuia8DO1jkd5HHzk1mdYw0DU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AZgBQW3EH7RsIdxqdwRWf2NpFTEUffEIjPkdwzUHeCI6GigAJ0fFY2THiw/nF+uz4 o35sQ7+VYudYOl13zw9OBKwrEvug2xlNH+UR2DbqqhbYp8CgPS9XXNOw282w2e+tzc C0qFdvpVOSOHT7nQSJAgdCGT3CfnObTBZelRV56dqkA9rJfGqBOU9Q/INkKffUAJ65 matiZBmWSWp48gnUoeljk4yJBc/bJI+4zLUAxYwYYs5gOuE+7dbn4IB9WFvleLE01e gYCJYixIIfiTGiStpIpHaNYqX2EviFtqaF3cMB6RcweeyzsRl5c5SkCoq1+BQt/zU8 DUHO2To8S+4Gw== Date: Sat, 29 Oct 2022 12:01:53 +0800 From: Shawn Guo To: Alexander Stein Cc: Rob Herring , Krzysztof Kozlowski , Sascha Hauer , Fabio Estevam , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/1] arm64: dts: freescale: Add PWM fan support Message-ID: <20221029040153.GM125525@dragon> References: <20221018093341.2581862-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221018093341.2581862-1-alexander.stein@ew.tq-group.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221028_210204_043711_AB3A24A2 X-CRM114-Status: GOOD ( 21.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 18, 2022 at 11:33:41AM +0200, Alexander Stein wrote: > This adds the support for optional PWM fan 422J/2HP. > > Signed-off-by: Alexander Stein Board name should be specified in the patch subject to tell this is a board specific change, maybe something like `arm64: dts: mba8mpxl: ...`? Shawn > --- > Now with inverted polarity support for pwm-fan in place, add PWM fan DT > nodes for TQMa8MPQL + MBa8MPxL. As this is optional, it's disabled by > default. This is based on next-20221018. > > Note: This device needs 'pwm1_enable' set to 3. E.g. using udev rule: > SUBSYSTEM=="hwmon", DRIVERS=="pwm-fan", ATTR{pwm1_enable}="3" > > .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 76 +++++++++++++++++++ > 1 file changed, 76 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts > index 7a32379cd006..ffd117f17bbe 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts > @@ -55,6 +55,21 @@ clk_xtal25: clk-xtal25 { > clock-frequency = <25000000>; > }; > > + fan0: pwm-fan { > + compatible = "pwm-fan"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pwmfan>; > + fan-supply = <®_pwm_fan>; > + #cooling-cells = <2>; > + /* typical 25 kHz -> 40.000 nsec */ > + pwms = <&pwm3 0 40000 PWM_POLARITY_INVERTED>; > + cooling-levels = <0 32 64 128 196 240>; > + pulses-per-revolution = <2>; > + interrupt-parent = <&gpio5>; > + interrupts = <18 IRQ_TYPE_EDGE_FALLING>; > + status = "disabled"; > + }; > + > gpio-keys { > compatible = "gpio-keys"; > pinctrl-names = "default"; > @@ -115,6 +130,18 @@ display: display { > status = "disabled"; > }; > > + reg_pwm_fan: regulator-pwm-fan { > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_regpwmfan>; > + regulator-name = "FAN_PWR"; > + regulator-min-microvolt = <12000000>; > + regulator-max-microvolt = <12000000>; > + gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + vin-supply = <®_vcc_12v0>; > + }; > + > reg_usdhc2_vmmc: regulator-usdhc2 { > compatible = "regulator-fixed"; > pinctrl-names = "default"; > @@ -172,6 +199,47 @@ linux,cma { > linux,cma-default; > }; > }; > + > + thermal-zones { > + soc-thermal { > + trips { > + soc_active0: trip-active0 { > + temperature = <40000>; > + hysteresis = <5000>; > + type = "active"; > + }; > + > + soc_active1: trip-active1 { > + temperature = <48000>; > + hysteresis = <3000>; > + type = "active"; > + }; > + > + soc_active2: trip-active2 { > + temperature = <60000>; > + hysteresis = <10000>; > + type = "active"; > + }; > + }; > + > + cooling-maps { > + map1 { > + trip = <&soc_active0>; > + cooling-device = <&fan0 1 1>; > + }; > + > + map2 { > + trip = <&soc_active1>; > + cooling-device = <&fan0 2 2>; > + }; > + > + map3 { > + trip = <&soc_active2>; > + cooling-device = <&fan0 3 3>; > + }; > + }; > + }; > + }; > }; > > &ecspi1 { > @@ -725,10 +793,18 @@ pinctrl_pwm3: pwm3grp { > fsl,pins = ; > }; > > + pinctrl_pwmfan: pwmfangrp { > + fsl,pins = ; /* FAN RPM */ > + }; > + > pinctrl_reg12v0: reg12v0grp { > fsl,pins = ; /* VCC12V enable */ > }; > > + pinctrl_regpwmfan: regpwmfangrp { > + fsl,pins = ; > + }; > + > /* X61 */ > pinctrl_uart1: uart1grp { > fsl,pins = , > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel