From patchwork Thu Mar 21 12:52:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angus Ainslie X-Patchwork-Id: 10863455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5DB331669 for ; Thu, 21 Mar 2019 12:53:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A1C828D6F for ; Thu, 21 Mar 2019 12:53:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DB7F2A094; Thu, 21 Mar 2019 12:53:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8AF1128D6F for ; Thu, 21 Mar 2019 12:53:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=5CK6gILKNN/pjNEz1dAEv9px9ZiVe9PI1ln+VxT9Q8c=; b=LTJsSWJsbbqtixtirHwfa+e2c8 9VgRxsRX6VrHp2QLJp6XhXvVu7LMY25ouXFTIrTcxWu6h1nQ77A12NWiLH/wozhDCU7g0v4WJOJyI KuyXUfs4ewvoYdkOrSQP0onx9x5hNhIXtZlFd3FB3+FKxrG2HVriJuO9FzbMxTHrA/A6phpqKitiR eBLdLLCKuCBirNmj5sEz+/DLrMDRW3Q6bH+vlm/5HWTl22vzWRUj8AynwQvlxKpiudQUFZf7wReSI rqAog7Kmdwcivn7lI+4b8vdtKTS5Of3jZ+41l5L7vRk4FSoHf/XZAxiB2/wn6Oi5akWG3XTdDVw0q 43lSAmTA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6xBx-0007Mn-SQ; Thu, 21 Mar 2019 12:53:05 +0000 Received: from node.akkea.ca ([192.155.83.177]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6xBu-0007MU-Um for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2019 12:53:04 +0000 Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 13D9F4E204D; Thu, 21 Mar 2019 12:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1553172782; bh=jPNnipZJgvNntal5zzOCzCjCB+uou0zDfBhLJgw28OI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=V1TzNGqml0TE4lTWYxO76wsDfwzA205xQprF4KWHElG3rgOfCKVs5YNClSATVynxK EhXdQ2BHkxJxurjf9E+cZOulQvVaJJwQqF8t/PtRcPJfP+MhK2n+vIpDRvKWZ8yhbg g/8MW9d5kectERfN75jkroG1eXiwB3mt3rcfzd4M= X-Virus-Scanned: Debian amavisd-new at mail.akkea.ca Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a23PqyqKDvzs; Thu, 21 Mar 2019 12:53:01 +0000 (UTC) Received: from midas.localdomain (S0106788a2041785e.gv.shawcable.net [70.66.86.75]) by node.akkea.ca (Postfix) with ESMTPSA id 99C1A4E204B; Thu, 21 Mar 2019 12:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1553172781; bh=jPNnipZJgvNntal5zzOCzCjCB+uou0zDfBhLJgw28OI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QRJrZRtP9VPOllUocpIO7nkk7/UZTP27KgeU5Ri+r26t7wOWkZ6IxJXmlkpyMbvYU YUGzeToqWPIMwYRPRX0Ed7iNxc2nDC1Xb20Sf/JRIO2DymAxSf82wngv1sdXLPPAsp 1DnfCVKRfXFhrBszFgDoJfztu8T6oEek+q7Lb5+w= From: "Angus Ainslie (Purism)" To: Fabio Estevam Subject: [PATCH v4] arm64: dts: fsl: imx8mq: enable the multi sensor TMU Date: Thu, 21 Mar 2019 05:52:52 -0700 Message-Id: <20190321125252.4498-1-angus@akkea.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190311213124.29325-1-angus@akkea.ca> References: <20190311213124.29325-1-angus@akkea.ca> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190321_055303_039452_AC52D2A0 X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Abel Vesa , Carlo Caione , Daniel Baluta , Sascha Hauer , "Angus Ainslie \(Purism\)" , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , =?utf-8?q?Guido_G=C3=BCnther?= , linux-arm-kernel@lists.infradead.org, Lucas Stach MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add the imx8mq TMU (Thermal management unit) nodes for CPU, GPU, and VPU. Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Lucas Stach --- Changes since v3: Moved the annotation. Changes since v2: Updated alert and critical temps for commercial parts. Fixed node names. Changes since v1: Removed references to multi sensor patch. arch/arm64/boot/dts/freescale/imx8mq.dtsi | 118 ++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi index b39c6c75c043..81d5ce1b1ec1 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include #include "imx8mq-pinfunc.h" / { @@ -89,6 +90,7 @@ reg = <0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_1: cpu@1 { @@ -97,6 +99,7 @@ reg = <0x1>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_2: cpu@2 { @@ -105,6 +108,7 @@ reg = <0x2>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_3: cpu@3 { @@ -113,6 +117,7 @@ reg = <0x3>; enable-method = "psci"; next-level-cache = <&A53_L2>; + #cooling-cells = <2>; }; A53_L2: l2-cache0 { @@ -210,6 +215,119 @@ #interrupt-cells = <2>; }; + tmu: tmu@30260000 { + compatible = "fsl,imx8mq-tmu"; + reg = <0x30260000 0x10000>; + interrupt = ; + little-endian; + fsl,tmu-range = <0xb0000 0xa0026 0x80048 0x70061>; + fsl,tmu-calibration = <0x00000000 0x00000023 + 0x00000001 0x00000029 + 0x00000002 0x0000002f + 0x00000003 0x00000035 + 0x00000004 0x0000003d + 0x00000005 0x00000043 + 0x00000006 0x0000004b + 0x00000007 0x00000051 + 0x00000008 0x00000057 + 0x00000009 0x0000005f + 0x0000000a 0x00000067 + 0x0000000b 0x0000006f + + 0x00010000 0x0000001b + 0x00010001 0x00000023 + 0x00010002 0x0000002b + 0x00010003 0x00000033 + 0x00010004 0x0000003b + 0x00010005 0x00000043 + 0x00010006 0x0000004b + 0x00010007 0x00000055 + 0x00010008 0x0000005d + 0x00010009 0x00000067 + 0x0001000a 0x00000070 + + 0x00020000 0x00000017 + 0x00020001 0x00000023 + 0x00020002 0x0000002d + 0x00020003 0x00000037 + 0x00020004 0x00000041 + 0x00020005 0x0000004b + 0x00020006 0x00000057 + 0x00020007 0x00000063 + 0x00020008 0x0000006f + + 0x00030000 0x00000015 + 0x00030001 0x00000021 + 0x00030002 0x0000002d + 0x00030003 0x00000039 + 0x00030004 0x00000045 + 0x00030005 0x00000053 + 0x00030006 0x0000005f + 0x00030007 0x00000071>; + #thermal-sensor-cells = <1>; + }; + + thermal-zones { + cpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 0>; + + trips { + cpu_alert: cpu-alert { + temperature = <80000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert>; + 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>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 1>; + + trips { + gpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + vpu-thermal { + polling-delay-passive = <250>; + polling-delay = <2000>; + thermal-sensors = <&tmu 2>; + + trips { + vpu-crit { + temperature = <90000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; + wdog1: watchdog@30280000 { compatible = "fsl,imx8mq-wdt", "fsl,imx21-wdt"; reg = <0x30280000 0x10000>;