[PATCH v1] thermal: imx: Make trip point offset configurable

Daniel Lezcano daniel.lezcano at linaro.org
Tue May 24 06:17:24 PDT 2022


Hi Francesco,


On 24/05/2022 12:07, Francesco Dolcini wrote:
> On Tue, May 24, 2022 at 10:35:14AM +0200, Marco Felsch wrote:
>> On 22-05-23, Francesco Dolcini wrote:
>>> On Wed, May 18, 2022 at 12:10:34PM +0200, Daniel Lezcano wrote:
>>>> It would have been easier if the imx6/7 platforms were defining the thermal
>>>> zones in their DT ...
>>
>> After checking the driver I completely agree with you... But this would
>> need much more rework.
>>
>>> Marco, Lucas,
>>> What about a &tempon { fsl,tempmon-critical-offset=<0>; } dt property?
>>
>> I would not introduce a special binding for it. Instead I would add the
>> support to parse the already exisiting bindings so the new-tempmon node
>> would look like:
>>
>> tempmon: tempmon {
>>          compatible = "fsl,imx6q-tempmon";
>>          interrupt-parent = <&gpc>;
>>          interrupts = <0 49 IRQ_TYPE_LEVEL_HIGH>;
>>          fsl,tempmon = <&anatop>;
>>          nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>;
>>          nvmem-cell-names = "calib", "temp_grade";
>>          clocks = <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
>>          #thermal-sensor-cells = <0>;
>>
>> 	commercial-thermal {
>> 		trips {
>> 			commercial_trip_passive: trip-point0 {
>> 				temperature = <85000>;
>> 				type = "passive";
>> 			};
>> 			commercial_trip_crit: trip-point1 {
>> 				temperature = <90000>;
>> 				type = "critical";
>> 			};
>> 		};
>> 	};
>>
>> 	extended-commercial-thermal {
>> 		trips {
>> 			ecommercial_trip_passive: trip-point0 {
>> 				temperature = <95000>;
>> 				type = "passive";
>> 			};
>> 			ecommercial_trip_crit: trip-point1 {
>> 				temperature = <100000>;
>> 				type = "critical";
>> 			};
>> 		};
>> 	};
>>
>> 	industrial-thermal { };
>> 	automotive-thermal { };
>> };
>>
>> That way we can reuse the existing dt definitions and if no *-thermal
>> child device nodes exist we can keep the original logic.
> 
> Good for me, it's more work, of course, but if this is the way to do it
> let it be.
> Daniel: I'd like to have an ack from you before implementing this.

It sounds like a correct approach, especially that is back compatible 
with old DTs.




-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog



More information about the linux-arm-kernel mailing list