From patchwork Thu Jan 19 17:08:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 644330 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2E13C678DC for ; Thu, 19 Jan 2023 17:09:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbjASRJR (ORCPT ); Thu, 19 Jan 2023 12:09:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjASRJQ (ORCPT ); Thu, 19 Jan 2023 12:09:16 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6807C82D71 for ; Thu, 19 Jan 2023 09:09:14 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id i4so1888386wrs.9 for ; Thu, 19 Jan 2023 09:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=fbD+DW6kRi8WktiZxNWXXSbOmEZ8Ih8ud6GlSgUdI9o=; b=YZC0yjtCR5ZC5+IGqwbhSVZ3qM78zr2yGAKBM3gkATEvj7B5eHWppakAIJVGHQNWfC VtWA/Q8aoR0z7bK3ibou6zaFcO+ilBntnTCFXE/O0SjRw091X4Oz0rrlhoPSnfI9Qt6J Y2u1IrQv0Tn8kWLdKuVB6rbAge1FRCWZ304wZQPk68TPVfqO42i1y1iPyix0AU9NWFO6 AcveKrquzrkzoflyNqv1iBaA+IpdwGsZ9b/gs0N4f9cOkfeMYlZRUr9yuQKT/ELTzNpA rvcmmXAWM0wByruRmEXyg87+a0QeUaGMQJ5ZYoWU2dGFtK+h0aI1oQuhp8+PjX/6NebX cGzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fbD+DW6kRi8WktiZxNWXXSbOmEZ8Ih8ud6GlSgUdI9o=; b=eZZrxxI/3ov/MaHJWWmJ2mqKDhZzjrrTUNhICOKLmgu11O7pQKYFbSOdgzt86e6jWM vy3tCKnYWMDMRDgSmBeQPoHSx1c8LSrekKV9bJSzJEqQqDjQBhSfABW+3k78rrgPR5hA 5Ujj1X2g6uXIPrLmlmelDKUPommv1yrsF71M53qu3tfuP7THTOiiI5ZuWj4uQPcZvySc Syl2qoUoMUKzeV1NeOKbPdSzzzCnvrml2Z3x3/GsMWE5OHrOZBZXyUNiDBtcvlKOefsR f22WvfIk89LD+kOus1p0/kw3XozWONtS2D/0pGGJwZDmYKHvWpYLdraeYDygkRC7i7pw BjfQ== X-Gm-Message-State: AFqh2ko6ze+wRRQZvzfE+yf0bhQnU9LwimLNZPsGjwYeOStSkXK6/P/e qNqFX9g1B+lR8CTvCu4oVs+SjQ== X-Google-Smtp-Source: AMrXdXtZ45FHDMDTTs7pqeSXu1NIqrWu0Kr3eR7aTnJku39FmwWKGvDZX2rIf2nGojdlUiU+4QUC1w== X-Received: by 2002:a5d:53d1:0:b0:24f:a289:b422 with SMTP id a17-20020a5d53d1000000b0024fa289b422mr9594458wrw.16.1674148152986; Thu, 19 Jan 2023 09:09:12 -0800 (PST) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id bu9-20020a056000078900b002be1dcb6efbsm8738701wrb.9.2023.01.19.09.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 09:09:12 -0800 (PST) From: Alexandre Mergnat Date: Thu, 19 Jan 2023 18:08:52 +0100 Subject: [PATCH v2 1/3] dt-bindings: i2c: i2c-mt65xx: add binding for MT8365 SoC MIME-Version: 1.0 Message-Id: <20221122-mt8365-i2c-support-v2-1-e4c7c514e781@baylibre.com> References: <20221122-mt8365-i2c-support-v2-0-e4c7c514e781@baylibre.com> In-Reply-To: <20221122-mt8365-i2c-support-v2-0-e4c7c514e781@baylibre.com> To: Qii Wang , Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Mergnat , Fabien Parent , Rob Herring , linux-i2c@vger.kernel.org, AngeloGioacchino Del Regno , devicetree@vger.kernel.org X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1047; i=amergnat@baylibre.com; h=from:subject:message-id; bh=w1ZiqWA2bE004ri1B4ESDbnqlp6EYjeGLKUKJD1Y6mw=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBjyXk2vLWvBYdixkUMWWeiPBfDt/ZlB6QQzrHTyGvD AINYpuGJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCY8l5NgAKCRArRkmdfjHURQFqD/ 43HvhF730JTqu82W+wSGG0WugG9LqdbtIwhRh2PApy/wnJ+OzO97fDQNuMkrOZ+IwOzQvHuvX7jSu9 DXRdCth2gWERiv2PwRlS61FMpI4osgPOgDvC3z9Cx8ah8jdMDmppQ/M7Cb8RpoRVvY0u57YqHSFhAe xNyHoWSsT2ukmRZKPp1wcJ+JVLTbR9ibAzBWFWQ7C+DWYiFSGd26TtF/vgxfZObsZDcxMMW+78/UN+ KAoIWpLvGGVNDoWcXOJ9XHuuoDUoZu2Dc4Tapihdw7DygQp4EJkO3aFRwq/H5+mEYM/MvvWopjy5Qj +a0J0Yd+OvjswSHMj0i1taF3IgfDUafy3s5ghKBCLOYAcR2lVeckVO1lGeh4JKlc55V61oFxzT/R3p q1ppDVrLURe+z+jO2JeVVNE6vJ5DHE9I+Etrt63grOeMRMGYLbNMaNKYfRyUN9ldyqAl0+w40LP4fq Jhp2uL+stooWYuizoIhKhSwINMUe7MhhEjPbnH52dP+6zP0tBvw5MXfDBP4zi8ky1yHS2rXDzW0kck ZFXY0JSkImSIkRiJoYrkOtBYB5h0jDqgqf6h5JWaMJ8Zv7aSc5X6tiT2Fbi4WdZ6t5nRtQzM5fsmHK P5yLnSvleMp06Hgn2KWq4SYUpce4cT+ZQYPvCHLDDd97ZoJFn9ux28LzDgMw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Fabien Parent Add binding documentation for the MT8365 I2C controllers. Signed-off-by: Fabien Parent Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml index 421563bf576c..72ae2e01cf22 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml @@ -41,6 +41,10 @@ properties: - mediatek,mt6797-i2c - mediatek,mt7623-i2c - const: mediatek,mt6577-i2c + - items: + - enum: + - mediatek,mt8365-i2c + - const: mediatek,mt8168-i2c - items: - enum: - mediatek,mt8195-i2c From patchwork Thu Jan 19 17:08:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 644329 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 157F2C678DD for ; Thu, 19 Jan 2023 17:09:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbjASRJT (ORCPT ); Thu, 19 Jan 2023 12:09:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjASRJS (ORCPT ); Thu, 19 Jan 2023 12:09:18 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BA55A5CB for ; Thu, 19 Jan 2023 09:09:16 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id r9so2525626wrw.4 for ; Thu, 19 Jan 2023 09:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=vY1pR8A7OW80xkAZYg++krO0fJkxZ30BhhNRiI4WE+4=; b=P65lYM/d/tq/Tl+523m0GHYdBPr1YEqPOFcgIGr7Fb3OmHUpAzkHxBwCvneoSkKqSA cN0C1PdoheStFj4oa4A9us8dMWFJn7V+qQYlsv37VHnvy1GYHeegrbBb0cBJ1c0kyVzm QCvRRVTGBRpngeUjZifN4H6yV9v0BpllFhZvtPnyMwPnPPjI76H5wBeVC6JlND4/YIQp GHn2y2tC18K5hsmJ/YGbBCbCLWg/wKzrdV5V2kR1EL9Z8mwfqxXhcTGYB8lOD4x6oGV6 P6DNeaV4536ihL0rpi7B/3oCM2OY1hdr3f1tmb8ZjZm2tEA5cizIF3FwtEtHFHD9Phya uARw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vY1pR8A7OW80xkAZYg++krO0fJkxZ30BhhNRiI4WE+4=; b=0DONeJeiSa4QOgEQJ307ixCOG2D/o2aHcapflrMqT+O96s5pCNxBwpUAcYrZex9M0D xiP+gzx4TJsWvDqDMcfRkoEIEpH9+zkTOXTmbWjCikeTtQocFkWqRuGlpmprBtdKYgaE H7ZQHw73TaxtdnkMkhmnqfe+sOWTpwZRO8ZUbACB4mGZx7Ovr4UdKBbMjWqoQgP0lCz6 kXzKm+5EgHiIBPgL81Cz/ccohPD49UR4SZdoz9db26ht1CrnYSUGZloBGuSwQAEoa7wi UMvGz1ixOAHwWZwhFIBOOZ/pq/VK7N1tSgur7YDE4I/Ae0eCoNTLdRIMDsY/JHyAtz4t mcOg== X-Gm-Message-State: AFqh2kqXJN4dcy6t1WRWat6pdnlmPSgEyyjRd92Qf2wNMwmWqgyCs/PD gUD4sq06D++sXjk2ocQcxpt8iQ== X-Google-Smtp-Source: AMrXdXuVy8ToVBnQPqscQFHF/FAJ0rM3gQzJN+hV5KyJBH7B3bYj/kUMevWR4CjW9sGQCBIdSI7M8g== X-Received: by 2002:adf:e841:0:b0:2bd:bf01:5c3 with SMTP id d1-20020adfe841000000b002bdbf0105c3mr10191130wrn.61.1674148155117; Thu, 19 Jan 2023 09:09:15 -0800 (PST) Received: from [127.0.1.1] (158.22.5.93.rev.sfr.net. [93.5.22.158]) by smtp.googlemail.com with ESMTPSA id bu9-20020a056000078900b002be1dcb6efbsm8738701wrb.9.2023.01.19.09.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 09:09:14 -0800 (PST) From: Alexandre Mergnat Date: Thu, 19 Jan 2023 18:08:54 +0100 Subject: [PATCH v2 3/3] arm64: dts: mediatek: enable i2c0 for mt8365-evk board MIME-Version: 1.0 Message-Id: <20221122-mt8365-i2c-support-v2-3-e4c7c514e781@baylibre.com> References: <20221122-mt8365-i2c-support-v2-0-e4c7c514e781@baylibre.com> In-Reply-To: <20221122-mt8365-i2c-support-v2-0-e4c7c514e781@baylibre.com> To: Qii Wang , Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Mergnat , Fabien Parent , Rob Herring , linux-i2c@vger.kernel.org, AngeloGioacchino Del Regno , devicetree@vger.kernel.org X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1340; i=amergnat@baylibre.com; h=from:subject:message-id; bh=VOgzUWYZ5LqJIocyR/msYYzp26C90wB0hqeJ/d6bEGk=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBjyXk2ouw0TaK/YymL8/LwYG7zbgNsYWk7Sm4QaG1v Hq9eNMeJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCY8l5NgAKCRArRkmdfjHURZhID/ 9Uub2bUuBaf78i7z9ZyRrS0l1yJ8Bdey5zQzK/4aK8mPTm5Nl9fubCpzirBoXEG8bhSVJjvmZwyo1G RaJkZfkeBqgLOJKpWVHZNGWpoGrsrNBkJoWkhNvK2qfqsOrK1w2RIbO8lefpgWEyvDM3JRCEW/WDJc i0pj+XSJSlvga7oQPj9FmDe9blRKUlGJDJTa2RQvdpsD+RE+Cq2wK75i0s0+Qmi6JEW8QcWXLIroNv lgqeZRqvP4ZBHWeQ6zRF/u+lyUNHKnRR4jU9DIM5f7xBmwQT3rAEdrRck4Px0Peb8tBqrov38SNyq9 A70WPxxZ8VFGSC1FkhuROcCV61CNyfxQSdAI9eKlmzav2RDqVbTjBSX+5jxcbLsd+gS2kS5rWWlFiE 8psXIUQHk9FxSOt0knnWdNgq2oMQ9MkBrmh3xDVJVKkCzBm1DJ/89cXh+Ems3p1VUYNt3MHOXIDDeM 1SQoV1em6g9NpHeegLBV1V/zKJ7D2+6avO1l9p2Ay8/4GZHtSOosLIQn2i0iT1mIgiXVZ3fFTv1SLK Ck+g+gNQ+/TN0hXC0qiPja3qxrwsuv1EnANH9SEJMt2OLgrXDyUV5yHWgRwmbBCWt/mfsh7+mbL31H 80CefxZZyl5wX20zlkLw5zEso3Vz3EOdA4uXryCmzG3y74NAbfq2W1SSwkVw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable the I2C0 bus provides communication with: - The integrated RT9466 Switching Battery Charger. - The integrated MT6691 LP4X buck for VDDQ. - The integrated MT6691 LP4X buck for VDD2. - The pin header, to plug external I2C devices. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 275ea3a0e708..d5d76a7dbd82 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -88,6 +88,15 @@ optee_reserved: optee@43200000 { }; }; +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + clock-frequency = <100000>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; +}; + &pio { gpio_keys: gpio-keys-pins { pins { @@ -97,6 +106,16 @@ pins { }; }; + i2c0_pins: i2c0 { + pins_i2c { + pinmux = , + ; + mediatek,pull-up-adv = <3>; + mediatek,drive-strength-adv = <00>; + bias-pull-up; + }; + }; + uart0_pins: uart0-pins { pins { pinmux = ,