From patchwork Tue Oct 11 23:17:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 13004519 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 F149AC4332F for ; Tue, 11 Oct 2022 23:21:34 +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=GVKw23mpLta5n3Lelscafxx4vwbajb+QtEIlkGpPAfA=; b=d2DF2PDbIF9LBj GfOvjNZpl9yW0TH8DnF9zkmmaDElz8/Mb7wzUDv9XsWuXgJt9ta9Ow6QjqA3E8cMz9qfHQCzcE7Pi TmJnhxOGwvNkPwlJCf+PSUaiEr71e4it9KkFk7Jzhe+kTvvLI2XQYP5YC8TRpIsGFOMg8KgcShsOR rG0+3PGpeQUx/dIu/VlC8hqiJAXG85LVefIKw7qdAjFfSHSB5wKMH+dSQvDrxQ2w1B6LOsyVrvAgL GEQo4xoRrFj2NgJmmkb0fptPRhiAeOrXCZW6ovnFyplpFiigy2Ro4T7aWlt3H26ME75mNRSoXifhU 3BFJMuK3cJLZm6yCeaaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiOXy-0069uu-NA; Tue, 11 Oct 2022 23:20:27 +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 1oiOW0-006925-AH for linux-arm-kernel@lists.infradead.org; Tue, 11 Oct 2022 23:18:26 +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 29BNI8dd005708; Tue, 11 Oct 2022 18:18:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1665530288; bh=yWGhxBED/EYOztiXTHh4AcivwZfhpPNPRo8BTRUenMk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=eAV+C1po8q3Q4Qjyof97fUv5itM+sghueiDX1vmdP0JbWOP2XG1w48AK4nNVLPpyc RVQpwQ/Rr+q7GInghakfu3FLSGKZty8DnNlEXQdy6XmuaibLiZ+rynxB62JLVqc92g tZiVa/qlTzYXFB15C/Ogg69gaJIcuY9JzpnvJq6k= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29BNI8Lb081780 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 11 Oct 2022 18:18:08 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Tue, 11 Oct 2022 18:18:07 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Tue, 11 Oct 2022 18:18:07 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 29BNI7nG088568; Tue, 11 Oct 2022 18:18:07 -0500 From: Bryan Brattlof To: Rob Herring , Krzysztof Kozlowski CC: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Keerthy , Linux Thermal , Linux Device Tree , LKML , Linux ARM , Bryan Brattlof Subject: [PATCH 11/11] arm64: dts: ti: k3-j7200-mcu-wakeup: add VTM node Date: Tue, 11 Oct 2022 18:17:27 -0500 Message-ID: <20221011231727.8090-12-bb@ti.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221011231727.8090-1-bb@ti.com> References: <20221011231727.8090-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3059; h=from:subject; bh=1sRLapOsPYA037+Zk0rINvpjpnn0VqHMNprDoz4GFMU=; b=owNCWmg5MUFZJlNZRQKgwwAAZ/////9v4/v13F//15LL/8eP323/ZW67zt/7bb/cx5b+7u+wARsY kPKDQBoAAbUAAaBoDIANMgAAAAADRoABoeoA0aNHqaBkD00Rp6gNP1MkMoDQD1ABoA0D1ABoNBoDQA DT1GjQDQAeoAaGQAG0mjR6hkbUGR5QeoNDJ6gNDk09Roeoek0GmmhiBoGjJoYho0NABoDIaANNNAZN DQGhiGmgaNADQaYQDRkDI0AAEQNW9I3kIC6B6Rc6UORz6unmX299wUKLDa+izDWTwnpQiEoMTwIfs5 JgoikEkFEPOStCessk1KIejx00vbGnl3oZIOKn2sTod90PNQgJyXXm+C9tyw+UaYJ6lCi0GFYn+I0K AkAJGg7bWHEYD6SZcCVwlGCiNwwyvlIqPFJVrwUiPCRBhpfUtSgYkPCZFnma3+wQhjKBOJeSwRZGdv ZuVyHvxZ8rW3jpe9Z+gVRs6OqN4i5UBbfKrxAKAYxZp39MSo2UCcbztErydU4I6RXl2HYMdYEHAo39 SmhA1AHzNOEJjZS4rUmkRJDqiHVpF49ssUuJ8UwhnNziEWkmVgDdUf+4Hy6QFU6PRXhEtwYVLUs0jE If5UwSBPRS+bFxDPxTS5aO6lhAy7U0Xhp2BQBy2LP9V0UExAwD7GjVsmHn/i7kinChIIoFQYY= 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-20221011_161824_498753_E7E62390 X-CRM114-Status: GOOD ( 14.30 ) 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 | 3 ++ 3 files changed, 58 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 ff13bbeed30c9..34d3e9bbd181c 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi @@ -375,4 +375,12 @@ mcu_r5fss0_core1: r5f@41400000 { ti,loczrama = <1>; }; }; + + 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..0bf52c93c3f9a --- /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 = <&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 = <&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 = <&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..9368a6e3d4a62 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j7200.dtsi @@ -168,6 +168,9 @@ 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 */