From nobody Fri Sep 20 20:38:36 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8E44C76196 for ; Thu, 6 Apr 2023 21:41:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238028AbjDFVlp (ORCPT ); Thu, 6 Apr 2023 17:41:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237881AbjDFVlm (ORCPT ); Thu, 6 Apr 2023 17:41:42 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64FD19749; Thu, 6 Apr 2023 14:41:41 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pkXMR-0004rW-27; Thu, 06 Apr 2023 23:41:39 +0200 Date: Thu, 6 Apr 2023 22:41:34 +0100 From: Daniel Golle To: linux-i2c@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Qii Wang , AngeloGioacchino Del Regno , Matthias Brugger , Sam Shih Subject: [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC Message-ID: <5f611059ba664f912c4c5c6cc859acb9b5121e2e.1680817105.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for the I2C units found in the MediaTek MT7981 and MT7988 SoCs. Just like other recent MediaTek I2C units that also uses v3 register offsets (which differ from v2 only by OFFSET_SLAVE_ADDR being 0x94 instead of 0x4). Signed-off-by: Daniel Golle --- drivers/i2c/busses/i2c-mt65xx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65x= x.c index 59eaefe999b11..a43c4d77739ab 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -431,6 +431,18 @@ static const struct mtk_i2c_compatible mt8168_compat = =3D { .max_dma_support =3D 33, }; =20 +static const struct mtk_i2c_compatible mt7981_compat =3D { + .regs =3D mt_i2c_regs_v3, + .pmic_i2c =3D 0, + .dcm =3D 0, + .auto_restart =3D 1, + .aux_len_reg =3D 1, + .timing_adjust =3D 1, + .dma_sync =3D 1, + .ltiming_adjust =3D 1, + .max_dma_support =3D 33 +}; + static const struct mtk_i2c_compatible mt7986_compat =3D { .quirks =3D &mt7622_i2c_quirks, .regs =3D mt_i2c_regs_v1, @@ -516,6 +528,7 @@ static const struct of_device_id mtk_i2c_of_match[] =3D= { { .compatible =3D "mediatek,mt6577-i2c", .data =3D &mt6577_compat }, { .compatible =3D "mediatek,mt6589-i2c", .data =3D &mt6589_compat }, { .compatible =3D "mediatek,mt7622-i2c", .data =3D &mt7622_compat }, + { .compatible =3D "mediatek,mt7981-i2c", .data =3D &mt7981_compat }, { .compatible =3D "mediatek,mt7986-i2c", .data =3D &mt7986_compat }, { .compatible =3D "mediatek,mt8168-i2c", .data =3D &mt8168_compat }, { .compatible =3D "mediatek,mt8173-i2c", .data =3D &mt8173_compat }, --=20 2.40.0 From nobody Fri Sep 20 20:38:36 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3048C76196 for ; Thu, 6 Apr 2023 21:42:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238276AbjDFVmC (ORCPT ); Thu, 6 Apr 2023 17:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238076AbjDFVl7 (ORCPT ); Thu, 6 Apr 2023 17:41:59 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 876618A7F; Thu, 6 Apr 2023 14:41:58 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pkXMi-0004sS-1K; Thu, 06 Apr 2023 23:41:56 +0200 Date: Thu, 6 Apr 2023 22:41:51 +0100 From: Daniel Golle To: linux-i2c@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Qii Wang , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Matthias Brugger , Sam Shih Subject: [PATCH 2/2] dt-bindings: i2c: i2c-mt65xx: add binding for MT7981 SoC Message-ID: <31957e15116027afd154f0d91e799028e2400bb2.1680817105.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add binding documentation for the I2C controllers found in the MediaTek MT7981 SoC. Signed-off-by: Daniel Golle --- Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml b/Docume= ntation/devicetree/bindings/i2c/i2c-mt65xx.yaml index 685da4df688d6..fda0467cdd954 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml @@ -23,6 +23,7 @@ properties: - const: mediatek,mt6577-i2c - const: mediatek,mt6589-i2c - const: mediatek,mt7622-i2c + - const: mediatek,mt7981-i2c - const: mediatek,mt7986-i2c - const: mediatek,mt8168-i2c - const: mediatek,mt8173-i2c --=20 2.40.0