From patchwork Thu Jan 19 22:13:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13108875 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 C938BC004D4 for ; Thu, 19 Jan 2023 22:16:05 +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=xWI1j7/5hNwiI2 DeplIFMKIkiqjqpuukzvFAhlb1qQ1gfmKqXaFXvdToOmSyIHILIr/WXvaq3J7wCnbfSco/7nv+9Xc xKio3sFFzp2LA31AfzWExV3RnzCJNrsXPokcXbwJhBJUwGGx2PFu0yq87WbmG+iqpGSg+8fLCYJeM T8BHKvR7J/FUrO+YKeu11hXaRKss1QhsqXvJjLnCiE4x1pG3zV5yQ54oKWLOQdUEadgmfoYdTwmRV eg4KxO23B085uCNPSu7ahwTlPimsv18lxzh8SvofTDWGenQuR/QceV+n+zGM63TRH+DQjsiVQrEb3 vmfw42/R7ShX9s0otziQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIdBM-007Pot-Dj; Thu, 19 Jan 2023 22:14:53 +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 1pIdAE-007POr-FI for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2023 22:13:44 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30JMDURQ110978; Thu, 19 Jan 2023 16:13:30 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674166410; bh=ZSPCoPFBIjAT2TdS7esgXeJaXnUbGDBq0LvDJbjFWbI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hhskcdreWIFqxRA5mnQgm9i4Rr3NwzcWoZVdPy297X1oY9tFMiUcICTOqRhBVFG+m Cr6OM+8oG4uZgo+p54H+TYXY7Z7QGBwK0wmL8yJTJQnyAh7+KgLjj9jwuGUMKjmy7r dwx/ZSZwVvFKLDfk4rut1+akB2yUmLeHDMG8pvvw= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30JMDUGt014175 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 16:13:30 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) 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; Thu, 19 Jan 2023 16:13:30 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE110.ent.ti.com (10.64.6.31) 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 16:13:30 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30JMDUoh046554; Thu, 19 Jan 2023 16:13:30 -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 , Bryan Brattlof Subject: [PATCH 1/6] arm64: dts: ti: k3-am64-main: add VTM node Date: Thu, 19 Jan 2023 16:13:17 -0600 Message-ID: <20230119221322.12563-2-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119221322.12563-1-bb@ti.com> References: <20230119221322.12563-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=owNCWmg5MUFZJlNZUoGuxAAAan///v5fw3vqXtvnXP3fff2339V/8X9v7/Nz+2u9+7Prkd+wARmw HagGmmgNGmhoDQAGgAABoANNGgADEDTTRoaANANA000DRoyephNNNMRiHtTUQNGQwgaMAgA0ZAwAgA aGgANNAGjIwBAwgANNDTEBoxNAGgGQA0HQaYQZqNNAGhoNNqAAZDEaMQGI0yAGEA00BtEBkBoPQQAZ GjQaNDQAABIm4fSlQiKjLul1xhAfB8nUvCmQL0Mo/RX9iDw4kiISdlvldAiueVru2lSve7eOCzST+S bIYLLhU0MQ9ThgNk6cJgN2aQyhoLeBcEwekk6vyKBvLJ14OwxAjVSkxU/JjF5MZ/+nhNfzX+cKZ7au gy9o9kVswxacAqlyjb9Krc/AudzIrpYooi9sMS8GpSdOe6OmcUu1sv9UdbtjklhwYp8oo2Jcml+gxB J0Yifsrbca/bAJoTW3/gisTICBKHRrFdrQmZYiBDXsaZcwD7gM6oNInUYiBFxHI83fCqy6P3gj6pUK FEJF7VUdBcFc5gpFWumr7GCk+hOuP5quaIdSzgRllUcplbFNBtjCj5Mc6jHrIa+TZkQKBH2xj8YhKB AHDqVnvNzk0yAFeNmov2XQNwzQpYF2PENljw3SCT8JoD25AK3QoopKi/xdyRThQkFKBrsQ 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_141342_660574_B8B23E5A X-CRM114-Status: GOOD ( 16.90 ) 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 --- 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 Thu Jan 19 22:13:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13108872 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 EF428C46467 for ; Thu, 19 Jan 2023 22:15:10 +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=JkIU7M0KfUDAI9 V313ESLU6STmpd5G3ufBtUOnPC0Tgy2rPtjbmqKyIwJLG+gfyWVhCLDyLe3m/o1Px+IalhM4xu0at RceH1z0D5oYbHsPQOKiXlbrLh2jbZP2x2k6MnTlVKVsHQFj4QhWHOuq1+xpN/nkq0ieVx9K8X35QO a4yKbTUbOzd1QYAVAaRE3W20SNFiqGxwFo0e+5wSyqL+U5iwg9Qr44qqWI05IRhqtbL1a+0YlEKIg ZeHGBAFJ7TGQSklFCUzlu5lNroCoEcAlxM2U9PzPJqPivHlcbDU1qwEd3jUFsMO89DWxzryJ3Za55 rOvp0uZseXNb53mbplkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIdAY-007PUK-VN; Thu, 19 Jan 2023 22:14:03 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIdAA-007PN4-7q for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2023 22:13:40 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30JMDUgc071620; Thu, 19 Jan 2023 16:13:30 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674166410; bh=cEXQJWdqSirqdsfWjVaeijGRWaufQgDbMEkTdpTW4r8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=bpXkLR8sf2cyrPRKYJVsIBbUKvnKR63AoxeXi3jaUCXNO2UVMp/wArGe0akm6T1mu Vu3NQ60eZkd97feuxFdATQUi98zB+4YEvE5xNaFVFjTLndgG8Cn3u9yuPs6nYPwuxt WfvWuWw4g8+0uN2PTUPkENxCGRVtJVHN5DzcMouM= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30JMDUIv012463 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 16:13:30 -0600 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE102.ent.ti.com (10.64.6.23) 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 16:13:30 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) 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 via Frontend Transport; Thu, 19 Jan 2023 16:13:30 -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 30JMDUtw002656; Thu, 19 Jan 2023 16:13:30 -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 , Bryan Brattlof Subject: [PATCH 2/6] arm64: dts: ti: k3-am62-wakeup: add VTM node Date: Thu, 19 Jan 2023 16:13:18 -0600 Message-ID: <20230119221322.12563-3-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119221322.12563-1-bb@ti.com> References: <20230119221322.12563-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=owNCWmg5MUFZJlNZ8sDBIwAAZ////39fviu96RH2e9/9v7xf77zvfpbk/kcd3W///vpdw9wwAQkB iQ02oYjQAAyAA0ADQDQAAaA0aAeoGg00DR6Q0aaaANNHqaNPSM0nlNDIw1Dk0AaaAaMENANDJo0epj UbSGgaNDTQDIaA9QNDJoDR6jTIZGTR6mgaBoNNGIDTIgwmIDJk0DE0DJoZNDQaYRo0AxDJkGEyDTEa DIaDEDQyMgAMmmmTExDQAfDZfHgLRYZCDRvT6cNweamndZRJhBsxoM0diYICLGBFshE9dV2Mk5QEAs r5SAwQ9Cj0DokoJRIhmOduSgebj6AF6h33bB6iVIueC5799K06hh/CBF2S82WCzd61jiguEr3C5N9T aMZkjAeaoEhl1eFPiTMvAsYXOeW59o2dKlZLaBcd4dgMxUZBqcJoD2rc4j8riGn9cSsj3BNR1Kpf+z kOqxtolEAIpVjeRNufaPByT5hm7a53tNNF7IOzGWOCzefCWoGiH4AdfigTgon9g+JbU3ogrn/ArDZM AmqfFminWyr0/ArBAxcMFgHroJfP6FYvuKZEW9ZK7gdJEYByqalqZR3/bPslyOZIs0k7lwDdnhxyPg FdMit3iEMUQ54IuVs8b5kW7BS5g1HCNnZU+6pXZhyVclId+oLmnl4dBsiipf/F3JFOFCQ8sDBIwA== 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_141338_398687_28A3AB50 X-CRM114-Status: GOOD ( 15.81 ) 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 Thu Jan 19 22:13:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13108873 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 468C4C004D4 for ; Thu, 19 Jan 2023 22:15:32 +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=4+X5f+kQL3Ou7r V5yXr4UnlUEpajMdfSxKFi1ZF95lvUexKXSQtMSZqTfyzJAJBy2qtQT8WhjeNV0yOyqZdo4j26L5r yQv6VRc0Vo7SSuqVhwZpEB8REsTwM8G/pi7udwoe6LOnBdPX8HxLf1bxhsm1l1OnebTMk0i5DfVar p6zaT48F4qiDU348bRRhBbku0hsQM9zEcE6890mjQmHJJum2eHDNyOoUyRRNta3KyyQx3zOnzSKg9 Pfi/S3wPQKOz5Pa6gHcTF3P/aths7caC2PekiuiJgIzWtqvWkKcTpxvrvFgQlCNWhyN9DKP4Px0MO JiUnAyA5k82e3N69Jk7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIdAp-007PXE-GU; Thu, 19 Jan 2023 22:14:20 +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 1pIdAC-007POI-ET for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2023 22:13:42 +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 30JMDUc5042936; Thu, 19 Jan 2023 16:13:30 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674166410; bh=wkXSLQGhAd5bDqbgGtKdURlGStuo/SEc+20hxb4hWGE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GuBs9TUaU3YcuH6TQwdhSzyhkuMW9A35dhh5DwCSsn/hYOkaCB2RDuuQmYS/3Jv2e +CS2g8YzOMfxGPCpnRAw3s/u2+HRe5LPoh+FpLrzvY9ImMVDuG7Xo7N3va5VVaVXl1 7tdaVJHvYI0TeUaLeeS0jFzLvtUjaGkqCwQ+3Ce0= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30JMDUZF014178 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 16:13:30 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) 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; Thu, 19 Jan 2023 16:13:30 -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 16:13:30 -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 30JMDUnF006933; Thu, 19 Jan 2023 16:13:30 -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 , Bryan Brattlof Subject: [PATCH 3/6] arm64: dts: ti: k3-j721e-mcu-wakeup: add VTM node Date: Thu, 19 Jan 2023 16:13:19 -0600 Message-ID: <20230119221322.12563-4-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119221322.12563-1-bb@ti.com> References: <20230119221322.12563-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=owNCWmg5MUFZJlNZOYK6ewAAY/////5b76tlr4/aW32T+/f+3o/3V+9/PWOf/35c9//U6v2wARsw jtINDQGmmhoyAGhoAA0aAAAAyDRpoAAGTTQA0GmhkaNHqaGTJk9TQNNNNG0xRA9QMgADQaDTRoNA0P UDamgNAMCaNNAMgGQA9TQ0ANGmRoD0jRkaMTTTJkAD0OQ9QGIGhkyaADQ0YJhMgAaMgADTIyMTTIxB iMIABoYQMBAGg0AAAAA/UBSNdbxMOihI2sin+g3Ea1r6ErSeCv9rijv65ADo5MQCLEeUHz5Y8bYAu4 Hfg+LkE4WhGChuGI95dASCGCovBI1EfdtAeXEWkKRkpayQwZ/zsFA5DkLdxWmP6OmGrZ1PkHLqlyxb jxiJnhQTC9SBJ97rgVmvUeji4z3AQzozXkSGBA+aHQvptQl6Fh6OWjBUmaioVRGBMEEzcFAXGYneJF UTh1t7DiZEgDBD1SlPgMVZk3/eCasM9+YCy5AYnVawn3IXQazJPr2ik+oWoCvn6q1bYfGuy4sbZhHD tywEAMbYaqIrYxmjcrnFApPWRI0TTir8SbHJTj/R7AQUPAMBrsTccLx1uVJNfT94EAuE3blEgDT5Ah kP0SZNRPhRylBaeSUgBmqQMtkIxJHRkxhRXfDcl8ulnetCAMkFycUUADWrxXQu5IpwoSBzBXT2 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_141340_613144_058E8020 X-CRM114-Status: GOOD ( 15.31 ) 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 Thu Jan 19 22:13:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13108874 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 A10BCC46467 for ; Thu, 19 Jan 2023 22:15:44 +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=zK7Tfzr2ctkUxm Cvd6GkZk7NSxyIGt6N2S52sIxkdO/DGCDiAC1ywzfteaZ/zEgNIUH/RNR0GEWP+jE/JH6SfKZaYOv DIv/9I9z9T+gOdE76vi/doPD/vPbgAAOf1pCUrStWOeBYU+a5V/DxnajhuYy8BQJ058kI5KTP/0LN f4xvZMPaI22QhTwnjY6C1VKXkFEs4sqvnfZSrZpefot3YQffRS16iz6jz59ikxTWp1KU0/tXgsT7N MK4ED6wNqPulMSxyIe76a7Haman4KbCeMIdVFN2WZE5Odhe1j53pBzkO5UeTkJlOGiH3r00Q7S0c/ HgWJUGkecGGmZAsR84NA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIdB5-007Pgs-UY; Thu, 19 Jan 2023 22:14: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 1pIdAC-007POZ-N0 for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2023 22:13:42 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30JMDV06042940; Thu, 19 Jan 2023 16:13:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674166411; bh=EhVmb2u2O6mw4AA79EZXTNGXm1WaiokelpyqCkP0Q/0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wBnTXLVO84owiGov3GID3wBz6sHmt4knS3O/IBLYZjf+9WwHaH9IlzaiOod5RWyYh 910rKK63EugTyONpuOUmpNHppcb3awJUpQLA1U4WMJdrRnyrQ8aa/CC7+25fLo3xCA 9IJ54ijO3ew/LQnsOPC0s8RR0owjtC89evzSZ4Y0= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30JMDVSU122576 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 16:13:31 -0600 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE100.ent.ti.com (157.170.170.30) 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 16:13:30 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE105.ent.ti.com (157.170.170.35) 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 16:13:30 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30JMDUqU046558; Thu, 19 Jan 2023 16:13:30 -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 , Bryan Brattlof Subject: [PATCH 4/6] arm64: dts: ti: k3-j721s2-mcu-wakeup: add VTM node Date: Thu, 19 Jan 2023 16:13:20 -0600 Message-ID: <20230119221322.12563-5-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119221322.12563-1-bb@ti.com> References: <20230119221322.12563-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=owNCWmg5MUFZJlNZao4iMwAAZ3///7/55v997f+m1ty22srf73d7eq2n6sfLbG8d/7dL7V8wARsT EMTJkYmRoNNMgA0aDRpowhoABkANDJo0aZBiGgyGjINAaDQANNPUyDCPUz1DpoGhpo9QNAA0AGTQBo ANAG1NAHoIBoD1AAD0jah6Q9NEeoPUGTagDQaNqeoKlG9SaG0jNRoAPUAaMgA0GgA0AZDJo0AAGgAG gBpoAANAB4o9TamBAIbp5cVsGcwul2QHhpOIDbjJNhTU6ov2/oAXfeDfdMxSj8GdFFSqhoUAA65e6F TrW6GTOOKOuL4MmWBZN17JAkbQhP4M1mN2mFIPKzv2lvUQADhR8Kgf44O6NB1Ah+Vnt9wpowRRB4TZ XCVAhlAE7lqQiGIefYMFrRem0jCyg62ybZzmp3yxxUtISxJDckx+X53800+q/Dyp3n9OOstqtSzAYH SsFONhItH2a+vUbGKDCa8fxYeb1YJSUdob9m7Y+q4k4Yc6u+qPP7TrEyUXkuTbllEif1IeKUGgDcLG eKmBzh+zvfRE3BsphfK+LSmMsgDuzImZZOVIWpoxEKIQ0cNoQiRELL5OUJ6BurP58eRCO3C6Aq7MMW wcaKaB9MHgCg6gYAWeOicAB8XXJs57yXEdgqda8zhLkBAxcaPi4Yu5IpwoSDVHERmA 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_141340_923290_2DF7065E X-CRM114-Status: GOOD ( 15.07 ) 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 Thu Jan 19 22:13:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13108870 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 56837C46467 for ; Thu, 19 Jan 2023 22:15:01 +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=saD1Y3g5KkTdvh lfCSQLmQbJAkxy/kZMD6YTAid1TI66bP7vcOzNsRytFxT8tfGsMZWs+iJVUTcaUnGht0vEzZuIGKO UtV7YjFMgSgCveEUMpbnZ7yvTG0JAfgrdc50cfioOKjns4sqhhZZbzURbAWFgZy7i+gVMk+FXBB5Z vWDTDR7k93VNcZHlBXUT4++odysldfdjcgv57VxerYY3oTF2kh3z/G88lA6aijRueIMpKGaAIRpTv F+tMcbVagBxng4U7V0hQ8S6ROmjlJ48PQ7Qmfxc+cErqw5I82/QZoyMMUq6uPkYzavD+drFFGeeVj L9w+q6r+5vQUtdJeXwGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIdAD-007POs-9Q; Thu, 19 Jan 2023 22:13:41 +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 1pIdA9-007PMJ-Dc for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2023 22:13:39 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30JMDV5I103038; Thu, 19 Jan 2023 16:13:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674166411; bh=31mTZJYBIgY75wlnyijVEc4W9dSBKWa72a/x4eFE+oY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=a1FNJNqLTdtWspAQO95nR1sDR9WqDMG+EeQmsv3WMqio2EwBp98HXsKcV5PBSvmXv qYNpzGII5uzmN3oPbMJ5GPX2xp8wyApDRZdTNfS9twcxVQt4qzuDMIG0U/2ymM/XTh SgtvMqNFO/zcdwCiZh63/11sR8jdcUGSN/29HDQo= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30JMDVQF012466 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 16:13:31 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE108.ent.ti.com (157.170.170.38) 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 16:13:30 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE102.ent.ti.com (157.170.170.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 16:13:30 -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 30JMDUJ1002659; Thu, 19 Jan 2023 16:13:30 -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 , Bryan Brattlof Subject: [PATCH 5/6] arm64: dts: ti: k3-j7200-mcu-wakeup: add VTM node Date: Thu, 19 Jan 2023 16:13:21 -0600 Message-ID: <20230119221322.12563-6-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119221322.12563-1-bb@ti.com> References: <20230119221322.12563-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=owNCWmg5MUFZJlNZOS/nAwAAYn/////7/vn6fL2+LOP/3fLv6SH210zT6t+tb7/88/14+m0wARmY HamgDQGmgNGj1ADQAAHpNANBo0BoAA0GgANANAGgZAeoaHlGgZoZTzShxDTQZMQNDEaZADQYQZGQGQ Gg0AYTTRiYRkNlA0aDQ0aaNDI0NDIaGRoaNCGh6g0aGjTQaaGTIaBkwgGQYmmmg9TQGTRhGmBAYgyA YRo0ZBkMgADQNMRoAAmk8T7KAyoVQDIiHQcSWIRyu7nlR+rDTgeK3V831BLVw+0OG/cI+IgFf3HoE8 cMvBqncG35ZgVS5wBfebdKt8hfgi2xKWd2wnyc+roj79ww50VIuL2b3rPCD9aA84YhoeLW2kqsPJkG wArm/ReCdcMFBNDInjWlbSXGPZFIdiSXEbWN7EmAnnGoGFp/OsCL3Nt3bwPfBhE5rUgWSv+eoYP14H FJwM/QFIOK1dAicb2fFTuv3QyS1Uvji5w+8chKAZhS0J5S2UIRNVApSGBJYsU3MYxlgHaHVnnb4vr4 9HZnjy5TM8yAPPj/xzZXCQiOrb4RHsnvcFz6mz2i1BEvAccj/OBgYuFGatbsMZpTOkOxKC+mQS2dZk /pDT0TB4ahCEq0l4u7vpyFhaKZWlpm5KsowtGkGN0zsMY4BYwIICsFYb/i7kinChIHJfzgYA== 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_141337_664953_617505A1 X-CRM114-Status: GOOD ( 15.46 ) 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 Thu Jan 19 22:13:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13108871 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 0B27AC6379F for ; Thu, 19 Jan 2023 22:15:04 +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=S7rAzMJ5d7lx9grOGVc61i4nPSzhh5iXhVVONLi2dps=; b=LvgB2eRHeDFDhe S4NRmrea8b5tyUBoazTuzeuiM9W/w9GiUnYzW+C4BDHPacgSFQCO6gMmSyFv4xpmNHUrtDaWg7sbo +627yj3vWcaP8WH8JtssSLP1QTMZZujMHOyebkQ7e4XO1t4+jnv3Q9j1fHpJZkLGFGlkO99tUrbW3 EpcaiyzCv9uEBg5l+Ago9+VuAL/XDY7myORwj1QAGRSQMU+dWlwm1rhdmz8ndJBLL4yKjUaXOneIl zDz/xoPFh+0Qj5RRmpvSZKznXQk89yh9JH1H+fd/6fQHO93AyS/yAU5AVlezISCVQJzHxWoVSTBwU 03PJNEidP/BhD2ML0xpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIdAP-007PRz-60; Thu, 19 Jan 2023 22:13:53 +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 1pIdA9-007PMh-Dx for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2023 22:13:39 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30JMDVVK103031; Thu, 19 Jan 2023 16:13:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674166411; bh=psud6/3Zex7Bnj45jRaOEP9aFmHjkTfzCmLnvxu6vqs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rQ8Fw6aEX2w/ybHwjAcNJMDLTfTvI/6FD/59qLfDZvc6dj4U/SpmgL2+l/mjv8VoW g+JVVYOzaBbSknK2zxy1TAuWYAfaJpEcgwTfNj+E2n1/gY5Jih+N2LmcpSwWiFnLsi SI61B0YpdZBzAp14p750Jc1iu4OEe+CEj+uZX2JM= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30JMDVdw122571 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Jan 2023 16:13:31 -0600 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE115.ent.ti.com (10.64.6.36) 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 16:13:30 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE102.ent.ti.com (10.64.6.23) 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 16:13:30 -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 30JMDUnw006937; Thu, 19 Jan 2023 16:13:30 -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 , Bryan Brattlof Subject: [PATCH 6/6] arm64: dts: ti: k3-am62a-wakeup: add VTM node Date: Thu, 19 Jan 2023 16:13:22 -0600 Message-ID: <20230119221322.12563-7-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119221322.12563-1-bb@ti.com> References: <20230119221322.12563-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=+8oOI2FkMbYpUXhfzeFebAQn++Ewvzjr9qxmkxY3bBs=; b=owNCWmg5MUFZJlNZU+tJIAAAYP////f5/zm9rMe5Nuxam07ffFt+/Xdm//vff7l8v/nq13+wARsw GJAA0GmjQDCNANGjIAaAaNMQ0NAGgDQaAGjQAAGg00aMmE000xMT1MaZIcgAaA0Bo00GRo0aNG1NDQ aA0ZAyDBAeiBkA0eoABoyaGJ6h6Q9Q9IGmQ0ZA0HJp6mgyaMhhNGgGIGjINGTTQNAZGmgAZMJkwTQM mCBoZNBkAGQAaMgGgyAAYHiHsguMcAkQ4mjmwP79rzIvTDQ8oWJBY6npBqjlIhh7o7nUFY8j1UF78e 8T6D6XNOB8zkr9NYpedxRVIyLcnQ3utv4AIIAlysKUVqKDq9j1fztMiNL6NU8FcnrYLaYhGQi1DGdL XwAODe7RuwgsRaSED+YUL1YLW+2rsBNizGVqeF4ZdTzpYnDJD02ojklIYRkmnPWu+3hhnmq5Vy9s6C vdzbSMC+yEqZGGnRrvxCDKIRihrtNEXi4k/tlfLyzo+vkdZiheqyoE2HpFPgUEu7U+pvLICNwErWYN EhSyChNjmDs9hKDjOlAbEfQ5GPXkINPinA6RuxCAScSYctTGOD2QOW0eDkDQWYqxxT163+S4/PUU07 ICeBYFdjI0SsiZKvjLw6GiyVGEIacu54VaSBmSYigLTNPnwgp3VgXyYfRf4u5IpwoSCn1pJAA= 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_141337_662506_3352CDB5 X-CRM114-Status: GOOD ( 15.38 ) 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..02c2bae300c49 --- /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 0>; + + 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 0>; + + 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 */