From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx-out1.startmail.com (mx-out1.startmail.com [145.131.90.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CE1E3093BD; Wed, 1 Oct 2025 21:00:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=145.131.90.139 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759352425; cv=none; b=gK+1TfZ8CkWsCzLMgRb7GEO7vy0SiqEyqmHhJG4VOsyPe39hpIqPGVpjLS0bGAMyjqiDZhPiVZuxlJ8Bei+iOgUaCXB8zbjBhcQwYzC4VoLsngOvqZ8+zG5PCHttCI0gB4gxzMpJjMY70HSztZcEsH+HWLDTqXEmY0an3btMuSE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759352425; c=relaxed/simple; bh=yk+mN31wNVhjALTh/hyQr0hUeTRsG/yDmF37onFFrvg=; h=Date:From:To:Cc:Subject:Message-ID:References:Mime-Version: Content-Type:Content-Disposition:In-Reply-To; b=o5BSONVqd9CH5VPsf+u9bRFZBfRKxQOm1GxnxePhLCoo9Gv2DiTWXV1zvOvvesOjh3+HWGG09BrMUsrlbOPyCdWI8lxIKhDQbv0jZj22mVuqoAcVFjmemSqOcE8fshd6V+JeT5ZrOQNe6y3KUuXPX7uXdIrFUurEsKpdYCxaaBk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weathered-steel.dev; spf=pass smtp.mailfrom=weathered-steel.dev; dkim=pass (2048-bit key) header.d=weathered-steel.dev header.i=@weathered-steel.dev header.b=YldTa0CJ; arc=none smtp.client-ip=145.131.90.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weathered-steel.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weathered-steel.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=weathered-steel.dev header.i=@weathered-steel.dev header.b="YldTa0CJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weathered-steel.dev; s=startmail1; t=1759352421; bh=omvTbOOO6blAUUDT41IFfrpds2YN8KtJB4Y6/99fD5w=; h=Date:From:To:Subject:Message-ID:References:Mime-Version: Content-Type:Content-Disposition:In-Reply-To:From:Subject:To:Date: Sender:Content-Type:Content-Transfer-Encoding:Content-Disposition: Mime-Version:Reply-To:In-Reply-To:References:Message-Id: List-Unsubscribe:List-Unsubscribe-Post:Autocrypt; b=YldTa0CJfdILoG1R5UcB0m6FtP3D4DDAlJ73Y1Xuinh+ita5kCpIMX4EchAJB9aEH lAuc0FXIc54G0gW/3bKtk8k6nMbPB+bZ3qvNumahjoD0OmJ9ZJE36VCNb9cKr5kmpN GpLL4EzyVi2dflE0SOHMN8/aEVVWD5QZVKjqV5Jhqttw+bccaX7YP8jAP4HD389D5q ULlps7z09UAXJ51SOOfwrgE2RRu0lZLfroaZVOp8Pn9SjBCdLfxjKFZl+O3WrP51D6 /63Sbrlh71hKJZ4REUum7ZXVOZO0mCmEFE3keiYw+CNAD0qo2jhIP9sqwUt4k3SJQN DZsXzwQuDjGug== Date: Wed, 1 Oct 2025 21:00:18 +0000 From: Elle Rhumsaa To: Michal Wilczynski Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Marek Szyprowski , Benno Lossin , Michael Turquette , Drew Fustini , Daniel Almeida , linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org Subject: Re: [PATCH v15 7/7] riscv: dts: thead: Add PWM fan and thermal control Message-ID: References: <20250930-rust-next-pwm-working-fan-for-sending-v15-0-5661c3090877@samsung.com> <20250930-rust-next-pwm-working-fan-for-sending-v15-7-5661c3090877@samsung.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250930-rust-next-pwm-working-fan-for-sending-v15-7-5661c3090877@samsung.com> On Tue, Sep 30, 2025 at 02:20:38PM +0200, Michal Wilczynski wrote: > Add Device Tree nodes to enable a PWM controlled fan and it's associated > thermal management for the Lichee Pi 4A board. > > This enables temperature-controlled active cooling for the Lichee Pi 4A > board based on SoC temperature. > > Reviewed-by: Drew Fustini > Tested-by: Drew Fustini > Reviewed-by: Elle Rhumsaa > Signed-off-by: Michal Wilczynski > --- > arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts | 67 +++++++++++++++++++++++ > 1 file changed, 67 insertions(+) > > diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts > index 4020c727f09e8e2286fdc7fecd79dbd8eba69556..c58c2085ca92a3234f1350500cedae4157f0c35f 100644 > --- a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts > +++ b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts > @@ -28,9 +28,76 @@ aliases { > chosen { > stdout-path = "serial0:115200n8"; > }; > + > + thermal-zones { > + cpu-thermal { > + polling-delay = <1000>; > + polling-delay-passive = <1000>; > + thermal-sensors = <&pvt 0>; > + > + trips { > + fan_config0: fan-trip0 { > + temperature = <39000>; > + hysteresis = <5000>; > + type = "active"; > + }; > + > + fan_config1: fan-trip1 { > + temperature = <50000>; > + hysteresis = <5000>; > + type = "active"; > + }; > + > + fan_config2: fan-trip2 { > + temperature = <60000>; > + hysteresis = <5000>; > + type = "active"; > + }; > + }; > + > + cooling-maps { > + map-active-0 { > + cooling-device = <&fan 1 1>; > + trip = <&fan_config0>; > + }; > + > + map-active-1 { > + cooling-device = <&fan 2 2>; > + trip = <&fan_config1>; > + }; > + > + map-active-2 { > + cooling-device = <&fan 3 3>; > + trip = <&fan_config2>; > + }; > + }; > + }; > + }; > + > + fan: pwm-fan { > + pinctrl-names = "default"; > + pinctrl-0 = <&fan_pins>; > + compatible = "pwm-fan"; > + #cooling-cells = <2>; > + pwms = <&pwm 1 10000000 0>; > + cooling-levels = <0 66 196 255>; > + }; > + > }; > > &padctrl0_apsys { > + fan_pins: fan-0 { > + pwm1-pins { > + pins = "GPIO3_3"; /* PWM1 */ > + function = "pwm"; > + bias-disable; > + drive-strength = <25>; > + input-disable; > + input-schmitt-disable; > + slew-rate = <0>; > + }; > + }; > + > uart0_pins: uart0-0 { > tx-pins { > pins = "UART0_TXD"; > > -- > 2.34.1 > Reviewed-by: Elle Rhumsaa