Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp227746ybb; Thu, 19 Mar 2020 20:35:25 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvknKWPK14CM0wcfySRQ6s9FtQ+eQ1NxtCGnqcxa3KFCbIrbN9V8Y+wWV2CvC9JG9K51L05 X-Received: by 2002:a9d:2c64:: with SMTP id f91mr5290229otb.17.1584675325266; Thu, 19 Mar 2020 20:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584675325; cv=none; d=google.com; s=arc-20160816; b=aQswVn+bHlgKT+hnZXUVK/o2z/KKc5ntHVDsOqGfAAD41pQ4Lx9+CG14uyTPSVV1kr ggncDXdox/blNR2S1Rti49yjRkb+bwB3lqVfY0x22j4/x3VsdETlaHDkJnxhcYIoSK0X FEyo3gh8/ZMNxiRjD1AUNSmFAoy68liffIfS/hH5pDtab0G1wvm4ilZEPOR8rLL1GuwW iY+bQyN0McuX7/xsZsmj5P8NLl9XT8DrUO07+O13b5EIjxjpXh3IHYec4OEGXpVbuEfG LWFxw96G/jnXm7m1Az1BsOfMoPDqtqUYBFXd29Jp1XY/d91sZkf3xbO+Iu9NpptIhvyY 0g3g== 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=4XTcBRr+wULG8AgL5Zaw1ArE4wteO2meh+kFFWwlN1c=; b=bnMZvJY3KbnDZi8KbVgQNoWXi25GywzC9wFqdDPh5fIWYu3h0QYVE2s3Y9XGzXIadE 96uz91gzddw4O6EdlUS7rvXdxeLe2cm3unbmqABuLPi0fa9ylg6Rd8HVic1gFslHfjf0 5csb+8HpfXiQkkEut9tf1Ca9+ayqHngTkqBkFVWMdndkFYAqQDMViAK1tSbcsgoIvo8H Pm3mdmeOnXxqsf3axMsKpBpfH2jzvFNnCWgfnOTqjcnGeIJDIPRWHHeALv9RkuBtNwm3 GwtljAQrru65oNom+qq7BN1iB+v3abTBJ3/xZoymEuNk4tOdgMU1A6kkpMubSjSX9amd DO1Q== 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 e6si2198278oiy.229.2020.03.19.20.35.12; Thu, 19 Mar 2020 20:35:25 -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 S1727069AbgCTDdj (ORCPT + 99 others); Thu, 19 Mar 2020 23:33:39 -0400 Received: from inva020.nxp.com ([92.121.34.13]:38672 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbgCTDdi (ORCPT ); Thu, 19 Mar 2020 23:33:38 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 3381A1A035A; Fri, 20 Mar 2020 04:33:35 +0100 (CET) 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 6A17D1A0344; Fri, 20 Mar 2020 04:33:27 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 3FAD7402F3; Fri, 20 Mar 2020 11:33:18 +0800 (SGT) From: Anson Huang To: rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, 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, 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 V2 3/3] arm64: dts: imx8mp: Add thermal zones support Date: Fri, 20 Mar 2020 11:26:31 +0800 Message-Id: <1584674791-9717-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584674791-9717-1-git-send-email-Anson.Huang@nxp.com> References: <1584674791-9717-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 i.MX8MP has a TMU inside which supports two thermal zones, add support for them. Signed-off-by: Anson Huang --- No change. --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 9b1616e..175165b 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,57 @@ method = "smc"; }; + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0x0>; + 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 0x1>; + trips { + soc_alert0: trip0 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + soc_crit0: trip1 { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupts = , @@ -215,6 +271,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