From patchwork Tue Oct 25 19:15:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 10946 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1174231wru; Tue, 25 Oct 2022 12:17:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5uRuG/41ZYcTB1zg020MghAOACTDJfZzw0xbFnVvZq9+75JPXczz4NMJbNpftcHhEn9DnP X-Received: by 2002:a05:6a00:1389:b0:566:1549:c5bc with SMTP id t9-20020a056a00138900b005661549c5bcmr40663471pfg.8.1666725448070; Tue, 25 Oct 2022 12:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666725448; cv=none; d=google.com; s=arc-20160816; b=N6i8xsGoBesqg30M4AvXyuwBFiOgoIh/RIJ7U3oDZQ5MZRR2ccsn7i/0YrgQYlYGnu TS0qsRIglkw4xbBYrc+hyutsU+ulOd+XOmqb6q2/5eEx1o7dc7Gs/PfYrMo7n+X0q3Ar Z98nwsm0mTu2ltdgVKdOOaJRjjC/n+9wQknotiHZkDlBzs1nNYfwmS2bcpleu2QRKxHg ODxJXtqquNXPz/Er7OcF3cf5mg6QUbc+6GsYfp9PcHFWlhp9qELg7ml5IpDGJV91Y/du 0jbNWc4ZO0tzjY868/t41P7AZ3FAMoPmnR5usdTsQIOhlVRSho4ivV6w9+CCSX9jHCPx 372A== 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=zrG9w02JnVRZZt0ciyWlc0+Fr/UocYsC+JZnx4gz+Fc=; b=IbZNo5+TBkXgUtTK03eZbixwSl1aIxFko5QYiCmcFpYL7uDXEC9NUa4hDBPArQLb+r 7zPFE9TwzZiaEO3DilI5evHBrWFtv62LNrD/PfLnZK2FG7CEypmxz39QG0o0xb0JoY9W 4x0bJxDEXnjExeU5C50sZo5YgJogkSDHSRkHyXOdPQiISbQPN6sBQAKghuAG8QMeLNwB rFLq3X+hZ5PjThmdNiYUblB9XeE44QLr/QffDkEsbqr0gNH4UsBck927hPF3SmGBOuQw hUV11nB3TH9GcJOkiqK8wsxMxye/JJ2QynCmR0LK/O3lCST4R3yKcvlmijhzi3r2cat5 wjFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wCHuM6dP; 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 me5-20020a17090b17c500b0020aeaa98ed4si15507099pjb.93.2022.10.25.12.17.05; Tue, 25 Oct 2022 12:17:28 -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=wCHuM6dP; 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 S231962AbiJYTPw (ORCPT + 99 others); Tue, 25 Oct 2022 15:15:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232334AbiJYTPd (ORCPT ); Tue, 25 Oct 2022 15:15:33 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B64197F0B2; Tue, 25 Oct 2022 12:15:32 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29PJFKn3112029; 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=zrG9w02JnVRZZt0ciyWlc0+Fr/UocYsC+JZnx4gz+Fc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wCHuM6dP+cJnJcwXMZLRihVcowvvTixFQFo3QNzmKjlnecx7RHzaGj8wcxECu6+yL eSYZdNNgSbiExsJL6RNefTKP7qPBAlCh9wJ0kbo1HT/f0Hmfys9w+S4QvPkeOe2VPk 4UYjAKArx0RKpz7U5+XZIaQVZIo6VgtpoP/3LLio= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29PJFKQQ082963 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 25 Oct 2022 14:15:20 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE115.ent.ti.com (157.170.170.26) 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 DLEE107.ent.ti.com (157.170.170.37) 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 29PJFJj6018069; 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 09/11] arm64: dts: ti: k3-j721e-mcu-wakeup: add VTM node Date: Tue, 25 Oct 2022 14:15:13 -0500 Message-ID: <20221025191515.9151-10-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=3842; h=from:subject; bh=vlkzNaHkJyVHTvJvk+O1jhmqXAYXIkCfkx3XmZoRK9Y=; b=owNCWmg5MUFZJlNZlGxQMQAAaf///n//2+Hs617vfv3e+1M/z/+n+wf22fe//uv/qTvz/26wARmY IeoHqDIGgNGgGgBoDT1NDNQAAA0AA0A0AaAAANAAAA0yNDQ9T1PUyGZNNRABoBkaMgDCADE0ADQ000 0AaA9QDENAHqeoAMJ6gNpAAGmTygDIA0GjQDHIaDJpp6RoAGgDQDIGTTRk0aDQNNAAAaNNGRhNBoDQ GjEDEMIaBgQDTQaACBN8LWywZ7xnkQZfgO+YtLOSfDAAwPfwQAI52A4vnP59xFU2kmjfdNBqsvgbA2 REkPleJZNk4kavDOdXZIpeg+Y0C1EqEREK70DSG6pH9Z20yNY44Lz22KX2nF32TMhMuOfGEDY5vbQh LQIpQDLgMeFEKrvNRLZMFSrcJK2rHxlPOv4HQSP3WA/IXIqpMF2CqbHWyxmffSO2dWRd3TZ+wCDcRC FtoumaD8F7ynSBrjrPEG0nEX3xZmjBPVJtTxDjphTCB+VTi3COGhwzKIt7dxkuxQRpUl9EC8AIS9hk KdR8EZ/gItGEfdGDUUeTCK9NYpIkwkNaCyJ9LA8aI9D+ZWx8jLq95SNovuKwUcu6s2XD1GRfxBs4AH bI6oYDnaAjC9cuD6gGBP2KRL05X5yYxJ06QCmVl64tvYLWlPk2IDAlJQ7SMor/F3JFOFCQlGxQMQ== 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?1747688303028381391?= X-GMAIL-MSGID: =?utf-8?q?1747688303028381391?= The j721e supports a single Voltage and Thermal Management (VTM) module located in the wakeup domain with five associated temperature monitors located in various hot spots on the die. Signed-off-by: Bryan Brattlof --- .../boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 9 +++ arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi | 75 +++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j721e.dtsi | 3 + 3 files changed, 87 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi index df08724bbf1c5..9a09f66c51c01 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi @@ -418,4 +418,13 @@ mcu_mcan1: can@40568000 { interrupt-names = "int0", "int1"; bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; }; + + vtm0: temperature-sensor@42040000 { + compatible = "ti,j721e-vtm"; + reg = <0x00 0x42040000 0x00 0x350>, + <0x00 0x42050000 0x00 0x350>, + <0x00 0x43000300 0x00 0x10>; + power-domains = <&k3_pds 154 TI_SCI_PD_EXCLUSIVE>; + #thermal-sensor-cells = <1>; + }; }; diff --git a/arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi new file mode 100644 index 0000000000000..79641927a9092 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j721e-thermal.dtsi @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include + +thermal_zones: thermal-zones { + wkup_thermal: wkup-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"; + }; + }; + }; + + c7x_thermal: c7x-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"; + }; + }; + }; + + gpu_thermal: gpu-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&vtm0 3>; + + trips { + gpu_crit: gpu-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; + + r5f_thermal: r5f-thermal { + polling-delay-passive = <250>; /* milliSeconds */ + polling-delay = <500>; /* milliSeconds */ + thermal-sensors = <&vtm0 4>; + + trips { + r5f_crit: r5f-crit { + temperature = <125000>; /* milliCelsius */ + hysteresis = <2000>; /* milliCelsius */ + type = "critical"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/ti/k3-j721e.dtsi b/arch/arm64/boot/dts/ti/k3-j721e.dtsi index 0e23886c9fd1d..cfab10e2455c4 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e.dtsi @@ -181,6 +181,9 @@ cbass_mcu_wakeup: bus@28380000 { <0x07 0x00000000 0x07 0x00000000 0x01 0x00000000>; /* FSS OSPI1 data region 3*/ }; }; + + #include "k3-j721e-thermal.dtsi" + }; /* Now include the peripherals for each bus segments */