From nobody Sat Sep 21 22:59:34 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 6E551C43334 for ; Fri, 8 Jul 2022 02:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236909AbiGHCSh (ORCPT ); Thu, 7 Jul 2022 22:18:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236564AbiGHCSc (ORCPT ); Thu, 7 Jul 2022 22:18:32 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6E445F66; Thu, 7 Jul 2022 19:18:30 -0700 (PDT) X-UUID: 6e6480c1268c4f2781acb312581376ea-20220708 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8,REQID:4aa5fbc8-1b52-4903-ac3f-b68a2205868f,OB:0,LO B:10,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,RULE:Release_Ham, ACTION:release,TS:95 X-CID-INFO: VERSION:1.1.8,REQID:4aa5fbc8-1b52-4903-ac3f-b68a2205868f,OB:0,LOB: 10,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,RULE:Spam_GS981B3D, ACTION:quarantine,TS:95 X-CID-META: VersionHash:0f94e32,CLOUDID:d87cb963-0b3f-4b2c-b3a6-ed5c044366a0,C OID:911398058f1c,Recheck:0,SF:28|17|19|48,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,QS:nil,BEC:nil,COL:0 X-UUID: 6e6480c1268c4f2781acb312581376ea-20220708 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 590764692; Fri, 08 Jul 2022 10:18:23 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Fri, 8 Jul 2022 10:18:22 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 8 Jul 2022 10:18:21 +0800 From: Kewei Xu To: CC: , , , , , , , , , , , , , , , , Subject: [PATCH 1/2] dt-bindings: i2c: update bindings for MT8188 SoC Date: Fri, 8 Jul 2022 10:18:17 +0800 Message-ID: <20220708021818.21400-2-kewei.xu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220708021818.21400-1-kewei.xu@mediatek.com> References: <20220708021818.21400-1-kewei.xu@mediatek.com> MIME-Version: 1.0 X-MTK: N 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 a DT binding documentation for the MT8188 soc. Signed-off-by: Kewei Xu --- 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 16a1a3118204..4e730fb7be56 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml @@ -27,6 +27,7 @@ properties: - const: mediatek,mt8173-i2c - const: mediatek,mt8183-i2c - const: mediatek,mt8186-i2c + - const: mediatek,mt8188-i2c - const: mediatek,mt8192-i2c - items: - enum: --=20 2.18.0 From nobody Sat Sep 21 22:59:34 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 3927CCCA479 for ; Fri, 8 Jul 2022 02:18:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236981AbiGHCSm (ORCPT ); Thu, 7 Jul 2022 22:18:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236692AbiGHCSe (ORCPT ); Thu, 7 Jul 2022 22:18:34 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6FA960D9; Thu, 7 Jul 2022 19:18:31 -0700 (PDT) X-UUID: 54a35d287b4a452d8b31e7b310bd5201-20220708 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8,REQID:d58aa563-d187-4f44-b2df-23e0c0ddfebe,OB:10,L OB:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,RULE:Release_Ham, ACTION:release,TS:95 X-CID-INFO: VERSION:1.1.8,REQID:d58aa563-d187-4f44-b2df-23e0c0ddfebe,OB:10,LOB :0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,RULE:Spam_GS981B3D, ACTION:quarantine,TS:95 X-CID-META: VersionHash:0f94e32,CLOUDID:270edc86-57f0-47ca-ba27-fe8c57fbf305,C OID:845891c07563,Recheck:0,SF:28|17|19|48,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,QS:nil,BEC:nil,COL:0 X-UUID: 54a35d287b4a452d8b31e7b310bd5201-20220708 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 955620555; Fri, 08 Jul 2022 10:18:25 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Fri, 8 Jul 2022 10:18:23 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 8 Jul 2022 10:18:22 +0800 From: Kewei Xu To: CC: , , , , , , , , , , , , , , , , Subject: [PATCH 2/2] i2c: mediatek: Add i2c compatible for Mediatek MT8188 Date: Fri, 8 Jul 2022 10:18:18 +0800 Message-ID: <20220708021818.21400-3-kewei.xu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220708021818.21400-1-kewei.xu@mediatek.com> References: <20220708021818.21400-1-kewei.xu@mediatek.com> MIME-Version: 1.0 X-MTK: N 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 i2c compatible for MT8188. Compare to MT8192 i2c controller, The MT8188 i2c OFFSET_SLAVE_ADDR register changed from 0x04 to 0x94. Signed-off-by: Kewei Xu --- drivers/i2c/busses/i2c-mt65xx.c | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65x= x.c index 8e6985354fd5..70aff42adf5d 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -229,6 +229,35 @@ static const u16 mt_i2c_regs_v2[] =3D { [OFFSET_DCM_EN] =3D 0xf88, }; =20 +static const u16 mt_i2c_regs_v3[] =3D { + [OFFSET_DATA_PORT] =3D 0x0, + [OFFSET_SLAVE_ADDR] =3D 0x94, + [OFFSET_INTR_MASK] =3D 0x8, + [OFFSET_INTR_STAT] =3D 0xc, + [OFFSET_CONTROL] =3D 0x10, + [OFFSET_TRANSFER_LEN] =3D 0x14, + [OFFSET_TRANSAC_LEN] =3D 0x18, + [OFFSET_DELAY_LEN] =3D 0x1c, + [OFFSET_TIMING] =3D 0x20, + [OFFSET_START] =3D 0x24, + [OFFSET_EXT_CONF] =3D 0x28, + [OFFSET_LTIMING] =3D 0x2c, + [OFFSET_HS] =3D 0x30, + [OFFSET_IO_CONFIG] =3D 0x34, + [OFFSET_FIFO_ADDR_CLR] =3D 0x38, + [OFFSET_SDA_TIMING] =3D 0x3c, + [OFFSET_TRANSFER_LEN_AUX] =3D 0x44, + [OFFSET_CLOCK_DIV] =3D 0x48, + [OFFSET_SOFTRESET] =3D 0x50, + [OFFSET_MULTI_DMA] =3D 0x8c, + [OFFSET_SCL_MIS_COMP_POINT] =3D 0x90, + [OFFSET_DEBUGSTAT] =3D 0xe4, + [OFFSET_DEBUGCTRL] =3D 0xe8, + [OFFSET_FIFO_STAT] =3D 0xf4, + [OFFSET_FIFO_THRESH] =3D 0xf8, + [OFFSET_DCM_EN] =3D 0xf88, +}; + struct mtk_i2c_compatible { const struct i2c_adapter_quirks *quirks; const u16 *regs; @@ -442,6 +471,19 @@ static const struct mtk_i2c_compatible mt8186_compat = =3D { .max_dma_support =3D 36, }; =20 +static const struct mtk_i2c_compatible mt8188_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 0, + .ltiming_adjust =3D 1, + .apdma_sync =3D 1, + .max_dma_support =3D 36, +}; + static const struct mtk_i2c_compatible mt8192_compat =3D { .quirks =3D &mt8183_i2c_quirks, .regs =3D mt_i2c_regs_v2, @@ -465,6 +507,7 @@ static const struct of_device_id mtk_i2c_of_match[] =3D= { { .compatible =3D "mediatek,mt8173-i2c", .data =3D &mt8173_compat }, { .compatible =3D "mediatek,mt8183-i2c", .data =3D &mt8183_compat }, { .compatible =3D "mediatek,mt8186-i2c", .data =3D &mt8186_compat }, + { .compatible =3D "mediatek,mt8188-i2c", .data =3D &mt8188_compat }, { .compatible =3D "mediatek,mt8192-i2c", .data =3D &mt8192_compat }, {} }; --=20 2.18.0