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 */