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: 12612797 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 40EBAC433EF for ; Wed, 10 Nov 2021 19:50:43 +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 0D6066117A for ; Wed, 10 Nov 2021 19:50:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0D6066117A 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=HuKg+G2C2G4K7RMjUbkO9wLVK81x/TOVgPlMXbcji4s=; b=elYajIDmBtLd6A uUkMwOaBfHBRTl4PcbBtkLaqtKshN71dDmm4Ci5Az8HX+wZqKQ96WH21uKuhtNISmXle7gTvjnJYT mpLGcTqZOsil2y1SQdl4InkWTMSkkEGHEgfNZgLhMFMUNXUC9KmxXLCgqnvAF4oxfFNLdvHvIYkV3 m0Kos03haBmgFsb25jt9xGyKDxuaP36kGnaSvu+oc7Sp+4MCFwJXp201TJSHl/6ktUjkY+WZp1hph D7gGtsQglLgPwZljGVUgfxphS9yZY4RCOnZzoQOx89Wfh6eAfssLoyMQLOMZGpNUPPCaldehuZ367 2jWrFDDETj2dGeZNyxTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktcC-006Cyw-2H; Wed, 10 Nov 2021 19:50:36 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktbs-006Crj-CI for linux-mediatek@lists.infradead.org; Wed, 10 Nov 2021 19:50:18 +0000 Received: by mail-wr1-x433.google.com with SMTP id w29so5904450wra.12 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=20X2vRdBDm2BHPV/sJe87YtSIArJV3+jmKKmsc0b4toSowDZPFCu0BZredM+xrpYDr p2iaLJZBTgPo/PSTDcrZ5P3EuF97H/TLPkNLRD2oYEjT8MkOai7b/eQ6PBgojbh5Ex1I D2U6wvy7nHp+6sdwRZQSvlYjFUF4yEqOEN1nkrV7W1uNH/4ewgHfaRBtK1SufzanOAtv HQO5tD6wS4h9ncZ0xnhuPyE7AsYGgSGqVIjMeCf+UQBu+ac0E0WMe54tRwtEpuy0h5/0 D7Bg5+wbai6ISX2eYLVotTzYbI5+0JSeeRx+J3Ab6/pdpkRb1zsvMnjl8IdKv/70ABr3 Ecuw== X-Gm-Message-State: AOAM533GX4QO14OwlQ/vzStNHDMOEqd5cbqIDowGXmqkqxiXoHjUSH96 YsWOiQu3IN6keEBOWMIYp5l10A== 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_452836_5B372885 X-CRM114-Status: GOOD ( 19.58 ) 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 --- 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: 12612799 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 E28EAC433F5 for ; Wed, 10 Nov 2021 19:51:07 +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 A6D2061168 for ; Wed, 10 Nov 2021 19:51:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A6D2061168 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=2RYfxI0OZSghy7hkC76EAe2xo7r1kgv0LrJW9gvIcL8=; b=rUQUgvLWqIyYqS tAhVIKoW2D21zxWCzp8tIg3eObaxfCm1qgnfdIiJ8brgzG6ZN/7kc2RCjP9XMTXEbCnQSYPeUCDRT 6YnXeZYR5d2nA4zCjO0hvN/LEFbOSCLNQj1CTAhuxgFvyW9io2MHZqs7d5Eibz0OP9RGzbQqZW3Uv 50fZZxomvYBrG9PkslsrjuI0jghGSwJxwUZ55xuaiWMuh2/53CAjix6By33MqXAMUojmY0ybd1Gww uGRaRFdKK4K40aYTemVn+DTgvxOdme7H2YVMehR1nr8VRLxELkDyisKYUU0/eh2+uMFOq3E1WpFqk 8wHdbVesd/imcBwa6E3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktcZ-006DB1-NZ; Wed, 10 Nov 2021 19:50:59 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktbt-006CsI-Pj for linux-mediatek@lists.infradead.org; Wed, 10 Nov 2021 19:50:20 +0000 Received: by mail-wr1-x42a.google.com with SMTP id n29so5905902wra.11 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=N7hIT9WlMIkZvGmtR1M4r8U5A1uEo18xbeN4UwVrSuFO2cAOUSxRF/dnViBSS47Bt3 rabsQ1GYN5hMxbczJSG284a2jngtHbHg41yzlcu02uuX+0WEze6Kp/3yJd87xmktS7OU PtL2p6J3zmzm7bPtua70CDLl2WUhOoW1vZqL7jyJdHeq1S9OQoCuIHxGVya+RarU7ygl /sI829ffgvbs7xphiNEsdNPB11Ir87aOKJcPDPD9+BG37vkGc4g884ysi5J8mv2Rwauv 8/WCZ7SeK0fJEfpg2PrtOZcsO5/f301zkoXqEg4kOd3Lth3yLVS14IyEV3XW/6mcJuKZ Y3Jw== X-Gm-Message-State: AOAM532nw4Zk+B3J9TpoA5qGk2qnDXW1laKPlvzpn9uFp5wSm5DmOLDd /0N3MbJAK9n2LkS08U3+W8ejaQ== 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_857710_AFD813EC X-CRM114-Status: UNSURE ( 9.40 ) X-CRM114-Notice: Please train this message. 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 --- 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: 12612801 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 87799C433EF for ; Wed, 10 Nov 2021 19:51:43 +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 5C1096113E for ; Wed, 10 Nov 2021 19:51:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5C1096113E 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=8O72NscS5Q3pCyYEu4iD4EOcw3Cbje2+79apu7OWUz8=; b=nk3FPbik5UJIXF 2EaAlYQWpNpa7XYA+xB7LzvD1zwHn+9WBfdwbf+Xz1d8Rgr1Wcntu9VAdtrDU7AZ2gX5FMk24Uowg mfzIEpoo2p+sDN1ltkz2F298SNiZGgSYS7VO9Y5VugFiVp1H4l9P2SJAsTBwSHXDPApnyRsDy9OtY kcbwSKu+2lxkHNBtjpfIU6Gwnv2d6Xa6BGCCp4ed/qCF/1gtcAwP8StoJX0hmcq588qNepSfQ06R1 VT0T1KPPJaR7HkAJZWTArb+nfkyLihthh1vfoCRl8rS9QYcYMw+n3bw11hUth+TmG7s7o0eH4Q4cQ OMsmaO4jjk8cqvVD7mYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktdA-006DVJ-9B; Wed, 10 Nov 2021 19:51:36 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktbv-006Csq-2i for linux-mediatek@lists.infradead.org; Wed, 10 Nov 2021 19:50:20 +0000 Received: by mail-wm1-x333.google.com with SMTP id az33-20020a05600c602100b00333472fef04so4803021wmb.5 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=4juh72SnzfLGKsPjNKmj02vy0HfiTJDEaujSvz5YDVb7yhi0xtqp4jX7Tyh7guXoZ+ vjbxvEa5ixnxZJJW18n8s5GutVp3grXnYuMuc0OQwQDC+/FnCQtC4Vq6+k3b4Yo5GRfs +uE9W39f9iJQBVdHT6NshGAn7oFZa167g5OVsJjt1F/fogUY078QwV2dRZMmC+ROKf61 FcjEWCzF/b16fvnFV5ha9y0HLoyJ6tlvA6LOqfGiFz87RQ+mkzlxiJTgMh6SqqVsqXlA qNWQWJijmcT87sGf2uoWP1Iuhuwr1espx613BYFyDzkXdOUlpAFAhoHwl2Tg4Zil4v+d 7Nfw== X-Gm-Message-State: AOAM532Ry0jkg0jn4cACKDqk3f25bfswHoV+ojFxY2x/13wmIWSTIcUH nd++JpzEUSR9rAeYZumDZvqx8g== 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_115019_148884_72243A20 X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. 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 --- 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: 12612803 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 2C0B4C4332F for ; Wed, 10 Nov 2021 19:52:27 +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 DE9F76113E for ; Wed, 10 Nov 2021 19:52:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DE9F76113E 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=j2oUflZmsYUbOHm9oBbHxgnfr26Rn0QvOCro1ZW35rQ=; b=vo71MI+8LDn9hJ NF19+M85lairxq1a6UK0lBIXHysfz74RVhQlBRmuYiq+D1qNPXMLsKGITQkbkBn/LYCJlsj7FhImZ /5QMN3t/Pvj1HY9l0nmN10uvCZBz91JLVUUIZ9nIB07NInjSZEy1EHvBBYldXHSuAtspwz5Ke0jNL uBvWtPpob6z5mlZ2O1+fN29J1nfZVpdDJPIMhcbbs1wcXB0mXL3e/Q02TXg3LvfAUKHUWTVZCCMVC xYWNBTY7f27nEyrxMRPmbEVDiMv12WO1e1j+pwwjT7lxhWQXfSEolv1FEAIoYXMoVIVElrJ4bto0U OpS1N92PiKk2piJH6zjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktdr-006DtD-7u; Wed, 10 Nov 2021 19:52:19 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mktbw-006Cti-Cy for linux-mediatek@lists.infradead.org; Wed, 10 Nov 2021 19:50:22 +0000 Received: by mail-wr1-x42c.google.com with SMTP id d5so5984326wrc.1 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=Kn5bOqyEiPbDMcg6pc1MYps4WRf5IYuoKqWuWlcjKwpxUHIR5h0DQOWgDmrzog0oHE f7bQAzykIfiwuG3Ko7LXnwra88drOa2QLPLBs78+yhC9cbz0LA50h1iGwhjlJ8qn1iUL FJP98XI3A6Fbanq45DsR3TwhbxHwpFph40f15LiK9NUBQ/UTlWYWmxghYMf8oHbcwvkm LEiSWaC2q20fY1c2gT12tpxQtrhDbZFrIY11rV50++qijm8Wxq2q2zfAQhdScoGhP7C8 WC2IKWtWGI3WZCll/3B5HorXR2zrf3N3z8qD1MD7+G8KdZt1Wz2P/7Tcebzy7ZgYBSRt X03w== X-Gm-Message-State: AOAM530G3/S13ZUKWQdj28Fqjl9gE7xdpuuoDYfT83MLYiAPiXSjOwTo d355tZyakVTf+02s6J3vSky3jw== 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_478097_4C59A948 X-CRM114-Status: GOOD ( 10.02 ) 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 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>;