Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp408125ybv; Thu, 20 Feb 2020 00:24:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxEefWmRo6WHh3OueLTmxxxEUFgYBd9z3MBTHefl9vpIXJbnolNoreKTsMT6pBCH/ggwhDb X-Received: by 2002:a05:6830:2110:: with SMTP id i16mr22123057otc.337.1582187050621; Thu, 20 Feb 2020 00:24:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582187050; cv=none; d=google.com; s=arc-20160816; b=pTQaZCwD9m6BfVjX4WaAnDaMynsFonASRbvIGJSqtXwouj2RGqn5k8bJdSWxNuD16X oWY6qgRfh3sKgYlftH0h/Im1KfIMGxEyuJZFAh5CDVwpcwcRrQqjH5PnEF2Nd6zul7gY MhYgnAfhIdb5NDsozb8KYyW4TmnZk9319oiYXG6ijY/STNVxEYwibvAm2aJwPPVVP8SQ vMxa0e1uV5NH0XhW1asClS0NzLYKduiW0cxzxu3izi9+70Wt2OHPpHsl7zo/qFyqWBZH 7153FtRusjHIsRBWQSdJAHkWpy5a6lg9B98aNYUBigk5FglgIBda7ByFVjzlr6+qmCE1 nLaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=LcCDI0FW3bh5hYupWizw0n8CE8i0EJTVDMM7iG1VPNw=; b=jSE24x3vOKe+hW0FAS768LFaZvNi7mlI8riR+fxPaw3nlgP+TXOrpdmex+kL8gCo/f o2WROv9ChjPoopNI8jpVgtIvfBZ+fmw/VIORafYo2iUmfS0oXfJm/OfYOElS6RIJ4fb9 LTfP0lqvlNolimxHrS9759fvUGHO/W+LY8ZF+oTspQtIaH48+dNfsByGH3KN/BTMw28L ZzRWw9zVr78YO0Hl5bNcdPbfyFt5aCm2zCstLt6T2qGAgAxOmVsVsjyAAMVP6ILwNkNu +41hsdoppB5jNNnt8Aao3qSmaopI8Xd4vBUMJt5FNEj1DVAe0DXOeQCjyUQwhFuDI2s/ x7ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l22si3111212oie.32.2020.02.20.00.23.58; Thu, 20 Feb 2020 00:24:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727158AbgBTIXr (ORCPT + 99 others); Thu, 20 Feb 2020 03:23:47 -0500 Received: from inva021.nxp.com ([92.121.34.21]:43808 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726989AbgBTIXq (ORCPT ); Thu, 20 Feb 2020 03:23:46 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C3F3E201B99; Thu, 20 Feb 2020 09:23:43 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 87D902048C7; Thu, 20 Feb 2020 09:23:28 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 31EE3402E6; Thu, 20 Feb 2020 16:23:15 +0800 (SGT) From: Anson Huang To: rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, leonard.crestez@nxp.com, daniel.baluta@nxp.com, shengjiu.wang@nxp.com, peng.fan@nxp.com, ping.bai@nxp.com, jun.li@nxp.com, bjorn.andersson@linaro.org, olof@lixom.net, vkoul@kernel.org, dinguyen@kernel.org, marcin.juszkiewicz@linaro.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH RESEND 4/4] arm64: dts: imx8mm: Add thermal zone support Date: Thu, 20 Feb 2020 16:17:26 +0800 Message-Id: <1582186646-22096-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1582186646-22096-1-git-send-email-Anson.Huang@nxp.com> References: <1582186646-22096-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add thermal zone and tmu node to support i.MX8MM thermal driver, ONLY cpu thermal zone is supported, and cpu cooling is also added. Signed-off-by: Anson Huang --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index b3d0b29..e438095 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -68,6 +68,7 @@ nvmem-cells = <&cpu_speed_grade>; nvmem-cell-names = "speed_grade"; cpu-idle-states = <&cpu_pd_wait>; + #cooling-cells = <2>; }; A53_1: cpu@1 { @@ -80,6 +81,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; cpu-idle-states = <&cpu_pd_wait>; + #cooling-cells = <2>; }; A53_2: cpu@2 { @@ -92,6 +94,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; cpu-idle-states = <&cpu_pd_wait>; + #cooling-cells = <2>; }; A53_3: cpu@3 { @@ -104,6 +107,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; cpu-idle-states = <&cpu_pd_wait>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 { @@ -204,6 +208,38 @@ arm,no-tick-in-suspend; }; + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu>; + trips { + cpu_alert0: trip0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit0: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = + <&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + usbphynop1: usbphynop1 { compatible = "usb-nop-xceiv"; clocks = <&clk IMX8MM_CLK_USB_PHY_REF>; @@ -363,6 +399,13 @@ gpio-ranges = <&iomuxc 0 119 30>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mm-tmu"; + reg = <0x30260000 0x10000>; + clocks = <&clk IMX8MM_CLK_TMU_ROOT>; + #thermal-sensor-cells = <0>; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mm-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>; -- 2.7.4