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