RE: [EXT] Re: [PATCH v6] arm64: dts: ls1088a: add one more thermal zone node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Shawn Guo <shawnguo@xxxxxxxxxx>
> Sent: 2019年5月10日 11:14
> To: Andy Tang <andy.tang@xxxxxxx>
> Cc: Leo Li <leoyang.li@xxxxxxx>; robh+dt@xxxxxxxxxx;
> mark.rutland@xxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
> devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> linux-pm@xxxxxxxxxxxxxxx; daniel.lezcano@xxxxxxxxxx; rui.zhang@xxxxxxxxx;
> edubezval@xxxxxxxxx
> Subject: [EXT] Re: [PATCH v6] arm64: dts: ls1088a: add one more thermal
> zone node
> 
> Caution: EXT Email
> 
> On Tue, Apr 23, 2019 at 10:25:07AM +0800, Yuantian Tang wrote:
> > Ls1088a has 2 thermal sensors, core cluster and SoC platform. Core
> > cluster sensor is used to monitor the temperature of core and SoC
> > platform is for platform. The current dts only support the first sensor.
> > This patch adds the second sensor node to dts to enable it.
> >
> > Signed-off-by: Yuantian Tang <andy.tang@xxxxxxx>
> > ---
> > v6:
> >         - add cooling device map to cpu0-7 in platform node.
I like to explain a little. I think it makes sense that multiple thermal zone map to same cooling device. 
In this way, no matter which thermal zone raises a temp alarm, it can call cooling device to chill out.
I also asked cpufreq maintainer about the cooling map issue, he think it would be fine.
I have tested and no issue found. 

Daniel, what's your thought?

Thanks,
Andy
> 
> @Daniel, are you fine with this version?
> 
> Shawn
--- Begin Message ---
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.



On 22-04-19, 07:09, Andy Tang wrote:
> Hi Viresh,
>
> Sorry to bother you. I have a question, hope I can get you help.
> Here it is:
>
> I want to add multiple "Thermal Zone" support in dts ( driver is ready).
> The final dts looks like below:
>
>         thermal-zones {
>                 cpu_thermal: cpu-thermal {
>                         polling-delay-passive = <1000>;
>                         polling-delay = <5000>;
>                         thermal-sensors = <&tmu 0>;
>
>                         trips {
>                                 ccu_alert: ccu-alert {
>                                         temperature = <85000>;
>                                         hysteresis = <2000>;
>                                         type = "passive";
>                                 };
>                                 ccu_crit: ccu-crit {
>                                         temperature = <95000>;
>                                         hysteresis = <2000>;
>                                         type = "critical";
>                         cooling-maps {
>                                 map0 {
>                                         trip = <&ccu_alert>;
>                                         cooling-device =
>                                                 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>                                 };
>                         };
>                 };
>                 platform {
>                         polling-delay-passive = <1000>;
>                         polling-delay = <5000>;
>                         thermal-sensors = <&tmu 1>;
>                         trips {
>                                 plt_alert: plt-alert {
>                                         temperature = <85000>;
>                                         hysteresis = <2000>;
>                                         type = "passive";
>                         };
>                                 plt_crit: plt-crit {
>                                         temperature = <95000>;
>                                         hysteresis = <2000>;
>                                         type = "critical";
>                                 };
>                         };
>                         cooling-maps {
>                                 map0 {
>                                         trip = <&plt_alert>;
>                                         cooling-device =
>                                                 <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>                                                 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>                         }
> }
>
> Here we have 2 thermal zones, but both map cpu0-7 as cooling device.  I have tested and didn't find any issues.
> My query is: is it allowed to map same device as "cooling device" to more than one "thermal zone"?

That should be fine IMO.

--
viresh

--- End Message ---

[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux