[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PH7PR20MB4962FF8B101A968B38565827BBF32@PH7PR20MB4962.namprd20.prod.outlook.com>
Date: Fri, 31 May 2024 07:47:34 +0800
From: Inochi Amaoto <inochiama@...look.com>
To: Haylen Chu <heylenay@...look.com>,
"Rafael J. Wysocki" <rafael@...nel.org>, Daniel Lezcano <daniel.lezcano@...aro.org>,
Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Chen Wang <unicorn_wang@...look.com>, Inochi Amaoto <inochiama@...look.com>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Jisheng Zhang <jszhang@...nel.org>
Cc: linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org
Subject: Re: [PATCH 2/3] riscv: dts: sophgo: cv18xx: Add sensor device and
thermal zone
On Thu, May 30, 2024 at 01:48:26PM GMT, Haylen Chu wrote:
> Add common sensor device and thermal zones for Sophgo CV18xx SoCs.
>
> Signed-off-by: Haylen Chu <heylenay@...look.com>
> ---
> arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 36 ++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi
> index 891932ae470f..dfb4bb6eb319 100644
> --- a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi
> +++ b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi
> @@ -310,5 +310,41 @@ clint: timer@...00000 {
> reg = <0x74000000 0x10000>;
> interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
> };
> +
> + soc_temp: thermal-sensor@...0000 {
> + compatible = "sophgo,cv180x-thermal";
> + reg = <0x30e0000 0x100>;
> + clocks = <&clk CLK_TEMPSEN>;
> + clock-names = "clk_tempsen";
> + #thermal-sensor-cells = <0>;
> + };
> + };
> +
> + thermal-zones {
> + soc-thermal-0 {
> + polling-delay-passive = <1000>;
> + polling-delay = <1000>;
> + thermal-sensors = <&soc_temp>;
> +
> + trips {
> + soc_passive: soc-passive {
> + temperature = <75000>;
> + hysteresis = <5000>;
> + type = "passive";
> + };
> +
> + soc_hot: soc-hot {
> + temperature = <85000>;
> + hysteresis = <5000>;
> + type = "hot";
> + };
> +
> + soc_critical: soc-critical {
> + temperature = <100000>;
> + hysteresis = <0>;
> + type = "critical";
> + };
> + };
> + };
> };
Move this to the cpu specific file. Different cpu should have different
thermal-zones.
> };
> --
> 2.45.1
>
Powered by blists - more mailing lists