From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-244107.protonmail.ch (mail-244107.protonmail.ch [109.224.244.107]) (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 75A211E49F; Wed, 20 Aug 2025 21:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=109.224.244.107 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755724711; cv=none; b=e4uthysS5IEp8g0g84mvnXscG8gctd1EczKPD9yOatv7cniIjKIBvsgcmrwV33sIivkqNgtMRh9U2miKeErkpPrJStlDjprDojaqvfWNEV69Zng1rzbsZMSNbV70glQpYH6Slvl15ykquexFNrIt78svuNz4ZoYh4pg9iDIcHN8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755724711; c=relaxed/simple; bh=U8X+7JyRirW1YLSFkGAfUxC6jQP6XhgmQavoB6gUt1k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H2CMQLy1SXWvQD4vdYGsR8QNgqypYlNtd0ngrkYiV5K3BX2wAicRgvjFi2bXVpXEKcqVLi7GiPeUHvhQxzGkf7iXTVpqMi0hzycKRuIwRFIFH5dhyZpzi8Lf2qVfXNi+SklKIyRiGnpMq3VzIilCQHbCeQHtLhXf8WC+jTi8r0o= 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=mRLvGFFV; arc=none smtp.client-ip=109.224.244.107 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="mRLvGFFV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=weathered-steel.dev; s=protonmail3; t=1755724706; x=1755983906; bh=JSAu0mbSO2Oo3ckHfGpNPMrfRcVmm1IBIVSUbO2haro=; h=Date:From:To:Cc:Subject:Message-ID:References:In-Reply-To:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=mRLvGFFVkHAjPY6dW6j4TC3cu15UDw7jn+8RL+wwYwFZnPibfP9rIdPa5JoSZqdeW hTwbO0p0XfJIKGVSKxmHOvoxIF5tgYrdKTw+wA5DVRCApljOBOZiHvHn5nd79Q4Xps ifGPh8vOhsgomfFKt0jegcZgLAuYJZmNeLAWlI96R3J6sBOzhVUCNc0LY3UKKkLggO SQNWmv3GezO8JbPcImZhi80xrGooKo2tKBq1NaMkG4D7r3BuSzwGbgkbdrRerZgJNV VUbbzhV+5ABBsao24jlN85kZOkSq4tRBTNL8D8h7UrlAklZtkQ7c+VoUnwdqrh9IPF thz5dnIvz+tmQ== X-Pm-Submission-Id: 4c6fSc1kpbz2ScPD Date: Wed, 20 Aug 2025 21:18: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 v14 7/7] riscv: dts: thead: Add PWM fan and thermal control Message-ID: References: <20250820-rust-next-pwm-working-fan-for-sending-v14-0-df2191621429@samsung.com> <20250820-rust-next-pwm-working-fan-for-sending-v14-7-df2191621429@samsung.com> Precedence: bulk X-Mailing-List: rust-for-linux@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: <20250820-rust-next-pwm-working-fan-for-sending-v14-7-df2191621429@samsung.com> On Wed, Aug 20, 2025 at 10:35:42AM +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 > 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