From patchwork Wed Nov 10 19:49:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12692199 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21D52C433F5 for ; Wed, 10 Nov 2021 19:52:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E8AEB60FDA for ; Wed, 10 Nov 2021 19:52:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E8AEB60FDA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mC3PdvxdePHHdICBefL6f2LgE3F0hee/yldWswXLT48=; b=PnpHuGXiQb/l4Q Vkyvn9uBUj+Wt8Af14kGCi+YjHTnuDG/4Q0zReu1IJnWkpDFuU2r9pzMoGKv8FRDBmfRTZM95YpSN 7MM/BqgGIKtAj23aeTc6DVI59vUslT09JayA8hyB0LGqZK+wJOMq+OwAiULJijUFxRY2VBUgxAeHD 9CRLzvLfU1lXiZJZD+M00+q9cu4W4DVKaCAbMOHdigEn8+XhwV8p3KvfzW9cakPc5IZIZ7wa6jAV1 ww2NozJvbJbHOYK9iS3zYies6Zh1oEHM+dRyyzGRg96ylZ7tv48OIZiqXkmlJ3xgS17r0CXeSTFYd iJKz/K7W1EHoZ3jl1iYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktcf-006DC8-PU; Wed, 10 Nov 2021 19:51:06 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktbu-006Csp-TD for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 19:50:20 +0000 Received: by mail-wm1-x32e.google.com with SMTP id r9-20020a7bc089000000b00332f4abf43fso4253266wmh.0 for ; Wed, 10 Nov 2021 11:50:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9v/p3H16Q1aF+/gSoivdZVyJ3IG44fQPKhtZ36YoWUc=; b=VjKbv2Zpc6bphwYBa6CnzuQ3EBlY7cT8fnqQxmtxi5dfMNOmVdkC6ZVNssGO9IbeeH FuPTyHp2SsTUWNCXoX+EjvpCyIUJb4Ctn4OZ4ezvBPsOUl0PViSncqzsGEiwnekHBLZw bcwcXhZp2JjtoOuP/UjB9JFcE4FVXaygmhzj/RJLR2/YjpFsFF7j36RKtN1LeKtEf+d+ WtjmbgCehRd5LQUwErc0V9by2F30IkDUsnBgi5Hawi4Pt9v/mETFuDa9iVx4egfygdmx 9Esz9+Ozc3BI9trSnkX9bDfduBlSEu6KRIkL6joNzj07/fxY7TUZfdIGrulE0dYOKOQQ nK/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9v/p3H16Q1aF+/gSoivdZVyJ3IG44fQPKhtZ36YoWUc=; b=iUwHOshEJmW0wOrkHzEGOLkNjt1ywwKVQse5CQ15M2kqL1HelygXKm+eLLeBNW2/Me Xr4LrtNegrs0AHh6Cq/6GsL430ICLRTTsKAhdQ68ahhzVODLnwfJJy2sb2+d1US9LS66 lT+lVLmUJK7+fSF6l3LLJAPcn7WZUOhsK4QR+8GjLzE3fPlFnx5emEJpz9TVJnpSOVyr /JycXMovcOhjPSi4VRhqrRT/ezpVxrvO/ehWwDDi+hQdQxctqy+u+8vtC/fAmRfrTiCF ldSpXhIpXBgC0CtNxP/GtzfBLucC/Ahp0l2B6oY0hIJpBwQEHzbkUa+/TwLpDkvKtzbT Hvcw== X-Gm-Message-State: AOAM531RKIT98QdkHymlGTu8lzqkXey3r7OAU+eelPHvptMgaAnWS7yB gxbtlhAENljj5Wz1VJf8BjtGyA== X-Google-Smtp-Source: ABdhPJwSPWVHGUSXAVFDBKRAJSOPw7HbTj6ZnnxeadITSc2hD6wRJTXTJzEv97AJwaIDDHZMAUsYmA== X-Received: by 2002:a05:600c:4f8a:: with SMTP id n10mr1937772wmq.54.1636573817648; Wed, 10 Nov 2021 11:50:17 -0800 (PST) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id k15sm750935wrx.53.2021.11.10.11.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 11:50:17 -0800 (PST) From: Fabien Parent To: Qii Wang , Matthias Brugger Cc: Fabien Parent , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/4] i2c: i2c-mt65xx: add MT8365 SoC support Date: Wed, 10 Nov 2021 20:49:58 +0100 Message-Id: <20211110194959.20611-3-fparent@baylibre.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211110194959.20611-1-fparent@baylibre.com> References: <20211110194959.20611-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_115018_997274_24F3DB40 X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for I2C on MT8365 SoCs. Signed-off-by: Fabien Parent --- v3: rebased v2: No change drivers/i2c/busses/i2c-mt65xx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c index 9ea427f53083..a0249ebe7c7a 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -411,6 +411,19 @@ static const struct mtk_i2c_compatible mt8192_compat = { .max_dma_support = 36, }; +static const struct mtk_i2c_compatible mt8365_compat = { + .regs = mt_i2c_regs_v1, + .pmic_i2c = 0, + .dcm = 1, + .auto_restart = 1, + .aux_len_reg = 1, + .timing_adjust = 1, + .dma_sync = 1, + .ltiming_adjust = 0, + .apdma_sync = 0, + .max_dma_support = 33, +}; + static const struct of_device_id mtk_i2c_of_match[] = { { .compatible = "mediatek,mt2712-i2c", .data = &mt2712_compat }, { .compatible = "mediatek,mt6577-i2c", .data = &mt6577_compat }, @@ -419,6 +432,7 @@ static const struct of_device_id mtk_i2c_of_match[] = { { .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat }, { .compatible = "mediatek,mt8183-i2c", .data = &mt8183_compat }, { .compatible = "mediatek,mt8192-i2c", .data = &mt8192_compat }, + { .compatible = "mediatek,mt8365-i2c", .data = &mt8365_compat }, {} }; MODULE_DEVICE_TABLE(of, mtk_i2c_of_match);