--- 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 ---