From patchwork Fri Sep 22 05:50:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 143792 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:910f:0:b0:403:3b70:6f57 with SMTP id r15csp53493vqg; Fri, 22 Sep 2023 20:08:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGX8TIv+zSLvCqKd/bf0GH41RTagIJrGR2xfFrDnx8pQyuBBCurkmPyMRO4KTvYRTdACb43 X-Received: by 2002:a05:6a00:802:b0:68a:6d1a:b812 with SMTP id m2-20020a056a00080200b0068a6d1ab812mr1439486pfk.9.1695438510778; Fri, 22 Sep 2023 20:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695438510; cv=none; d=google.com; s=arc-20160816; b=SS5tkb80vGYUn6JW5yi9+xxabjyfEq/zAUKYUz54Kn8k2Moy6MRoOXGd6TJpNawZsq 5rq34ZKHOlaZYhm/q08n9FnUu+Y20zYwoyubPvdGzka2wmMzye28TSrdtKWBqfvmN9bt g30eWH5//eeSx218skZmxIz2rrp0gz0wUDpixlV2U9PSLO2NVtUssryIUkVNma7CcF59 rNEPvc1EGgtjqyVDJwOsrXRHTvrotBlnlgIlaxdEFZDkSrMdF90q3Rbyn2ptf+7cXIQc y4FnXAH3lh86TDvdkX7qgj28lDLzEIekKWTOXnPLpULM3KVSUj2OW90HB3wYE05tEwmH Ig9A== 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=wdjXDLLf4xtrNUzt8GcD/GV6BJ5U7aPo/HDDEtqI8z8=; fh=6NWB/Bi+HQfZeeJN0y1jxzRC9/vpGDa0jITzP4h3BBY=; b=enM7Sp37Dtzr+3JRWomRSnmiystGcel9eXJiEHJ9fPVguz7StjapKfR+NygibNnEm+ 75onRCu0I0O412DXIW5Z1EUM9+YlMe9d2bBQpDwbbIGnwfOMuGH8PHRu1W+xYjdGnVGh ow/z6YrbXXH0DSeB8SQQsCtV0pUq1ICCqn2tBJn0MC5lzVI9LC3yuc6bui+GIo2Ab9r6 fpYXbmry1mu4Lier1lX8MdPd2daWKJk9n+CPWksPJJ04ke2CjQCFQl87Au2IH+t6uaqg lYNa2x++SMihP591PVjdapGZgHOEBnYPNRptDndIstLESaBGe99Zx7tXGzSvfAJhngPV avcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=KHwvkIIX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id p3-20020aa78603000000b0069019bef4e4si4721865pfn.79.2023.09.22.20.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 20:08:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=KHwvkIIX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D18378345295; Thu, 21 Sep 2023 22:50:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231136AbjIVFul (ORCPT + 30 others); Fri, 22 Sep 2023 01:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjIVFui (ORCPT ); Fri, 22 Sep 2023 01:50:38 -0400 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 831FB195; Thu, 21 Sep 2023 22:50:28 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout4.routing.net (Postfix) with ESMTP id 68B421009F0; Fri, 22 Sep 2023 05:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1695361826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wdjXDLLf4xtrNUzt8GcD/GV6BJ5U7aPo/HDDEtqI8z8=; b=KHwvkIIX2yzZ2xdkLxlaYzZ0TlnyBd26c6GLYiEn3QwqDR9UqE3sUP9sn2maLbHwIHrzRt xc0DxRj0GZO9pODwSfYbaaA+ZaD78FjNH0BRZh9cIQTrHxV85y0jRQPDMoEfGw40bK4lp+ EzA1+ut8uiVHXBI/urwLEC56VrU1W8w= Received: from frank-G5.. (fttx-pool-217.61.149.125.bambit.de [217.61.149.125]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 72252403BF; Fri, 22 Sep 2023 05:50:25 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski Subject: [PATCH v3 1/4] dt-bindings: thermal: mediatek: add mt7988 lvts compatible Date: Fri, 22 Sep 2023 07:50:17 +0200 Message-Id: <20230922055020.6436-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230922055020.6436-1-linux@fw-web.de> References: <20230922055020.6436-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 16933f30-6449-450f-a84f-4f76d6247f3b X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 21 Sep 2023 22:50:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777796131804544945 X-GMAIL-MSGID: 1777796131804544945 From: Frank Wunderlich Add compatible string for mt7988 lvts application processor. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski --- v2: - change mt7988-lvts to mt7988-lvts-ap (Application Processor) - not added Ack from Rob because of this change --- .../devicetree/bindings/thermal/mediatek,lvts-thermal.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml b/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml index fe9ae4c425c0..e6665af52ee6 100644 --- a/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml +++ b/Documentation/devicetree/bindings/thermal/mediatek,lvts-thermal.yaml @@ -18,6 +18,7 @@ description: | properties: compatible: enum: + - mediatek,mt7988-lvts-ap - mediatek,mt8192-lvts-ap - mediatek,mt8192-lvts-mcu - mediatek,mt8195-lvts-ap From patchwork Fri Sep 22 05:50:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 143205 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5357297vqi; Thu, 21 Sep 2023 23:22:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEs+lrgtBQZIKa7YN+Cl6nHn41ZRgV6otGll4Xorj+XPvKfiHZBSVl81q9aKcFywgynY5IJ X-Received: by 2002:a05:6902:569:b0:d85:b09e:b9c9 with SMTP id a9-20020a056902056900b00d85b09eb9c9mr6641070ybt.52.1695363747439; Thu, 21 Sep 2023 23:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695363747; cv=none; d=google.com; s=arc-20160816; b=fgGFTRxRnyhf1UPO3Lo7taN17fIrVmeQjtvculHpmIq9C5ULym6+sTjqEOUwXtQJNG ULfeJU6SEZtfw5WafYyYPdbgbS0BO8pwxSXbiEAw+LI/tNLBZbvwfy8/V7sTGxGNMGiC t+Z2V1+r3+567aEdvEbPnIzFvBtD8VSf7V1nV0Mhl1Dz1KMQ7luUgvkW9X3t57t3fGP/ WUVnD1DofPoLtaodfaHvINkn4spZr7Pv+WvEI+4cftl2VSq8sd+vQ0dglgzKJO/ZuDKR NLUoKqG6+qWD1+yOrZ6IK673U+pc+xrjn0S2saQiI+g45gZwYoD9M350Fc+KwJZv3dr7 B7UA== 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=UoH4W3986fDzxNI5gGh01oTwLD5puh/l8B+NZqmUkdE=; fh=IDc+7hlJTz8iYs+tAGZaupIxU3FLZUuiOYN6ts3md9E=; b=Q5odQ1oZVyaMe1XAWkGJ5+GvVXE76v21jidDO3QSUeS/sXUIk6d1MrB7I/ZzLOxdxJ 5MI5hlNvAUeQhA0o1MwspnyXzqQFIawZ2JOjIfjyYqvqIDY+AyBRPfzR92VoSxEPHLGb Hz/XDpuWr7HWlqzMmZxYF2+j3PNVwM8zvJWje7bTtmhVR9ns0MWYpzxaLgthO1XdgfYs z4872aKuDioaobqUsva/EWsgz/JpGPE401+jOZn3rEcoP/NR1zJW0App3VcbWNzTE5yQ ap9/DYFiGIPHyp7pdSqtaXStRY9MDEc/tg/k688k+3xN8gSBoBtQfB0ULSl7qr3hNNZs OP7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Z27W9aaU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id x3-20020a636303000000b0055fdd303745si3056234pgb.421.2023.09.21.23.22.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 23:22:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=Z27W9aaU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3141082F099B; Thu, 21 Sep 2023 22:50:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbjIVFuo (ORCPT + 30 others); Fri, 22 Sep 2023 01:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbjIVFui (ORCPT ); Fri, 22 Sep 2023 01:50:38 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32332C2; Thu, 21 Sep 2023 22:50:29 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout2.routing.net (Postfix) with ESMTP id 574835FAFC; Fri, 22 Sep 2023 05:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1695361827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UoH4W3986fDzxNI5gGh01oTwLD5puh/l8B+NZqmUkdE=; b=Z27W9aaUiUcLJfBEEMIP/D5/ub8RhY31duqvE/rHZAwtGA7V1kEqTHc3r/2gBJ/R26Vqo+ JUDYNOB3+Q1gmGW/cmPrlefKbY1U+38S0kbsHg89d5+sTcQTwCjq/NyxPg/Xoloo3PvUq2 q3DSPOM2DChvt4gDwxJbvYgfS2gDUv0= Received: from frank-G5.. (fttx-pool-217.61.149.125.bambit.de [217.61.149.125]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 567E540625; Fri, 22 Sep 2023 05:50:26 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Conor Dooley Subject: [PATCH v3 2/4] dt-bindings: thermal: mediatek: Add LVTS thermal sensors for mt7988 Date: Fri, 22 Sep 2023 07:50:18 +0200 Message-Id: <20230922055020.6436-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230922055020.6436-1-linux@fw-web.de> References: <20230922055020.6436-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: e5a5378d-0ffe-43d2-843a-7836791bd6a3 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 21 Sep 2023 22:50:54 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777717737117573981 X-GMAIL-MSGID: 1777717737117573981 From: Frank Wunderlich Add sensor constants for MT7988. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Acked-by: Conor Dooley --- v2: - new patch (moved from driver code to binding header) - give sensors more meaningful names --- include/dt-bindings/thermal/mediatek,lvts-thermal.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/dt-bindings/thermal/mediatek,lvts-thermal.h index 8fa5a46675c4..8c1fdc18cf34 100644 --- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h +++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h @@ -7,6 +7,15 @@ #ifndef __MEDIATEK_LVTS_DT_H #define __MEDIATEK_LVTS_DT_H +#define MT7988_CPU_0 0 +#define MT7988_CPU_1 1 +#define MT7988_ETH2P5G_0 2 +#define MT7988_ETH2P5G_1 3 +#define MT7988_TOPS_0 4 +#define MT7988_TOPS_1 5 +#define MT7988_ETHWARP_0 6 +#define MT7988_ETHWARP_1 7 + #define MT8195_MCU_BIG_CPU0 0 #define MT8195_MCU_BIG_CPU1 1 #define MT8195_MCU_BIG_CPU2 2 From patchwork Fri Sep 22 05:50:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 143267 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5414835vqi; Fri, 22 Sep 2023 01:49:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG7wVkRmwp8GoJoWoDrkcv8QJiDbrG+oRykwelKvzfd/bxF2j9zhlj8fPlMBSA2ofB3jDTA X-Received: by 2002:a05:6a20:2594:b0:14b:f86f:d9ea with SMTP id k20-20020a056a20259400b0014bf86fd9eamr7716402pzd.3.1695372562460; Fri, 22 Sep 2023 01:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695372562; cv=none; d=google.com; s=arc-20160816; b=mTdlAyZ8U+Ic91be+d1szWigHwyC2lUqG0N1ljk2P6+xdAOGAF/bEe16CY1/e5Uny0 jCPdHqLsG7W6kj89v2sx9+jMwaN3XWo834gUCcm1E1VSs7u1KsNhW9XujaGQRMugq8Q/ aXw+j4bP/BQdJdg6XV5lCcLVEGJbaDSPoQ1QyeSVmz9tNZarDzl4NL3q9xT/5zlnVxty 7kzqUo/RDLdMB71Dlgclj0VFoNiH0/xETAXxmG8Xywki0sXCmCLRFh4ZLkml3xPdsueK jcX1cNLVX6Nivv9oW/cDcI2hxCDybZoY6MPvgUR8eSW/mKXesztXJSf7ugPCfczKIW7E 9/Tg== 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=H4PGtOOvMqPAJvUztaljSdd3cxuehsc/o+gXiODesZ0=; fh=FBLOeAhicL3MHbPCCQPBrSY+L4SCfw6OdXtfmzn+ZOE=; b=pZowbGUtJCD8kC3YwfVUjZ35tBV/xhtbnPkohSdb6+oIZahlZAujZxOtZX1vUsswLh +xc/hQRg1BJv2h6i1N2m4xuCJeUd85bd43PrTylvosh/ao200BT3aAo7ebEqOc6qLTmJ QHCoq6uVfd3QZHwKPPtSSS6FzalehkfyqSG4qHpiK+ytHVZ7+LGq2CEhvhPccv4DqDpb mI/GdExPj3bMCrSNuFiScLtuTd35/fJq7pdy7jftNfsgjjjpMTeADMsk99yV/Qv44+56 M0aFx72fKBGAYdSQRbyUiYXbQG6r9T45dTWiOnLXKLd5/4nALtT+b7HAt7u6kNYhxPPI BbPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=obn2gtLm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z15-20020a1709027e8f00b001bc650255b6si3381081pla.390.2023.09.22.01.49.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 01:49:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=obn2gtLm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E5AD8834D692; Thu, 21 Sep 2023 22:50:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231247AbjIVFut (ORCPT + 30 others); Fri, 22 Sep 2023 01:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230504AbjIVFuk (ORCPT ); Fri, 22 Sep 2023 01:50:40 -0400 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 030E3FB; Thu, 21 Sep 2023 22:50:29 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout1.routing.net (Postfix) with ESMTP id 2B12540551; Fri, 22 Sep 2023 05:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1695361828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H4PGtOOvMqPAJvUztaljSdd3cxuehsc/o+gXiODesZ0=; b=obn2gtLmKsMbQ7oTfVG3YzYrZftXFejU2vWsy4x5Pd+z5Px6Sw1WnQvyLI0WNeK/d/uFs7 x+R9eFgmlu52E7Tyz8ruFx2RaVJ7YIAcPaDNfYPSSpN+yLH+jnI4w3q47q8jZeqlMCGkqz UqWyV7pLZvrJvgJpkMzoc/49xJ/BUkU= Received: from frank-G5.. (fttx-pool-217.61.149.125.bambit.de [217.61.149.125]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 46C5B403BF; Fri, 22 Sep 2023 05:50:27 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 3/4] thermal/drivers/mediatek/lvts_thermal: make coeff configurable Date: Fri, 22 Sep 2023 07:50:19 +0200 Message-Id: <20230922055020.6436-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230922055020.6436-1-linux@fw-web.de> References: <20230922055020.6436-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: fa0f46da-b851-4668-a9a5-c9f39f15d774 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 21 Sep 2023 22:50:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777726980336906399 X-GMAIL-MSGID: 1777726980336906399 From: Frank Wunderlich The upcoming mt7988 has different temperature coefficients so we cannot use constants in the functions lvts_golden_temp_init, lvts_golden_temp_init and lvts_raw_to_temp anymore. Add a field in the lvts_ctrl pointing to the lvts_data which now contains the soc-specific temperature coefficents. To make the code better readable, rename static int coeff_b to golden_temp_offset, COEFF_A to temp_factor and COEFF_B to temp_offset. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno Tested-by: Daniel Golle --- v2: - rename static int coeff_b to golden_temp_offset - rename coeff.a to temp_factor and coeff.b to temp_offset --- drivers/thermal/mediatek/lvts_thermal.c | 51 ++++++++++++++++--------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index effd9b00a424..c2669f405a94 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -80,8 +80,8 @@ #define LVTS_SENSOR_MAX 4 #define LVTS_GOLDEN_TEMP_MAX 62 #define LVTS_GOLDEN_TEMP_DEFAULT 50 -#define LVTS_COEFF_A -250460 -#define LVTS_COEFF_B 250460 +#define LVTS_COEFF_A_MT8195 -250460 +#define LVTS_COEFF_B_MT8195 250460 #define LVTS_MSR_IMMEDIATE_MODE 0 #define LVTS_MSR_FILTERED_MODE 1 @@ -94,7 +94,7 @@ #define LVTS_MINIMUM_THRESHOLD 20000 static int golden_temp = LVTS_GOLDEN_TEMP_DEFAULT; -static int coeff_b = LVTS_COEFF_B; +static int golden_temp_offset; struct lvts_sensor_data { int dt_id; @@ -112,6 +112,8 @@ struct lvts_ctrl_data { struct lvts_data { const struct lvts_ctrl_data *lvts_ctrl; int num_lvts_ctrl; + int temp_factor; + int temp_offset; }; struct lvts_sensor { @@ -126,6 +128,7 @@ struct lvts_sensor { struct lvts_ctrl { struct lvts_sensor sensors[LVTS_SENSOR_MAX]; + const struct lvts_data *lvts_data; u32 calibration[LVTS_SENSOR_MAX]; u32 hw_tshut_raw_temp; int num_lvts_sensor; @@ -247,21 +250,21 @@ static void lvts_debugfs_exit(struct lvts_domain *lvts_td) { } #endif -static int lvts_raw_to_temp(u32 raw_temp) +static int lvts_raw_to_temp(u32 raw_temp, int temp_factor) { int temperature; - temperature = ((s64)(raw_temp & 0xFFFF) * LVTS_COEFF_A) >> 14; - temperature += coeff_b; + temperature = ((s64)(raw_temp & 0xFFFF) * temp_factor) >> 14; + temperature += golden_temp_offset; return temperature; } -static u32 lvts_temp_to_raw(int temperature) +static u32 lvts_temp_to_raw(int temperature, int temp_factor) { - u32 raw_temp = ((s64)(coeff_b - temperature)) << 14; + u32 raw_temp = ((s64)(golden_temp_offset - temperature)) << 14; - raw_temp = div_s64(raw_temp, -LVTS_COEFF_A); + raw_temp = div_s64(raw_temp, -temp_factor); return raw_temp; } @@ -269,6 +272,9 @@ static u32 lvts_temp_to_raw(int temperature) static int lvts_get_temp(struct thermal_zone_device *tz, int *temp) { struct lvts_sensor *lvts_sensor = thermal_zone_device_priv(tz); + struct lvts_ctrl *lvts_ctrl = container_of(lvts_sensor, struct lvts_ctrl, + sensors[lvts_sensor->id]); + const struct lvts_data *lvts_data = lvts_ctrl->lvts_data; void __iomem *msr = lvts_sensor->msr; u32 value; int rc; @@ -301,7 +307,7 @@ static int lvts_get_temp(struct thermal_zone_device *tz, int *temp) if (rc) return -EAGAIN; - *temp = lvts_raw_to_temp(value & 0xFFFF); + *temp = lvts_raw_to_temp(value & 0xFFFF, lvts_data->temp_factor); return 0; } @@ -348,10 +354,13 @@ static bool lvts_should_update_thresh(struct lvts_ctrl *lvts_ctrl, int high) static int lvts_set_trips(struct thermal_zone_device *tz, int low, int high) { struct lvts_sensor *lvts_sensor = thermal_zone_device_priv(tz); - struct lvts_ctrl *lvts_ctrl = container_of(lvts_sensor, struct lvts_ctrl, sensors[lvts_sensor->id]); + struct lvts_ctrl *lvts_ctrl = container_of(lvts_sensor, struct lvts_ctrl, + sensors[lvts_sensor->id]); + const struct lvts_data *lvts_data = lvts_ctrl->lvts_data; void __iomem *base = lvts_sensor->base; - u32 raw_low = lvts_temp_to_raw(low != -INT_MAX ? low : LVTS_MINIMUM_THRESHOLD); - u32 raw_high = lvts_temp_to_raw(high); + u32 raw_low = lvts_temp_to_raw(low != -INT_MAX ? low : LVTS_MINIMUM_THRESHOLD, + lvts_data->temp_factor); + u32 raw_high = lvts_temp_to_raw(high, lvts_data->temp_factor); bool should_update_thresh; lvts_sensor->low_thresh = low; @@ -692,7 +701,7 @@ static int lvts_calibration_read(struct device *dev, struct lvts_domain *lvts_td return 0; } -static int lvts_golden_temp_init(struct device *dev, u32 *value) +static int lvts_golden_temp_init(struct device *dev, u32 *value, int temp_offset) { u32 gt; @@ -701,7 +710,7 @@ static int lvts_golden_temp_init(struct device *dev, u32 *value) if (gt && gt < LVTS_GOLDEN_TEMP_MAX) golden_temp = gt; - coeff_b = golden_temp * 500 + LVTS_COEFF_B; + golden_temp_offset = golden_temp * 500 + temp_offset; return 0; } @@ -724,7 +733,7 @@ static int lvts_ctrl_init(struct device *dev, struct lvts_domain *lvts_td, * The golden temp information is contained in the first chunk * of efuse data. */ - ret = lvts_golden_temp_init(dev, (u32 *)lvts_td->calib); + ret = lvts_golden_temp_init(dev, (u32 *)lvts_td->calib, lvts_data->temp_offset); if (ret) return ret; @@ -735,6 +744,7 @@ static int lvts_ctrl_init(struct device *dev, struct lvts_domain *lvts_td, for (i = 0; i < lvts_data->num_lvts_ctrl; i++) { lvts_ctrl[i].base = lvts_td->base + lvts_data->lvts_ctrl[i].offset; + lvts_ctrl[i].lvts_data = lvts_data; ret = lvts_sensor_init(dev, &lvts_ctrl[i], &lvts_data->lvts_ctrl[i]); @@ -758,7 +768,8 @@ static int lvts_ctrl_init(struct device *dev, struct lvts_domain *lvts_td, * after initializing the calibration. */ lvts_ctrl[i].hw_tshut_raw_temp = - lvts_temp_to_raw(lvts_data->lvts_ctrl[i].hw_tshut_temp); + lvts_temp_to_raw(lvts_data->lvts_ctrl[i].hw_tshut_temp, + lvts_data->temp_factor); lvts_ctrl[i].low_thresh = INT_MIN; lvts_ctrl[i].high_thresh = INT_MIN; @@ -1223,6 +1234,8 @@ static int lvts_probe(struct platform_device *pdev) if (irq < 0) return irq; + golden_temp_offset = lvts_data->temp_offset; + ret = lvts_domain_init(dev, lvts_td, lvts_data); if (ret) return dev_err_probe(dev, ret, "Failed to initialize the lvts domain\n"); @@ -1338,11 +1351,15 @@ static const struct lvts_ctrl_data mt8195_lvts_ap_data_ctrl[] = { static const struct lvts_data mt8195_lvts_mcu_data = { .lvts_ctrl = mt8195_lvts_mcu_data_ctrl, .num_lvts_ctrl = ARRAY_SIZE(mt8195_lvts_mcu_data_ctrl), + .temp_factor = LVTS_COEFF_A_MT8195, + .temp_offset = LVTS_COEFF_B_MT8195, }; static const struct lvts_data mt8195_lvts_ap_data = { .lvts_ctrl = mt8195_lvts_ap_data_ctrl, .num_lvts_ctrl = ARRAY_SIZE(mt8195_lvts_ap_data_ctrl), + .temp_factor = LVTS_COEFF_A_MT8195, + .temp_offset = LVTS_COEFF_B_MT8195, }; static const struct of_device_id lvts_of_match[] = { From patchwork Fri Sep 22 05:50:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 143264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5414391vqi; Fri, 22 Sep 2023 01:47:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwmkUsAs04tgYRCG/ci9d/WrVgtrlA66DwFOFxYecRIsOJaF//XoxAJyO2M9B59WADNxVX X-Received: by 2002:a17:903:22c4:b0:1c3:6724:db6f with SMTP id y4-20020a17090322c400b001c36724db6fmr7317577plg.29.1695372477628; Fri, 22 Sep 2023 01:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695372477; cv=none; d=google.com; s=arc-20160816; b=N7PjASnLFrCk+lnZROOQ3WO2HdINVmc1ecn1CQ4xvACv5psWbTXQ8icnzyMstnP4uF YXXBIoMY9ugvZrjjnw9FBa3Tld2Gl/cgt4t4AUbmQGNbbyYwIasMUnhaEs0pqJmLt1iy QwaAb6X1CrAq4BXrBp7cojXXkK6oWL4kLcQYAOc7H3b5KGcqdODasj8f8cJs81vZpFHY ADF5d5QqOsecgV1b+sjzJj+8U2/EDjfDVwSWJt9TUA/vXUS7I0yUcajDOV5sMF2pRj2A E/Lx5o2t3IK90l1mKvCHwx3ZR2Hsd/HNQ7a7vh+LtmrP2bjoHMeHov9uy7+rbk2fT960 yN2w== 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=wd/4D84ABQ1LUUMTxdk3iRJmoRHg+E5YpjikqYdM80A=; fh=FBLOeAhicL3MHbPCCQPBrSY+L4SCfw6OdXtfmzn+ZOE=; b=JmvUVsDda6p3skGZUa4OiclCMM58sFFmwD2oUsFkFUh7aIVMV7BWFaKvuC5K/CPkGw o+dqsDF2dbu0g1gxjQoKcZTbpzWEPqGs6VORrNvIN0CjCL4CkB9/98Wu6QyuEVPfbewW RGpUJSuhhC0xW5XmbpzCP2s0n9eul5zCS2l/mejbQpq4UkBPpk43L4pXi0ux3nOUOy83 Vuxae+PMap2pF+k3hsMU0N/WVJlky9OPPEjs1Cn0yrfK2utUVT1dmJGTIoMfxBt4z+CW CY5qeEv+3T2rJ/gVgiQF4+L5hTLrP2/9Lnyywmm9o1owLZouo6Ms8wlyOIXO1GV0cseU J9iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=sioAofnc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id kb16-20020a170903339000b001c3fab52a94si3267014plb.212.2023.09.22.01.47.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 01:47:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=sioAofnc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id DC45883B9667; Thu, 21 Sep 2023 22:51:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231223AbjIVFur (ORCPT + 30 others); Fri, 22 Sep 2023 01:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230292AbjIVFuj (ORCPT ); Fri, 22 Sep 2023 01:50:39 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DF39114; Thu, 21 Sep 2023 22:50:30 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout3.routing.net (Postfix) with ESMTP id E8CE160F65; Fri, 22 Sep 2023 05:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1695361829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wd/4D84ABQ1LUUMTxdk3iRJmoRHg+E5YpjikqYdM80A=; b=sioAofncDb3E5M01wPfvOv9pI8bqr77jl887SgjeUrwc9QkQTS7CkSVHUhMDDtD74BM1hr cecraz1Cw4gGi+vKytwcjtcvJ+KNxqqb6gXBtmFGF4s1Pty04GfeipPZmRfHXUEolZPI2p ovz4KJ4R0l5qWe0VDx59QYokUhfoKkI= Received: from frank-G5.. (fttx-pool-217.61.149.125.bambit.de [217.61.149.125]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 1D6964021D; Fri, 22 Sep 2023 05:50:28 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 4/4] thermal/drivers/mediatek/lvts_thermal: add mt7988 support Date: Fri, 22 Sep 2023 07:50:20 +0200 Message-Id: <20230922055020.6436-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230922055020.6436-1-linux@fw-web.de> References: <20230922055020.6436-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 12176a23-d372-4442-8d8e-fe41e40334c0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 21 Sep 2023 22:51:00 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777726891011835452 X-GMAIL-MSGID: 1777726891011835452 From: Frank Wunderlich Add Support for Mediatek Filogic 880/MT7988 LVTS. Signed-off-by: Frank Wunderlich Tested-by: Daniel Golle --- v3: - drop comments v2: - use 105°C for hw shutdown - move constants to binding file - change coeff.a to temp_factor and coeff.b to temp_offset - change to lvts to lvts-ap (Application Processor) - drop comments about efuse offsets - change comment of mt8195 to be similar to mt7988 --- drivers/thermal/mediatek/lvts_thermal.c | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index c2669f405a94..23b4e0b3195c 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -82,6 +82,8 @@ #define LVTS_GOLDEN_TEMP_DEFAULT 50 #define LVTS_COEFF_A_MT8195 -250460 #define LVTS_COEFF_B_MT8195 250460 +#define LVTS_COEFF_A_MT7988 -204650 +#define LVTS_COEFF_B_MT7988 204650 #define LVTS_MSR_IMMEDIATE_MODE 0 #define LVTS_MSR_FILTERED_MODE 1 @@ -89,6 +91,7 @@ #define LVTS_MSR_READ_TIMEOUT_US 400 #define LVTS_MSR_READ_WAIT_US (LVTS_MSR_READ_TIMEOUT_US / 2) +#define LVTS_HW_SHUTDOWN_MT7988 105000 #define LVTS_HW_SHUTDOWN_MT8195 105000 #define LVTS_MINIMUM_THRESHOLD 20000 @@ -1269,6 +1272,33 @@ static int lvts_remove(struct platform_device *pdev) return 0; } +static const struct lvts_ctrl_data mt7988_lvts_ap_data_ctrl[] = { + { + .cal_offset = { 0x00, 0x04, 0x08, 0x0c }, + .lvts_sensor = { + { .dt_id = MT7988_CPU_0 }, + { .dt_id = MT7988_CPU_1 }, + { .dt_id = MT7988_ETH2P5G_0 }, + { .dt_id = MT7988_ETH2P5G_1 } + }, + .num_lvts_sensor = 4, + .offset = 0x0, + .hw_tshut_temp = LVTS_HW_SHUTDOWN_MT7988, + }, + { + .cal_offset = { 0x14, 0x18, 0x1c, 0x20 }, + .lvts_sensor = { + { .dt_id = MT7988_TOPS_0}, + { .dt_id = MT7988_TOPS_1}, + { .dt_id = MT7988_ETHWARP_0}, + { .dt_id = MT7988_ETHWARP_1} + }, + .num_lvts_sensor = 4, + .offset = 0x100, + .hw_tshut_temp = LVTS_HW_SHUTDOWN_MT7988, + } +}; + static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { { .cal_offset = { 0x04, 0x07 }, @@ -1348,6 +1378,13 @@ static const struct lvts_ctrl_data mt8195_lvts_ap_data_ctrl[] = { } }; +static const struct lvts_data mt7988_lvts_ap_data = { + .lvts_ctrl = mt7988_lvts_ap_data_ctrl, + .num_lvts_ctrl = ARRAY_SIZE(mt7988_lvts_ap_data_ctrl), + .temp_factor = LVTS_COEFF_A_MT7988, + .temp_offset = LVTS_COEFF_B_MT7988, +}; + static const struct lvts_data mt8195_lvts_mcu_data = { .lvts_ctrl = mt8195_lvts_mcu_data_ctrl, .num_lvts_ctrl = ARRAY_SIZE(mt8195_lvts_mcu_data_ctrl), @@ -1363,6 +1400,7 @@ static const struct lvts_data mt8195_lvts_ap_data = { }; static const struct of_device_id lvts_of_match[] = { + { .compatible = "mediatek,mt7988-lvts-ap", .data = &mt7988_lvts_ap_data }, { .compatible = "mediatek,mt8195-lvts-mcu", .data = &mt8195_lvts_mcu_data }, { .compatible = "mediatek,mt8195-lvts-ap", .data = &mt8195_lvts_ap_data }, {},