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: 13108392 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 73A3FC6379F for ; Thu, 19 Jan 2023 17:10:59 +0000 (UTC) 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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hdmOIK4vgDq4gIUxwnm1kiTk+qGLILNXbTqqCIHXHWc=; b=nBLwspkidG9ASY lThPUKOeyprUGh8SoMW9+NBAPoMwjQleFK0VTzJLeFOdQnP9+3UNZCuy1kG1dAl9pVeP7UtMNZ2XD fW22Yzq5mJk+/C+bKTjK4WVzLTPSjc2NlAOyTsQKVzozwxGqkhT6+X6C+mijE5CFipH3mFbAFYEUv PcTwF9W9PCtlvHdz9s4wWN32FMoB3jCUlOS7r62vI2VlCM5k+KBQ2LROwMsKeHoTsF282lhPQgjsJ 96TqMlHOsMcUxlRAEMZbcx/jpMTan1cQ3fwEEQhWt/J5wUMZhocLhjWOY8vTOdgBthN8jCTlTt0yA mxX5EFcaK08eoGyzQY3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIYQ3-006Asi-1t; Thu, 19 Jan 2023 17:09:43 +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 1pIYPa-006Agy-Tv for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2023 17:09:18 +0000 Received: by mail-wr1-x431.google.com with SMTP id d2so2507776wrp.8 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=olPt0m5BWUkEZRGpQqHw2NuOg699Q06J0YvQNqr+GA1zc52x0SKezM0PxW00fzc+gw vmSajHmHzmyE7Ek1EqXx+1j95xzMpMj/5Tox7Cguo2rlncuq3tIyked1RrffrXavleCj 5K4APAvmTBXbyO106sXlBi6XMz9nkCIJDSUIQ4BA1OFYqiLaoG/rx/6nn+tpmfp/uTkp iEUPudNdKjBFFfv6/GaicpvTvT7x6B758470fnoOypgFGnDXbCGY7oTnLk4dQr077fOG rhGm8Ki1EAwL8bbu5W/SKe7pIZxfyzneXFwL83QlyU6nm8QK78GQxbkA7ZoGZ+KWRqwg c/lg== X-Gm-Message-State: AFqh2kqtoaKgH+wgywBc9l8qy9jBn/W3VeiUb7eqnoaQ7gC6bNFVVviA /vmPUho2OCLU/VqnXyC2WXZIdQ== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_090915_033839_2D52D772 X-CRM114-Status: GOOD ( 10.02 ) 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 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 Reviewed-by: Matthias Brugger --- 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:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13108393 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2FA59C00A5A for ; Thu, 19 Jan 2023 17:11:26 +0000 (UTC) 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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VQGHJeOHXeeHLEJpioSztzcpFuWGhvOcQE68Y1DouMU=; b=Sp6wwYxAlG5E6j NZe8VWdUaHN1HEG2q2humSds1vb8nAFn7H8YO7EWgJAGJP76C4C6TSDKubosB4dIp4FigW+67nSqW ppnGTdUOf8wcA/dDAF8Gjydlfac0Q5lNWtg7TVbrlS0WpW+Z81RINwyroDQelJ5Xb+m25Zc0whp7I mVKi2r1SAfYEptE7oUO7HmMFA0Dg/OKulurnz2OzkySz5AfhhBf77PfzaYPE8kqnhW2dAEA0EPMcs xsoDkDeu8YPibQ4f8ZINywGZu5506rdzw+eG28/b7V0w5aVNlBYBbhyxhKgmm6VB4P8Pa22HSLN2i UKTlxYDG49OR31zk1vYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIYQT-006B0y-Uz; Thu, 19 Jan 2023 17:10:10 +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 1pIYPb-006AhT-Ij for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2023 17:09:20 +0000 Received: by mail-wr1-x433.google.com with SMTP id i4so1888432wrs.9 for ; Thu, 19 Jan 2023 09:09:15 -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=nlUPFT5LnAx9YsUAxMPVVxhEMNKGvpW7llEko3PxJJc=; b=yhzy7rhZNGRyyFFztwDyv6b+ynsjiqP7Yo3+hZMwQDKqWScxMNvHS9Jtrgg9vOG5Pg drnkfX+KeQ1d8Bu+of5dAru12C5P8a6RE7LpUfEC5E06GPKFKYBftxzDxU48byKgWJIx zVeBpSVWr/8VeF9O9sRPe8EXOndY5R0rEILIYnqnxBmDt8uqMcE3k+rAZaovz7nj2Elx 3tX0pKxIl5FqU75PBtGRbcsDLUhHFpuRnQb4JB/0/kWB4adpDBHtIvAaNsPWOyepahI9 PjSTUPzhBD8ahLymqqY4i3NVhAQwl26hPFWwSoNY7CPEcc7ItYVQo6b/ULDsmDTH7tiy IsAA== 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=nlUPFT5LnAx9YsUAxMPVVxhEMNKGvpW7llEko3PxJJc=; b=v71AHSjHgj++nexisBgFBMbipOx1uNeP7aAOM4CEHiiMCv//S1vwG5KE5aV/G9y9Sc jvl0MDNLlkwauUuquRAAzLv9uX9A+b3FNEcPDi8h12jOJjjt36szOtiKICyeexPQzIkn VDsmN5LpnDdfvzqBVM6r52YdANWZ5ebdWxmx3UmzYaKVHVY+YmpI6IaZjm91qxuQcPxF yx2QIi/rxJoDpgYehmDZ/3xF8hqMb0CPbkO/oPM6QhGSOpso4L2A/sQRGGP0efXRmemv kFekN3EjVv4/rNlA5FHxoSMBQx4F+WxJ5/qexSh27v7bb0+QzvVwdIIquwEg5xQKqBmL EZ7g== X-Gm-Message-State: AFqh2kqk2AQQ8bQLMNvQYIzrhmJ5DBdre2xqrCZ+RXUxNb6EGg66I/Wd zs7YddXyp+sZAdldywY5+/Bmeg== X-Google-Smtp-Source: AMrXdXvHQSKEQ/RdT4gpmXWZ3OAen7L9xGEUoiYMPNpCEiEUmm1oaSDe9qel5bZaULsKuhg8fBJAgQ== X-Received: by 2002:adf:a3d9:0:b0:2bd:deaf:6a88 with SMTP id m25-20020adfa3d9000000b002bddeaf6a88mr9992146wrb.17.1674148154050; Thu, 19 Jan 2023 09:09:14 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 09:09:13 -0800 (PST) From: Alexandre Mergnat Date: Thu, 19 Jan 2023 18:08:53 +0100 Subject: [PATCH v2 2/3] arm64: dts: mediatek: add i2c support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20221122-mt8365-i2c-support-v2-2-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=2420; i=amergnat@baylibre.com; h=from:subject:message-id; bh=3qzpqDF5qfsZV4KFvmmkuAuRkJdkE+nj1hKT6VsiEUg=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBjyXk2DWa0vY1hFgtNfd4QTVahKvP0ZkrY5dVux337 SpiXGkOJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCY8l5NgAKCRArRkmdfjHURdyLD/ 0STpm6+z3UnD9cuzRfXOhPP7k4MXyxU7tyhUjhe7GaHnlEHZbXPMJ+L0M05jPyPCla0vFPcMDJJyrM 9Zg1Mkl3SnkvD2sWiVJg6uvZsqIGnPpBeo33iKV3EmpjMxw6Shw1NPNb61FpEQX0fdriFOnoBvTgC1 vybtbcFuEFu2QgKKRlhMo2TKUqBb5WlaPBqZD0LpAv0IQM+BR05th9TDcjpREv8WXkgu5s75T/sn8a /hq780PeuNb4AC9ququQ7mixh73ajBrCSuCoWBORqsYOkvegWqklX5G/tAd7r43F+6t2inGtnEVVgD 5Jd3BB9r+Mma7U2VmM7bBCFPMDnem6Q1vg/KBogizDT5EQelJTEsF1QmMxj+yoLjVhTSvNaofvYba1 GmKKacDExAHvwAMiOkebr26DzK30nEkmsxitcA5mo1QF9RRgAHyuQV0buR2IxZSM/7G2Se3LljeLXu EJiYLwjTGrxSWWqkYa024eK0IO0KS//GwNgrm3ckgyiCFnx4848OuqzUF6F8jYBYgmZ5F2o0RBIU7q VZ3oTKfPMUgfLatolft/J5pvr9bnz4bK0dr2V4QcQGLjy+5J2VvpPEQj+0haNMoM20gG0G2vebEWE8 uJ7f2udZP3tXCg8UuXwxInHrgexGGnbYvXgJyMo2g3KHprRrOP5iVKt8TieA== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_090917_929183_C9D5FE58 X-CRM114-Status: GOOD ( 10.54 ) 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 There are four I2C master channels in MT8365 with a same HW architecture. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index a32f2b7507be..013beb50b4aa 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -282,6 +282,58 @@ pwm: pwm@11006000 { clock-names = "top", "main", "pwm1", "pwm2", "pwm3"; }; + i2c0: i2c@11007000 { + compatible = "mediatek,mt8365-i2c", "mediatek,mt8168-i2c"; + reg = <0 0x11007000 0 0xa0>, <0 0x11000080 0 0x80>; + interrupts = ; + clock-div = <1>; + clocks = <&infracfg CLK_IFR_I2C0_AXI>, + <&infracfg CLK_IFR_AP_DMA>; + clock-names = "main", "dma"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c1: i2c@11008000 { + compatible = "mediatek,mt8365-i2c", "mediatek,mt8168-i2c"; + reg = <0 0x11008000 0 0xa0>, <0 0x11000100 0 0x80>; + interrupts = ; + clock-div = <1>; + clocks = <&infracfg CLK_IFR_I2C1_AXI>, + <&infracfg CLK_IFR_AP_DMA>; + clock-names = "main", "dma"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c2: i2c@11009000 { + compatible = "mediatek,mt8365-i2c", "mediatek,mt8168-i2c"; + reg = <0 0x11009000 0 0xa0>, <0 0x11000180 0 0x80>; + interrupts = ; + clock-div = <1>; + clocks = <&infracfg CLK_IFR_I2C2_AXI>, + <&infracfg CLK_IFR_AP_DMA>; + clock-names = "main", "dma"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c3: i2c@1100f000 { + compatible = "mediatek,mt8365-i2c", "mediatek,mt8168-i2c"; + reg = <0 0x1100f000 0 0xa0>, <0 0x11000200 0 0x80>; + interrupts = ; + clock-div = <1>; + clocks = <&infracfg CLK_IFR_I2C3_AXI>, + <&infracfg CLK_IFR_AP_DMA>; + clock-names = "main", "dma"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + spi: spi@1100a000 { compatible = "mediatek,mt8365-spi", "mediatek,mt7622-spi"; reg = <0 0x1100a000 0 0x100>; 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: 13108394 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 37AEAC00A5A for ; Thu, 19 Jan 2023 17:11:41 +0000 (UTC) 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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x7WlqGnqhHvHSPnxYY1eKJ2VszBwHZGX2/YYzfBfV4c=; b=t+CYOkMxpZGrxP 9OIEXmBJLn1h5X028ZorAlTWY6rkMVTaaYOzMAyWa4YC8AI7scAdK2PR4asiym/X42EkvFLVRk+ij na/MtnvODSeEbzg5IE6Pp/obrFIm5vcLQuqzXUevy/jMouUy2nyr5BjbN4wv4/UXu8PXB15uO/NQc FckLQdpZNZxFOlk9my3IxcB6chj4SjzfgZnFzx0OlUnAkuNFNk6N7avGOwZzAjqmTydOP1sxYL3TW gThpWxTj8m1Cik+ltQzGqWllW7TJPOIE10GSjNpmhx2zfZGiVE1pzozXa+G0u8y+YBwVBBO9o4gM2 D94+eSNU/jC14pvx8rdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pIYQl-006BAh-BY; Thu, 19 Jan 2023 17:10:27 +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 1pIYPc-006Ahx-9w for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2023 17:09:21 +0000 Received: by mail-wr1-x431.google.com with SMTP id bk16so2499080wrb.11 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=xjpE3KwzmVwgRVLUjwVunr7tKeonhT0mCiNXP0hbUr2w3kJX7n3uKu4uIgveMCgJIi 6hCxLFhbbHTxsec/w7MKj1NbVYQbEOq568P4du5KCFRS/31kQ8FmYrs1pQVRpT4sZURo 2Bh/LDudlDNokOXt9dafIRF3CY2gcBJNkIcLcJCfrB3yOrfw/ABTH4IeDqmUzqDFLMqM qx32Avt/2b6nI9MMkiz3GYOgSc/wgcvi9ewTRgTkNZoC3B6M72jQQOomf1vurit2i/1Q vbXZwT01IyT53fB7s19LVACVSjpaMN1bjSpzvxojx0DGtAFdXmCb6pvstqqVNVMf2FOH /bDA== X-Gm-Message-State: AFqh2krV3TB1rvCcyKWQHzjqh0LAGtYjRLvzSvywgt2taszwTGaL9PJJ mm39LNyF0hU1/8zMyZdKrqofYw== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230119_090918_320650_6E5B7A83 X-CRM114-Status: GOOD ( 10.09 ) 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 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 = ,