Message ID | 20230403105052.426135-3-cristian.ciocaltea@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2211421vqo; Mon, 3 Apr 2023 04:02:20 -0700 (PDT) X-Google-Smtp-Source: AKy350ZlaNw50xk7aE4elpJzMpUlHM8BS0UD8OgIa7lBgFQtkj7W0u5Rcme9SVlmAjqaebhMX1bd X-Received: by 2002:a17:906:9f1a:b0:947:405a:955f with SMTP id fy26-20020a1709069f1a00b00947405a955fmr13107404ejc.31.1680519740239; Mon, 03 Apr 2023 04:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680519740; cv=none; d=google.com; s=arc-20160816; b=Ws3SHnyf10kBHJm772D6+oab/OX5HlsCNvwL9xjKqS3mMMUziKKTPhA/HAVDikY1d+ X4s4YyjLEsNFZUCiMEtYl2TaCObqsd4jWPFgsxb9Nqxwr3lHul0vcyUajklcGQLciwBi EMGv8VOBoBEew2zXrqTfb0605F2sCGlxF00+4YZI0THb1kakTgVFrMmMplJSElwhe2yC lhVCueimEvOKb/2qXLtWcuXI0xxmrHU8VDNZ1l/c18spQlt1I9qZ34l5pA0DSsdlug/y 2sRww9uPeZiM+lGHDlw+PZEYd0008oIrcsRlFU1MjSF6zWvWNPGS6k8o9mB/TODc3uNU YI1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=othrvWLOseR2iNmEDqc4+hmmB5BmhnCk3/NZ3yg0TFI=; b=N6JJ2ZUVunXOLA9kjYPJ3ES3+plrK2jJnLMcjE27gpdubIkyArrUe0ZQ/9kDfBSSsF H3arDWwVClxWhszoPg+TN4VBL0FGCSxH6o7Uq/CJKJjzr4smifEtOy3/y8Ce0LByeT6u QsRASIGvx1SGDH813pEAzoAA3ylbsTWzF7pmGc/BSmWu+y5GJH28JCsTpfYudirSJLBl pxbuiSyFtJjoQ0BK0x1vVmryUTzCZCQWnqDtHnUW1dtQPjmXbKBMZepMfIpkYEVdMvYJ D8IIq6yXkP7UPtc1wjwgxKiQwA2a268hNu84DG2BDjaPq8F+NUBhUCRk55+6COHMtYJ6 X1/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fGAnFpQP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q24-20020a170906389800b008d4d102a7bcsi61660ejd.216.2023.04.03.04.01.56; Mon, 03 Apr 2023 04:02:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fGAnFpQP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232059AbjDCKva (ORCPT <rfc822;zwp10758@gmail.com> + 99 others); Mon, 3 Apr 2023 06:51:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231946AbjDCKvE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Apr 2023 06:51:04 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12D1F8690; Mon, 3 Apr 2023 03:51:04 -0700 (PDT) Received: from localhost (unknown [188.27.34.213]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id BD0D16602040; Mon, 3 Apr 2023 11:51:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680519062; bh=97JLXa1qL1Q6tXE1ABA2Qq1JziV8s4pj8cdLUcAzWyc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fGAnFpQPICXfoOONO/XSV8hsItw5JzWd7biiPsvvPzz1ud77H2sO0uf/KgHo5bGiR jiuWRlGZdIf41QPiW7LDytgPTzv1m//aW7160vN9iZFceJP1VOlueBcyFK1kZ5tSbI rr/VlFchlyQXHHo02/gNsFas7tme0//yhZwTqYT2f3Rjw0RAtePB7vMRMaLwa/STkI I9jBXGxPQ7gXsJwGcyWd2eJs/cfoguSfBRbmG7TGzXt0giy7c1mmZ1uhwEt62N4/qj C3KT0BHEbOdXP+3OQhLZFomKC0BjiyhoTisdjBsj2o4wlackXczgoCOKzSi5f/LYPm 4U+SDeM+e3JtQ== From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> To: Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Heiko Stuebner <heiko@sntech.de> Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@collabora.com Subject: [PATCH 2/2] arm64: dts: rockchip: rk3588-rock-5b: Add pwm-fan Date: Mon, 3 Apr 2023 13:50:52 +0300 Message-Id: <20230403105052.426135-3-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403105052.426135-1-cristian.ciocaltea@collabora.com> References: <20230403105052.426135-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762152666805829869?= X-GMAIL-MSGID: =?utf-8?q?1762152666805829869?= |
Series |
Add PWM fan support to Rock 5B board
|
|
Commit Message
Cristian Ciocaltea
April 3, 2023, 10:50 a.m. UTC
Add the necessary DT changes for the Rock 5B board to enable support for
the PWM controlled heat sink fan.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
Comments
On Mon, Apr 03, 2023 at 01:50:52PM +0300, Cristian Ciocaltea wrote: > Add the necessary DT changes for the Rock 5B board to enable support for > the PWM controlled heat sink fan. Honest question, but should we be adding this to the board file if not every device has a PWM fan (they all have the socket for the fan, but not the fan)? For example I have a passively cooled case that doesn't include a fan. Thank you, Chris Morgan. > > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> > --- > arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > index 95805cb0adfa..bd74d9da2c17 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > @@ -17,6 +17,14 @@ chosen { > stdout-path = "serial2:1500000n8"; > }; > > + fan: pwm-fan { > + compatible = "pwm-fan"; > + cooling-levels = <0 95 145 195 255>; > + fan-supply = <&vcc5v0_sys>; > + pwms = <&pwm1 0 50000 0>; > + #cooling-cells = <2>; > + }; > + > vcc5v0_sys: vcc5v0-sys-regulator { > compatible = "regulator-fixed"; > regulator-name = "vcc5v0_sys"; > @@ -27,6 +35,10 @@ vcc5v0_sys: vcc5v0-sys-regulator { > }; > }; > > +&pwm1 { > + status = "okay"; > +}; > + > &sdhci { > bus-width = <8>; > no-sdio; > -- > 2.40.0 >
On Mon, Apr 3, 2023 at 1:56 PM Chris Morgan <macroalpha82@gmail.com> wrote: > > On Mon, Apr 03, 2023 at 01:50:52PM +0300, Cristian Ciocaltea wrote: > > Add the necessary DT changes for the Rock 5B board to enable support for > > the PWM controlled heat sink fan. > > Honest question, but should we be adding this to the board file if not > every device has a PWM fan (they all have the socket for the fan, but > not the fan)? For example I have a passively cooled case that doesn't > include a fan. Active cooling should be set up to take effect before throttling. If it is there great, (especially if it has feedback), if it doesn't exist it really doesn't affect anything because the throttling will kick in as necessary. > > Thank you, > Chris Morgan. > > > > > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> > > --- > > arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > > index 95805cb0adfa..bd74d9da2c17 100644 > > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > > @@ -17,6 +17,14 @@ chosen { > > stdout-path = "serial2:1500000n8"; > > }; > > > > + fan: pwm-fan { > > + compatible = "pwm-fan"; > > + cooling-levels = <0 95 145 195 255>; > > + fan-supply = <&vcc5v0_sys>; > > + pwms = <&pwm1 0 50000 0>; > > + #cooling-cells = <2>; > > + }; > > + > > vcc5v0_sys: vcc5v0-sys-regulator { > > compatible = "regulator-fixed"; > > regulator-name = "vcc5v0_sys"; > > @@ -27,6 +35,10 @@ vcc5v0_sys: vcc5v0-sys-regulator { > > }; > > }; > > > > +&pwm1 { > > + status = "okay"; > > +}; > > + > > &sdhci { > > bus-width = <8>; > > no-sdio; > > -- > > 2.40.0 > > > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip
Am Montag, 3. April 2023, 19:56:26 CEST schrieb Chris Morgan: > On Mon, Apr 03, 2023 at 01:50:52PM +0300, Cristian Ciocaltea wrote: > > Add the necessary DT changes for the Rock 5B board to enable support for > > the PWM controlled heat sink fan. > > Honest question, but should we be adding this to the board file if not > every device has a PWM fan (they all have the socket for the fan, but > not the fan)? For example I have a passively cooled case that doesn't > include a fan. We also set up the sdmmc host without knowing if the user will plug in an sd-card ;-) . So especially in the case where there is a dedicated socket for it, as you write, we should definitly add it for the board. By the way, am I correct in thinking that patch 1 and 2 are actually independent of each other? So I'd just pick patch2 for the Rockchip tree (as we do have a text-binding) and you can handle the yaml conversion in a followup or whatever? Thanks Heiko
On 4/4/23 00:55, Heiko Stübner wrote: > Am Montag, 3. April 2023, 19:56:26 CEST schrieb Chris Morgan: >> On Mon, Apr 03, 2023 at 01:50:52PM +0300, Cristian Ciocaltea wrote: >>> Add the necessary DT changes for the Rock 5B board to enable support for >>> the PWM controlled heat sink fan. >> >> Honest question, but should we be adding this to the board file if not >> every device has a PWM fan (they all have the socket for the fan, but >> not the fan)? For example I have a passively cooled case that doesn't >> include a fan. > > We also set up the sdmmc host without knowing if the user will plug in > an sd-card ;-) . > > So especially in the case where there is a dedicated socket for it, > as you write, we should definitly add it for the board. > > By the way, am I correct in thinking that patch 1 and 2 are actually > independent of each other? So I'd just pick patch2 for the Rockchip tree > (as we do have a text-binding) and you can handle the yaml conversion > in a followup or whatever? Yes, the bindings conversion can be handled independently. Thanks, Cristian
Hi Cristian, On Mon, 2023-04-03 at 13:50 +0300, Cristian Ciocaltea wrote: > Add the necessary DT changes for the Rock 5B board to enable support for > the PWM controlled heat sink fan. > > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Christopher Obbard <chris.obbard@collabora.com> > --- > arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > index 95805cb0adfa..bd74d9da2c17 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts > @@ -17,6 +17,14 @@ chosen { > stdout-path = "serial2:1500000n8"; > }; > > + fan: pwm-fan { > + compatible = "pwm-fan"; > + cooling-levels = <0 95 145 195 255>; > + fan-supply = <&vcc5v0_sys>; > + pwms = <&pwm1 0 50000 0>; > + #cooling-cells = <2>; > + }; > + > vcc5v0_sys: vcc5v0-sys-regulator { > compatible = "regulator-fixed"; > regulator-name = "vcc5v0_sys"; > @@ -27,6 +35,10 @@ vcc5v0_sys: vcc5v0-sys-regulator { > }; > }; > > +&pwm1 { > + status = "okay"; > +}; > + > &sdhci { > bus-width = <8>; > no-sdio; > -- > 2.40.0 > >
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts index 95805cb0adfa..bd74d9da2c17 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts @@ -17,6 +17,14 @@ chosen { stdout-path = "serial2:1500000n8"; }; + fan: pwm-fan { + compatible = "pwm-fan"; + cooling-levels = <0 95 145 195 255>; + fan-supply = <&vcc5v0_sys>; + pwms = <&pwm1 0 50000 0>; + #cooling-cells = <2>; + }; + vcc5v0_sys: vcc5v0-sys-regulator { compatible = "regulator-fixed"; regulator-name = "vcc5v0_sys"; @@ -27,6 +35,10 @@ vcc5v0_sys: vcc5v0-sys-regulator { }; }; +&pwm1 { + status = "okay"; +}; + &sdhci { bus-width = <8>; no-sdio;