Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1289854rwl; Wed, 5 Apr 2023 14:54:56 -0700 (PDT) X-Google-Smtp-Source: AKy350Z5b/LEIn+ygat0OFhFO6s1hNdHa2kZbRmU8vcyF27ZpGnYWxHSkrUw2frmZLGWLB7XYya0 X-Received: by 2002:a05:6a21:8693:b0:de:13c4:5529 with SMTP id ox19-20020a056a21869300b000de13c45529mr586147pzb.62.1680731696456; Wed, 05 Apr 2023 14:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680731696; cv=none; d=google.com; s=arc-20160816; b=CHvxAWwpE+ZwFWpa+Z2R5b2uRl/yTWSvquCnM7WFlgFJGYf8LkrxMqaUkxG3+6+tPx H4tlet0mksSt1GzQLiaDV1v7S8UwD9rXRwvBoE24xF/xi4gnyN6FqSKhTzd3Q2nrpEww cWwUTpcc67Zx6+qAIxYbvn+WhM7PYHmLfjhyzHC0H+OKCsxWmJ2Micc8V+nbGg0E4GdY 8kMSpWvh88fnDuKT2pimtebX/CGC1zmP15wtRQmbKg8yjjYiixk2LtfMWvg89RDJYZAE 7BDsko5tp/xO0EMMtzqh5fJuotKev8e8VTANPSvXU/HKTP9BM820KSw9PMN4p71KU1Lz z++A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=clqkHsNQNcPVqIpQ6r2HdCEYxIyKH+fSK/iWYtt4KeQ=; b=MWPblmxaMHf5PWJ6ruUkR0UUSUr6YLMZFzZqCxwWTDosI0N5+02KrhHWlD8JOXGNnD 7osB2Ko/307z6Y01mwKlS68jh1xYFnuXHZQtjM3IbfqTxWyOqp4Rf9IJmK/OveamV4O1 3q+jsUBO1YIQ4kZXys4egCN7yVl/+a5VmjhDzTSMIlSP1IbOl7ZN2EP/XWrN5uXdwi5k yhLr6IAtQRlbrjnitJ1xIcMO9LRBTXwitIrMnd45fjEckGlGzvd61cYSNdRHk3DS4adE 82eh+B8WEiEhEyTNhe22jAfgVjsXlRQ7fdiuTJ3oJsMXOjqXZQFH8bIQDiCZ8nwgLg+J oDGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="q4TxB4/w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020aa79d0d000000b005a8ee84ba02si13233059pfp.310.2023.04.05.14.54.45; Wed, 05 Apr 2023 14:54:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="q4TxB4/w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233862AbjDEVyT (ORCPT + 99 others); Wed, 5 Apr 2023 17:54:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232921AbjDEVyK (ORCPT ); Wed, 5 Apr 2023 17:54:10 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7E132134; Wed, 5 Apr 2023 14:54:08 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 335LrprS109534; Wed, 5 Apr 2023 16:53:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680731631; bh=clqkHsNQNcPVqIpQ6r2HdCEYxIyKH+fSK/iWYtt4KeQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=q4TxB4/wlcDugwc0k4vKpcYY4rQsHB56Oynu5+zLDyKfOypO8FHc0WMKG9YdBNEJZ Iy7caS9x466GAS2MxDqiCtbCZGkBifItQyWGcKSpCb8QAx+DjG3sXQCk4Fn4cIEVSO FjMWdmpahtRPyDa6QmQa07kTCVeAcpx07uj+4M3M= 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 335Lrp4Y031351 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Apr 2023 16:53:51 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) 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; Wed, 5 Apr 2023 16:53:51 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE109.ent.ti.com (10.64.6.30) 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; Wed, 5 Apr 2023 16:53:51 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 335Lrp4g049459; Wed, 5 Apr 2023 16:53:51 -0500 From: Bryan Brattlof To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo CC: Rob Herring , Krzysztof Kozlowski , Keerthy , Device Tree Mailing List , ARM Linux Mailing List , Linux Kernel Mailing List , Bryan Brattlof Subject: [PATCH v3 7/7] arm64: dts: ti: j721s2: Add VTM node Date: Wed, 5 Apr 2023 16:53:28 -0500 Message-ID: <20230405215328.3755561-8-bb@ti.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230405215328.3755561-1-bb@ti.com> References: <20230405215328.3755561-1-bb@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Keerthy VTM stands for Voltage Thermal Management. Add the thermal zones. Six sensors mapping to six thermal zones. Main0, Main1, Main2, Main3, WKUP1 & WKUP2 domains respectively. Signed-off-by: Keerthy [bb@ti.com: rebased on v6.3-rc1] Signed-off-by: Bryan Brattlof --- .../boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 9 ++ arch/arm64/boot/dts/ti/k3-j721s2-thermal.dtsi | 101 ++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j721s2.dtsi | 4 + 3 files changed, 114 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 a353705a7463e..a178368224f44 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi @@ -379,4 +379,13 @@ adc { compatible = "ti,am3359-adc"; }; }; + + wkup_vtm0: temperature-sensor@42040000 { + compatible = "ti,j7200-vtm"; + reg = <0x0 0x42040000 0x0 0x350>, + <0x0 0x42050000 0x0 0x350>, + <0x0 0x43000300 0x0 0x10>; + 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..f7b1a15b8fa0a --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j721s2-thermal.dtsi @@ -0,0 +1,101 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +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 376924726f1f3..4aab2daf85fc7 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721s2.dtsi @@ -163,6 +163,10 @@ cbass_mcu_wakeup: bus@28380000 { }; }; + + thermal_zones: thermal-zones { + #include "k3-j721s2-thermal.dtsi" + }; }; /* Now include peripherals from each bus segment */ -- 2.40.0