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

Francesco Dolcini francesco.dolcini at toradex.com
Tue May 24 03:07:28 PDT 2022


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.

Francesco




More information about the linux-arm-kernel mailing list