Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1289586rwl; Wed, 5 Apr 2023 14:54:35 -0700 (PDT) X-Google-Smtp-Source: AKy350a7V0x8Hw1lfiakGV8Uq6B6Kyxw1qwuXcBlSjDrgZUTVD9OmZLGDkbYgd6J9IxKR0O+GnPX X-Received: by 2002:a17:902:d503:b0:1a0:514c:c2d2 with SMTP id b3-20020a170902d50300b001a0514cc2d2mr9677856plg.68.1680731675540; Wed, 05 Apr 2023 14:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680731675; cv=none; d=google.com; s=arc-20160816; b=k+WX7q+7nRuJhbmF7uGBQSbmrgFrsL3tOVm9AoofYRGzACxgpmcFPEiP0HbiXbwIes ei9HoGhufvxhjzTL2DHZ57+Q3LXkBNUFDMjC3ltoFgat1xq7eE7bNCV2Dx8Wau8SCi5V RJRPXnoWJU9/DOxJ7+keCogisRxJOu5YpxPVKl3e64L2YHBnEmsClPi7/f8qEdVTmLAa 7NnHDNlRpf1v4ZYB662g1jvzpXRGfgP4hZGcM8sEPMihQsnSoqifH+JgLja+GgLATioo K75T2XgRSwOLVZ3YyBrq4kouy8h+kJ6x1WHZ5QbfLmT1BhVhfbhj+tFLeE8B4xm9Mvvo KbmQ== 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=EUlsFTXW7rMpWtXQZPcTFeOD4r02Fx8Op48eamUllgw=; b=PDPwDMKmFnTsSjHhulqp5xQ3r6dcXmk2m5lJIeSARRMdKRN0Qaw11hgbiLFnSpTm8D udQO6RwBGVr6WVshNw1YjDp0RBm6jMJ0IwDetdQInHVq21cSzjLyP4XYwAF5hJ/83d6u HBj0fU1IltFifVV7WfWQqq+/ybMhOZ3TG3mHCaDvJi04OGRxXODNU0Cnff77KMcVaCOC eTHKPl0APXqa7RwHfOJwmM9ZTsnFzOVgc3OCLo7Yx7fD0mZq6SrS77x+ByIT/6RBtwXf dnYVyO1T9HRha6lGCANRk7wSo7VGAfMw7wxwjr0G1meqCou7MFwxuI/IJzKidf5V3dkX xr8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ixLDoBqs; 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 u14-20020a170903124e00b0019ca54e71e4si30297plh.224.2023.04.05.14.54.23; Wed, 05 Apr 2023 14:54:35 -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=ixLDoBqs; 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 S232680AbjDEVyI (ORCPT + 99 others); Wed, 5 Apr 2023 17:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230497AbjDEVyH (ORCPT ); Wed, 5 Apr 2023 17:54:07 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD45610CB; Wed, 5 Apr 2023 14:54:04 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 335LrpQx024993; 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=EUlsFTXW7rMpWtXQZPcTFeOD4r02Fx8Op48eamUllgw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ixLDoBqsSNYbUp/vvsY9EYAjrs1YrW26snm3a9PXMxtCN3L8cLXvvkRObFyLMWkSo 9drHfUx2VCE/O6Vn97gFiQzMJNFGwnZeYct9aZOHZ8fv37OlpXtRCNlJQBIvDJ3Srx Vosi5eJ0KnO0llA3Z6mifTOiG7g9QODCzy81XSR4= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 335LrpoH031345 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Apr 2023 16:53:51 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE103.ent.ti.com (10.64.6.24) 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:50 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE100.ent.ti.com (10.64.6.21) 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 lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 335LrppQ012702; 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 4/7] arm64: dts: ti: j784s4: Add VTM node Date: Wed, 5 Apr 2023 16:53:25 -0500 Message-ID: <20230405215328.3755561-5-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. Seven sensors mapping to seven thermal zones. Main0, Main1, Main2, Main3, Main4, 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-j784s4-mcu-wakeup.dtsi | 9 ++ arch/arm64/boot/dts/ti/k3-j784s4-thermal.dtsi | 101 ++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j784s4.dtsi | 4 + 3 files changed, 114 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-j784s4-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi index f04fcb614cbe4..62dd520601bbf 100644 --- a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi @@ -342,4 +342,13 @@ 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>, + <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-j784s4-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-thermal.dtsi new file mode 100644 index 0000000000000..f7b1a15b8fa0a --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j784s4-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-j784s4.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4.dtsi index 2e03d84da7d2e..cd403c3d2be88 100644 --- a/arch/arm64/boot/dts/ti/k3-j784s4.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j784s4.dtsi @@ -281,6 +281,10 @@ cbass_mcu_wakeup: bus@28380000 { <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>; /* FSS OSPI1 data region 3*/ }; }; + + thermal_zones: thermal-zones { + #include "k3-j784s4-thermal.dtsi" + }; }; /* Now include peripherals from each bus segment */ -- 2.40.0