Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp431329ybb; Fri, 3 Apr 2020 05:36:27 -0700 (PDT) X-Google-Smtp-Source: APiQypKsdgUrEeO2a/GO9+vWqpVKSg0lVxHJbZDBOvzNha2iSdPDP8RMOJcqxAD3+FRn+t8DzMYk X-Received: by 2002:a4a:d2de:: with SMTP id j30mr6427020oos.95.1585917387091; Fri, 03 Apr 2020 05:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585917387; cv=none; d=google.com; s=arc-20160816; b=yHvlhe3BPuMmtYX8utrLj8+vvOZeABds5VGBLJzYfvp/F3VSqIPz07YujOIKL761Wm 1hiERUN88gzhnnpMeAtILWAr7+qgQ/M9pImFmqg058XEF1ZtGt0TGANJobtPei+OmzIm rWj6uFUJV+YaywUqlw6ryo5mxPI9rSwGeuqbrQ+dj2cvgiD0rPvSoib6LXkVn67+voTf nckD3bVlAKAH1+kQVq+ZCQsbm/zT3OctbNEDXzaXy1puTRh9Afdo0VugKG6ZasHZHEqa TDU+cLUp31WKBl+Zr5wcs1q+QKrXrNeFY4JGIpNMcPdyiJOzWgaOvDx6LNyPay4SGYij acrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=YSXGbFvp5aGwmtQVTtrt8PuypTBcA4nodTpaPEefvKE=; b=b9Roaux6EYKOwty/V4r3rnRs6OHLp+qZbsdGlIihrjKisZnKZZWFDXQ2lGLyAD8MdV dPqj2GHhVtb3gbLqfKZmlUsLjidWSjtGtuU8KedCkCJZLNxIYRE1CaKGLT8H1QvrMlwm o0uAWVK99Hq+eP5djP/xti9OOueiwlxNf0KFmSPxwXF3TruZLg4Ok0dX5B1LMPb6ruIl Y5XHzP7WcUw//Ce0Dq6/5tg9GxaNLmxXKYnl/dM9xncuq08U8/FTM1wmCMhAAieseX2Q hlWnPBZxCodrghUG9S2Ub3rXuICuAWhl2gWgrr6npZT6LCRnZBSrfYEIItA56Buxl3Ft f93A== 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 w5si944748otb.186.2020.04.03.05.36.14; Fri, 03 Apr 2020 05:36:27 -0700 (PDT) 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 S2403930AbgDCMLG (ORCPT + 99 others); Fri, 3 Apr 2020 08:11:06 -0400 Received: from inva020.nxp.com ([92.121.34.13]:53680 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403859AbgDCMLG (ORCPT ); Fri, 3 Apr 2020 08:11:06 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id CBA3E1A0068; Fri, 3 Apr 2020 14:11:03 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D16021A0023; Fri, 3 Apr 2020 14:10:57 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 9E9EE402C4; Fri, 3 Apr 2020 20:10:50 +0800 (SGT) From: Anson Huang To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, horia.geanta@nxp.com, peng.fan@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V4] arm64: dts: imx8mp: Add thermal zones support Date: Fri, 3 Apr 2020 20:03:24 +0800 Message-Id: <1585915404-7658-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 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 i.MX8MP has a TMU inside which supports two thermal zones, add support for them. Signed-off-by: Anson Huang --- Changes since V3: - Drop some '0x' prefix; - Add cpufreq cooling for soc thermal zone as well to fit the passive trip point. --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 9b1616e..77aff14 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include "imx8mp-pinfunc.h" @@ -43,6 +44,7 @@ clocks = <&clk IMX8MP_CLK_ARM>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 { @@ -53,6 +55,7 @@ clocks = <&clk IMX8MP_CLK_ARM>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_2: cpu@2 { @@ -63,6 +66,7 @@ clocks = <&clk IMX8MP_CLK_ARM>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_3: cpu@3 { @@ -73,6 +77,7 @@ clocks = <&clk IMX8MP_CLK_ARM>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 { @@ -127,6 +132,68 @@ method = "smc"; }; + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>; + 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>; + }; + }; + }; + + soc-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 1>; + trips { + soc_alert0: trip0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + soc_crit0: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&soc_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>; + }; + }; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupts = , @@ -215,6 +282,13 @@ gpio-ranges = <&iomuxc 0 114 30>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mp-tmu"; + reg = <0x30260000 0x10000>; + clocks = <&clk IMX8MP_CLK_TSENSOR_ROOT>; + #thermal-sensor-cells = <1>; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mp-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>; -- 2.7.4