From patchwork Tue Oct 25 19:15:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 10955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1174746wru; Tue, 25 Oct 2022 12:18:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7EfD18AnoEDcvTGvofTlfRocNz5VZTq95XVXtx7hr530J5fU4t5WPMp1+XcG5n6IUA5p9W X-Received: by 2002:a65:604e:0:b0:43c:428d:16a9 with SMTP id a14-20020a65604e000000b0043c428d16a9mr6713556pgp.423.1666725523772; Tue, 25 Oct 2022 12:18:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666725523; cv=none; d=google.com; s=arc-20160816; b=DAztHm27EgwSX0wewRq6rOjsvg/ypRof62LNK7/jq5dEKMG8NYBYKHnhXTqAs1kcDM vzAmqUE5m6x3p+ZcZx53wsAWhf3FdD0wgh0ptfOhCsNzBfHT9ZeKN87xdnFd6NZZ77Zf B3F+SHpnsqC7lnnAwf/g929zgUCMyzZ+xIkaLJz/6zpc1ft7y5xuS0+w0iv5RJbej+KH wZyQvmTJidM6KrhafFYEDT1sLm5fJr13Kr+NJn6y7dkC5qzJw7lkPuooronjpK6MuN2X jXwosVpMdbabKXbqAzFVQFVvtySZXdkGWexvfHS9mbxS8gjHPi8soX6OTle1f7djfUME btow== 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=Le+bXLRPi2PorGOqYWdZ7TXZI7dPM2vRnsQn7M/5zyo=; b=jr21aQuWU4VgoHOfwaLd0qYLK3dlUPq0MrOFAJW3X8uvF/NsZBqwZxnYeUPq4E1ILh /5oPu4HeLHPTVeUn0VNOH2O8i2tnoQIMBpP3565MIYkHPRMCQf2ke1XOtQ365m4t7llS T/zVyQ/nvCrAhkUSRcHJFQWcXdpwqwFceceFZoEtH5JmomA8vcSxZKfwwfTbhMxh7MJh 1tfIpfjN/fWgvhlEhXDS9vZ+aGb/MmgJDhpV3aZe4g70pGbnvv2Q96gb/bi1OuiypcOH AG2idgxW+6sVtRuv1jbT+faH9lCMf6KPhs5735Sa2h/fY0mV7TmkFDFvv1sCp3IX1s5h zK+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jiTVp1Et; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x8-20020a170902ec8800b001868bdb66cfsi4027142plg.461.2022.10.25.12.18.30; Tue, 25 Oct 2022 12:18:43 -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=jiTVp1Et; 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 S232868AbiJYTQC (ORCPT + 99 others); Tue, 25 Oct 2022 15:16:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232614AbiJYTPf (ORCPT ); Tue, 25 Oct 2022 15:15:35 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B6797F11A; Tue, 25 Oct 2022 12:15:34 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29PJFKOK114089; Tue, 25 Oct 2022 14:15:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1666725320; bh=Le+bXLRPi2PorGOqYWdZ7TXZI7dPM2vRnsQn7M/5zyo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jiTVp1Et2ENCHcp1WpQgK8PNUPLqTQS6URzLK4rce0jU/l5EpeHJyTSDAnM6bYd4j SEzUspbYpMZjtWzqiyYIdIlTA5YHBSj65ph3rC4Tv0wmaU8TwYFfbGl8Qpyq8Kiwij OLDewvvrnbnfaaABNabJJjM48zzC19yQVFp3eYUQ= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29PJFKh9027909 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 25 Oct 2022 14:15:20 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Tue, 25 Oct 2022 14:15:19 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) 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.6 via Frontend Transport; Tue, 25 Oct 2022 14:15:19 -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 29PJFJGB018066; Tue, 25 Oct 2022 14:15:19 -0500 From: Bryan Brattlof To: "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Rob Herring , Krzysztof Kozlowski , Nishanth Menon , Vignesh Raghavendra , Tero Kristo CC: Keerthy , Linux PM , Device Trees , LKML , LKML ARM , Bryan Brattlof Subject: [PATCH v2 07/11] arm64: dts: ti: k3-am64-main: add VTM node Date: Tue, 25 Oct 2022 14:15:11 -0500 Message-ID: <20221025191515.9151-8-bb@ti.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221025191515.9151-1-bb@ti.com> References: <20221025191515.9151-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3215; h=from:subject; bh=xlJl/GZ0bAid8uJVN8dSqjl+Si5t64KdmpX6Ljuu5Vs=; b=owNCWmg5MUFZJlNZOUJDugAAYv///v/5jvtvvqXe377xfuhP4b+23q7uH+tT/O3/7zH//v8wARpq hyaA0BoyGgBoA0NNNNGg0AaNNGgGhoGhoaNBk00AAA0HqGRo9IGmnppMjRkZPU8ohoGTTTBGTQyBpk BoaBgTQZGTIDQAZBk0NDIGQBoBpkBkGQxGQxNHqNGmgByZNGjI0yGCNAaAGmJiZGQaAaAAADJpkYmA TJhAGQ9QaNMQaAAGgAGQqUM3EWOSJD5AEMLNCvCOK0raYDgIouZGsRQ8MC7HwLUhM6R3yeMAS2CZk/ d9Y80hcTrWH60GRQ0RYJCJ4golRJQ5WkxQrUQ/ohsZKbamGCI3dpxx1GrDdBNDyz2tvhWIXCcUGOzZ MLcgA2UARczNLnVXgFiLdMs4Rw2KVdrl/cq5C5A6nQtiRnqssMDRQdHctPe1in3Ba5nBLPzB6qgt8g a6uUpUkJr4haH47t3utt+RcUbb8Y4kGkUnSkmUgW/0GtKs6kAFLgr3N8PpmwLZk1RuzX6USGPJphoA gPNKc7KXC8qR1XaSOHaMyYvkUqQHZoQjgPlgEKuEeZRI/LpPD9ewASrpuvub2tZ8CSjrCtc7JMrFe6 DSUiD2rA25IOBRizq4GnDItOMIcrgD4vLsd4ZMiKmye0EUYYyPPasfcjDa5Jj/i7kinChIHKEh3QA= X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747688382624982019?= X-GMAIL-MSGID: =?utf-8?q?1747688382624982019?= The am64x supports a single VTM module which is located in the main domain with two associated temperature monitors located at different hot spots on the die. Signed-off-by: Bryan Brattlof --- arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 8 +++++ arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi | 33 +++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am64.dtsi | 4 +++ 3 files changed, 45 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi index d6aa23681bbe5..a31a139127e35 100644 --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi @@ -1356,4 +1356,12 @@ elm0: ecc@25010000 { clocks = <&k3_clks 54 0>; clock-names = "fck"; }; + + vtm0: temperature-sensor@b00000 { + compatible = "ti,j7200-vtm"; + reg = <0x00 0xb00000 0x00 0x400>, + <0x00 0xb01000 0x00 0x400>; + power-domains = <&k3_pds 95 TI_SCI_PD_EXCLUSIVE>; + #thermal-sensor-cells = <1>; + }; }; diff --git a/arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi new file mode 100644 index 0000000000000..1819a6948b19d --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am64-thermal.dtsi @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +thermal_zones: thermal-zones { + main0_thermal: main0-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&vtm0 0>; + + trips { + main0_crit: main0-crit { + temperature = <105000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + main1_thermal: main1-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&vtm0 1>; + + trips { + main1_crit: main1-crit { + temperature = <105000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am64.dtsi b/arch/arm64/boot/dts/ti/k3-am64.dtsi index c858725133af4..a0170605d7b4e 100644 --- a/arch/arm64/boot/dts/ti/k3-am64.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am64.dtsi @@ -69,6 +69,7 @@ cbass_main: bus@f4000 { <0x00 0x00420000 0x00 0x00420000 0x00 0x00001000>, /* ESM0 */ <0x00 0x00600000 0x00 0x00600000 0x00 0x00001100>, /* GPIO */ <0x00 0x00a40000 0x00 0x00a40000 0x00 0x00000800>, /* Timesync router */ + <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */ <0x00 0x01000000 0x00 0x01000000 0x00 0x02330400>, /* First peripheral window */ <0x00 0x08000000 0x00 0x08000000 0x00 0x00200000>, /* Main CPSW */ <0x00 0x0d000000 0x00 0x0d000000 0x00 0x00800000>, /* PCIE_CORE */ @@ -105,6 +106,9 @@ cbass_mcu: bus@4000000 { ranges = <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>; /* Peripheral window */ }; }; + + #include "k3-am64-thermal.dtsi" + }; /* Now include the peripherals for each bus segments */