From patchwork Tue May 18 14:55:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 441490 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 3780EC433ED for ; Tue, 18 May 2021 14:57:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C69F610E9 for ; Tue, 18 May 2021 14:57:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244640AbhERO6q (ORCPT ); Tue, 18 May 2021 10:58:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243645AbhERO6l (ORCPT ); Tue, 18 May 2021 10:58:41 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5F78C061756 for ; Tue, 18 May 2021 07:57:22 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id o127so5594284wmo.4 for ; Tue, 18 May 2021 07:57:22 -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=nnvJ8osbkowWmqtn9NFdggrDzHVnx44WWHnS4UTIDOM=; b=dqKKErEgkRlR/pYnicFKmswieuRIFj7bEca/bsTnapwvj2d7DrbFobFVAB/igJPDPH UfbaKjLSc4YwuLqpfz4YuA8+JSRGcf6B2IAiFPw803FOmrM5P1DKzXCEH90/QzwSx2dT BL2cO/+aNcxil+n6LKy4wjvEWD5eqlxSnlGqOAmk2QRQkcKq8hyalmI1x5F0CwW6to79 xVjjpqTzopTJhSXfjNkSN0zuA9/0QS4+l4yZBudznhcwL+7GhrGE2E7819lc+BM5w8Ca GUBBgTjXeKrdBzX7XAwZOedzp0eRVerGZgUWpjwQeV3nBLYoIRyhklIZ6pb9fO1Vhz0q /0dA== 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=nnvJ8osbkowWmqtn9NFdggrDzHVnx44WWHnS4UTIDOM=; b=lHiEkmEQSBj78epu2YoNDqBbQuvDvBPOY9lLDB3Cjg5Qwl7z51zpGJzJN8G+JNVOGw kLsBiUwOi/3kNZ5X5r4soNXJaqXNj3+Te/kpfZ0VkC2PUmfrG7kXbqMy2ZouFmyGm/w5 mktVlvOlc4czX3gbet1jmIZ9uCewZBjgQTPD/K/ix+CdALqdB86jwRtnBN8WeK3jOugh ww1g4cL2rq9cO2bEAK3tt8uM6DYqID1VLrCiKuwVjGDnVv0Do753PTV5JY7vfLt9h/Gp YLy8zQayOBTn0PO0gs5GzL/OPgKSU2HGyrBa3sFrpHfv1q//NZgtErdmZNOfsu+y79wu RBBw== X-Gm-Message-State: AOAM531+AFrrxYyyeIXUgHnXSz4fVp0Wr3elX7z1xO3dY0D4qvNS/OSM CZFNWfCi062H5CZjULeGyEBHlw== X-Google-Smtp-Source: ABdhPJykHbrqVuGSot4jl0mtKbOsvhBcfbVcGuhfK+eptPr3NLTg0KErO+dWYOEgB6dOfCldaFg29g== X-Received: by 2002:a1c:2507:: with SMTP id l7mr5969715wml.188.1621349841534; Tue, 18 May 2021 07:57:21 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id a18sm2928386wmb.13.2021.05.18.07.57.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 07:57:20 -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 1/3] dt-bindings: i2c: i2c-mt65xx: convert doc to yaml schema format Date: Tue, 18 May 2021 16:55:20 +0200 Message-Id: <20210518145522.2420135-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 Acked-by: Rob Herring --- .../devicetree/bindings/i2c/i2c-mt65xx.txt | 49 ---------- .../devicetree/bindings/i2c/i2c-mt65xx.yaml | 97 +++++++++++++++++++ 2 files changed, 97 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..0f445d2ab727 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml @@ -0,0 +1,97 @@ +# 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-9]*@[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: + - const: mediatek,mt2701-i2c + - const: mediatek,mt6577-i2c + - items: + - const: mediatek,mt6797-i2c + - const: mediatek,mt6577-i2c + - items: + - const: mediatek,mt7623-i2c + - const: mediatek,mt6577-i2c + - items: + - const: mediatek,mt7629-i2c + - const: mediatek,mt2712-i2c + - items: + - const: 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 Tue May 18 14:55:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 442815 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 E8FBDC43462 for ; Tue, 18 May 2021 14:57:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE31961261 for ; Tue, 18 May 2021 14:57:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242468AbhERO6q (ORCPT ); Tue, 18 May 2021 10:58:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244530AbhERO6n (ORCPT ); Tue, 18 May 2021 10:58:43 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 567D1C061760 for ; Tue, 18 May 2021 07:57:23 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id q5so10585368wrs.4 for ; Tue, 18 May 2021 07:57:23 -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=/D0C6tEXN/UZQW5bW2HTmCtLgx9o77WgGBJs9UOzZPU=; b=VAlse7UHliYrr2QpSXkTgQ56o3em7xamY/ka4A1njfjrXl42CZMzMrueeAbfqF4x42 Vmhpm1632T+d+TPDK7hedy2SRx9QGlD35XqN+a69C6NKTS2mqHCRc3jmm4FQSuhVRtLD PZkG5sN5RhzROrjB+7XkDGk8WyZ0a4YWUMulaGE8+/SRQGs3oTVdQY/xqin0FYwA04gp GLrpVq1qu+ln2PbHnRfWgCwyukMz6qCfgKwEQsuMcCvW9KcJn6BsQ6++KIAYzOO96cIv hHEmxibD2tatUwbMCVbBl/1b2SjYJrwRllMzsdndewBUbET79k1VLKBD0wKhnvDztjsZ xxFA== 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=/D0C6tEXN/UZQW5bW2HTmCtLgx9o77WgGBJs9UOzZPU=; b=NT5ugIvhfURzHu7/oeZR5q1LDNiSZnEYCEbxcz3lYT+iuVp5cfyqBtuIEgX+dmayen 1vJfqjKtPHk2r8o+rakzQNpf5k0c4M6pT/Uf9LVh4qI1/xHko6gsxM12eHXFrGafuQes 6bdB8MynJx+DRSpUWm4B/Ta7m/PdOKPAXrrzBQbm9rhb7D1enuztNK79EYWTbley+sg7 gPAy44rC26vn2YsZ4g2uPN7y5rSKume80wIH4Ny4BGRFWM2TTInM4L7yl7CvCo6N8zep fekghxyoUNvIzntf4pUKqXcXrlYcvTFCqO2MZ6/v0MiyKVISNpo5Pi4vJHg9S89kmS9t Fdcg== X-Gm-Message-State: AOAM531oiN0AqqyIT/9bs/ucQVMCABVzQlyZfRFyZJA0kmiwvXKlLhyL 4mMFjWlwNHx3gk71jdYRbqTVUg== X-Google-Smtp-Source: ABdhPJwpMJWsGQ+2piFN+d8uOfC4WF5Q6hmay5w6ZlBLGrB2is0Suo5wmQEaFXpTdmckDEth6WsKpA== X-Received: by 2002:a05:6000:4d:: with SMTP id k13mr7762317wrx.98.1621349842761; Tue, 18 May 2021 07:57:22 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id a18sm2928386wmb.13.2021.05.18.07.57.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 07:57:22 -0700 (PDT) From: Fabien Parent To: Rob Herring , Matthias Brugger , Qii Wang 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 2/3] dt-bindings: i2c: i2c-mt65xx: add binding for MT8365 SoC Date: Tue, 18 May 2021 16:55:21 +0200 Message-Id: <20210518145522.2420135-2-fparent@baylibre.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210518145522.2420135-1-fparent@baylibre.com> References: <20210518145522.2420135-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 --- 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 0f445d2ab727..ddeda6d7348a 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: - const: mediatek,mt2701-i2c - const: mediatek,mt6577-i2c From patchwork Tue May 18 14:55:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 441489 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 A5B1EC43470 for ; Tue, 18 May 2021 14:57:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 89B096100C for ; Tue, 18 May 2021 14:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244703AbhERO6r (ORCPT ); Tue, 18 May 2021 10:58:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240578AbhERO6q (ORCPT ); Tue, 18 May 2021 10:58:46 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ACF3C06138A for ; Tue, 18 May 2021 07:57:25 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id z17so10551045wrq.7 for ; Tue, 18 May 2021 07:57:25 -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=vurGL64Q3SxR/3rC1VvdPqxLLlL5m2GaEVxxxuUXcnk=; b=ADC6wtP2Uy28k6oVzgFz3m7h+EKlhA/HZv6l3f85y9KwFUpxLWRtNp4Z2S1XCyYiNn /MtYGElEOf3XT15Zb16RvoCYb26HsPmfLLWh0ioZPt1KUHckECCiqmzk3uCRt6XRpNOL x+ijhif8boPjZQkpGhW85RTvrPjyd/NgsEB2C7CrCLiLdBmiQS2iGl6oaUFyjgUcZ5hF 0dK4ktiJL6shb6c//mDf6Q6i3UyXvqP8cuBzioqFIcRxw80SzzbWKFpnS8QAmkNhhSGl P/qYAbILrnu6yKoQWTDtAS1WXwp7/uoalDTBj6Y3wDaSnygUAZIcHQfr5/+eEbFnZejv BVBg== 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=vurGL64Q3SxR/3rC1VvdPqxLLlL5m2GaEVxxxuUXcnk=; b=G8Z2Ed8pRq89CdxLK3QqzQT83e153ZTs5/i2Eo40lPv8lGqHDHR9wnZmC2Nvyq/7q1 6PLg4AcLKfZrNHrtzBFHWdkTa3xZkhYmKc6jQQit/DE9wNyKqato2ZHXjzW04HWstqZV WkcX0mAcCfMiIi2oRkzT666zp93BkZthKHV2KseupuRm/Oq4AE4K4bgfUg2gC55BE2MY k+oprYtlSFRcKD+WgXPIoq55K1xx2fCRYPgrbkQ8AigFWZqRx8N/69a2PyuMyvhw/ckX 4EAdTTbQ2EEItEBVzq4G3hi36suGERaVAua7TPNH7+RquadUk9dZMrR8WD1Pdc4gP1gF Wx1g== X-Gm-Message-State: AOAM530Rx46Tl+Be+of867E3qkVjhhB07L4M0f04T8lHIFYC2oEYoLvK lJzScCcrVNmJj5zT8sIu0Btk8A== X-Google-Smtp-Source: ABdhPJzudJFc0nj4LYsR4FvoPi7DZDUoXDJbEP/PWcHdFQceggrOdrlOub2/IYm5mnnfPtyt8yv/Ig== X-Received: by 2002:a5d:5249:: with SMTP id k9mr3866068wrc.301.1621349843897; Tue, 18 May 2021 07:57:23 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id a18sm2928386wmb.13.2021.05.18.07.57.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 07:57:23 -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 3/3] i2c: i2c-mt65xx: add MT8365 SoC support Date: Tue, 18 May 2021 16:55:22 +0200 Message-Id: <20210518145522.2420135-3-fparent@baylibre.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210518145522.2420135-1-fparent@baylibre.com> References: <20210518145522.2420135-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 --- 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);