From patchwork Wed Sep 20 17:49:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 142778 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp4706642vqi; Thu, 21 Sep 2023 02:04:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZjk6nGTxc231gEZaQkfsUi9o+8LQyJQvSecGEUEQTQUVy7bWb9H30HdEGpfW9Gol4lKsZ X-Received: by 2002:a05:6871:288:b0:1d6:b7aa:c6ed with SMTP id i8-20020a056871028800b001d6b7aac6edmr5297133oae.56.1695287083150; Thu, 21 Sep 2023 02:04:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695287083; cv=none; d=google.com; s=arc-20160816; b=nVoo7Wudt8V2H9cVNbt3xCz2zIJwblAi3lSYCgXJC26O0fsAQgxX1qrsG3PzGcbVrO /DgWQ7RtDLIjgAcT0f6ocdBb2nv22gnpHcbwKaGo8eUdSgX6iEz9VZyHOBuewuqf3Dcg gmaFAQZcsNwAyyYoi/4SSlkadyYOGrjvpXxREj2vH0zMQRdQPQjipdbdl8rkjp8yk0mB Y0yx74WNgHMaQh2bXUxUDOtkcqAohAFqjGHVw6Vx3RGJfzmPoObluXOrWsrillf0X/Ux zXseUBydEKlnt4jYz+H7zX7p8CtFC5UV6h4r1t5x9dBBTVxgaXSFtPMp5DiHa6V2Dn+A dclA== 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=EpXyE3pyrLeXOoW/vTn/35mmwMMGT5ciC6Nn0z7I4eI=; fh=FBLOeAhicL3MHbPCCQPBrSY+L4SCfw6OdXtfmzn+ZOE=; b=h11XGfdQ+jPh+kUE5kx411ar3R1t7CWN6LWE3vhqHA9v6nVrWdUepXbXLDdj17oM4g 19qKycEQcq3YFRQ1nujHLt5XheIs4ORcwL5gFt1rTiWOKRMURo1mtojjMs6Yrzxzckug pjS0Ci7aBNF7iOZLmuDObxqV630LBw3kn2HOgNtE3yV3mTLaTlTcghG7a0CQsitLeCWW rAIW1RX0LDBWmXHQ0pAmk5wSdBWTEmxCRXbZhgdkpzrTDn/nEuUI6ka6CDsIEWNvZ/TF DE14yAooS3S0wDYtxwaKQmoRWJKwsXV9zIoC8PE0aKB5hIYE+g+d4kuym2r1QWqxn1Yn 3zfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=h3BGCFCn; 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 t185-20020a6381c2000000b0057744bb67dcsi970110pgd.455.2023.09.21.02.04.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 02:04:43 -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=h3BGCFCn; 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 9074A82513A1; Wed, 20 Sep 2023 10:50:24 -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 S229591AbjITRuV (ORCPT + 27 others); Wed, 20 Sep 2023 13:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjITRuR (ORCPT ); Wed, 20 Sep 2023 13:50:17 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF52DCA; Wed, 20 Sep 2023 10:50:10 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 0817F6035B; Wed, 20 Sep 2023 17:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1695232209; 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=EpXyE3pyrLeXOoW/vTn/35mmwMMGT5ciC6Nn0z7I4eI=; b=h3BGCFCnFpKrXPsRyyuYxjScEcHuE5yKI+5VscIyM7e7qLus6YOrnwRwLFbkKcXdFMSYQn m5hNdJW/WcuqODSErRv/CIL4K5wM4z5EC31U7rZbwkdsTsflW1wyRhE2xZsfc6WNeoDGrl G04GkiedV1LYm7WjGhG2R4//uig4pg0= Received: from frank-G5.. (fttx-pool-217.61.152.105.bambit.de [217.61.152.105]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 3BE701006A2; Wed, 20 Sep 2023 17:50:08 +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 v2 1/4] dt-bindings: thermal: mediatek: add mt7988 lvts compatible Date: Wed, 20 Sep 2023 19:49:58 +0200 Message-Id: <20230920175001.47563-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920175001.47563-1-linux@fw-web.de> References: <20230920175001.47563-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 5430aa16-e26a-4aa4-9ee0-76ea05442544 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 20 Sep 2023 10:50:24 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777637348660368235 X-GMAIL-MSGID: 1777637348660368235 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 Wed Sep 20 17:49:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 142562 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp4370536vqi; Wed, 20 Sep 2023 12:20:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrhppAupxayvDj8C+HUNHi/ObMoI0fqnry3MaJMirXH9PXW8bi4ypXUyZTflD3HDxir/MA X-Received: by 2002:a17:902:d4ca:b0:1c3:83e2:d0a9 with SMTP id o10-20020a170902d4ca00b001c383e2d0a9mr4128498plg.58.1695237600780; Wed, 20 Sep 2023 12:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695237600; cv=none; d=google.com; s=arc-20160816; b=q4MFEA+ac7g/+Pj1c5jxB93SQ/+62WJusZ0yKExrcWcN/CmOpSvwxagWCwGj7Po08C v9S06KoqzeQGj7H56/vytHaKZpZLbVCbDZWQvSjCohJFPkdzWTPluh/HjtjscDrcM4oU guJGgYlG/sPNnrHpnYNElB4eyhRYDFAlOCfn8irPhtkOhKeYn088y+mJXSyPl1sKP19o I6VDYqag72AcLtLK0qBdcv+4qIh8m8E/clD4ijRq/IS+JS09FBNvwruQEek9RWK4AB10 YpRhxkXLTdLnq47xErl8oOSxUxd2+bZWYqz7p2HNRzaAZPVrpieGFX0FMPswT9r6YlgU mesw== 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=6Ab/IJGopl0Fd9bE40PtYLKeKlhYSWE9/GzXwTQ8IZ0=; fh=FBLOeAhicL3MHbPCCQPBrSY+L4SCfw6OdXtfmzn+ZOE=; b=mAA0umRlBkFf/e8WC/DkJiVq/pbSCpMTf7YuPIj9X3gxsnkCgkCgpK0X4VRPcQH/97 F4h1d2yxpJ9rxzDZwA+8wvVgku3sK08CDdO2lVgAjpB5UENS4pfM7jc6EBZwUMYmBwqC mlenQ2Bk8y05xps8b2XeLS2HyHlL5KrU0wnoP5tuNw42GyB7iEBfz6gbAaZr5reDV3pG ZKsVxP6lsSB13TeRXSTou5EH25l0IfOyNbvRUpw3epQVuF/x1whWPgF1sl5Ec9qscbLy 4dEy2S6N9hLvQnTA+/XXTR0clDiwxGscdReY1dBoHupWOkd0AIzUGJHaGDp7RObtYqFV qCZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=KDbQv9Gp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id y8-20020a17090264c800b001b895572179si7650588pli.184.2023.09.20.12.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 12:20:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=KDbQv9Gp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 0C5378067103; Wed, 20 Sep 2023 10:50:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229600AbjITRuX (ORCPT + 27 others); Wed, 20 Sep 2023 13:50:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjITRuR (ORCPT ); Wed, 20 Sep 2023 13:50:17 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C9594; Wed, 20 Sep 2023 10:50:11 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id C33F1615FC; Wed, 20 Sep 2023 17:50:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1695232209; 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=6Ab/IJGopl0Fd9bE40PtYLKeKlhYSWE9/GzXwTQ8IZ0=; b=KDbQv9Gp+pCwGmY6GAW2gND9JNsiWa5glAC5IBTBQfSu8U0WauN54as8GQ2Wo1J/3n3+Dy MsTnFSnIdVbzRL0rgcTtKfQ9SO/zQwVJZRAOIReRI/NzAxlqlFEsHOyF0GRefAPf95F53V IvQNeadAvecIjjDQl6HUgoP4KTimw1k= Received: from frank-G5.. (fttx-pool-217.61.152.105.bambit.de [217.61.152.105]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 059B31015CA; Wed, 20 Sep 2023 17:50:09 +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 v2 2/4] dt-bindings: thermal: mediatek: Add LVTS thermal sensors for mt7988 Date: Wed, 20 Sep 2023 19:49:59 +0200 Message-Id: <20230920175001.47563-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920175001.47563-1-linux@fw-web.de> References: <20230920175001.47563-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: c3a287f9-3456-4424-bf8c-b952a733516f 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 10:50:35 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777585462210463474 X-GMAIL-MSGID: 1777585462210463474 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 Wed Sep 20 17:50:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 142604 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp4425209vqi; Wed, 20 Sep 2023 14:05:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnikQHGkAlNgBVsBQWs7kYlArQqkUe9PZN9TTVjbmtafOs9ByMMmeLd3nyU5GGjFf44roU X-Received: by 2002:a17:902:e5cd:b0:1c3:e5bf:a9fe with SMTP id u13-20020a170902e5cd00b001c3e5bfa9femr5088862plf.30.1695243948637; Wed, 20 Sep 2023 14:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695243948; cv=none; d=google.com; s=arc-20160816; b=UMBAqKxkH8bIUvFCt1bc9ItNBiNA6IAgjV5Ob4FwnJdBQyiuGQMYfbso12W6e58NJR Io01c4UdteiwD6GCmziEy1IKmluOmIbEo/PQxAVuSZjFrhyJK46C+ZxVgJwMXvMc8GwS RBXV0tuaFSb2BH8g7wz09It6apygKhCdYhH8m2hGUrDuiY2sAf+5q5Kt/IFt2Sd0LQQ+ 0Ru2xMeEBkZ4c+n0OYTJoUccPPO7zNQkQ20YGpFmpS2yFK9HY8+9glecAW7awZiw7+Xn YW0AIaxP8f0Q2YPEKYeSJsaLjlOgbEO11f7nq6hiv4MOPUBiPkN6+PzJYote8AJI/ygE xN2A== 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=5QpydNhnuiJDmq+DkprcEXtw+wHEatREQRn/jQOhq8U=; fh=FBLOeAhicL3MHbPCCQPBrSY+L4SCfw6OdXtfmzn+ZOE=; b=bdMi8TSiBSXev8C3OfN1WDCyToJgqETxJb9yPKSi89txG6KaW49/44wDkeNPyT3kkV APEg91BWOslXwuc1z50qzldxBOuoNwfH2kUxG9Q10e0FHhMzFscfOIYFut+K0Bx61MGO +CftXW/NYBF+bKIH8UrUikm1SvxMgYZ/JWd/So9WVRryzfTDEnVHSb1YzuzSjJEos3cv ZOEs43fHcDxcbvgknHN0/7NDY7nF7GeRwyYPyZ56XSwcZbFXzhtiInj4gMWNPO78beDW aTkrYhNAwB9ue1g6sxvYiMS0L2DztMavLr1sCAzwsD1cT+ckxB6k7Jq86oUfXCk1xJp8 7Yog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=psadO1KI; 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 b14-20020a170902d50e00b001c3e98a0d79si13066546plg.401.2023.09.20.14.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 14:05:48 -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=psadO1KI; 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 24F1D832C35B; Wed, 20 Sep 2023 10:51:02 -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 S229602AbjITRu1 (ORCPT + 27 others); Wed, 20 Sep 2023 13:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbjITRuS (ORCPT ); Wed, 20 Sep 2023 13:50:18 -0400 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D5EA3; Wed, 20 Sep 2023 10:50:12 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout1.routing.net (Postfix) with ESMTP id 9DD9B4045E; Wed, 20 Sep 2023 17:50:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1695232210; 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=5QpydNhnuiJDmq+DkprcEXtw+wHEatREQRn/jQOhq8U=; b=psadO1KI3iBd80l9ivfW3Xc8VuZT4T3fzQ+BK66uGeSaUavtIWoXIoq+BHtSJYcZ0N9Yj2 O2mOPIkuv4OXumPzOmkAA9Q6GSWmgquA4FOHgOcEoqtFUzUcF3i5XYEQOGUA4DndII9uv3 3HF2l7WMM/u5Ma6yg8ykXBoIkG+CbSU= Received: from frank-G5.. (fttx-pool-217.61.152.105.bambit.de [217.61.152.105]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id BD9911006A2; Wed, 20 Sep 2023 17:50:09 +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 v2 3/4] thermal/drivers/mediatek/lvts_thermal: make coeff configurable Date: Wed, 20 Sep 2023 19:50:00 +0200 Message-Id: <20230920175001.47563-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920175001.47563-1-linux@fw-web.de> References: <20230920175001.47563-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: ef1a64eb-da28-41db-a1c7-108f57370c3b 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 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]); Wed, 20 Sep 2023 10:51:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777592118933944587 X-GMAIL-MSGID: 1777592118933944587 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 --- 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 Wed Sep 20 17:50:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 142720 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp4597553vqi; Wed, 20 Sep 2023 21:15:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHkcbJJOYdtXf1EIhmBBbeDyQllZYLi+Atk5Rlz+OQtkt1OOpDVE5Qa6i8VOzfJkS637Ctk X-Received: by 2002:a05:6a00:23d3:b0:690:2ecd:a593 with SMTP id g19-20020a056a0023d300b006902ecda593mr5137082pfc.26.1695269707697; Wed, 20 Sep 2023 21:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695269707; cv=none; d=google.com; s=arc-20160816; b=L/4l8S9gchv+8AelGwRgbjX0uFpkF5Qxs77BG1pRz71a3A/RX/IzWyYnWcyz3T/Tv2 ayDZbsJ83wJlWzv7ZAgAbxgKRLrJCbR6IcT6sdWkF/R+ckDR9fhOGG9+MHkvcRCyyQZa W00cEVH3OkyDasoCWRnV0bQ+iLjOnvInTRLDm/gVupPvw8KCKxByfADIbv8c1/LQEEGb 0mtHmBcW/QTHqE0CGPTT8+/Dmv337lx0+o7TZXNWSnZAh8sedswYl2mMPw5bm/pMiiAe UpsQhJc9LhTxzYAnnJsSJmZviLJAwSFRKJu5INqDTlu4ixQkOyA4VrlR+ZnOHfjcXft2 R4ZA== 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=yPGaIcaBpYIsL+K5fU/g5XcubHkm1r3TP41OLpcHHUU=; fh=FBLOeAhicL3MHbPCCQPBrSY+L4SCfw6OdXtfmzn+ZOE=; b=hv56iiuK/Kx3ME2Y41OdX2Zv8qPTF6zc1ELDU6nO+Jobcfb7e2XHiDnTR9yLgzA8o3 RuGLr/BVcOfvWcDCWSeOJJ5sS1Io83GXKsT7tYxzhp7rTzcCeb6zb8IHkAlrAoG4Pclq d/wB6KhnDDgVr00bMfk+qoQ/ZdTxCKVCEPX6GVKBqrJ0V+d/YhkJfs3kw3vbfDNSnvBr q6lpY/lsBJiWGmhcOvjC4LNEGeBQDk8M6W+CYGXpQs1nFjRce7LZnXV1gsu8ICdyM9sV iP397JSvqrRi0NDfvxyq70iz8J1NxhKUpSuqlOA+AjjwmD+drTrZtOmMa1np/BhPMJpb zhcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=GFMXvfg9; 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 eb2-20020a056a004c8200b00690fe0f6e0dsi616856pfb.68.2023.09.20.21.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 21:15:07 -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=GFMXvfg9; 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 5F3588077A73; Wed, 20 Sep 2023 10:50:35 -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 S229592AbjITRuZ (ORCPT + 27 others); Wed, 20 Sep 2023 13:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbjITRuS (ORCPT ); Wed, 20 Sep 2023 13:50:18 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB29FC6; Wed, 20 Sep 2023 10:50:12 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout3.routing.net (Postfix) with ESMTP id 61A2462615; Wed, 20 Sep 2023 17:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1695232211; 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=yPGaIcaBpYIsL+K5fU/g5XcubHkm1r3TP41OLpcHHUU=; b=GFMXvfg9d/BnAHtYhKhiU8HFWdvHDME9Kkq9jXrc4St8oh4WGMX6qjBy7htYFri4oY6Ywd FzRkIuGF5Ck+VL6ggxHrghuu0+FbpJWQh10bnYEosuL556EtNBN+Cs7zbZ9AMPD1YprvgQ BqCDdPAxxEekoKME8GvQ9g8iWNO7/Zo= Received: from frank-G5.. (fttx-pool-217.61.152.105.bambit.de [217.61.152.105]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 967111006BE; Wed, 20 Sep 2023 17:50:10 +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 v2 4/4] thermal/drivers/mediatek/lvts_thermal: add mt7988 support Date: Wed, 20 Sep 2023 19:50:01 +0200 Message-Id: <20230920175001.47563-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920175001.47563-1-linux@fw-web.de> References: <20230920175001.47563-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 28533bc3-42fd-4ddc-a511-be8c45e8489c 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 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]); Wed, 20 Sep 2023 10:50:35 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777619129022477800 X-GMAIL-MSGID: 1777619129022477800 From: Frank Wunderlich Add Support for Mediatek Filogic 880/MT7988 LVTS. Signed-off-by: Frank Wunderlich --- 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 | 46 +++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index c2669f405a94..8fd1dc5adb16 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,41 @@ static int lvts_remove(struct platform_device *pdev) return 0; } +/* + * LVTS MT7988 + */ + +static const struct lvts_ctrl_data mt7988_lvts_ap_data_ctrl[] = { + { + .cal_offset = { 0x00, 0x04, 0x08, 0x0c }, //918,91C,920,924 + .lvts_sensor = { + { .dt_id = MT7988_CPU_0 }, // CPU 0,1 + { .dt_id = MT7988_CPU_1 }, // CPU 2,3 + { .dt_id = MT7988_ETH2P5G_0 }, // internal 2.5G Phy 1 + { .dt_id = MT7988_ETH2P5G_1 } // internal 2.5G Phy 2 + }, + .num_lvts_sensor = 4, + .offset = 0x0, + .hw_tshut_temp = LVTS_HW_SHUTDOWN_MT7988, + }, + { + .cal_offset = { 0x14, 0x18, 0x1c, 0x20 }, //92C,930,934,938 + .lvts_sensor = { + { .dt_id = MT7988_TOPS_0}, // TOPS + { .dt_id = MT7988_TOPS_1}, // TOPS + { .dt_id = MT7988_ETHWARP_0}, // WED 1 + { .dt_id = MT7988_ETHWARP_1} // WED 2 + }, + .num_lvts_sensor = 4, + .offset = 0x100, + .hw_tshut_temp = LVTS_HW_SHUTDOWN_MT7988, + } +}; + +/* + * LVTS MT8195 + */ + static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { { .cal_offset = { 0x04, 0x07 }, @@ -1348,6 +1386,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 +1408,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 }, {},