From patchwork Tue Oct 25 19:15:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 10953 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1174513wru; Tue, 25 Oct 2022 12:18:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7+Sz6nvq2+gpzA1FI7FsxD1UdjaBF/Yinjj5xmiEhYlBy5avkH0ra0PFKAlEmJbTF2ESJ4 X-Received: by 2002:a17:902:bd8e:b0:178:25ab:56cc with SMTP id q14-20020a170902bd8e00b0017825ab56ccmr39457431pls.86.1666725492801; Tue, 25 Oct 2022 12:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666725492; cv=none; d=google.com; s=arc-20160816; b=0f4/dsR/g2dEUAX96PbDQCRig2qn4+pwLrfO1T65UzTcrGvR+bHviJ4GquUH9Qygk1 PiigKxAg3lGA91xv7y8ByrELvu8UeD2I46rTS5KMFh43recTq0AxPpdLid6th5Gfue3Q CyOFng0gJo2XMGaizEZdjywcWf2cTWZEuldsARm9V+8L6lp2VMIAGajFZZaoyi4OkNrG RVdrangMvAX5viRc9ZyyXfbY7gAZuCMJ1UFJ91wHfc08lWYR3VVLfZQz/kDmZancZ26A 0WI4WRHfV71HFLfLIDThj3arL/WPS0jZ46E5AT6gtpBsON9E5CgT2YzNHRhOm7EjwW8z 89zg== 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=YityQ/wuUXHsyeqfnkyK8ltNeRnXLIQbQj38R/cl/ME=; b=ElNIIod5y9Jid4ybGuFqJwmkJnKPeaneMAHaT4qVUpKhhK56gIUnd0ivlRVW1hv12Z 45iHiZZpznAk7yStmqnkfWhuwQbafdTb+/qBn6Rg5Hi3STrqZDMDteafIMus/yCq/pFU Twkvn/gtznSQvbpNJPSWVSNKMJX7kYn77CaXY92wAnVxl+4+WYG0aGMcaDA0XBpb1XBm eKyWm7GAD6uUfgtNEEPjAizRt+ySfwA88dCP5DI/rTXvFARb79sPPjzmnyD0SQKtTb+P 9y8Abwge14QlsxafjZmmUDBq6VlYu7XjJJpmMsfQCYgjG1gx4xPbjUwBN5H9zqCkoyDw aEpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=r8mMcijt; 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 mi4-20020a17090b4b4400b0020b15fcac76si15742611pjb.4.2022.10.25.12.17.57; Tue, 25 Oct 2022 12:18:12 -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=r8mMcijt; 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 S232654AbiJYTQX (ORCPT + 99 others); Tue, 25 Oct 2022 15:16:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232706AbiJYTPh (ORCPT ); Tue, 25 Oct 2022 15:15:37 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94A207F24F; Tue, 25 Oct 2022 12:15:36 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 29PJFK7s112033; 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=YityQ/wuUXHsyeqfnkyK8ltNeRnXLIQbQj38R/cl/ME=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=r8mMcijtSRbl4ZPwW+G/l6/FJPD8mS1MIuByVqX5OGpvhebDfungSYfQMYpXyCdRt pAGTnzNaPIPsSd3GV55NmbSFX6q2iD7kSTmjvtlmPRw26HyDwT9OgxiUDot34q7UaV uMfHN8HChsbO2Q23WdoEtd0QhnXoH/Si/Zewgtic= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 29PJFKpS066003 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 25 Oct 2022 14:15:20 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE104.ent.ti.com (157.170.170.34) 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 fllv0039.itg.ti.com (10.64.41.19) by DLEE108.ent.ti.com (157.170.170.38) 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-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 29PJFJND057000; 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 08/11] arm64: dts: ti: k3-am62-wakeup: add VTM node Date: Tue, 25 Oct 2022 14:15:12 -0500 Message-ID: <20221025191515.9151-9-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=3321; h=from:subject; bh=/6/erm8uGvFnwvcLO4BZMnh8Xxmwt3ii2KHozEpD0Qs=; b=owNCWmg5MUFZJlNZ5+cmKgAAZ3///vf/+/dz7p/3XeV7f3SvsR17ShdPm3pv1p7tvvdfv/+wARsY HZIaAAAGgA9R6g0B6gNAG1DJoAaAGgaAAAAGgAGj1AD01AaepoeU9TwodBoNA0AGjQPUNHpAHqaA0A NDQ/VB6gABppoBoDRoAaPSeo09QPUeoA9RoNDymTQByaZDTQaGmIaaaA0ZGjJkGmEaNAABkYmQwTJi AwIZMIaNNAAAaA0A0yNNAMHrT4a7aRqniCB7ZTJ9ojeKzkIhH6X8P2UQcnNS4ChrcmL5gFpFaCI42o 2nnEH0zFsXCgneELkXv+cOJBCHr0QNWSVYpglLNWVzNdji+6LHxgExQH2POsVREwfQnBfUgbE0zOwk Zgi3WXP04qmNu2AWT4ISwV6pblpKiwO2nyMcNpA3cDRHqm1k0tSj+aZyRJ07U9BlLO0Vmo1p6fLXrl EJAfRg5u1LrEfKYyeT5YciQ0wibvY9t0IIx1GSkHwjJLXLDxjpOc61A/p4TTHkY8GKeA1NA6a+WhZj cGJyjBEikiLjcRXgEeRIKIUsfzdCFCpzTglMgW/5W4x7hx7kYepI/F4HemPRgFM2BVb3GP+rkv0UAv LQ/hDYBTV4/F9XRapJ4klmszW3oDM0TUaR4XHAHC2H6iaYhgGgrQWZch/i7kinChIc/OTFQA== 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?1747688350744531316?= X-GMAIL-MSGID: =?utf-8?q?1747688350744531316?= The am62x supports a single Voltage and Thermal Management (VTM) module located in the wakeup domain with two associated temperature monitors located in hot spots of the die. Signed-off-by: Bryan Brattlof --- arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi | 33 +++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 8 +++++ arch/arm64/boot/dts/ti/k3-am62.dtsi | 7 ++++- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi b/arch/arm64/boot/dts/ti/k3-am62-thermal.dtsi new file mode 100644 index 0000000000000..1819a6948b19d --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62-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-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi index 4090134676cf6..3954a73a33f35 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi @@ -38,4 +38,12 @@ wkup_i2c0: i2c@2b200000 { clocks = <&k3_clks 107 4>; 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-am62.dtsi b/arch/arm64/boot/dts/ti/k3-am62.dtsi index 37fcbe7a3c336..1795f3ee534e0 100644 --- a/arch/arm64/boot/dts/ti/k3-am62.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62.dtsi @@ -80,6 +80,7 @@ cbass_main: bus@f0000 { <0x00 0x04000000 0x00 0x04000000 0x00 0x01ff1400>, /* Wakeup Domain Range */ + <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */ <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, <0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>; @@ -94,10 +95,14 @@ cbass_wakeup: bus@2b000000 { compatible = "simple-bus"; #address-cells = <2>; #size-cells = <2>; - ranges = <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */ + ranges = <0x00 0x00b00000 0x00 0x00b00000 0x00 0x00002400>, /* VTM */ + <0x00 0x2b000000 0x00 0x2b000000 0x00 0x00300400>, /* Peripheral Window */ <0x00 0x43000000 0x00 0x43000000 0x00 0x00020000>; }; }; + + #include "k3-am62-thermal.dtsi" + }; /* Now include the peripherals for each bus segments */