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: 12264965 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 AB9E2C433ED for ; Tue, 18 May 2021 14:57:51 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 15518610E9 for ; Tue, 18 May 2021 14:57:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15518610E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=kgr+QnqHwl3xDNjlIV8fiUwTdqa7bOoxI8Cz88zyL2g=; b=junnz6fnquctyRxJMjdDva5nso AQXFtTs5ADn7C8HM94SpmhVlXfv+vsDhsh3nUM3ubJxzdN9hYdGREvC/ur/vTHsJvNsdf08r6HENR uFAFYey6orjgvbYLWQFOp9+tRp2dJJ+xE7duFFf26WS+2pHsbVgvvIo2Uf1JMvqWuwOALgbZ++YJH OC7xASTQrolP+msjOwZOmYH7P48noFCc5krY3tb22viK427/xJWF/Hv4RIu7adpkV3Y5uV5qw4JBI G8NC6ZRNN+xVYpUijPefLXaIWgbfCx4EUarvibn+am5g6nbnkmof3rFd5iav1FR6/HnbgHg9dxNcl EzrZeACg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj1A2-0017Rt-6X; Tue, 18 May 2021 14:57:30 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj19z-0017R0-OG for linux-mediatek@desiato.infradead.org; Tue, 18 May 2021 14:57:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=nnvJ8osbkowWmqtn9NFdggrDzHVnx44WWHnS4UTIDOM=; b=nffRL3MC+JE2a+iX095Msb35aF mxywmXufgveu8pjOiDjtxlgxbKuAJDkaUv6oFKkJUxWq10I17+EFbwr5eS5VdPvxFU0IEDdqC9XN6 BrNi7+vYDCPh+H0v7lN3yA0fpJn0Wv6bLj1arezQBZ5F9tRlThjDDEGT7Uj1YcXwiA1qd48WikVjY eURs8p/ARfe5ZDzr1L9RgwoyCPb+98vI4rrywiL0eiKyPPcLjG21oce9O7+76Kl2OGTsiYL8pwYo6 Xi7LXHDMh5lLkJjkzTJqyEz++Q7ViHcQEBhtjIioEysh2x4cBK/ZsH6vg3ueJQPCB9tUzieMEd+A1 HxYILSqA==; Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj19w-00EkSc-5o for linux-mediatek@lists.infradead.org; Tue, 18 May 2021 14:57:26 +0000 Received: by mail-wm1-x332.google.com with SMTP id f19-20020a05600c1553b02901794fafcfefso1081553wmg.2 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=PkRctjZGhQd5aIhfaAYZN3LRIP7GPieLRdCwopBdh3l2U3nM7lMHTJwABastCYeU1t 40y8cpGTtt4cvc2PnJ3qiMuG8RSrsphj5XRTmt3tooANmjshPOgPOuye8eBEfaXoJabk 6nN65Q1O6k+nQ1skJ0ytJy4KvYb6vaBfdWbTJtlaBhWo8REWoXDV+3bCdgDLhK2SWmh2 W3lXTa1gWQrbiHEg+xm77ItVsnUvwGQakiBKJbezT5pJNF3dhjoroOtRkDgyVsUM62sB bzYuOGAgZZ8W8+gR/EqwzOzkZzF+Bs5duheJJERXFz6HkDQSz7QQ3hFb1eabrtShQsjP TZsw== X-Gm-Message-State: AOAM530x/lvNyQlpR8g8eVQT0AgMIKrr4obSIIfT5sibevFZ4AVYsTdY 0NgFdJnljOdM9futlywKRv6lUg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_075724_292099_59E11493 X-CRM114-Status: GOOD ( 19.23 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Convert the binding documentation for i2c-mt65xx driver to the YAML schema format. Signed-off-by: Fabien Parent --- .../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: 12264967 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 CFAE9C433B4 for ; Tue, 18 May 2021 14:58:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 9A7066100C for ; Tue, 18 May 2021 14:58:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A7066100C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=6agSDfMrDvNw/LIGx5aHvXBn2jp6qC2Jltvh/lunjzQ=; b=kqIqdMGcP1FrYmIhODk+cryty DXBXvsfu2p91rGkJUwmakJ5oSlA1HTyj5AmQlYAKygJGnDFVO+Nl16J0o+KTvqUXAdb8zbdX/UySv 9at9fU6kyvxkK95krdfZ8n3q5Yb9jWnwbMGS+X4lFhNY0gx0GJe23GrT6/yfAwNj8oA+JWS0LVo80 VEAFbqmU4ydH/4Yn22NfyUcBczZdwkqRa9dLSmI8yV9fA7aZO426mARa5mDSoBzoQ+8QbJrjxSL1F 5llynRlI392pmMRyJckBTV4nTpvn8X942pYd7NkETJpLPzMscnTxGYxc8TFnluQSyGgjEqFLc7GPP A9K7LcvQA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj1AY-0017Zn-Sq; Tue, 18 May 2021 14:58:02 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj1A1-0017RO-1f for linux-mediatek@desiato.infradead.org; Tue, 18 May 2021 14:57:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=/D0C6tEXN/UZQW5bW2HTmCtLgx9o77WgGBJs9UOzZPU=; b=EST/XIhSd8lR96Fl8LsdmKPJpb Epcp8DwFddgen+XMNtTGBMR2QTess6f+wKU3l2qsTVc1JNYrMGXDElmHO6ndKVVC/nU8SX+YnGXhU +R0VjcvTVdmw/RlGMB1I4vDSxusXd82nrYTEG7wbJ5fTYb7TB4DppZoaT8am1wQLzT82WExnvfLGj wVWY3p+pmTDLXaCthP2w7CjajZUw1/K25QkpivG8dG53pfAXHjsZXH6jdh6iYalrMnnGdfDf04lG1 8S5+PYXrNoWibMqC7g7hmXr5tnS+di55z7jSyBxlpJBN4OAVq+lSI7DGy+os5sqQ97q6AY7ObrcH0 D6Nxm7xQ==; Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj19w-00EkSe-EW for linux-mediatek@lists.infradead.org; Tue, 18 May 2021 14:57:27 +0000 Received: by mail-wr1-x429.google.com with SMTP id n2so10654760wrm.0 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=HcXCcO9iav2czeOS9gdn/yjgxMaGLYBvRuNvNrrvMvsL11E5H+ckAxcLctpsInfdUf mE4jaGN9LbEzoJYoCHAB2Z2KUsyjplfSP/NqWKqIdopK7tic5zI9Iqcs2kLp53RryO8S AVw0WIgD1ba1RO3KbxEEx01sqqdHnAgXwL/psnetKqtvKAvGEOxSCoCHU33Ye/AMecvH tRtJDY+ZILANTTEwptDlhQMj/cQWPKgGI5PrapV5G/SQrJwS1ypazNQYHVA0prq4ctbd t37tIzVgz/bHnoyzfyIdYAcn0CsNbjw4MjogMfA8+i77lveocSVJpEbh8yxk4lbV9HUm Sm0g== X-Gm-Message-State: AOAM5338p3kdfFVZnlPZuUOkbqvFMzZCTuVAa9CQ7BcXuIW5Fj9XwrAv LERN0+LWBk1D/wQaqZUWAX/m9Q== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_075724_494295_6815CA77 X-CRM114-Status: GOOD ( 10.29 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.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: 12264969 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=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,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 60468C433ED for ; Tue, 18 May 2021 14:58:21 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 D97B76100C for ; Tue, 18 May 2021 14:58:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D97B76100C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=65DXscvRvvYJRAK/tiyC/XoOJ3wymn+rZU+jf2xgRS0=; b=GJs7JAFVNepCHGAuDcZpn45zg TzlWcrZMBWhpvSzvkSpYIPzvruNIq2Q7uUUM703NEZrytqjOQ0/3UgSngiYIqjjXspfN8EcWk/PKi 6mtP2X2Ngtb9P0E4aSDl2ewMMsIW69AxZyjtIlzcO4zzzCc0qldZo6+jqmRW86U625zq8Et6K5ynS 6p0ki0VV5rNvDRMP5u+DNglJVX2drzPLpN/lVeoQc3beBx8R50rZKLK2u9aOPg7mosgndEVlomJl6 BVXyZghcBYO+NH4pSEQm3+R3Q0hViLu6dGmQ8rcU2wiw29aYgN0Kf99Vdkx6jAv8iyswlQUDNwk0T k2VSmvQeg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj1Aa-0017aM-Oi; Tue, 18 May 2021 14:58:04 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj1A1-0017RQ-Al for linux-mediatek@desiato.infradead.org; Tue, 18 May 2021 14:57:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=vurGL64Q3SxR/3rC1VvdPqxLLlL5m2GaEVxxxuUXcnk=; b=vLuEkzwgL+exNalIuEzs/t6mKx NlZQMGHgH0e2I0gyeI3U+CKgzcnbkpy1XJoE+y5HAev4TOFrL+JS9teRhq7QfvKDYUM0nyXwLTXCh 2EbMYH6HFMREnvqReIxdAfJtvAUMuuUhMTIrmZhGXkK6Y64ho6fN1aEW/rC2EMlLUjVp+ELLAcMB7 hRx+t2Ic1QN+ZcCuATAcmtBVlN0Uc97U5dYnJ1LNaApSBgAnVmya+Ecp05y5MAmfo66PM5MkXxhkz /Qw58D/PN3cR1zScnpJwpc433DEOcL8gCUfvb6V/uqcnz31tcN57NKi6p0j6n2tolHpsmEl/z2TLP 5bQM6Kvg==; Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj19y-00EkSz-EJ for linux-mediatek@lists.infradead.org; Tue, 18 May 2021 14:57:27 +0000 Received: by mail-wr1-x435.google.com with SMTP id c14so8788495wrx.3 for ; Tue, 18 May 2021 07:57:24 -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=Rt8Xy7KBYoyf3i513CeU2BapkOo+b9FeioG1Q7SV4Je5aWZrU6MBfsgESFwOaLit0d 09ExHYWNTNcIvrkTslGLdmnnKQU0MM4k0cdyL3phyJfYgUa+WrIXlwdF2xeeO0Pf4glv /mQppEpS3HwHvQFJQJVNAhOjdftxO55QgdSaRoDAWVeA1q4qFANZ94AGtUY0Hv6E2SeI 88ZXlEPOAeLsoOQ8FuLsXqtj/PaUJBK3ggkWGOQV2IXmv27c/TArEFJRCyBOx0yJ1ckV bPHeVRAUUWsK+RvHoAQkp6xJ2H8Rrypk7oGB3GFb2otELYHtqPndNCs4tZMoXW6N73hC DlNQ== X-Gm-Message-State: AOAM532cA5y9ihONO7tLMuN3vKlNv5XLFhnS1nl5+3fXKjpgWXKzKPnm 7KuPeQiF/b0ztHEWQPa0R6K/+g== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_075726_486231_0578F649 X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.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);