[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGb2v65Qv6_KQ_MPg0u37P+o5gnnQWhbifOrY6g5FiWvnadmiw@mail.gmail.com>
Date: Wed, 18 Dec 2019 12:32:31 +0800
From: Chen-Yu Tsai <wens@...e.org>
To: Vasily Khoruzhick <anarsoul@...il.com>
Cc: Yangtao Li <tiny.windzz@...il.com>,
Zhang Rui <rui.zhang@...el.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Amit Kucheria <amit.kucheria@...durent.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Maxime Ripard <mripard@...nel.org>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"open list:THERMAL" <linux-pm@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Ondřej Jirman <megous@...ous.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 6/7] arm64: dts: allwinner: h6: Add thermal sensor and
thermal zones
On Wed, Dec 18, 2019 at 12:22 PM Vasily Khoruzhick <anarsoul@...il.com> wrote:
>
> From: Ondrej Jirman <megous@...ous.com>
>
> There are two sensors, one for CPU, one for GPU.
>
> Signed-off-by: Ondrej Jirman <megous@...ous.com>
> Signed-off-by: Vasily Khoruzhick <anarsoul@...il.com>
> ---
> arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 33 ++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> index 29824081b43b..cdcb1a36301a 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> @@ -11,6 +11,7 @@
> #include <dt-bindings/reset/sun50i-h6-ccu.h>
> #include <dt-bindings/reset/sun50i-h6-r-ccu.h>
> #include <dt-bindings/reset/sun8i-de2.h>
> +#include <dt-bindings/thermal/thermal.h>
>
> / {
> interrupt-parent = <&gic>;
> @@ -233,6 +234,12 @@ dma: dma-controller@...2000 {
> sid: efuse@...6000 {
> compatible = "allwinner,sun50i-h6-sid";
> reg = <0x03006000 0x400>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + ths_calibration: thermal-sensor-calibration@14 {
> + reg = <0x14 0x6>;
Nit: my preference is to use words as the smallest increment, so this
would have a size of 8 instead of 6. Same goes for the A64 dts.
AFAICT this doesn't impact the driver in any way.
ChenYu
> + };
> };
>
> watchdog: watchdog@...90a0 {
> @@ -856,5 +863,31 @@ r_i2c: i2c@...1400 {
> #address-cells = <1>;
> #size-cells = <0>;
> };
> +
> + ths: thermal-sensor@...0400 {
> + compatible = "allwinner,sun50i-h6-ths";
> + reg = <0x05070400 0x100>;
> + interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ccu CLK_BUS_THS>;
> + clock-names = "bus";
> + resets = <&ccu RST_BUS_THS>;
> + nvmem-cells = <&ths_calibration>;
> + nvmem-cell-names = "calibration";
> + #thermal-sensor-cells = <1>;
> + };
> + };
> +
> + thermal-zones {
> + cpu-thermal {
> + polling-delay-passive = <0>;
> + polling-delay = <0>;
> + thermal-sensors = <&ths 0>;
> + };
> +
> + gpu-thermal {
> + polling-delay-passive = <0>;
> + polling-delay = <0>;
> + thermal-sensors = <&ths 1>;
> + };
> };
> };
> --
> 2.24.1
>
Powered by blists - more mailing lists