From patchwork Fri Jan 20 00:30:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13109013 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8C17C46467 for ; Fri, 20 Jan 2023 00:32:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i8JYEgYheXVcj5ilngTD9Zdy4VWNWyWgaHnmWbGc2Xg=; b=w5+R7UiqrdpVny k4pdRNvV5K4G1R+taoLOnfyft1/bD5eSIgq9pRplK0q7dqSofYf7xOxTPLfx7KnRUOjIvxFOlWMk6 SANOeXyp4990KnH2SR6znoDW/D825K54v0gtvsxL/Qj07Ef9nTlofS2OR1FCoOGFA5WgWi8HNCHwt MnLlOmMxB5FwbGi7OJ1eJ6Zm4FyRDKOkv9AYnxeL7f5BeysTcI8vhECNBkgPuU9KX1Jw8dqnUdQR/ /lP96cGJeoZCvcSa914SrvDWeE+05NcJRDgJhCYfMAJgofn4LUaMKzxGntAiJHqaPNZHh8yOKVNh9 EmPddC8Vra3NqR3MqjNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJO-007k56-Ob; Fri, 20 Jan 2023 00:31:18 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJL-007k21-8E for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2023 00:31:16 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V2Uu006094; Thu, 19 Jan 2023 18:31:02 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674174662; bh=ZSPCoPFBIjAT2TdS7esgXeJaXnUbGDBq0LvDJbjFWbI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wUHQTacaFCKWLEy8RUqREIbEn+NfJuOE+WciWZH14lv1XEX9JNfwE9lRb/L7xh9Dr nKfa/Fd4Hf6A+64T+UaYrzVpjieycfzIwa6bH+vVmwgx2Wu6BtXACjvLEre9SB5s3v 3EBUThTobLKlDcoqdKIut2p0lhCGQRpfSnT7mdNM= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30K0V2GD079137 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 18:31:02 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 19 Jan 2023 18:31:02 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 18:31:02 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V2Uh120121; Thu, 19 Jan 2023 18:31:02 -0600 From: Bryan Brattlof To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski CC: ARM Linux Mailing List , Device Tree Mailing List , Linux Kernel Mailing List , Keerthy , Bryan Brattlof Subject: [PATCH v2 1/6] arm64: dts: ti: k3-am64-main: add VTM node Date: Thu, 19 Jan 2023 18:30:46 -0600 Message-ID: <20230120003051.9100-2-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120003051.9100-1-bb@ti.com> References: <20230120003051.9100-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3221; i=bb@ti.com; h=from:subject; bh=WRpTenZnFqswM19fCea5NPnWy2bZgS4CBrjRh4INKEg=; b=owNCWmg5MUFZJlNZy/U9GgAAaX///7/9/vF/Trvq3mvTvW+2X12n8Vf83vfLw/+4//l/8sawARsw HaQGgGgAGQyaNAAyNAHqBkNDEaaA0ZGg0GgNAAaAGhgjTTQ00yMmJtE8mog0GgyAaaGEaAGg9TTAmI Ghk0AAaBiGRppkAGTCeoMhoMmTQwmGoNADQAdBkNGTQMRpppoA0YhkyYTEAGQGBMQDRhNMEDIYTRoa AAANAGTRoA0wBAuikkgqD0hj5EdLT4YkHOlK6rdU8jb6BaThdM3MAGHn7s3gDMi5q+Jq8MN4UzyZ4J uBC4kNIHOP6U3V2MUNGkPr63iFtAnfZ5ZW9tUxZJCHABHr6hDHaNc5C5Hp2RBn3+NaMFaDKk5QXgLM JcxAU4K5yGLZno3b01Dt8IsMFvbtUxzXSBsvDpwGY87rF3R4jC/v5RD00ITDMK0gKeKqeS7GsWqhSj T9XwiXDg/NWL8lmyg/4rQ9W3Zeq5gcNFGJPSDVeC9y3QvSpowiP6kSgYRZ9mvMyu+3ZC2NstCQBcwo AJRMpeCAlW7neJJXQnWNYmxZM7jFlN6QpXGmil9cgzERkpLEKdiwYthnV4JTkGhEM5TFgfR5uANgDr lo9QvTxk2E7ZJBm//NQEolysjVShwE+EErXwgo6HWe5cfPAT9ALou+UX/F3JFOFCQy/U9GgA== X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_163115_528373_2E41E744 X-CRM114-Status: GOOD ( 16.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The am64x supports a single VTM module which is located in the main domain with two associated temperature monitors located at different hot spots on the die. Signed-off-by: Bryan Brattlof Tested-by: Christian Gmeiner --- arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 8 +++++ arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi | 33 +++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am64.dtsi | 3 ++ 3 files changed, 44 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi index 5e8036f32d79d..dc8c1c6021630 100644 --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi @@ -1392,4 +1392,12 @@ elm0: ecc@25010000 { clock-names = "fck"; status = "disabled"; }; + + main_vtm0: temperature-sensor@b00000 { + compatible = "ti,j7200-vtm"; + reg = <0x00 0xb00000 0x00 0x400>, + <0x00 0xb01000 0x00 0x400>; + power-domains = <&k3_pds 95 TI_SCI_PD_EXCLUSIVE>; + #thermal-sensor-cells = <1>; + }; }; diff --git a/arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi new file mode 100644 index 0000000000000..036db56ba7977 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +thermal_zones: thermal-zones { + main0_thermal: main0-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&main_vtm0 0>; + + trips { + main0_crit: main0-crit { + temperature = <105000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main1_thermal: main1-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&main_vtm0 1>; + + trips { + main1_crit: main1-crit { + temperature = <105000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am64.dtsi b/arch/arm64/boot/dts/ti/k3-am64.dtsi index c858725133af4..3ac0545cbfe6f 100644 --- a/arch/arm64/boot/dts/ti/k3-am64.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am64.dtsi @@ -69,6 +69,7 @@ cbass_main: bus@f4000 { <0x00 0x00420000 0x00 0x00420000 0x00 0x00001000>, /* ESM0 */ <0x00 0x00600000 0x00 0x00600000 0x00 0x00001100>, /* GPIO */ <0x00 0x00a40000 0x00 0x00a40000 0x00 0x00000800>, /* Timesync router */ + <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */ <0x00 0x01000000 0x00 0x01000000 0x00 0x02330400>, /* First peripheral window */ <0x00 0x08000000 0x00 0x08000000 0x00 0x00200000>, /* Main CPSW */ <0x00 0x0d000000 0x00 0x0d000000 0x00 0x00800000>, /* PCIE_CORE */ @@ -105,6 +106,8 @@ cbass_mcu: bus@4000000 { ranges = <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>; /* Peripheral window */ }; }; + + #include "k3-am64-thermal.dtsi" }; /* Now include the peripherals for each bus segments */ From patchwork Fri Jan 20 00:30:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13109015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83733C46467 for ; Fri, 20 Jan 2023 00:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2TpE9dAEd29J+7Vb1wZ1X5IMUS1Z9hSOzZ/ZqESw1Fg=; b=NSoW30O0sY/KGY 3Mz9KoM9cx8gX5uxlgnh23D1KW57RUYYbfNz/p8+TAMz0l82CbhobCh8HyOInMMcklUxfz7C1jSvk Wyk6Wbqu4fGsgidocw0XLLcxdcl+BeVtE3AQrj8Kc1bL4JI/1y4YCsKSy/BDBy1YSpOb5jKeb1Iww hyv2wtBrGJJYGttkXnXLSq6osbf6k8YOiealcRfTp6zWG2GgEXaHwtTjLUwGgqdmf46ca36ir7cMG jWKeiCjDZ5ZqnwP2DNiJ9f3t51xTLuOmI3LgAIWcnyHgF1gP++M8fDl/0dWoEuk4xyVg7yOF4EMu4 8y8Yat9avvwmAtLU0HyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJs-007kGl-Hk; Fri, 20 Jan 2023 00:31:48 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJL-007k1z-8A for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2023 00:31:18 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V3mZ069176; Thu, 19 Jan 2023 18:31:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674174663; bh=cEXQJWdqSirqdsfWjVaeijGRWaufQgDbMEkTdpTW4r8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=sEhEjL2B+Mmv/94HNxXf5VPKHtwirJRflOuRLWtrkuvdyfLDmOo6dtz3kOc7vZxjQ mW9HRv/hUQY+otXOqg6chStRMXu1LF6DdQsM2+ugTN0WiYZ7NK2w4zX/BB0fOjOjyH yhiz/HE2H3mbcm7JooGDxfqZFi7qZLX/BQoG/ALg= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30K0V3Vp089209 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 18:31:03 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 19 Jan 2023 18:31:02 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 18:31:02 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V2af016876; Thu, 19 Jan 2023 18:31:02 -0600 From: Bryan Brattlof To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski CC: ARM Linux Mailing List , Device Tree Mailing List , Linux Kernel Mailing List , Keerthy , Bryan Brattlof Subject: [PATCH v2 2/6] arm64: dts: ti: k3-am62-wakeup: add VTM node Date: Thu, 19 Jan 2023 18:30:47 -0600 Message-ID: <20230120003051.9100-3-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120003051.9100-1-bb@ti.com> References: <20230120003051.9100-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3326; i=bb@ti.com; h=from:subject; bh=W31s4HWtI6oPxVN7LZbcq2NBLgzbe0T/4XYkAdrsJro=; b=owNCWmg5MUFZJlNZisCfIgAAaH///3/Z1uv7irz7/Okff7c//0363vbo3u+/62tq/1ZX//6wARsx oygAaAGj1AAAAZMgAAAAaADIYg00HqAAPUNDEaD1APSHoj0h6QPUNNPU9T1EAAaNGgHqDagaAMIAGh oDQ0AGh6jE9IA9RoZGg9JoD1ANNM0mEyNGgAHqDQAxE9TRkZojQ0NDT0h6mjQMgyepoAADRoMgMgNA PUGQABoAaDQADRoAAaPUZAgtAtOFilqhcQ3UzZDoey9xoIrbUz7iwIZgYR8eAB9vlAgChML1oaiLj0 veLuzXY4pNLUnOvLGvwQFJ8oAZ0c4PGbfozRbUoqvI4fBkdEDya1RM3VMpHc/tOGnIPjJQdpH1DxxQ IdfsCltBEJtw0hgmZe3p4VyTfy7ZksRiQvaAi4AgUEBvipKlVxLrVT2C+gXadYKz+58HxFiHe5k7g8 V6ga/CxAJg3G6EOMOt1mrFYkDT1Bqvzv3VkWClJ+VYEd1VDPgWb/LrkMV61hZEVaikbOszv/fHByy2 gdAnkmd9OiP70EX9qjaD8AZXi9TIijsvcOXxkuoG2/WkuOFElFBwtaIUMAC7GHLqEBLJlhWrgZygfE j7FBqhGQjtVxzekbADAtaW3D+vwiehq67bshXkc0sIOmG1eA7g1LcGWZDcjyY5f4u5IpwoSEVgT5EA X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_163115_535839_61B2FE87 X-CRM114-Status: GOOD ( 15.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The am62x supports a single Voltage and Thermal Management (VTM) module located in the wakeup domain with two associated temperature monitors located in hot spots of the die. Signed-off-by: Bryan Brattlof --- arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi | 33 +++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 8 +++++ arch/arm64/boot/dts/ti/k3-am62.dtsi | 6 +++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi new file mode 100644 index 0000000000000..a358757e26f07 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +thermal_zones: thermal-zones { + main0_thermal: main0-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 0>; + + trips { + main0_crit: main0-crit { + temperature = <105000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main1_thermal: main1-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 1>; + + trips { + main1_crit: main1-crit { + temperature = <105000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi index 38dced6b4fef9..91ec9887ac6d1 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi @@ -40,4 +40,12 @@ wkup_i2c0: i2c@2b200000 { clock-names = "fck"; status = "disabled"; }; + + wkup_vtm0: temperature-sensor@b00000 { + compatible = "ti,j7200-vtm"; + reg = <0x00 0xb00000 0x00 0x400>, + <0x00 0xb01000 0x00 0x400>; + power-domains = <&k3_pds 95 TI_SCI_PD_EXCLUSIVE>; + #thermal-sensor-cells = <1>; + }; }; diff --git a/arch/arm64/boot/dts/ti/k3-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi index 37fcbe7a3c336..74cf1b4d7a6ad 100644 --- a/arch/arm64/boot/dts/ti/k3-am62.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi @@ -80,6 +80,7 @@ cbass_main: bus@f0000 { <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>, /* Wakeup Domain Range */ + <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */ <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, <0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>; @@ -94,10 +95,13 @@ cbass_wakeup: bus@2b000000 { compatible = "simple-bus"; #address-cells = <2>; #size-cells = <2>; - ranges = <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */ + ranges = <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */ + <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */ <0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>; }; }; + + #include "k3-am62-thermal.dtsi" }; /* Now include the peripherals for each bus segments */ From patchwork Fri Jan 20 00:30:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13109020 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4F73C46467 for ; Fri, 20 Jan 2023 00:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wQvzu2sxsv6GeEIrwp1jIwb+X8Q8TU+VGz+4sbM0vNY=; b=sAAb7s5yTGcVZW PFXNI8HYmZyQAmpzV6J/1XUrjN9v59HuoWA7y988jyQ/DANK6RmHvLke8cvEudAXCYwsPkXY7d1cN m+9tV5KhMyElXTbet2QYOad2bOJqLrJFhmT6J7zlq0AeHGxzrAd1xsVdZ4jgzoM/fEcfZe3fqQ0kN Ej+AuUX+1G3I10g0vtU3Z7missmseY/OCDmcubSZl/ZHjjO/1aOMWS77Xm71e9l0TRDwUbulfO3qa z4Ds9AsVqO8RE1nhUZvX9LbEBg4eLs9TwKF0+RozwL2kJtOamCau/oZXEP+G6U4/+bpfhikAqExer zGKyipEduaJe5v7fY4Ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfKY-007kaJ-E4; Fri, 20 Jan 2023 00:32:30 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJL-007k2D-8D for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2023 00:31:18 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V3CJ128881; Thu, 19 Jan 2023 18:31:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674174663; bh=wkXSLQGhAd5bDqbgGtKdURlGStuo/SEc+20hxb4hWGE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=nqlO5vCSR8UNfNvkmfhHVlxLvOmPRvdF/Z8/iKDgcyp9fenOUTYxPFdp91q/Q5A3v 0lUWcDn74KIYAWp6+/xbE8AfHlX8/R+dXWmOf5DCQBh5jXaFwwt6ikQ1qq4jq3Ch7r hPqFKbIcFBm7YRlsO+bQ589/4HiTfCSZmT1lnKFA= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30K0V3Vo089209 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 18:31:03 -0600 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 19 Jan 2023 18:31:02 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 18:31:02 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V2ox030624; Thu, 19 Jan 2023 18:31:02 -0600 From: Bryan Brattlof To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski CC: ARM Linux Mailing List , Device Tree Mailing List , Linux Kernel Mailing List , Keerthy , Bryan Brattlof Subject: [PATCH v2 3/6] arm64: dts: ti: k3-j721e-mcu-wakeup: add VTM node Date: Thu, 19 Jan 2023 18:30:48 -0600 Message-ID: <20230120003051.9100-4-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120003051.9100-1-bb@ti.com> References: <20230120003051.9100-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3856; i=bb@ti.com; h=from:subject; bh=s6+UArdBZKREnmzM0nnJurq9/CTqw7EakXacfj9uiSQ=; b=owNCWmg5MUFZJlNZ8HlxrwAAZH////bLw+37uP/i/fu/H3Gqs//75753/m/99f0/9/5Pv3+wARsW DEgAaAGQBoAAZAaADIAAAGgNGgAAAAyNAaA0aDQAHlHpNHlBo0e0ogAA00A0BkADQ0ABoyAAANA0DQ 9Q9TQ0aGgHqbJDIDT1Bo0AHqaB6gaAyNGm1EPUNAAeo9Q0DTTQaBoAANDQ0aaeptIAyAGgBoBkAA0y A0aaMgGRk0ZGh6hkNA0DBiJyLNhxrdXHoxAbH1Ja8G4bSG94TTDLBGhNAqtWB1n7aENLwGEayFoxXY VEXjSsclvzhgKuVCHY/eTswOMrhM186QgbIjxG6zA5AYhli103rKzvPktSq5Mwb7EVV5+LUyg+dX7I I93xgZm+L3G9L4F2NukUZ6CW6B1co9J/nHQVl74FYVu1IkhbwNYaIm44kuAGfoknbZqXIuMw0AL4Sg owq83rCpdH9QsDRzdQrJjLUu4yxflMnOJd/T5EZzi0QNiHgpfHiPzPKOovY4zRhawTSB1Lf3PkTcAW BeFSHuXjd0MQs9kzJjCECPxuXic6pSIL1OzaL66bCOq9AoXXahnVXyPiAMUbKk/IMyleBzvE7iLY5A 5fRACE6gJGOlAGiT1CxRVFK0XwBY4HyVtF+lyiCwDE+6ElBqQGxpT2TEbBSb/F3JFOFCQ8HlxrwA== X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_163115_531084_CE8B90C8 X-CRM114-Status: GOOD ( 14.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The j721e supports a single Voltage and Thermal Management (VTM) module located in the wakeup domain with five associated temperature monitors located in various hot spots on the die. Signed-off-by: Bryan Brattlof --- .../boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 9 +++ arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi | 75 +++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j721e.dtsi | 2 + 3 files changed, 86 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi index 8ac78034d5d6b..a6472a077a8cd 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi @@ -425,4 +425,13 @@ mcu_mcan1: can@40568000 { bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; status = "disabled"; }; + + wkup_vtm0: temperature-sensor@42040000 { + compatible = "ti,j721e-vtm"; + reg = <0x00 0x42040000 0x00 0x350>, + <0x00 0x42050000 0x00 0x350>, + <0x00 0x43000300 0x00 0x10>; + power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>; + #thermal-sensor-cells = <1>; + }; }; diff --git a/arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi new file mode 100644 index 0000000000000..4db7185a6bd9d --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +thermal_zones: thermal-zones { + wkup_thermal: wkup-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 0>; + + trips { + wkup_crit: wkup-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + mpu_thermal: mpu-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 1>; + + trips { + mpu_crit: mpu-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + c7x_thermal: c7x-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 2>; + + trips { + c7x_crit: c7x-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + gpu_thermal: gpu-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 3>; + + trips { + gpu_crit: gpu-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + r5f_thermal: r5f-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 4>; + + trips { + r5f_crit: r5f-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi index 0e23886c9fd1d..934dffbc136f3 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e.dtsi @@ -181,6 +181,8 @@ cbass_mcu_wakeup: bus@28380000 { <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>; /* FSS OSPI1 data region 3*/ }; }; + + #include "k3-j721e-thermal.dtsi" }; /* Now include the peripherals for each bus segments */ From patchwork Fri Jan 20 00:30:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13109014 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16EF4C46467 for ; Fri, 20 Jan 2023 00:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gdNBqrYSfOEQBoyfAVOQFgKJBUdYl1uAZkuKIVUpCSg=; b=Ernjr3oummjUjF +VxRj41Im4cOPm26/JIZ4e8wTZLiAGklL2eiBPPGWbWJp6cekabvvGHyRe5t2MN5/VfKJ7pUHbbXm joG5KXsMwTsr1M12D8xhvJP1XKlC0fkOi7gOve6JVNJTdTDoDETcxH82ABtlrwJU5uReAT65WOD2J sYQg7LA1dGi/1CncmNsDBfcgi+sSze357PfyKX/rxHwMjEdsJxgc3Y2zUqz+GPUYn0sbwiVfz1fJ/ TY+SQLJ995WEKYthtiaqBoiA2yVgxejhHawzkwVWGVwoIli07LO6o6P7tHRXy4gtPK7xf57yqM4Ls qZw4lWCBwcdyPzGToRHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJg-007kBh-NS; Fri, 20 Jan 2023 00:31:36 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJL-007k2A-89 for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2023 00:31:18 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V3gi069161; Thu, 19 Jan 2023 18:31:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674174663; bh=EhVmb2u2O6mw4AA79EZXTNGXm1WaiokelpyqCkP0Q/0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=aWI3/TNQSu4yIupAYDNjuz7ZbMCs5nxOhQnBmkE8YjH3p32sEWTjIAyw2HFmasNtV ++RFm8+EmN6ykp7BitdA9oNjgvmcBxiHwnIvH+nx6hLj6kQorh1VSh/r6ZtZ6HNZIa 0lMtaZU4raEZlQvWfr9snhu1HcqqzwtN3WL8lFLw= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30K0V3F4079150 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 18:31:03 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 19 Jan 2023 18:31:02 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 18:31:02 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V2El120141; Thu, 19 Jan 2023 18:31:02 -0600 From: Bryan Brattlof To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski CC: ARM Linux Mailing List , Device Tree Mailing List , Linux Kernel Mailing List , Keerthy , Bryan Brattlof Subject: [PATCH v2 4/6] arm64: dts: ti: k3-j721s2-mcu-wakeup: add VTM node Date: Thu, 19 Jan 2023 18:30:49 -0600 Message-ID: <20230120003051.9100-5-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120003051.9100-1-bb@ti.com> References: <20230120003051.9100-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4456; i=bb@ti.com; h=from:subject; bh=bi4FblxH6lsHOjpjZdiQo9patDWW3roBBQlfzTClUAM=; b=owNCWmg5MUFZJlNZut8WrgAAZH///rd9Ti/7+MzeXu//+t9b37s7+j//v/fr97/4039R516wARsb Q71RoGgDQAaAGhoaGmgGgGgGIGjQGIDRkAAAD1NAAD1AMgDRpkaaGGm1RADQBhABoaAD1NAAGgNAeo 9TIDQNDID1AGg2oaaaHqaaeUaaDQD1B6QNAGmQGQyjTaRtTJpoBo0AaAZMTQyGgNAZAGgYgNA0Bpoy DQGQDQGQDQNMgaNPU0aNNMgSJ3OAKpFX1N0Ajkr4PKlIkVnz4QXJADgETEAQCISo4YjnWtezdoOTK1 i7NBVlwJh6CHbjJaAsSiYkjSQbjK4Ys1VnRJhSnhwbwHeEfFh1oIpJhJoAu598B0cIdxXdyKoIwcMj UIHXo+UNouictKwWcSRayDLIqwPPTsZ48JHBBnrVKjA+IFUJFqalgVEXq06sbAaF+ybqhlKgwshnnk 2MhB467/tHCvHVqDLOkviX7b9BuGjZFBX3yq8K3VE7QQRXiO9+vE7eVSQnQrBfPsYaTPIVWdKTV+A6 UIGnfMfFZpuumcKQvMyrvFFZF5LU7nMXEO49tINW3k1D55p6Z2jTWtgA+2npQA1zkbolzk9HxQrIp8 sAffACuhdGaSui8UhrjdYNCOZwCZtYuLnmbgww3uEemockq0jwuQPqfLqd2guxw3zh/i7kinChIXW+ LVw= X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_163115_529074_040B9678 X-CRM114-Status: GOOD ( 14.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The j721s2 supports a single Voltage and Thermal Management (VTM) device located in the wakeup domain with seven associated temperature monitors located in various hot spots on the die. Signed-off-by: Bryan Brattlof --- .../boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 8 ++ arch/arm64/boot/dts/ti/k3-j721s2-thermal.dtsi | 103 ++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j721s2.dtsi | 2 + 3 files changed, 113 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-j721s2-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi index 0af242aa98162..b31a0a812f83f 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi @@ -306,4 +306,12 @@ cpts@3d000 { ti,cpts-periodic-outputs = <2>; }; }; + + wkup_vtm0: temperature-sensor@42040000 { + compatible = "ti,j7200-vtm"; + reg = <0x0 0x42040000 0x0 0x350>, + <0x0 0x42050000 0x0 0x350>; + power-domains = <&k3_pds 154 TI_SCI_PD_SHARED>; + #thermal-sensor-cells = <1>; + }; }; diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-thermal.dtsi new file mode 100644 index 0000000000000..945f3fa44aefa --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j721s2-thermal.dtsi @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +thermal_zones: thermal-zones { + wkup0_thermal: wkup0-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 0>; + + trips { + wkup0_crit: wkup0-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + wkup1_thermal: wkup1-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 1>; + + trips { + wkup1_crit: wkup1-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main0_thermal: main0-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 2>; + + trips { + main0_crit: main0-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main1_thermal: main1-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 3>; + + trips { + main1_crit: main1-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main2_thermal: main2-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 4>; + + trips { + main2_crit: main2-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main3_thermal: main3-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 5>; + + trips { + main3_crit: main3-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main4_thermal: main4-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 6>; + + trips { + main4_crit: main4-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/ti/k3-j721s2.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2.dtsi index 7b930a85a29d6..0c8234a4d7978 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721s2.dtsi @@ -161,6 +161,8 @@ cbass_mcu_wakeup: bus@28380000 { }; }; + + #include "k3-j721s2-thermal.dtsi" }; /* Now include peripherals from each bus segment */ From patchwork Fri Jan 20 00:30:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13109012 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9404C678D4 for ; Fri, 20 Jan 2023 00:32:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e/I0AmxPS4KmtsRFeSwyNqEoImBD4cym1dfRIK7lpbc=; b=BvwH4tqXIrcKGR pGt34LYbBzrvLYCXCSmj0l4vYqC2g1D9y+9RTpOAljARgauxztbBMNk+cLSfRnYv8uM3563POX+f2 wqwbioUpH5vDtXuC7HEB8nHiZSJIKDSci1Ga9Ic/WdnwyBzsdVWnrOh95ZinVsIb0Xki+SKYdGU9X R8Gi0YwuxK9M+0qEdy4EO7Lsp3VwlTax+HimM2Vb7W7KsXfhd2UZK0OD1Y2dG4LDgEV7fHnidERai F6IHFuljzVhdNExsakzwAI+h0jTqYSiiaMi07krhn+U5tehMoO8d1IgpHzQvwsbusRTSrZzn8s13x a6AEiqGCdOEr6agj/sWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJX-007k7o-6N; Fri, 20 Jan 2023 00:31:27 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJL-007k1w-8C for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2023 00:31:17 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V3W4069165; Thu, 19 Jan 2023 18:31:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674174663; bh=31mTZJYBIgY75wlnyijVEc4W9dSBKWa72a/x4eFE+oY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=oUNiJGEWQP/Y1PjZ8r0+uGEuKWwng6SPGEogr2XFrH20YaM0mlL6vP0bIeWwsjxyy gKhfOFfpYNn7mDAMAMZSYX1hgG7Xw90iIZqBoNiOZJylY/JzpgZ7bBBRGbNASvmnSS yhk1iqq5XclcW29K/77Z08exqxdKtcf5UFntyDZA= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30K0V31B079155 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 18:31:03 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 19 Jan 2023 18:31:02 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 18:31:02 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V2vb016882; Thu, 19 Jan 2023 18:31:02 -0600 From: Bryan Brattlof To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski CC: ARM Linux Mailing List , Device Tree Mailing List , Linux Kernel Mailing List , Keerthy , Bryan Brattlof Subject: [PATCH v2 5/6] arm64: dts: ti: k3-j7200-mcu-wakeup: add VTM node Date: Thu, 19 Jan 2023 18:30:50 -0600 Message-ID: <20230120003051.9100-6-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120003051.9100-1-bb@ti.com> References: <20230120003051.9100-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3085; i=bb@ti.com; h=from:subject; bh=fnGHhI0x+GuDg9xHZ1j87gRgvMs54/9Tc3Q9qTchzRQ=; b=owNCWmg5MUFZJlNZs90XbgAAa3///7Z5v/e3//P+bX1fv/vzuf/naMYXnHs/bf2v/N95i0+wARtZ RD1ADQA00AGgDQ00AA0AGgHqAAxDQ2oABoHqAGgAAAeoeoaaGh6J+pPZUQaGgYgDBMhkAaMmTEyMIN NAA0GCaNGINAMRhMQDQNMIDCZA0AaAaAMmp5T0jRoMgNNAaB5R6TQNqNBoAA00AaaDIAAAaDQAyGQA aDQAaaDIHpNPUDD2DCeoXF8RHEFzLyD/G0B4YQ+OnYqnUqmfzYHaBXgo8xLDIR1bMsguymFOSwdRAs Ny+NWaReT01cLOpqt9fZNvYrcCUcHrsLlPT0rm64fw5LYl1e1gbgRH1CraF7ZGtVeVzJRjy8K+0pP9 aSTPPDCwSNNhkmkON1dLdlyiitkkFrpj8feEEBYpEz9tnf5n1d6LcyTqAmXCTsHCnh78V62vg/htvD NlvOLl20qQsCR08baFpyJQ8d1JuYgbhSs7DZVVlpAQVHqmmI+H9A6F2bj8l0i8rn/ttN7o2KVER1iG KKjKtMKi24W6RDqxjILHedmtYuOT8oYsls5ZzBMBvpBPvs8ifUA4I3ffwn4aNWxbl1zyZaNDmP3R+O 7D6UKQmhZMwbyAY1hV6yR2QCEBCsDUKOC2PjZGUlsQMRzRwhRUAsT/F3JFOFCQs90Xbg== X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_163115_527953_F0C7B19B X-CRM114-Status: GOOD ( 15.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The j7200 supports a single Voltage and Thermal Management (VTM) device located in the wakeup domain with three associated temperature monitors located in various hot spots on the die. Signed-off-by: Bryan Brattlof --- .../boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 8 ++++ arch/arm64/boot/dts/ti/k3-j7200-thermal.dtsi | 47 +++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j7200.dtsi | 2 + 3 files changed, 57 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-j7200-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi index fe669deba4896..1eb16542bf9f1 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi @@ -399,4 +399,12 @@ rng: rng@40910000 { status = "disabled"; /* Used by OP-TEE */ }; }; + + wkup_vtm0: temperature-sensor@42040000 { + compatible = "ti,j7200-vtm"; + reg = <0x00 0x42040000 0x00 0x350>, + <0x00 0x42050000 0x00 0x350>; + power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>; + #thermal-sensor-cells = <1>; + }; }; diff --git a/arch/arm64/boot/dts/ti/k3-j7200-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-thermal.dtsi new file mode 100644 index 0000000000000..c271cbb72db68 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j7200-thermal.dtsi @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +thermal_zones: thermal-zones { + mcu_thermal: mcu-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 0>; + + trips { + wkup_crit: wkup-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + mpu_thermal: mpu-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 1>; + + trips { + mpu_crit: mpu-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main_thermal: main-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 2>; + + trips { + c7x_crit: c7x-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/ti/k3-j7200.dtsi b/arch/arm64/boot/dts/ti/k3-j7200.dtsi index b6da0454cc5bd..2abc872ecec08 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j7200.dtsi @@ -168,6 +168,8 @@ cbass_mcu_wakeup: bus@28380000 { <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>; /* FSS OSPI1 data region 3 */ }; }; + + #include "k3-j7200-thermal.dtsi" }; /* Now include the peripherals for each bus segments */ From patchwork Fri Jan 20 00:30:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13109017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09146C004D4 for ; Fri, 20 Jan 2023 00:33:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c0CbwKLERz2pUHnX/DvxX+sJgHNpoi2/XXDz/6Pw3EE=; b=mbZ48fOhQlZb38 iCPEoJlSJkmZyRFqUby9i8FVN5k5ORUwyFLdza2OQBqRgAAY+AsM4Hk9X6E4+t5SX5LrpAQ1usKIE U113Fp8gqa80OlgLDlJOfkRm13ES6QHYvG/TaCZQpVpLyMyW++e5+kk+9IE+OkpbelPG/wlDVlINk 0JtgiPI6+0vDzscm6dAWi9jtqw9yXlobM/NksH1ewtCfNcRM/DZIMXxgilyhk8cvbAzjTsrOXdCj+ j6daIElezaYmZmh0OB6ubMcZyIBX5yhAFJvpVWPQNRbcv9N4+DwyHU0BrjtZxtMXzqMmzQlSs1X4J uasj4sLO3iriunKrilTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfKK-007kSm-6F; Fri, 20 Jan 2023 00:32:16 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIfJL-007k20-8A for linux-arm-kernel@lists.infradead.org; Fri, 20 Jan 2023 00:31:18 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V3aP069173; Thu, 19 Jan 2023 18:31:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674174663; bh=u+uc2nYXPIgUszj4w49lgbEZtWJWci+3AIakOyLqess=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=d83kb17jziKbHf7WZBqOUCr3lUyC0zmFX9dPvnSDsjgie3+YaUFl8MGWOLQDpRtjr bhh51GZf2l7BUVol1zdjCj/0hbplhy9lPiykYaU1jby+EMfEaEaLVR0mdxA767XnNy xMtyEe97YKIX2a1+9vDDOH0intA6XF1np+lqet6g= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30K0V3mG089211 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 18:31:03 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 19 Jan 2023 18:31:02 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 18:31:02 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30K0V20C021528; Thu, 19 Jan 2023 18:31:02 -0600 From: Bryan Brattlof To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski CC: ARM Linux Mailing List , Device Tree Mailing List , Linux Kernel Mailing List , Keerthy , Bryan Brattlof Subject: [PATCH v2 6/6] arm64: dts: ti: k3-am62a-wakeup: add VTM node Date: Thu, 19 Jan 2023 18:30:51 -0600 Message-ID: <20230120003051.9100-7-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120003051.9100-1-bb@ti.com> References: <20230120003051.9100-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3073; i=bb@ti.com; h=from:subject; bh=+Kty86j+q7PXR7vWHvLKDTs+vLrH0F5uM0CEG61hrrE=; b=owNCWmg5MUFZJlNZhSzbRgAAZf///v7/7//9uf/6h//cv/t+TyT6+v7Nv38///qtq9Rc++cwARtg HagAGhoAAAND0hoAAAaAaAGQNABoDQ00BoAAAGTTRpiaMJieptGowTahxGgNAAyMg0ANMmmQaaAGjQ AAyNGmEaZBmoxDINNBpkBoaA0MmQBoDQAaMHQaMjaTEBoaANGQaDTRhNA0A0BkGQZA0aNDIAYhoBpo NAYgAaGQYmRoBpoAwe3rBt+uACo8t5FPn8/Y1zNGx4UvV9YEEJBdEl3AjTrlWcS+4Jat8nQAJTICSE sW8OSwTIUl0/NHAgMBQ1lFwIgLF2qVnXIsdDyidl9rpVpMYIvUw5o3QVU9Nr+/V3T/1an0Snczu2Cf xvT6ETV8Sp2twV4eBCqoA2tkNRl2Sq84iURoQZeAxEyxabMGsyJRg8lyqGuPO6+Tr+QzxusrEYhTk0 S4msIF38iwXDvHmSpkgL0j3D+gUIb6dKGIwtPBI7LB5B+MdQRH6mjv2xOUkOV0i6p3CXpD+yG/HTxl R/AUq7Z+yTFRsbc+UDr1Y1VI60glnRhg2gomUXFElC0dhRSYeW3vxCpJ3hlqDEuhBkG8Lv79R8fKWq jwIGUeycnlA97pkZhlp3WZ+zBfbDJIDVKi0giDtaTDNi0FhHRoQFchDUKAELd8wuoKD/i7kinChIQp Ztow X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_163115_541239_5085A289 X-CRM114-Status: GOOD ( 15.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The am62ax supports a single Voltage and Thermal Management (VTM) device located in the wakeup domain with three associated temperature monitors located in various hot spots of the die. Signed-off-by: Bryan Brattlof --- arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi | 47 ++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 8 ++++ arch/arm64/boot/dts/ti/k3-am62a.dtsi | 2 + 3 files changed, 57 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi new file mode 100644 index 0000000000000..85ce545633ea5 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +thermal_zones: thermal-zones { + main0_thermal: main0-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 0>; + + trips { + main0_crit: main0-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main1_thermal: main1-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 1>; + + trips { + main1_crit: main1-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main2_thermal: main2-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&wkup_vtm0 2>; + + trips { + main2_crit: main2-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi index 81d984414fd4a..9bdafead7199a 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi @@ -51,4 +51,12 @@ wkup_rtc0: rtc@2b1f0000 { wakeup-source; status = "disabled"; }; + + wkup_vtm0: temperature-sensor@b00000 { + compatible = "ti,j7200-vtm"; + reg = <0x00 0xb00000 0x00 0x400>, + <0x00 0xb01000 0x00 0x400>; + power-domains = <&k3_pds 95 TI_SCI_PD_EXCLUSIVE>; + #thermal-sensor-cells = <1>; + }; }; diff --git a/arch/arm64/boot/dts/ti/k3-am62a.dtsi b/arch/arm64/boot/dts/ti/k3-am62a.dtsi index 6eb87c3f9f3ce..84e8adeeebb61 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a.dtsi @@ -114,6 +114,8 @@ cbass_wakeup: bus@b00000 { <0x00 0x78100000 0x00 0x78100000 0x00 0x00008000>; /* DM R5 BTCM*/ }; }; + + #include "k3-am62a-thermal.dtsi" }; /* Now include the peripherals for each bus segments */