Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1939777ybi; Thu, 4 Jul 2019 02:25:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6lPMTpr7eTeIfGGZHVNA+JXxZPpU60DtJSW3yjvtZ2+kBcatFpmjQGGqRGg2aw2GxsmzW X-Received: by 2002:a17:90a:e397:: with SMTP id b23mr18301441pjz.140.1562232300357; Thu, 04 Jul 2019 02:25:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562232300; cv=none; d=google.com; s=arc-20160816; b=buHs99absdfcE7gzVFF60hwEjTRWcSelpHgWIaf5e/fNdT1tFPk1w/+b05Wcb6z+gF FBz9CPrGtmFAHt3XrmDyl6i6BrhPiLamia/ZbOKHTqIESaSce9V1ph+7VDMnn31DktAA xdFd4xMXOOBbA3FKZZlDI4By7gpddmnd3EKWAi0Flqu1sfJNhqc1LAcwpYib2N/9azgf sT0F33flGesNOP0eWk05KW6MPRkeYvEg+FEJG2XAjvda7OHbiEeq0ooI5/k5Zgc95LhM BvUPGeedk3CvUvyEh4/WtptuI3KtUK4O2pf7rOsEX2f7jkWtRFQZThclBbj0kem5tuw8 298A== 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=goDkMxAW9b1SjMKAq/fbRUcxonNfzhoXneX7IRbbxDA=; b=CSbUcLfDkmcB0Bj0ZmkrSuyMhObCBXzZa2mvCvpCVK1R3qrsKA/vmTKchuaSYOWAOF X6ONtn1JBgc/yoly7Yrwce+CopbRvxfV1CCQMNVFnEkMTcDuZxVmgFKp7FYAhBU1aOjV dRVFMX3bdRgBlhfPTbSUeOGbMBKj5GVkru14KgSudnnzmRJjhrUZQf5nuKjMZMzvKTM2 /xQhkW6cbdd2wNirtzEJPajGUYM3TMy4ly9yB1HOHwJoCDbGrUxJhTg3mKC6H/b/lHuq YET+I3sje084BGBAG/CeUC/2OUKzwShLNvG3nHo4qztNmPtoUhkF/pX6YZM+FusoAWjr VagQ== 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 a9si5509423pfn.104.2019.07.04.02.24.45; Thu, 04 Jul 2019 02:25:00 -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 S1727514AbfGDJWr (ORCPT + 99 others); Thu, 4 Jul 2019 05:22:47 -0400 Received: from inva020.nxp.com ([92.121.34.13]:48074 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727492AbfGDJWp (ORCPT ); Thu, 4 Jul 2019 05:22:45 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 107091A0562; Thu, 4 Jul 2019 11:22:43 +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 70EE51A0570; Thu, 4 Jul 2019 11:22:28 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 1E8D4402E5; Thu, 4 Jul 2019 17:22:15 +0800 (SGT) From: Anson.Huang@nxp.com To: rui.zhang@intel.com, edubezval@gmail.com, daniel.lezcano@linaro.org, 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, ping.bai@nxp.com, olof@lixom.net, maxime.ripard@bootlin.com, jagan@amarulasolutions.com, bjorn.andersson@linaro.org, dinguyen@kernel.org, enric.balletbo@collabora.com, 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 4/4] arm64: dts: imx8mm: Add thermal zone support Date: Thu, 4 Jul 2019 17:13:13 +0800 Message-Id: <20190704091313.9516-5-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190704091313.9516-1-Anson.Huang@nxp.com> References: <20190704091313.9516-1-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 From: Anson Huang 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 3a62407..1870c89 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -70,6 +70,7 @@ nvmem-cells = <&cpu_speed_grade>; nvmem-cell-names = "speed_grade"; cpu-idle-states = <&cpu_sleep_wait>; + #cooling-cells = <2>; }; A53_1: cpu@1 { @@ -82,6 +83,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; cpu-idle-states = <&cpu_sleep_wait>; + #cooling-cells = <2>; }; A53_2: cpu@2 { @@ -94,6 +96,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; cpu-idle-states = <&cpu_sleep_wait>; + #cooling-cells = <2>; }; A53_3: cpu@3 { @@ -106,6 +109,7 @@ next-level-cache = <&A53_L2>; operating-points-v2 = <&a53_opp_table>; cpu-idle-states = <&cpu_sleep_wait>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 { @@ -209,6 +213,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>; @@ -368,6 +404,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