> -----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 ---
- Subject: [EXT] Re: Ask for help about cooling device map
- From: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
- Date: Mon, 22 Apr 2019 08:13:23 +0000
- In-reply-to: <VI1PR04MB43334F646A71A0575CAB7C03F3220@VI1PR04MB4333.eurprd04.prod.outlook.com>
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 ---