Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1254981ybh; Sat, 7 Mar 2020 23:05:49 -0800 (PST) X-Google-Smtp-Source: ADFU+vvaTv7pjiNXWFNPqB2WAyEFGBCl7ZqwXwz1CAc+KtoeSmgYvBvIhiOk1gljOfx0EyiyZQnh X-Received: by 2002:aca:55c4:: with SMTP id j187mr4822908oib.114.1583651149250; Sat, 07 Mar 2020 23:05:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583651149; cv=none; d=google.com; s=arc-20160816; b=xU1aa6UpG6L/TlGVR+76rMz8ExDoo8uVuHziPZ8dq3D+Vdr3JZndtmjxSpzQQ2sOYG lQRZVuIWJE5B4GJOciy00SmZShRzWdKbMRsVbW8iz2GDuKKqkTX8iCziQxQlt8Ax+Eh9 qTHR6+STC5VXFaW8Ey3tuOjhmG6YTjyKR8NAwq1jNPJafhubrJKVFS4UPs287//C8eFq 8Gd4zjVBgf7yWIXj2OK71eVevktUH+B6PwEN9iVK08RtDeKnx8mG7Xkp9+OIalwqYylu NtmOGMBhL4Dy+G5H9m9qLMVUV0ZgJF+eNagk8pvV6BtMOzXhHBq/Krh77Iq0GWio5c7E l7iw== 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=m3zJ4xuIwlMmCRauOrSJA02JU1mtw+FJWJ2f0vRo43Q=; b=AjRwL/T7kYK51Mc3Ap2685z1mafkbKhA6VBpfNJio0/h4IV3C4aP3jNRIyfFhmfk5o fpTJ7IHgrWj+ZbD9uvu1TgjkQf5a6rLKkRbfH+Y/cGv7a5X7/oWaaEZvdT3VZ2h9tsMJ 46eh3e72Sy9gKUQC5y0VjHgeA41qkjyBXjnNygLoYjK1mde2P2xJCmKWwuhCw4VDysgH 9dLQrLtKQQbyMQ30zQUp648EE3N4Z4rtog+vXgplzGR9exsQ3eADYGVUOW2s6jY1dZA0 q63j3gkGrCB5tDW54DgvIaiFvLqA5KPBM+1eOLV+HRVeQ1ccYKDqP+pSqky1lNbd4sDu 7VBQ== 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 48si4604917otv.320.2020.03.07.23.05.36; Sat, 07 Mar 2020 23:05:49 -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 S1726213AbgCHHFJ (ORCPT + 99 others); Sun, 8 Mar 2020 03:05:09 -0400 Received: from inva020.nxp.com ([92.121.34.13]:49856 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbgCHHFI (ORCPT ); Sun, 8 Mar 2020 03:05:08 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8E5091A13CA; Sun, 8 Mar 2020 08:05:06 +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 736BE1A1393; Sun, 8 Mar 2020 08:05:00 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id DC1AC402A5; Sun, 8 Mar 2020 15:04:52 +0800 (SGT) From: Anson Huang To: robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, leonard.crestez@nxp.com, daniel.baluta@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] arm64: dts: imx8mn: Add CPU thermal zone support Date: Sun, 8 Mar 2020 14:58:41 +0800 Message-Id: <1583650721-7912-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.MX8MN shares same thermal sensor with i.MX8MM, add thermal zone support for i.MX8MN. Signed-off-by: Anson Huang --- arch/arm64/boot/dts/freescale/imx8mn.dtsi | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi index f277572..88eeb52 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include "imx8mn-pinfunc.h" @@ -67,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 { @@ -79,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 { @@ -91,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 { @@ -103,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 { @@ -186,6 +191,38 @@ method = "smc"; }; + 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>; + }; + }; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupts = , @@ -274,6 +311,13 @@ gpio-ranges = <&iomuxc 0 119 30>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mn-tmu", "fsl,imx8mm-tmu"; + reg = <0x30260000 0x10000>; + clocks = <&clk IMX8MN_CLK_TMU_ROOT>; + #thermal-sensor-cells = <0>; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mn-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>; -- 2.7.4