Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1328277ybf; Fri, 28 Feb 2020 19:52:09 -0800 (PST) X-Google-Smtp-Source: APXvYqwcjTCBm6gdJRbC3Nwr7iz50Et9OyFrh1NalfWLcjnO2vGWCoJv6eWjamUxxSxxcYAxqJ58 X-Received: by 2002:a9d:6a4f:: with SMTP id h15mr5776734otn.86.1582948329115; Fri, 28 Feb 2020 19:52:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582948329; cv=none; d=google.com; s=arc-20160816; b=tSzSnllKEK7UYkTu8u5LzoW8XajyynTk1kiPQAQgSzwxdSDktArJ27omqDBWrx0ZCz rZUkdyntqqbn8YKlu6PprN9IsYCULxFKBeaH/gRWIB+oQoMFhp7cfEdNadT3xmXw0Qas 3+6G5bsNjyLngIjL2jq97JhUK3aPyPKAZzn6V0ezKe3f07yJUB2FiaSaDZ9WvqutAf3x dixxCojpr3cYE8s3JQBT9vNmMk6gJ6ue1OX4xwpwgdeoK9V2YY6VmMj/O/E+Ln91yfr2 fvHzXQhyn5JhAmWoWK/k0d02ufcfRkkubRe/VfJwDV7xhst2cwkqTR6g74ZvNdPh5sz2 05pA== 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=qEpn/DFYrXexr0oL2hekusCQK8H0QqOfG0ygPytxivk=; b=WEULv0eBlpTyjM9dCxl+Al6Vuyo9bhiKU5e3f70czH5NML3nPf/ajyMDvKKmor2rw6 sT25OdDRHjfy1npBBScVJ/0LMGzl3JoElsgm4W6lyUi2LhkuYedwLFI+yiCY7zbU5Ajx Krj45uRBD/3YcQbUSeIGQXEsCmt1uuNK4nQ6eZLrO/fQXOedJlIv5R3jaP3lnajWxbmE Bjwm1DsvnrWEPTgbZP8s6CT0uXkswwXZ5snW6e+l5cASgJaO2Cs8AJA4r5wn4axO78g0 LPde1U91wb6tQfMUM6LiejjhxuodmPjoMZUc7xUtfRxNIgKjgOudyfqrN6oecpiOPu2R 6uSA== 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 i23si2412776oto.206.2020.02.28.19.51.57; Fri, 28 Feb 2020 19:52:09 -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 S1726969AbgB2Dut (ORCPT + 99 others); Fri, 28 Feb 2020 22:50:49 -0500 Received: from inva021.nxp.com ([92.121.34.21]:35494 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbgB2Dus (ORCPT ); Fri, 28 Feb 2020 22:50:48 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 7392C2004ED; Sat, 29 Feb 2020 04:50:46 +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 6F697200505; Sat, 29 Feb 2020 04:50:30 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C2A8A402AD; Sat, 29 Feb 2020 11:50:16 +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, peng.fan@nxp.com, aford173@gmail.com, ping.bai@nxp.com, jun.li@nxp.com, shengjiu.wang@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 V2 RESEND 4/4] arm64: dts: imx8mm: Add thermal zone support Date: Sat, 29 Feb 2020 11:44:22 +0800 Message-Id: <1582947862-11073-4-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1582947862-11073-1-git-send-email-Anson.Huang@nxp.com> References: <1582947862-11073-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 --- No change. --- 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