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