From patchwork Tue Mar 14 01:18:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 69224 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1510581wrd; Mon, 13 Mar 2023 18:51:49 -0700 (PDT) X-Google-Smtp-Source: AK7set8vcOCANrZtub+mWpByd5SiGYu9pGdK+cmD5qV1eKzxPDbMHYKT9uqu+dTs57Cw+cSWdNVW X-Received: by 2002:a05:6102:3e91:b0:421:d64b:6375 with SMTP id m17-20020a0561023e9100b00421d64b6375mr22547242vsv.5.1678758709411; Mon, 13 Mar 2023 18:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678758709; cv=none; d=google.com; s=arc-20160816; b=WHM9q3pDASSPUHaMjYNGgnrob136fCU9H4xXkWw6RMyB6HJPMDh2zPnd742FMPdewz xMYRH5S+SNTGBsDVEEBjy8c0gduRwLEPc57RTbqxqZr34vCAQh3bZ2qQCfmwlWJ4NWTn AykheBZ3+StRZH5Jt+PP4ZcKhJUnHQDZYBDCEN3p0Vr3OXcRy9gatzVw4WPYo6uPQC/Z c0ERRfHmSrLLdUMQG6S9Ngb8Bhve+AZrDM0bl1vavFAPYAMp85m2lITxvrvcqz12EeTf ccoZCOStnhp98r0Zq9OBnHo3HnIJimoJmfT/9+rl9DFa80TqgzN6ZPh3uZFQsHZKGmyw +HvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=HaIz1rGnRHu5cGVAcA8I9zQmUSD4ROApxY2X0fvzIl8=; b=M/5qepsSCtywcp5y/2ZF2uPHs+nvAORtQsbVj9s8m2oT217AhFAMUXUZvFIeZVPvp2 4yk1WepQc3AZ21UQ3jlRNh7XMJjsAI8PervFivs6wg+FxXxObyGTC70xzMgRaHl4DAie jOvLOORxFJ6IRPPmdg0X3+pRBIRyVElplVdC5eX0Juk9kwgwIgXhXsuOkQOkDSu8Oukx cnQWkrRSb7rpgF6J+wGjwNp8smJerdlMJgV7PNnEv4qt2rZRipIocd6ZD4tkhJmyDKjg XZrASusrhBiWhNtzL+aK4zpdelpL99PyPACBu5YaEld3FTgOK+lk9BPNpEAQJ8vd3XmN qkxg== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a67f24b000000b0042587bbedc0si625885vsm.148.2023.03.13.18.51.34; Mon, 13 Mar 2023 18:51:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbjCNBUG (ORCPT + 99 others); Mon, 13 Mar 2023 21:20:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbjCNBUD (ORCPT ); Mon, 13 Mar 2023 21:20:03 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D8F05B5C3; Mon, 13 Mar 2023 18:20:02 -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 1pbtKa-0005iW-2f; Tue, 14 Mar 2023 02:20:01 +0100 Date: Tue, 14 Mar 2023 01:18:24 +0000 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 , Matthias Brugger , AngeloGioacchino Del Regno Subject: [PATCH 1/2] i2c: mediatek: add support for MT7981 SoC Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760306092441835079?= X-GMAIL-MSGID: =?utf-8?q?1760306092441835079?= 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-mt65xx.c index 43dd966d5ef5..54cabd366403 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 = { .max_dma_support = 33, }; +static const struct mtk_i2c_compatible mt7981_compat = { + .regs = mt_i2c_regs_v3, + .pmic_i2c = 0, + .dcm = 0, + .auto_restart = 1, + .aux_len_reg = 1, + .timing_adjust = 1, + .dma_sync = 1, + .ltiming_adjust = 1, + .max_dma_support = 33 +}; + static const struct mtk_i2c_compatible mt7986_compat = { .quirks = &mt7622_i2c_quirks, .regs = mt_i2c_regs_v1, @@ -516,6 +528,7 @@ static const struct of_device_id mtk_i2c_of_match[] = { { .compatible = "mediatek,mt6577-i2c", .data = &mt6577_compat }, { .compatible = "mediatek,mt6589-i2c", .data = &mt6589_compat }, { .compatible = "mediatek,mt7622-i2c", .data = &mt7622_compat }, + { .compatible = "mediatek,mt7981-i2c", .data = &mt7981_compat }, { .compatible = "mediatek,mt7986-i2c", .data = &mt7986_compat }, { .compatible = "mediatek,mt8168-i2c", .data = &mt8168_compat }, { .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat },