From patchwork Thu May 20 11:21:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 443600 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 704B4C433ED for ; Thu, 20 May 2021 12:24:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 52AAA611C2 for ; Thu, 20 May 2021 12:24:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232736AbhETMZV (ORCPT ); Thu, 20 May 2021 08:25:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231791AbhETMZQ (ORCPT ); Thu, 20 May 2021 08:25:16 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8908AC0438C6 for ; Thu, 20 May 2021 04:21:10 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id b7so8351314wmh.5 for ; Thu, 20 May 2021 04:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hkbd3ZNvjGsOfD3AtfBISF0Ql1q34vUavLh2tmeeXiY=; b=AbuR8D31D0aEydN9/qBTqKVe762diEtY52hlBCNUqPOBMR1/4MruCFDWdmypmSvYlx mjXBc56vIghamZhnPYqYkTblnJmeGyYXEk5+zM013Cniioh2svZjE2a2Yg+gdNhJ2Gkw AFueyd3oABPgMAPqKW/B2RRrPWpi2h8J3fG56vYLjllgEPoi+2Su3aO5I8pAjTvHHXUn h/b9OQXH4XgRx3C0+rHXKlB4hIKGzl9i8K5VYNVoovqKM9eLUAabQaSuzmmXg5g8JIRT orAeQgRTIg6ATo/vZX4mwx9kHLmUs6yx2R1qkzKvs3uy3NR3B6oFy5p0dhR1BVxTHxNc 1HhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hkbd3ZNvjGsOfD3AtfBISF0Ql1q34vUavLh2tmeeXiY=; b=c5Qwe+wvEnCO9FqctKsbAO2jV16X4nlHqteEKenzloUrkqEUSaI11J/NTGQTpnruhB uZhSY1clxkgJrYTxlGYpDnHIKyW4Nm58/S9QLemPUrFPIe34pMx8FHgEW0HgRcIVI3U4 iImNiMy0XRESlcBlBC0i726UED/9NqggyxySgCFbaUh+wqqH76cY6YC08cAUjBzNUqDu fLSMerHb27awEvT83Yibn2Rgo/h+kW4baL18peBEgzxI4N5XWiUgmBpG0PbWml+731m3 MpUTKX2KjZLnn2MbGnsQAXtLJdFsaItrR6WdpP9+qF0E6thKD7fQrt9vtec7gMqlZ34r cgQA== X-Gm-Message-State: AOAM530FSSSm9AIJXNIr33yx8wcmIu9Ay8fEG8fi8lni3PmDHHN7Wp2v wL3GIGM1gWlmNDOeUjLuM8tpMw== X-Google-Smtp-Source: ABdhPJy+OPM9ZufNRM9UA5H8yhwkRCjRB2XrMMPH+JnjStcV7z59I2irWFSKsO0DLI6rCBvVPUaCSw== X-Received: by 2002:a7b:c24a:: with SMTP id b10mr3511825wmj.157.1621509669146; Thu, 20 May 2021 04:21:09 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id o11sm2756646wrq.93.2021.05.20.04.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 04:21:08 -0700 (PDT) From: Fabien Parent To: Qii Wang , Rob Herring , Matthias Brugger Cc: mkorpershoek@baylibre.com, Fabien Parent , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] dt-bindings: i2c: i2c-mt65xx: convert doc to yaml schema format Date: Thu, 20 May 2021 13:21:02 +0200 Message-Id: <20210520112106.77190-1-fparent@baylibre.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Convert the binding documentation for i2c-mt65xx driver to the YAML schema format. Signed-off-by: Fabien Parent --- v2: * write compatibles in a more compact way * set the node pattern to be "^i2c@[0-9a-f]+$" instead of "^i2c[0-9]*@[0-9a-f]+"$ .../devicetree/bindings/i2c/i2c-mt65xx.txt | 49 ---------- .../devicetree/bindings/i2c/i2c-mt65xx.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 49 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt deleted file mode 100644 index 7f0194fdd0cc..000000000000 --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt +++ /dev/null @@ -1,49 +0,0 @@ -* MediaTek's I2C controller - -The MediaTek's I2C controller is used to interface with I2C devices. - -Required properties: - - compatible: value should be either of the following. - "mediatek,mt2701-i2c", "mediatek,mt6577-i2c": for MediaTek MT2701 - "mediatek,mt2712-i2c": for MediaTek MT2712 - "mediatek,mt6577-i2c": for MediaTek MT6577 - "mediatek,mt6589-i2c": for MediaTek MT6589 - "mediatek,mt6797-i2c", "mediatek,mt6577-i2c": for MediaTek MT6797 - "mediatek,mt7622-i2c": for MediaTek MT7622 - "mediatek,mt7623-i2c", "mediatek,mt6577-i2c": for MediaTek MT7623 - "mediatek,mt7629-i2c", "mediatek,mt2712-i2c": for MediaTek MT7629 - "mediatek,mt8173-i2c": for MediaTek MT8173 - "mediatek,mt8183-i2c": for MediaTek MT8183 - "mediatek,mt8192-i2c": for MediaTek MT8192 - "mediatek,mt8516-i2c", "mediatek,mt2712-i2c": for MediaTek MT8516 - - reg: physical base address of the controller and dma base, length of memory - mapped region. - - interrupts: interrupt number to the cpu. - - clock-div: the fixed value for frequency divider of clock source in i2c - module. Each IC may be different. - - clocks: clock name from clock manager - - clock-names: Must include "main" and "dma", "arb" is for multi-master that - one bus has more than two i2c controllers, if enable have-pmic need include - "pmic" extra. - -Optional properties: - - clock-frequency: Frequency in Hz of the bus when transfer, the default value - is 100000. - - mediatek,have-pmic: platform can control i2c form special pmic side. - Only mt6589 and mt8135 support this feature. - - mediatek,use-push-pull: IO config use push-pull mode. - -Example: - - i2c0: i2c@1100d000 { - compatible = "mediatek,mt6577-i2c"; - reg = <0x1100d000 0x70>, - <0x11000300 0x80>; - interrupts = ; - clock-frequency = <400000>; - mediatek,have-pmic; - clock-div = <16>; - clocks = <&i2c0_ck>, <&ap_dma_ck>; - clock-names = "main", "dma"; - }; - diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml new file mode 100644 index 000000000000..41cedb4930de --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml @@ -0,0 +1,93 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/i2c/i2c-mt65xx.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: MediaTek I2C Controller + +maintainers: + - Qii Wang + - Matthias Brugger + +allOf: + - $ref: /schemas/i2c/i2c-controller.yaml# + +properties: + $nodename: + pattern: "^i2c@[0-9a-f]+$" + + compatible: + oneOf: + - enum: + - mediatek,mt2712-i2c + - mediatek,mt6577-i2c + - mediatek,mt6589-i2c + - mediatek,mt7622-i2c + - mediatek,mt8173-i2c + - mediatek,mt8183-i2c + - mediatek,mt8192-i2c + - items: + - enum: + - mediatek,mt2701-i2c + - mediatek,mt6797-i2c + - mediatek,mt7623-i2c + - const: mediatek,mt6577-i2c + - items: + - enum: + - mediatek,mt7629-i2c + - mediatek,mt8516-i2c + - const: mediatek,mt2712-i2c + + clocks: + minItems: 2 + maxItems: 4 + items: + - description: Controller clock + - description: DMA clock + - description: ARB clock for multi-master when a bus has more than + one i2c controllers + - description: PMIC clock. Only when mediatek,have-pmic is set. + + clock-names: + minItems: 2 + maxItems: 4 + items: + - const: main + - const: dma + - const: arb + - const: pmic + + mediatek,have-pmic: + $ref: /schemas/types.yaml#/definitions/flag + description: Platform can control I2C from the PMIC + + mediatek,use-push-pull: + $ref: /schemas/types.yaml#/definitions/flag + description: IO config use push-pull mode. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - clock-div + +unevaluatedProperties: false + +examples: + - | + #include + #include + i2c0: i2c@1100d000 { + compatible = "mediatek,mt6577-i2c"; + reg = <0x1100d000 0x70>, + <0x11000300 0x80>; + interrupts = ; + clock-frequency = <400000>; + mediatek,have-pmic; + clock-div = <16>; + clocks = <&i2c0_ck>, <&ap_dma_ck>; + clock-names = "main", "dma"; + }; From patchwork Thu May 20 11:21:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 444929 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 483F4C43460 for ; Thu, 20 May 2021 12:24:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C598611AD for ; Thu, 20 May 2021 12:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233350AbhETMZV (ORCPT ); Thu, 20 May 2021 08:25:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232736AbhETMZP (ORCPT ); Thu, 20 May 2021 08:25:15 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3A25C0AE13E for ; Thu, 20 May 2021 04:21:11 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so4983501wmf.1 for ; Thu, 20 May 2021 04:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=higKOj1p3ok/7nI+zj6z0ZvfY1Ko1k+VC4e6gD2otWI=; b=g9Gf1u+Jbh6DYBX9q1rzo3cTRkf5wxluU18iBxD2nboZn34JD7rYfLeuZoHtyfYMzh qmvDsnXmCTLcXkhlwtqpztHAaQCf2lFm9PimRUibqmVi5VMJzEZYmu/Qo6dfE49VCGs7 W1cpAhTo7DBJs4uGujD87YIezUZ6ONMo1DJGshzIs9/RIfi3iAoFBkMNL80jdTLWwNwp 4Oi8pnkc8qQlkFicJH5U0hHMJATrgl94UKJ7oKAdy3kx1AU9NZElD+zzl4ZlSkBai3gq ykXgJ52Detsa640Mx2ru4rjRDvBFB7PWYFQOeqB8O5KzwjWyECGnzc3/byDIUkDLV70E 36XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=higKOj1p3ok/7nI+zj6z0ZvfY1Ko1k+VC4e6gD2otWI=; b=firCLyosgpU08tAQx8mATX9xG6dxZ32QvdiOs0TU/lFRsUU/BIw5LVpK2UVvAspRPp x1DGCiv6D4FeBQ7tG+O4DzTzh/rFmYizTj4D5wwcrIopihnoVXgtCOgZJ/1nMGAeA3KA oNwtHXMK1hfMHnC1145clcEaJPdVn9ShZqQgsYu/bB2iAXxuXc2PIzf6dzixCp2alO7I aeY9tiB1rrtcHrx+i28vxQB3CbSwqTUfy8++ZD2+F/FZrSqHkdVy8Uxedz2kGyEpX6ny wGXpfmk1rf4U0lpp2V0FWq/+cbRnECV3HHq9OyGH6Kai35v1tmsBBg/pzrUlz+nazO+t 4uJg== X-Gm-Message-State: AOAM531aHkWAlEex3a7JSkAt9vYRzn0OvBdYz1QFSoJnHhN1faO+UMJp FkpeXrxIK9wZfj1zvCeQZLpNNA== X-Google-Smtp-Source: ABdhPJxVIvEDcoDggTJiB4vSdqTDuOsOwbvvKHhNoweVKBATxb0UMt/Jt655qWVNCHb7uHZpTP29TQ== X-Received: by 2002:a1c:b646:: with SMTP id g67mr3075568wmf.117.1621509670493; Thu, 20 May 2021 04:21:10 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id o11sm2756646wrq.93.2021.05.20.04.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 04:21:10 -0700 (PDT) From: Fabien Parent To: Rob Herring , Matthias Brugger , Qii Wang Cc: mkorpershoek@baylibre.com, Fabien Parent , Rob Herring , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] dt-bindings: i2c: i2c-mt65xx: add binding for MT8365 SoC Date: Thu, 20 May 2021 13:21:03 +0200 Message-Id: <20210520112106.77190-2-fparent@baylibre.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520112106.77190-1-fparent@baylibre.com> References: <20210520112106.77190-1-fparent@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Add binding documentation for the MT8365 I2C controllers. Signed-off-by: Fabien Parent Acked-by: Rob Herring --- v2: No change Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml index 41cedb4930de..2c437368532e 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml @@ -27,6 +27,7 @@ properties: - mediatek,mt8173-i2c - mediatek,mt8183-i2c - mediatek,mt8192-i2c + - mediatek,mt8365-i2c - items: - enum: - mediatek,mt2701-i2c From patchwork Thu May 20 11:21:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 444928 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48185C43462 for ; Thu, 20 May 2021 12:24:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B78A61353 for ; Thu, 20 May 2021 12:24:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233601AbhETMZX (ORCPT ); Thu, 20 May 2021 08:25:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232583AbhETMZR (ORCPT ); Thu, 20 May 2021 08:25:17 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16BA3C0AF781 for ; Thu, 20 May 2021 04:21:13 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id u5-20020a7bc0450000b02901480e40338bso4865627wmc.1 for ; Thu, 20 May 2021 04:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SYtTHed5+bcflT7W1MwJxVtTplHwdof5DPlJCzKg/GU=; b=wHzSjTiwKXBcRbEJoWYfBbHsBACdQyin173EJ35ibk/Le84pDQz22+ydLN+s2rjISy I+JQrHpSULjWpslolZhZ5oNzuFn6Jm4Xfez874QzyEF3o1vjZLDKl5RfL6iEpjDpTU6E GsWAE200CVFWmzZB0jBnSHQiysNZqmuHA4QBYeUZNk7kY6BB8Z9W7JH+a6/3a+lWNf1q aiDoJJPNe7khmZ6EHXZO1bhn6GXd4F7Hp/o3NyaiFDPEhbKCcue5aqXjPfe0cBmp8TKB DNHKneadShb9fVu0FQOnKh4P481VVKGXrk6C+/s6sN3zz62tMKeeqha/+VCFc2gHYup/ yVdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SYtTHed5+bcflT7W1MwJxVtTplHwdof5DPlJCzKg/GU=; b=oyxDM/bWqAzxho5h/7ON4eo5QhnW5BQ4SJFohB8Y+cfYWN68P8T+GdYqn+fyNNjivu Wgfss6OmcMYAWUGs6tugtQ8y5o2/W01Q5/PAYNhE90BcNxOCizZAPiWFPQ3x2F4dNi6f J+/Tr9xo350uNLZuX/Go5aVFY6ekKNKNVOfgwnQQk6BfZwnrXl/Zav/8A6wbe8YeQp2F Qg7Ew4MwjBiK5yPPlmUiNAQf+Nufilmtyk8eHNKp4lV3Pms/kohd3pQOaX1vw0PX2TwY uaI3zsAXnWLPYn9ryqwcZhDc8XuKROFJijLtYzi1MScK+O3y1+ue9zX1WE2KMBBRtsry 5wLA== X-Gm-Message-State: AOAM53234BlO7Lycr+31cG3yg6csatgDaHtMpYCi2SjF5CodN2e0j+29 fLH9AR0MJdIfdab++1N+MHKS5g== X-Google-Smtp-Source: ABdhPJwvuM5ZR01Iie6YuQBaMHLb3duG28paxLrXOheP+cO3HgcEo+2Qn9ejUUvRZNq2JhTAWP7/DQ== X-Received: by 2002:a05:600c:5c1:: with SMTP id p1mr1599688wmd.10.1621509671651; Thu, 20 May 2021 04:21:11 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id o11sm2756646wrq.93.2021.05.20.04.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 04:21:11 -0700 (PDT) From: Fabien Parent To: Qii Wang , Matthias Brugger Cc: mkorpershoek@baylibre.com, 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 v2 3/4] i2c: i2c-mt65xx: add MT8365 SoC support Date: Thu, 20 May 2021 13:21:04 +0200 Message-Id: <20210520112106.77190-3-fparent@baylibre.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520112106.77190-1-fparent@baylibre.com> References: <20210520112106.77190-1-fparent@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Add support for I2C on MT8365 SoCs. Signed-off-by: Fabien Parent --- 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 5ddfa4e56ee2..0e6ad84e0e47 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -404,6 +404,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 }, @@ -412,6 +425,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);