Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp55987rwl; Thu, 6 Apr 2023 14:42:13 -0700 (PDT) X-Google-Smtp-Source: AKy350bkU1dajgVj60lZxPfni8zjkPmk5/MFVl+B5BE5cn72jpg+hBVTDMXwgQGF4NqRnp7QjaWL X-Received: by 2002:a17:902:da81:b0:1a5:206:4c90 with SMTP id j1-20020a170902da8100b001a502064c90mr706714plx.30.1680817332728; Thu, 06 Apr 2023 14:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680817332; cv=none; d=google.com; s=arc-20160816; b=dqkWwTP9Qp0QjXHTWMcIVbUltjpc8mQlT6wGCXMX/aKFJ98646MheMg6S/Q2A5fxRO gIKKNliX/yVMUU2OXiJ3trg3RfAi07V6ulBJVns72yFrXW1VtD5gGkWsOcrjDKuhPnTQ Gpk7e5FoZftU168jIZnLGK1O9V6d1l+VnnRQ9uOPR7AP85fBjT+dw+9TcPQdoIB1HmEN RWWzRCrtqlbICuyU4dzKy/soC/CoLSSLjXdvEeVDq3/d76+hG7jI30JqqnJZrkBsJu0E xQFMDX9TEqClx6PBftoCPYix0Rd/h3fOw8RuNO3yWDtTzTo1l+VQizc8MeT8xhOXQpff r8+g== 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=MNo3VUeVBCvTr93etMC8xb2Qm5HnTquhpskeDbfLiFg=; b=iJqk1QR5S/H9J1N1BhEfhNoy6FVgb2pwGfBeAfbpZjE7ZdWr5tZOj78SxmLH3VLf4L SoqWQ70zGn05meyK9MsnXO2NIgOkWG0lVeKJXsu/o7YnwjkZvJGf5sjOWJFSvyw8cEdQ wzQJ7jWP9kT2fTdi6yYSUQ6T7xCjE4pkuGP24Lau3dRl1XL563gN6GzKI12lpmWSQxNv 6RywtClU/Hz1BDBT8XtgMhA5houiCu//6g0gc4Nbgtdcm8ClbBngMmxmeHXwWwhipjXR Z1ivnoZDZ2T4PDVvDENgYeRuaiJcDobHeCbE6N7OZM5/N8ua6oTiwaTTcPzmTsTVXFdU 5CDA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020a17090300ca00b001a2513b8e14si2388058plc.84.2023.04.06.14.42.01; Thu, 06 Apr 2023 14:42:12 -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 S230348AbjDFVlo (ORCPT + 99 others); Thu, 6 Apr 2023 17:41:44 -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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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-mt65xx.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 = { .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 }, -- 2.40.0