[U-Boot] [PATCH V2 4/4] imx: imx8dx/qxp: enable thermal

2019-07-20 Thread sbabic
> Add thermal dts node
> Enable thermal in defconfig
> Signed-off-by: Peng Fan 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH V2 4/4] imx: imx8dx/qxp: enable thermal

2019-05-05 Thread Peng Fan
Add thermal dts node
Enable thermal in defconfig

Signed-off-by: Peng Fan 
---

V2: None

 arch/arm/dts/fsl-imx8dx.dtsi  | 56 +++
 configs/imx8qxp_mek_defconfig |  2 ++
 2 files changed, 58 insertions(+)

diff --git a/arch/arm/dts/fsl-imx8dx.dtsi b/arch/arm/dts/fsl-imx8dx.dtsi
index 715abb413d..4fc87a9fc8 100644
--- a/arch/arm/dts/fsl-imx8dx.dtsi
+++ b/arch/arm/dts/fsl-imx8dx.dtsi
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 
 / {
model = "Freescale i.MX8DX";
@@ -543,6 +544,61 @@
power-domains = <_conn_enet1>;
status = "disabled";
};
+
+   tsens: thermal-sensor {
+   compatible = "nxp,imx8qxp-sc-tsens";
+   /* number of the temp sensor on the chip */
+   tsens-num = <2>;
+   #thermal-sensor-cells = <1>;
+   };
+
+   thermal_zones: thermal-zones {
+   /* cpu thermal */
+   cpu-thermal0 {
+   polling-delay-passive = <250>;
+   polling-delay = <2000>;
+   /*the slope and offset of the temp sensor */
+   thermal-sensors = < 0>;
+   trips {
+   cpu_alert0: trip0 {
+   temperature = <107000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   cpu_crit0: trip1 {
+   temperature = <127000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   cooling-maps {
+   map0 {
+   trip = <_alert0>;
+   cooling-device =
+   <_0 THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
+   };
+   };
+   };
+
+   drc-thermal0 {
+   polling-delay-passive = <250>;
+   polling-delay = <2000>;
+   thermal-sensors = < 1>;
+   status = "disabled";
+   trips {
+   drc_alert0: trip0 {
+   temperature = <107000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   drc_crit0: trip1 {
+   temperature = <127000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+   };
 };
 
 _0 {
diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig
index 2fb2fdf7ff..6101f62087 100644
--- a/configs/imx8qxp_mek_defconfig
+++ b/configs/imx8qxp_mek_defconfig
@@ -74,5 +74,7 @@ CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_SPL_DM_REGULATOR_GPIO=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
+CONFIG_DM_THERMAL=y
+CONFIG_IMX_SCU_THERMAL=y
 CONFIG_SPL_TINY_MEMSET=y
 # CONFIG_EFI_LOADER is not set
-- 
2.16.4

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot