From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Fri, 12 Apr 2019 07:55:09 +0000 Subject: [U-Boot] [PATCH 7/8] imx: imx8dx/qxp: enable thermal In-Reply-To: <20190412080741.32412-1-peng.fan@nxp.com> References: <20190412080741.32412-1-peng.fan@nxp.com> Message-ID: <20190412080741.32412-7-peng.fan@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add thermal dts node Enable thermal in defconfig Signed-off-by: Peng Fan --- 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 3b1a2a20e3..1c163afdcd 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"; @@ -489,6 +490,61 @@ power-domains = <&pd_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 = <&tsens 0>; + trips { + cpu_alert0: trip0 { + temperature = <107000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit0: trip1 { + temperature = <127000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = + <&A35_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + drc-thermal0 { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tsens 1>; + status = "disabled"; + trips { + drc_alert0: trip0 { + temperature = <107000>; + hysteresis = <2000>; + type = "passive"; + }; + drc_crit0: trip1 { + temperature = <127000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; }; &A35_0 { diff --git a/configs/imx8qxp_mek_defconfig b/configs/imx8qxp_mek_defconfig index 14e9da386a..f0da489645 100644 --- a/configs/imx8qxp_mek_defconfig +++ b/configs/imx8qxp_mek_defconfig @@ -73,5 +73,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