From patchwork Wed Nov 10 19:49:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12692197 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 B55FBC433EF for ; Wed, 10 Nov 2021 19:51:52 +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 89B916113E for ; Wed, 10 Nov 2021 19:51:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 89B916113E 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: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=hI/4KGN1UhN7pJ+GaFdueyfkT9a1ubEkeB12UF/WRCw=; b=RUNhzMa6pWyzcG l11bdidm814PJxU2WVpim4y+QWn6sYvfAdnDcf0KAVbSNCHB+Km+zs7ziZwH+K8x60pqprs6WN9lo EqUlUG1QqzBj+3G2q6TxkQrmECX9KLbdVZhzu3JdLe7RB+1xj8tqYOuSWSQA1oYlso9nH7es2fK9g a3ohqTZ+2Z2tQhUyJjs0ePscrhl0L/eU5sOuDDGYV6hesZEAj1VBZhwiaN/LDaSNgDwzyBHlUJqMt wedwFN6jmgyGpGZX/lYSpv0BaiAx9Ls+evg/QjZ4wHrpu8HJArZqldRsyDQCC0qw0V5D7+4mIKEHG nhJOu6OVdCuD+SNp77GA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktbz-006Cug-5P; Wed, 10 Nov 2021 19:50:23 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktbs-006Cri-HQ for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 19:50:18 +0000 Received: by mail-wr1-x431.google.com with SMTP id u1so5893722wru.13 for ; Wed, 10 Nov 2021 11:50:16 -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:mime-version :content-transfer-encoding; bh=geLSRi4FCt+c/I7zdRe9IBFISJEgU+7yaWXyBuqJoC0=; b=AMC6DtiKrW4/kJuXCMqBXLO7d30/NDkVUgjoA3xt+8BDTPIkBASbs44NsB50hOfgdY wSrETvChMAyi7bBSePP6Vpzdu4PLQ7mpt4r67adfpEisJnhsFzn6xih+P9qzcgRzDSGS YhIg+UY8waGnEBKytlQxiRmTRkpq6hSYsiwNKBzp8t8VdhmNF4lIr9AZqOI2nlaua9BQ M9GQnrbHOtbkAcKehmnVtZ0fbBERNj2tCnWdgo/wbN3R2C4qqeA743+brPK8LOYm+2BU GwJcJneUJhJkC912U1neV887JwYzj4eB4kuYLxI9nTsYslD4IQMY/qN1qUWqb+Ak6oPx ifdg== 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:mime-version :content-transfer-encoding; bh=geLSRi4FCt+c/I7zdRe9IBFISJEgU+7yaWXyBuqJoC0=; b=VkKyGVbuHb/kY6pnMKD04yaC4yy7p+soRF/Ig8lDmVVLAu7Nx5KezHSBhojauO9Twd 2U9MMfKpcWu7MatiaGDW3AKuL5zc1suIP8l7ivUkGCeT6IwJuxJFWnmmOFHifoGlL4vj bw4qdDm4tUrydM3jm492V8baJewQhgOtQnWOqDySHl2lWX3xTA8ZeORZgONBt3ymw4Y7 19i39JKxG2rZ8VWq1Uemky88yJkxeGAZcjHGNof2lFe8TDJFMXYdGsswxg5GjKH9Qk1N 9nWcDEDLZR9cgxGhP21xsCIUkUi4xq/2TWOTBokB296tjocA5LtC3feyQSmFqyfyI0BB fI/w== X-Gm-Message-State: AOAM530/m+ultimp+f+xXoBgIZrXp8U9inQ9NX2XiBLnjnVNrL7L5Ci+ MmqwciujKFtd71YzNkYHaESHgQ== X-Google-Smtp-Source: ABdhPJxhONkOR/1gFrmkF2ek8fxt5sSiYcS+5fvMHATAmxkVKqAjKFDEM6j4DBnNKFKTEfoZrwf5tQ== X-Received: by 2002:adf:d20e:: with SMTP id j14mr1926086wrh.220.1636573815138; Wed, 10 Nov 2021 11:50:15 -0800 (PST) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id k15sm750935wrx.53.2021.11.10.11.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 11:50:14 -0800 (PST) From: Fabien Parent To: Qii Wang , Rob Herring , Matthias Brugger Cc: 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 v3 1/4] dt-bindings: i2c: i2c-mt65xx: convert doc to yaml schema format Date: Wed, 10 Nov 2021 20:49:56 +0100 Message-Id: <20211110194959.20611-1-fparent@baylibre.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211110_115016_591767_E2CED5FB X-CRM114-Status: GOOD ( 21.00 ) 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 Convert the binding documentation for i2c-mt65xx driver to the YAML schema format. Signed-off-by: Fabien Parent --- v3: * rebased: added new compatible since last revision + added vbus-supply description * added clock-div description 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 | 51 --------- .../devicetree/bindings/i2c/i2c-mt65xx.yaml | 106 ++++++++++++++++++ 2 files changed, 106 insertions(+), 51 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 5ea216ae7084..000000000000 --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.txt +++ /dev/null @@ -1,51 +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,mt8195-i2c", "mediatek,mt8192-i2c": for MediaTek MT8195 - "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. - - vbus-supply: phandle to the regulator that provides power to SCL/SDA. - -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..af0880fcc22b --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml @@ -0,0 +1,106 @@ +# 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 + - items: + - enum: + - mediatek,mt8195-i2c + - const: mediatek,mt8192-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. + + vbus-supply: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the regulator that provides power to SCL/SDA. + + clock-div: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Fixed frequency divider for I2C clock source. + minimum: 1 + +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 Wed Nov 10 19:49:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12692198 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 2E733C433EF for ; Wed, 10 Nov 2021 19:52:05 +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 00C5661106 for ; Wed, 10 Nov 2021 19:52:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 00C5661106 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=UngM7Duu7uaCd1TTSo+fesd+2gDutSpKr2Jn6JjSLVE=; b=oxhQV8Kxnj2HRw ylXP1B8/VkrLie0A5WIBMYsQC58uIbbgalrS+QfhWvNNoUxzLmqtH1nC4zaGjSoZ2qizp/CUd0URL OEnGarZ5GmimJfaSegEHfj0EGE4lRZFNVZoEo453kCfbd2I1PuCHhGVgzflh8L5weBo6C+6JW5aO4 iERbRV8wliZEcmJ14MCIBOkPER+uXLUfHHa3JO209dpA1kZej0x8/fdkpCvK2LAgeZE7RO6GYrTJ0 fQGA/zM03v1lRnrjCFTT/osL4s0d8alER4lgi7gjdoWgwTAJqMsPj7d37qu4Kr00QZ7bXSBFatXx5 X+vYybYtp03uGanQ8bZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktcI-006D1f-0P; Wed, 10 Nov 2021 19:50:42 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktbt-006CsJ-KQ for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 19:50:20 +0000 Received: by mail-wr1-x42d.google.com with SMTP id i5so5985945wrb.2 for ; Wed, 10 Nov 2021 11:50:17 -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=IvmETFDU1aZRyg9GHS+FGtvzWa39IdshgN6HuoFmqYI=; b=dKuxtI2584RvobmXc8CJP3nWR59VbsiSNVrW+FbRSzx2kB3wxpqGivnSRkUcp+4oZO lzWMBSPeC5rT0BpFt0LqmblipaIUtKPqVoYM/N1E8gGsmCOHEjbfv8CztelutewnqNTo Hhb7cwYhtPmnkx2/NQZKwhXVIfeqpiFiI2bnGiIHQfMyE2+Ml1lzfc6Maz8R/Oo8DVVB 2JkI1YYbZfiJjJ6MR4jdcb9FXhgS/mj9ivAhVAKHnT8/O7rkfFakekn9UqgqKKHaD4ad VDeqnGPDJdCa3HgNZ1Fhl6jFv7I1d+UMvXXiqyVoogMBMl/9ientCN5Nd+RoFByj0mry 3HHw== 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=IvmETFDU1aZRyg9GHS+FGtvzWa39IdshgN6HuoFmqYI=; b=HgfMyZuZozNVO/NWC69f9byEvFQZzQtKbYWdLrxWS6PMWSDiosJFPHYPICXN8+CqcW zJGQbUmYvkRZGUFpSRnGQSZMxWrPfEmj0KY8Zij/c1Nk9/xjRGCPXi5V/Qw0dEXluJZf YxHGRaRCzKNx/AGCGjROO9G7x5W/pnhJikFkVwnqpxOGDUKA2gTynHrygVgyDhOL+XUn Gk/MfigsN70BZAkNKxQuiPz9+cIOUAPENbKe3YiPl7QJT+MUzk1yFo1Szw5nvILjRzx7 9KE5rAU8SHbVskSPUPuslJ0Z4yFtjd/GobPEReav/I8aG0E9bFBfAy6Zi05b6WO9EEIX VpEA== X-Gm-Message-State: AOAM531agCnTim+JYeB6XXNPghYNcO4R2Qo/61U7zkaVMqhwLzcSfpy/ 8YhnHUwMC0TiZHe+h0/McK7GgQ== X-Google-Smtp-Source: ABdhPJyt91L5dhbRUokBF789uCxIJneb+BFFENpsod7T3a54QzIpI6DlYXnYJQHB/pK/KpbL5weNvg== X-Received: by 2002:a5d:47c7:: with SMTP id o7mr2028688wrc.204.1636573816415; Wed, 10 Nov 2021 11:50:16 -0800 (PST) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id k15sm750935wrx.53.2021.11.10.11.50.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 11:50:15 -0800 (PST) From: Fabien Parent To: Rob Herring , Matthias Brugger , Qii Wang Cc: 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 v3 2/4] dt-bindings: i2c: i2c-mt65xx: add binding for MT8365 SoC Date: Wed, 10 Nov 2021 20:49:57 +0100 Message-Id: <20211110194959.20611-2-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_115017_705094_B20EA162 X-CRM114-Status: GOOD ( 10.81 ) 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 binding documentation for the MT8365 I2C controllers. Signed-off-by: Fabien Parent Acked-by: Rob Herring --- v3: rebased 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 af0880fcc22b..843f3b22e975 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 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); From patchwork Wed Nov 10 19:49:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12692200 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 45F19C433F5 for ; Wed, 10 Nov 2021 19:53:13 +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 1981861038 for ; Wed, 10 Nov 2021 19:53:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1981861038 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=6+22ZExgZZHzbFOKDJpc4S0kIUb53jikOFy2PwRojbY=; b=J5r69OPbSKWoGr 1xmXBWj+1mB6DPVp27gHx+6FFl9tWPovOBibql78wnbH9S2ucx3Yk0wzV+QL4z0TJ9usVoKHrE7kI t6xXXzJhJoPEBKbObgNl9H3kr4/7ncS4CQN8HBX5AVOy2CXn0WE7P9AOotvSBLGKtgm0FZhjf+eZy x+EA7icbOiue1kB3axwfl7Ki/FNasRFWPA5nMz/e1N72YRstOyu1qu9SlEdORoLLTdctLqekQYHN3 jgC4mhrkaX0o56CLgkXYG39CDS/kttJHOSdZfnDDtivkDNk9OJmClh+uiobmt9D9DEhPtXfSrKa9q 0fWadaYc5i45Wkxphf1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktdH-006DWz-I1; Wed, 10 Nov 2021 19:51:44 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktbw-006Cth-1B for linux-arm-kernel@lists.infradead.org; Wed, 10 Nov 2021 19:50:22 +0000 Received: by mail-wr1-x42d.google.com with SMTP id c4so5920753wrd.9 for ; Wed, 10 Nov 2021 11:50:19 -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=fi1SQ0650VpnUBsZivmkkBhDo1jhzZgEKHW44G9Rwtw=; b=h3AI7I6ru3Nn/MCBCN35cPu4WE47fz6h+EIjb1eXtPS/nC4egSJFdDxGFcHv0KaE7p gt2ox2xz4q/bE6vbUm4+C5y1y1axolM+2MKnGJyp33JG1q5EcxX+mDca6A1MdDAPjH14 Iw2YT7/zeUur84LG9TKKpGcjdr+t3eoiuYsae9Y5PI2E686+j47lM6po+zm/iif9+2td G1gnU1A6G8zFUJMo/eoIoeo8ivhQSrcHpol52F5NQYnWb2OoacJU89GqL63cfQlvR8HB qp7IoZjwOuXLDV9bFLm1IgT/dZWW8QzbUJamQ+Rq1MqR8bGTdkRObjNsq73lwQHgNYmn kCiQ== 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=fi1SQ0650VpnUBsZivmkkBhDo1jhzZgEKHW44G9Rwtw=; b=2tD7UdD90SOCGCPQuc0GsiNdcnQ7/0PHuBStucQjQk+QBUAn/5FHdQfXNRLqu57Ww6 kcN6G/UIu68Ubn8IAc8c54nZkLHcq5q8FNYAT+9oQVvkCo3ObBzRDJ3zWozz1rKRmNvA 1Jq+0pLdt9wYA6v06j8iBwQuU3+Y0zDNko1J/zdqWA+nk1p1TYeQHCGUdYxrAB9NzVHg nfglkGzfxr1Bq4wX3ti+IlqZ3ay7XsAHSLE9ruaL5iCN3nDj039Tr1bpU/TUVQbI3fKE 5nYZgz5arCoPR1Zb/cyQoPjfKSu4L6FiuBv+jPjeSiiSBj5H05H8WstqtUq1lJEQzB4t jadg== X-Gm-Message-State: AOAM53295wfBbdL601qtYMU4t+vYkGVNEKd5urr5H7A28aNG+7jcIVuD iwuOldueL5EmGcrg7coti4H6og== X-Google-Smtp-Source: ABdhPJyNwAHNRfrXhmSz0qWblbyRi1RZjAletdfZItDgstEuKD8EM5XYNkrrljsACKRpt8B1eOaSzA== X-Received: by 2002:a5d:6043:: with SMTP id j3mr1857692wrt.375.1636573818895; Wed, 10 Nov 2021 11:50:18 -0800 (PST) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id k15sm750935wrx.53.2021.11.10.11.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 11:50:18 -0800 (PST) From: Fabien Parent To: Rob Herring , Matthias Brugger Cc: Fabien Parent , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/4] arm64: dts: mediatek: mt8192: fix i2c node names Date: Wed, 10 Nov 2021 20:49:59 +0100 Message-Id: <20211110194959.20611-4-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_115020_135894_5ED23318 X-CRM114-Status: GOOD ( 11.44 ) 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 Fix the i2c node names to be compliant to the YAML schema. The I2C node name should match the following pattern: "^i2c@[0-9a-f]+$". Signed-off-by: Fabien Parent --- v3: rebased v2: new patch arch/arm64/boot/dts/mediatek/mt8192.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi index c7c7d4e017ae..53d790c335f9 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi @@ -479,7 +479,7 @@ audsys: clock-controller@11210000 { #clock-cells = <1>; }; - i2c3: i2c3@11cb0000 { + i2c3: i2c@11cb0000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11cb0000 0 0x1000>, <0 0x10217300 0 0x80>; @@ -498,7 +498,7 @@ imp_iic_wrap_e: clock-controller@11cb1000 { #clock-cells = <1>; }; - i2c7: i2c7@11d00000 { + i2c7: i2c@11d00000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11d00000 0 0x1000>, <0 0x10217600 0 0x180>; @@ -511,7 +511,7 @@ i2c7: i2c7@11d00000 { status = "disabled"; }; - i2c8: i2c8@11d01000 { + i2c8: i2c@11d01000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11d01000 0 0x1000>, <0 0x10217780 0 0x180>; @@ -524,7 +524,7 @@ i2c8: i2c8@11d01000 { status = "disabled"; }; - i2c9: i2c9@11d02000 { + i2c9: i2c@11d02000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11d02000 0 0x1000>, <0 0x10217900 0 0x180>; @@ -543,7 +543,7 @@ imp_iic_wrap_s: clock-controller@11d03000 { #clock-cells = <1>; }; - i2c1: i2c1@11d20000 { + i2c1: i2c@11d20000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11d20000 0 0x1000>, <0 0x10217100 0 0x80>; @@ -556,7 +556,7 @@ i2c1: i2c1@11d20000 { status = "disabled"; }; - i2c2: i2c2@11d21000 { + i2c2: i2c@11d21000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11d21000 0 0x1000>, <0 0x10217180 0 0x180>; @@ -569,7 +569,7 @@ i2c2: i2c2@11d21000 { status = "disabled"; }; - i2c4: i2c4@11d22000 { + i2c4: i2c@11d22000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11d22000 0 0x1000>, <0 0x10217380 0 0x180>; @@ -588,7 +588,7 @@ imp_iic_wrap_ws: clock-controller@11d23000 { #clock-cells = <1>; }; - i2c5: i2c5@11e00000 { + i2c5: i2c@11e00000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11e00000 0 0x1000>, <0 0x10217500 0 0x80>; @@ -607,7 +607,7 @@ imp_iic_wrap_w: clock-controller@11e01000 { #clock-cells = <1>; }; - i2c0: i2c0@11f00000 { + i2c0: i2c@11f00000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11f00000 0 0x1000>, <0 0x10217080 0 0x80>; @@ -620,7 +620,7 @@ i2c0: i2c0@11f00000 { status = "disabled"; }; - i2c6: i2c6@11f01000 { + i2c6: i2c@11f01000 { compatible = "mediatek,mt8192-i2c"; reg = <0 0x11f01000 0 0x1000>, <0 0x10217580 0 0x80>;