From patchwork Tue Jan 17 08:49:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 643589 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 BD359C678D4 for ; Tue, 17 Jan 2023 08:50:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236291AbjAQIuI (ORCPT ); Tue, 17 Jan 2023 03:50:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236228AbjAQIt6 (ORCPT ); Tue, 17 Jan 2023 03:49:58 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F23911A4B9 for ; Tue, 17 Jan 2023 00:49:54 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id g10so21643815wmo.1 for ; Tue, 17 Jan 2023 00:49:54 -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=Km72Ozc/Vyrr+VItW0cIHsd+mEJlhUZtzVcHQEBHbFs=; b=n4vNbGfK5yIRIrJ7BDPqX63H6uYWeoZyYRGtVklWvA9PhGfM3w7Ee+JhxK/Sl4zc6H HPN04G4R0M0gvg8RWqPkTL+gXCRONRFd/JnKiZDKyTSuE8ZK8d5ezCL+0Ls4OEtmrw3t EtJsvGVvlfYftDXeQAZWOpNFdEjMQgFdOPaiT1BQrm38mQaaRbWutoC0M5vxmFEAkaqB o8r8OhRTqZ3q0YLTeJVAiWaOQQif5AOLtyPFJ5Nzqtj3/QkfWGmCshaLmZZ7yx/eoFoa raojrixCerAWcnK6YqR8KQA+liKnjfrzDE9dkqjQHSHfaYseHsjeh45hDUJh1/RZa3pK rqhA== 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=Km72Ozc/Vyrr+VItW0cIHsd+mEJlhUZtzVcHQEBHbFs=; b=FUvzitx5C3/sXkRY2t6Tum3go+BbfFSF5O7nXG6Y2D4OTmHlpzLKQLFgmVQl2fwbaj ms4vm8mhmy6A2jQ/LzS4GJAI7MOSCGH4JuUt553OGhWkILrM3D6quWCdYiCWX681qPBa +iypZjeCbWkXOT9y5NN20kl49VGhmNa9+vKblkUZYNB75di8TPaLS3DizoRCcuSaKzA/ MG3+VIyrGl6KS3nUSkP2v/GhDjDlbi1W3KPsKUaQ6Y6q6bUZFXoEQ/XONKMAx7FNFoOy ZeZNPLRgEBGdNHT63iU2fhKvMMI7Cz8NUyPXNrzo5jDlxp5IZ45OJJ/3bhqPErRRNF7b mQ6A== X-Gm-Message-State: AFqh2kpdu5tJxR/jwW5DAcBp8XCOe0k//5fn92EQicn8edj/Eh9OfmU3 /XL4RYthHTuP8msj98t+ZZ2B6LmErsRTPgMO X-Google-Smtp-Source: AMrXdXu9bt+xPzypGl/F+mIIgonOm1sPTgpGAOgsT1pbkfhhzXESU+etGoaF9tltTxf7OMxdMv8YSA== X-Received: by 2002:a05:600c:4b9a:b0:3da:fcdc:cafd with SMTP id e26-20020a05600c4b9a00b003dafcdccafdmr2228805wmp.13.1673945393232; Tue, 17 Jan 2023 00:49:53 -0800 (PST) Received: from [127.0.1.1] (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id i14-20020a05600c354e00b003d1d5a83b2esm45040928wmq.35.2023.01.17.00.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 00:49:52 -0800 (PST) From: Alexandre Mergnat Date: Tue, 17 Jan 2023 09:49:39 +0100 Subject: [PATCH 1/4] dt-bindings: i2c: i2c-mt65xx: add binding for MT8365 SoC MIME-Version: 1.0 Message-Id: <20221122-mt8365-i2c-support-v1-1-4aeb7c54c67b@baylibre.com> References: <20221122-mt8365-i2c-support-v1-0-4aeb7c54c67b@baylibre.com> In-Reply-To: <20221122-mt8365-i2c-support-v1-0-4aeb7c54c67b@baylibre.com> To: Rob Herring , Qii Wang , Krzysztof Kozlowski , Matthias Brugger Cc: linux-i2c@vger.kernel.org, Rob Herring , Fabien Parent , linux-arm-kernel@lists.infradead.org, Alexandre Mergnat , Kevin Hilman , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=964; i=amergnat@baylibre.com; h=from:subject:message-id; bh=0qPQE4yGfoxCGQFTIge9uLlrCOrdE3u8zE/R7eutZWA=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBjxmEuhQT6QRyWEmit8/G/GCW6H47F2HxOTGT1ZSuo cCY6uaaJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCY8ZhLgAKCRArRkmdfjHURfVYD/ wPXcEZODLRlSW4k/1YFHhTcK/f/a+xBbyKmw7B+fxBkQshi6gAAca4Vx1oQP8hItEnTBMh1H0MjQrk cuom0S7kl6s2OSi99RSu0Jm6lNzfEYsuqy0goln16eaBQWfHegUSut6ijRDixWoR0dI2qspXDlTGwE D4+A2ziNmP6ZWD1b8Io0wn7Zj+jOobK0ua+K4QJamBy607Ud5yIDdujnxd49aByRs2M6vq3+VFNGK2 w2hR7m/kcjOFKJBaTKPRH2qqy8q4g6XnBlywN3UddrYZd3AX78aili1D2Nz5iRQfxbS4QUyuIhOi/h STjL9hoD7IFDAVHme3rCR1pivB3P6yJ4MeTD8Qq1abKY9EVn8IqGClDKkUt5kwdepHbNKT5HZeEXVM AJsd0f58rNZ9a9Z7Ch5oLrfEHfAl+w4huIGNe7gOxG+C+hubVq5wC5ITKA3DzYM/WC5s9d54L9TN9i JQvddXyndMunjjA5QHEH/MP3m2tqQ8/Yaawx2MjJzHLdRnUZ6nqPrSHOYsNdI/5+doCYK15T2Hn+JZ Vwlw4tj2pzfCBfOveUX2c3cGCQ0UJnZ4yaS6d8X8kiEw4hQlrtoZIQn0DFNsliEde1L8nkk0pcHvPU jDsePkJb43AtoIavas5keLUwk9oe26laD4onZtjTszzuuJZyntve4KFxoeMQ== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org From: Fabien Parent Add binding documentation for the MT8365 I2C controllers. Signed-off-by: Fabien Parent Acked-by: Rob Herring 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 Tue Jan 17 08:49:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 643590 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 62BBFC678D7 for ; Tue, 17 Jan 2023 08:50:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236255AbjAQIuH (ORCPT ); Tue, 17 Jan 2023 03:50:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236241AbjAQIt6 (ORCPT ); Tue, 17 Jan 2023 03:49:58 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D92FE1E9C1 for ; Tue, 17 Jan 2023 00:49:55 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id c10-20020a05600c0a4a00b003db0636ff84so975787wmq.0 for ; Tue, 17 Jan 2023 00:49:55 -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=UgoXPu1A6G8aOhAjG7a8w9p9zygyaf4s9I2TGoeTltI=; b=br0AnOeqEeTM0zui1xtg65KTyJzkss2Hnbj0igYV+z0AGaL3ZPigHUjl7LH+iLh9s1 UOB99NxhPyHnEsOZVigJagAIQdCNDM2VGavpVH2lMZ3z+yD6qwJEyMoveeDWBxbUqK1F ZKd6b348eIeht3C4jJGN/IKf7ngNYLfIvhM+kYHnXHC3NiJwyEm8Fr6ePhAtv0EJDw9+ 0lLq1byDElzyt9jUJUycc2iMsgzJFGfmU80f3gJS/4PvmB58O80F1a2Pi/2l5im6rhd8 MA+/y6l65ytx5H5LPYhF4dATSTXFK61F+/PKAoEaAe0AOW9chItrcYys7vlS4nVfIBrg pn4w== 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=UgoXPu1A6G8aOhAjG7a8w9p9zygyaf4s9I2TGoeTltI=; b=s4epMSUBkxgkvUOrIqKKqFJPiGKBzjSJc3P2qZArwN8IxtpBjnYjDWuYqGTttjDNBB XdAwHeq12L6K1Gp0impDGBRmkT1xaJZHsIR3St8TqJIZ7vD/Q2wSU1wzDTGFD2x7sVTz To9azhpvjquOPG8uIi1tPyViJRkDJx1agUOJYJ8wScTUcZN91vNQ2fHVEoyAx8EAvsmv Y3RSOXKS339eW12d5BD3+2RSQ12xPIZE23wkJanDz/8rD5HzEHgVpTIiYfYNXfFAMHJn hQegFdGoM488YFazNaH+Dq8qCbpWwCSfrAg6n3l8GT1F33e2gsxyjUWy161kR0F9JpgP q8Aw== X-Gm-Message-State: AFqh2krZtUvgY8SUUPCAJSl6W9DxzrJr75AJS9eeEcGoq9UBl5uHRjgN zWUpIY7YLVtGq0peSGEmw6I7kGAxJcfsFeh9 X-Google-Smtp-Source: AMrXdXuDwjuQIJ9bVydfzGqKXubMAUmMY5yYYHElltf5Pc0ST63jYYv8z3loNVA4Fd2I2eGFzTk8WQ== X-Received: by 2002:a05:600c:4928:b0:3da:909f:1f6b with SMTP id f40-20020a05600c492800b003da909f1f6bmr2465111wmp.1.1673945394216; Tue, 17 Jan 2023 00:49:54 -0800 (PST) Received: from [127.0.1.1] (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id i14-20020a05600c354e00b003d1d5a83b2esm45040928wmq.35.2023.01.17.00.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 00:49:53 -0800 (PST) From: Alexandre Mergnat Date: Tue, 17 Jan 2023 09:49:40 +0100 Subject: [PATCH 2/4] arm64: dts: mediatek: add i2c support for mt8365 SoC MIME-Version: 1.0 Message-Id: <20221122-mt8365-i2c-support-v1-2-4aeb7c54c67b@baylibre.com> References: <20221122-mt8365-i2c-support-v1-0-4aeb7c54c67b@baylibre.com> In-Reply-To: <20221122-mt8365-i2c-support-v1-0-4aeb7c54c67b@baylibre.com> To: Rob Herring , Qii Wang , Krzysztof Kozlowski , Matthias Brugger Cc: linux-i2c@vger.kernel.org, Rob Herring , Fabien Parent , linux-arm-kernel@lists.infradead.org, Alexandre Mergnat , Kevin Hilman , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2508; i=amergnat@baylibre.com; h=from:subject:message-id; bh=pLPRl4jPAYZIqf1fe/JXLH5pg1d46bBPCeqWhQgjHKU=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBjxmEucJi1q1NdT5HmNXnp5kIxA1c+e049A9ok+evg 5QXuV6uJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCY8ZhLgAKCRArRkmdfjHURVrmD/ 4gskZjdw09f2tZ7bUHTkY/CVV7XUZSvc78gwOs2ISy6/sqNimRoXdAbaoO1qZEnZA8x73UFSv2cnNi +5FANiQKHS47maGYzC2OIaMnxsmhy8KvLsvsmgt45YoEb8t0LW5Erq8eYEWlB0qW4XzcfMloK2DZBo NkTlDS65SDy2FvvGJOyhmSXS0RGUzjnFz2AXv9ATc30Ne3VCoWdMn8t4kdESqovn4qWcxpAspbEX9S /vb/CeAquacvmUw90GvgcmZ7lOYWMlir36wYnHRrvpkEEwkhT9ibp4fRljjS9AHD9HvsJBV8aBvlJr nq9BkyYFSpmpnJhvDrmDiYlPjJ/uLM8urevXr95JSLe9hL03WuS/NcVgft99n081xCJ6da44ERbDrN MwcIeb0Qp78Guz6iICSbmkr0IChMmfZTeSm06oWPL63yLAzA2IbFCqIbe0H0a9CEW8c6k3VVMZAF7X 5AhvgKdFJyHKaKlHpkl98w02jfFPRIKSKve0BN3Do0GwmfgicJSDded41vqU9vJ6gMPOvWe7wqVqsg Jllv4HfdHSwJFNwsONhbi+jbEPMzxFIFHdxK7A5GyS23UawCdMu9yeth4hWlSN7TO0zd4otLV69q52 VqcBsbxU2S3VwSZLVsv5piHR5MIGFrontdbYQKgIiU5nwWCzvRK2LU7+0sfw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.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 | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index a32f2b7507be..3c2819bd32af 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -282,6 +282,66 @@ 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>;