Re: [PATCH V7 4/4] arm64: dts: imx: add i.MX8QXP thermal support

2019-02-20 Thread Eduardo Valentin
On Wed, Feb 20, 2019 at 06:53:58AM +, Anson Huang wrote:
> Add i.MX8QXP CPU thermal zone support.
> 
> Signed-off-by: Anson Huang 
> ---
> Changes since V6:
>   - add fallback compatible string "fsl,imx-sc-thermal" according to i.MX 
> SC thermal driver
> update.
> ---
>  arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 28 
>  1 file changed, 28 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi 
> b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
> index 4c3dd95..24b03d6 100644
> --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
> @@ -10,6 +10,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  / {
>   interrupt-parent = <&gic>;
> @@ -116,6 +117,12 @@
>   rtc: rtc {
>   compatible = "fsl,imx8qxp-sc-rtc";
>   };
> +
> + tsens: thermal-sensor {
> + compatible = "fsl,imx8qxp-sc-thermal", 
> "fsl,imx-sc-thermal";
> + tsens-num = <1>;
> + #thermal-sensor-cells = <1>;
> + };
>   };
>  
>   timer {
> @@ -443,4 +450,25 @@
>   power-domains = <&pd IMX_SC_R_GPIO_7>;
>   };
>   };
> +
> + thermal_zones: thermal-zones {
> + cpu-thermal0 {
> + polling-delay-passive = <250>;
> + polling-delay = <2000>;
> + thermal-sensors = <&tsens 0>;
> + imx,sensor-resource-id = <355>;
> + trips {
> + cpu_alert0: trip0 {
> + temperature = <107000>;
> + hysteresis = <2000>;
> + type = "passive";

Please add your cooling maps for a passive trip point.

> + };
> + cpu_crit0: trip1 {
> + temperature = <127000>;
> + hysteresis = <2000>;
> + type = "critical";
> + };
> + };
> + };
> + };
>  };
> -- 
> 2.7.4
> 


[PATCH V7 4/4] arm64: dts: imx: add i.MX8QXP thermal support

2019-02-19 Thread Anson Huang
Add i.MX8QXP CPU thermal zone support.

Signed-off-by: Anson Huang 
---
Changes since V6:
- add fallback compatible string "fsl,imx-sc-thermal" according to i.MX 
SC thermal driver
  update.
---
 arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 28 
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi 
b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
index 4c3dd95..24b03d6 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 
 / {
interrupt-parent = <&gic>;
@@ -116,6 +117,12 @@
rtc: rtc {
compatible = "fsl,imx8qxp-sc-rtc";
};
+
+   tsens: thermal-sensor {
+   compatible = "fsl,imx8qxp-sc-thermal", 
"fsl,imx-sc-thermal";
+   tsens-num = <1>;
+   #thermal-sensor-cells = <1>;
+   };
};
 
timer {
@@ -443,4 +450,25 @@
power-domains = <&pd IMX_SC_R_GPIO_7>;
};
};
+
+   thermal_zones: thermal-zones {
+   cpu-thermal0 {
+   polling-delay-passive = <250>;
+   polling-delay = <2000>;
+   thermal-sensors = <&tsens 0>;
+   imx,sensor-resource-id = <355>;
+   trips {
+   cpu_alert0: trip0 {
+   temperature = <107000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   cpu_crit0: trip1 {
+   temperature = <127000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+   };
 };
-- 
2.7.4