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