From patchwork Sat Aug 7 11:06:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA62DC4320E for ; Sat, 7 Aug 2021 11:07:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A4A0760C51 for ; Sat, 7 Aug 2021 11:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232057AbhHGLHp (ORCPT ); Sat, 7 Aug 2021 07:07:45 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:57967 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231972AbhHGLHo (ORCPT ); Sat, 7 Aug 2021 07:07:44 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MUpCz-1mctRd1GTZ-00QiM0; Sat, 07 Aug 2021 13:07:08 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 01/10] ARM: dts: bcm2711: fix MDIO #address- and #size-cells Date: Sat, 7 Aug 2021 13:06:32 +0200 Message-Id: <1628334401-6577-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:tqfvKtEzoZCEh33YB92Q1m9qtHEymKKXGP3LyZ4mP61zKuOfW+X B60puBofk7GAfiLTncd/XFZQVwvGNwWzXfR4NnmE0C2f8hLNydKcVoAa0wi3m+2SBw+ZoYj PS/nggas2vA/5NgzpdOTrfUduIo/rqII9AxAfQ5gpquBVpdK7Q5PqIhwJnXiqyZijUydFTy 3EqKxewFa9htrjd2F3w9Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:l3vbtDbD13M=:IQbF7pqSLIQFux3euKUThn ZnbXABZGeJD2J8AB0VCNbF/vsKtPRPmej7EvraZDLmYBfDWK96j2m2pdIVtViGMS05CRmzyZm vNRpQd0948CjW9DHgocq1V5g51AvmEBJ4Wld44W3Q5iscbgUggpvpNOY0Vq91Cm2MhSUKTKjW rnVuxfXB9JO4B98bvMJ8CURlUbCb9eBspiMesJ9qZ+Kt48ZbdCy5o50o19sW0Ed2dPNbicEmc cRCPElKLXQ8EQQP9BCggWF/n+TGfdW948bUWBUTfLJg5pixFzu77F10Z2CnYb3YxE7SLpi8yn LeYzsoDAjEZd7S0scWxp1GF+YtliCommSob/xKefgQuhEhTrfBKI3+7fffJ3IuY7WEeNtZ9n+ pYkLZbAbZVsZXSQchGFUUHKtUkqYXDMh9HPJiFpkBR5iBkaTUkNKKQJRBYRkOxHe2A4DHXfGw 9Buxm0CNEar9JCaG1ebZ7MnH2ZHaohbMsxS2YQlOHbtyNuKC3KPwb6xo+xPg7FOmr6sf0xqcJ JwmfJkVTAvEFuPn09ybcyXKhvdsW/5z8IKGo98Rf3wxPCqVPXe7ONOb0vslnmUxXHsX1qBLWo ViPFfxVDShxd1qMeUsuYn9s5x6nmb3Bvl/25fvdj4b7Etw7j16T43sDGYLWvK9RDC7rpTqyQV gyHg42mGdvcWk7UqzqA8sfapgzvGagx82f2ES2TUG98PZrRD94dAuYdQqcdTC5ziXGwDAnZ0l At0HvNjQy2IN1PVyzFOXSp9r/uiR/JIjphhAeUcoznIme7BzXNIBapwMRLL3FBpWv1dP319w8 w4vGm81Z2Q3ga03e/KfOcTJHrWCIRBAzSoDDybbZC/6BHrO2CuLiLxeAigJuQyFdNWrU++5x9 bccT3qK6+Z5+zAS1ufHQ== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The values of #address-cells and #size-cells are swapped. Fix this and avoid the following DT schema warnings for mdio@e14: #address-cells:0:0: 1 was expected #size-cells:0:0: 0 was expected Fixes: be8af7a9e3cc ("ARM: dts: bcm2711-rpi-4: Enable GENET support") Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/bcm2711.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index b8a4096..a0db9b0 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -532,8 +532,8 @@ compatible = "brcm,genet-mdio-v5"; reg = <0xe14 0x8>; reg-names = "mdio"; - #address-cells = <0x0>; - #size-cells = <0x1>; + #address-cells = <0x1>; + #size-cells = <0x0>; }; }; }; From patchwork Sat Aug 7 11:06:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF379C4320A for ; Sat, 7 Aug 2021 11:07:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84FA860C51 for ; Sat, 7 Aug 2021 11:07:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232139AbhHGLHs (ORCPT ); Sat, 7 Aug 2021 07:07:48 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:51577 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232049AbhHGLHq (ORCPT ); Sat, 7 Aug 2021 07:07:46 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M4ahC-1mAgH43mUQ-001iZn; Sat, 07 Aug 2021 13:07:09 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 02/10] ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states Date: Sat, 7 Aug 2021 13:06:33 +0200 Message-Id: <1628334401-6577-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:rxN6Du+6J5W11kdd5uwIM540sM0r6PGy0faROvYut9l4wc13GTU JKIChKg5mSuHWl95yTzni4qvhvBA3XlHscPFKy4N84MyFbeU9CUdmV6huLHf1UFk9yaZvyN 9GP6iM9jO9nzM+eR82tjGPwe7yf7dN/ErQYpw0F/8xP7VPmsJic1xFySomChY66JycjyENy KFasKnyF0brdlqMSrgsBA== X-UI-Out-Filterresults: notjunk:1;V03:K0:F0HkEPxV324=:LEj0M33wAhbZDwM2sVUHBp bcg2Nbd4mHaBYuuU4vSH8S9t64XxMXzRA4G3XA8LJKvd34uKLrgE80f07WyJ3c1v5XRN5EeUb cQmlWPhPMZ8d98YFj/DmysH6YcD4T6LMIlvjUMEtBM+LQFL/TLFJ0a8LxlmRZBpUKm0hat1MI lkv/yZSCAPwl3D4RFdJdG9ZD7vc3R7/M7N5IDMScKGlpi+6MAGG1CY2MGcN2I51CFxk7nG/DB l025Ed7OcSSuhL2AcDySNXeFuKx/tYYhW8vYrP4JNqJMn0JpEXqYfxpmm7iSdenRNXO2R1KVR CIN601wmfcd6XX3i5DIQvytG3WIILNXZwa9u1AKy794jsuF7F+fWcy7/wOnGyFtJv6Dl4LPKs fTCWBBvmNMxXrp7BmJyqJvwBZu0fM0GWvWd7xCSLLgZmyYxmMFAIhVWYd36dUDJsqUZ7Y12Rb sa6Yr/sGqJNtao70kh/VJotzlRl8/m0Rl2b/SG732YJ8oHjXUDXumYvsYqL08y1fqTqM1y1kG OKqjXrR1Mflm781wnZDOAWesiBLrPUWCU83jNJallcEPIU/MFKJ16z87h8Tr7PGqnBxAmfVmH BSU1fY0QW2y/pmiBzRnOpqF3cReCVXhpPoqYyKK7Bm2Ns1W38bXKZADYSjlSYbxV8LpigxmaW MozVRnHuDi5C+emyXqGcN6Xcex9vJ37+MlHxvvGrlxGq5jFXzoyzTj7mw+U1IiXE5gXNR3ASy nU6NKYkehUrJmUFmORGTM1BBtgJHGbe1Z1GAUN/8A4HbMGQXi1W7fAnbFlAybwEdDF3Jkaklo UadAXTl1SwW24y7t9bl2l9fusTzxsbU6D01FmW/m6S6mjAY/NN83QacLZpk8Z57A9rr0HbXPS XUYUDfDXRzbi9kKZOG/Q== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org DT schema check complains at sd_io_1v8_reg about the following: [1800000, 1, 3300000, 0] is too long Additional items are not allowed (3300000, 0 were unexpected) So fix the states definition. Fixes: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support") Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts index f24bdd0..abf8298 100644 --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts @@ -40,8 +40,8 @@ regulator-always-on; regulator-settling-time-us = <5000>; gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>; - states = <1800000 0x1 - 3300000 0x0>; + states = <1800000 0x1>, + <3300000 0x0>; status = "okay"; }; From patchwork Sat Aug 7 11:06:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424291 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B1E2C4338F for ; Sat, 7 Aug 2021 11:07:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0228B60F38 for ; Sat, 7 Aug 2021 11:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbhHGLHo (ORCPT ); Sat, 7 Aug 2021 07:07:44 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:46171 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231922AbhHGLHn (ORCPT ); Sat, 7 Aug 2021 07:07:43 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MZCvh-1mhJHw20lV-00V8CK; Sat, 07 Aug 2021 13:07:09 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 03/10] dt-bindings: display: bcm2835: add optional property power-domains Date: Sat, 7 Aug 2021 13:06:34 +0200 Message-Id: <1628334401-6577-4-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:fdAi0eW6lkNHxUUv9MAiUpmpsqcYqunqRorRROAxKZe1jnLq6Xo AVsERlC42LCsx/Qg5DYKB+dY5EZaNISK8AITwiW/47yAoNQXU5QxIoexcqhXlEnfnbOHbwr Uo60f8eUPfoglTt/PTRpHqYTNAANIXfgqzRIHE9ajdhMgI0FoKi239KAeJ9dKrvHgVwMw+U DcddPDSfUqSNpFgGDOqpw== X-UI-Out-Filterresults: notjunk:1;V03:K0:4qg6qOIprYg=:rXv5yT/7zrwTlvSl44ePry BgfAvIS7vckyq4GQMCq2Gee5zYApbvmbLpeTgZ02nnD+TucCfvmgtpmc/C+uWMRvZueBmXSY3 CbAY58AvHSefspDsSquzm+uefL5crB1x7YscP81Mmo2lf4WSMPh+7OuAdN14Bn7BqMnLKfvVi BHEr4606kKjKq4obhIfYuzx5FNVVX4e0VZHnJHhyl0RMlH7dZXmV1lY2y9mlouprfOrFyPzfC 8dV9yqYqT0TLht3WeE+PlKuAWvql4NjhjVf2XvxUvDyMtYv2sCEgJRllT/Q0c0LAL/3C7iz6U 8+q65z3MrGzLw0PkYz7GCMzklf+puFYPc72I2bCJVY1xa2izOWjGMdSnMGMy5yo3StxZVcbOf qEVMxPR11mUbLgLCyh2lEBK8eWU7hlrQPqcSdilTBVCfwN9HajBUaR3UueL/+3T/6TN2lCoGm f5aQdJlIk9ufqvzMm5P/MYfmx3FylgoTSvUOC92Do4Uel6E3bY1nv847igpd6NmylpHhvWMnW 2UcG9xxfXy78sp62vzFlk5OSwCp9efI0pZWSGJKO833lczFZYS1dlYmckHJR0LDlMrr8KHw4O maFjb90n+NGsk6eY1S+mvBgekvAWvO1/SPWAaxsu500sn+zrwri6rILpymJXiYAn9Ylqkl7Ka EMVyVAfIXENQFlW5txgPztnUahIoMoKYGG8bF8qgWDDL8l0ItjMusVSjp8ROcvfK0lFnUqQP4 ELYPv3+54GAQYqIwFclt1fztgkGmxyRDD4T+GwUKShEwodOvVOEF14YUJbw4zADaB254kz1dH 1K63epFBNoXogHqBILhbT6VQa2YzrP4sUexqf1P2QkVJb0gHEjznVF3teg+2LZZpS2ryZJidf BUxjeCiSClHPrcy2ZjGw== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The Raspberry Pi boards with BCM283x needs control of the power domains to get display components running. DT schema warns us that it's used, but not documented as a optional property: hdmi@7e902000: 'power-domains' does not match any of the regexes: ... Signed-off-by: Stefan Wahren Acked-by: Rob Herring --- Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml | 3 +++ Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 3 +++ Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml | 3 +++ Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml | 3 +++ 4 files changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml index 3260857..c8b2459 100644 --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml @@ -47,6 +47,9 @@ properties: interrupts: maxItems: 1 + power-domains: + maxItems: 1 + required: - "#clock-cells" - compatible diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml index 031e35e..48c8cad 100644 --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml @@ -51,6 +51,9 @@ properties: dma-names: const: audio-rx + power-domains: + maxItems: 1 + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml index 8a73780..c55a821 100644 --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml @@ -24,6 +24,9 @@ properties: interrupts: maxItems: 1 + power-domains: + maxItems: 1 + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml index 9b24081..5d921e3 100644 --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml @@ -24,6 +24,9 @@ properties: interrupts: maxItems: 1 + power-domains: + maxItems: 1 + required: - compatible - reg From patchwork Sat Aug 7 11:06:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D45BFC43214 for ; Sat, 7 Aug 2021 11:07:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5E6D6115C for ; Sat, 7 Aug 2021 11:07:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232036AbhHGLHo (ORCPT ); Sat, 7 Aug 2021 07:07:44 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:59681 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbhHGLHn (ORCPT ); Sat, 7 Aug 2021 07:07:43 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MCKSA-1mKXe80AjK-009SLv; Sat, 07 Aug 2021 13:07:10 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 04/10] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Date: Sat, 7 Aug 2021 13:06:35 +0200 Message-Id: <1628334401-6577-5-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:gfEVCU1kBksYlVlI36+xhO7/PrdkmSafmJw2daC3ONkAk/TcvWc QbA5BiTWasSzGIKdzbgsBw83id/EB7tV261L3lcQZ+24eD5YKqNY/BD1odPeEO9UOGMi274 h8jSBFBwXDRP6dP8cNRty4Hx2F+sLZDFilRGqArfRr+vX/sBPPCBUmp03laUbXzkVrbEDGI R9eKOXXrm5BHsK2uM+1tQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:/1+GcGykBLo=:R3f+HlLl9XrJ2GPs6Itt1N WzI7gF2Yc037Lc4d5MYtmwbhbUlIprhpHAAC7r3JIF1+mbhx2f68nDfoCQmRtrfNuMKB42kIf 8engvX2fX2mFzLvtt871yHwPDiB5e8LUi5Ojdi02klTIvpwY22FDlLn0cawZAyIITTETLsRz8 iT5Ql0FdlQzM+RTdi4/WpB4b7qZeGGciY467DyS+xA81eKF/iNyLhix4rjcju6Aeq66y08WwN ZJc753VqLIYsBypE/UKQiBkI+7lb4jLaY5ZJHelfx5unkkin86ZeYVJUHoTOHM9OpcjHhjl1l +7eNboTtlJu/DygrpDoleSC8OxJd15kvm/hA8ySKgJeIHnhUDNQFU4dyQxu81HuxpQHlHtS0f +Cf+0wvdYEWRvGuqvJmvUjKm7Mg7692yLTifZCSqplee4xIgUy1or5SSB1494Dilvht3TdLAq /6PlHERi5sAtJgu5EUhvsO7N2kj5+Ee3n3AdCNi2vs6xB3oT3N8yH/TSzZKnczuDkp+NPsVIt yLy97gwFDWwH+TJ+OjiKR8mOEOFeV0wvkgUhdeqBYsZQlyS2OEJb8DPEpY44SpFpWHe+LPF5f wP5f2X5r9fuJgao/fGtFxVQHHkaSahFViAANQSvTIf9oP8oSD1oNKkmdfBT2ncyEHLi1xGWTW uzHlpNWL70UJ/O4T9oBqPd6POwEZkqkHoPQkmDnHCtSYTzBZtQJv+tUaqCwlPIWhPdTRIq0i7 XNU8aFXhle8mf7aC85TlcBwH/nVtR+ec6tQr9mhNVuN24mPnVdLp0aBsMZHytK74UucWqdZcU u9XuqFW98sxRmsZSojG4cPBXSohlrYo/j3FyDr9OjN8Qu0BrodXQEUsenlSLHLupFBAUHhz28 oO7ARG1ZVhAwofbfKo8Q== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Nicolas Saenz Julienne There is a known bug on BCM2711's SDHCI core integration where the controller will hang when the difference between the core clock and the bus clock is too great. Specifically this can be reproduced under the following conditions: - No SD card plugged in, polling thread is running, probing cards at 100 kHz. - BCM2711's core clock configured at 500MHz or more. So set 200 kHz as the minimum clock frequency available for that board. For more information on the issue see this: https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/T/#m11f2783a09b581da6b8a15f302625b43a6ecdeca Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren --- drivers/mmc/host/sdhci-iproc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index cce390f..032bf85 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -173,6 +173,23 @@ static unsigned int sdhci_iproc_get_max_clock(struct sdhci_host *host) return pltfm_host->clock; } +/* + * There is a known bug on BCM2711's SDHCI core integration where the + * controller will hang when the difference between the core clock and the bus + * clock is too great. Specifically this can be reproduced under the following + * conditions: + * + * - No SD card plugged in, polling thread is running, probing cards at + * 100 kHz. + * - BCM2711's core clock configured at 500MHz or more + * + * So we set 200kHz as the minimum clock frequency available for that SoC. + */ +static unsigned int sdhci_iproc_bcm2711_get_min_clock(struct sdhci_host *host) +{ + return 200000; +} + static const struct sdhci_ops sdhci_iproc_ops = { .set_clock = sdhci_set_clock, .get_max_clock = sdhci_iproc_get_max_clock, @@ -271,6 +288,7 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = { .set_clock = sdhci_set_clock, .set_power = sdhci_set_power_and_bus_voltage, .get_max_clock = sdhci_iproc_get_max_clock, + .get_min_clock = sdhci_iproc_bcm2711_get_min_clock, .set_bus_width = sdhci_set_bus_width, .reset = sdhci_reset, .set_uhs_signaling = sdhci_set_uhs_signaling, From patchwork Sat Aug 7 11:06:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A24AC43216 for ; Sat, 7 Aug 2021 11:07:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA71B60C51 for ; Sat, 7 Aug 2021 11:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232163AbhHGLHt (ORCPT ); Sat, 7 Aug 2021 07:07:49 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:56861 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231972AbhHGLHq (ORCPT ); Sat, 7 Aug 2021 07:07:46 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MAOeB-1mIbhd344x-00BwOU; Sat, 07 Aug 2021 13:07:10 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711 Date: Sat, 7 Aug 2021 13:06:36 +0200 Message-Id: <1628334401-6577-6-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:u0dsEv9jFM+tW+Sg1Dp3uVwEizVQrVB28BJ35SkprIsS+lWZL+/ QbkH8H57xvdZE34nPO+nJwt9cJP21qQUWf9Lc/tTJyZPLiu0U5Hukyps95nBDkhPrzIZeAD RLy8p9Be0C2k5HMQCDa50/mnBxZJFR4bYKQvrc/EIslGjFMfPrnOVXAl6n+2MIjTffERJt/ /81T3awZ6H1FhMaL8Ielw== X-UI-Out-Filterresults: notjunk:1;V03:K0:SKENu3phtEQ=:9NLKQGVRYLgrZ3PQ8+QXiy kfotEGl1sQEcA3qstF0HDGvz3Wdkc+xOaxVgyLenGayUnzVh/Scm+nn07evH5988ZmRJzMrzc GgLawXLjDa37UvDL5NcG7enhWwA29GDPZWLyk3aiKNR/B5cASF41lZCWfCPisJOuTWhv+CDoi 2nxkMgPiF9WtSTyZip/xWUQUoa36py3KFHDkY2OJfw9tmuZNHtxXieUv8olRsOZycRUdHp3g8 FK5wLXjCFgyOq/IX5cdUmAhDHXwUwxOLALJX/QeE5Ccw2nBdpUb/6feyLk4cm81rpai9TOM/s UyjiPwmuh5WzIM/dSerG7nsZR1Xd2aN/TMAqkWKRx5rNdSMxO//HsV05m0/FA8EFtxIIBARtN VrkXSbn0FcBRag01meD6ntB2GQi6jO+7VIErMw2BQRy72oDLJw5GvI3jPVvvyt5q9kkM63JdO IU1M3RPe8adcz8Kn2EFfs8dVX8oLiYokEk9uy+lm6ykaPnjPplkrZtu9Po3SSdBE9rtJ3nejU AlahHNZxlqR+kuHLj8zl+oxyd0uXbgbahksm4m0Pv7xwiQ40QR7QZnZ405+CfAECBmNwI+68H tlxC8XTICgN2XeMmwmKdJ96msjrBX6etIzGwWTJECGj+wmrJ1G6J26FKMTKh3itOuYQw+WJVL /kJFCEseOjgRvMlj/W0/09w/ciH9uYj2+cm7p/Fvnyp1RvrYEqEEgZjBpCdyz1kmlFo5rNeXa MoiW6Sz25svrklg6KcYn2m5eazlT+rjXiC8cfjQGdU5sKAPQJWqGU7nVkFO8y4kKVvqneoSK2 OhduJAS/F3qbNhaBhv6cZsrvNOlrrzgtnIdCn3SlLKpaEbHBN9geLB9ZyMB77KFSp061oieKT nkyWRCOt8rziBz6VtvUQ== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Nicolas Saenz Julienne The controller doesn't seem to pick-up on clock changes, so set the SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency directly from the clock. Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren --- drivers/mmc/host/sdhci-iproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 032bf85..e7565c6 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -295,7 +295,8 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = { }; static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = { - .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12, + .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 | + SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, .ops = &sdhci_iproc_bcm2711_ops, }; From patchwork Sat Aug 7 11:06:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F6D7C19F39 for ; Sat, 7 Aug 2021 11:07:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3803B60F38 for ; Sat, 7 Aug 2021 11:07:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232113AbhHGLHr (ORCPT ); Sat, 7 Aug 2021 07:07:47 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:58473 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbhHGLHp (ORCPT ); Sat, 7 Aug 2021 07:07:45 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MhUQ7-1mpnqe10N9-00eeQQ; Sat, 07 Aug 2021 13:07:11 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 06/10] ARM: dts: bcm283x-rpi: Move Wifi/BT into separate dtsi Date: Sat, 7 Aug 2021 13:06:37 +0200 Message-Id: <1628334401-6577-7-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:QmjLhRlmSvymuTwXZC2Fma9HjVesmN+wkmjc/fvETI6wB+MsCTW Yiqq6XGCBkypDc74pPhM6wM6gj1QqQ1T+sqq86GozDW4pCpQ/PLnS60fpcxQY699chlA1a+ Hz3Q7EUk1jnkeqaHar+r0K94Tuhgiozxqn7UtrsC0EkZDyHqJJZT9mus/wonjlhV41T5rFW WmbStwCGU+huPk/ABzXWQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:usvl7TM8DkQ=:FbuLfKL4eZgnYN/6DODpAY n2mS2duxtMGfzH2X8cOCldlA81fx1wGqna4EPEF5o9jjtOef3gmfqtwVeZMcN1oADKIVEREl6 yzoLV89cYLx4z8nx7rwWsZyIeWtm+dN9CsO9H/GqqsjmwQ7TkgeDiNVG6KBWLAUE3oMyuCIXm gBN8TG9iFRKfmifbfHmRWmIzkfuX+qUAN0wL2U1+mbkKmka97nB5vb2NuYqyvxSMy81wZZ5pR 6MC264gIiEEGNcoCkIRQxCczIe2ycuLjOszou2OWrzG5Ys9xJOC158eBJf4aSGioDzs3nBE3L ldEg+nDxxeINobYuZfJDtozAkBzoDkazfGGe9TzxvCpB5R7gvzjLJgBOS1SYt/X/09Gj5HGwA mhBzfXezB3pBbnMrvApmpOmN1H3WlH3dWkehUwXN1R6VAxii6w1arYqkqiSBSgxtwCvwI5SiN egsGLRdHMSzoMLmQn57yR2SKMOcUekfkPScrnwztCupHi23e0c2Ta3m8zt/DyTfpH5TmNgcur UkBw4ILbphkKo+859v9v5Agy6KEkXFbtQtJQBLQ5Dqu9dEYM4a4X8NAmsJVl7YtB+d2bAJQnn 1uO3bUBLcMD1NPKDI4mCpq2qYsGebVKJ+17mCaQl97U0AtwTKfsNG1c6r1JUpyjvNRIWOXU4E tRYEYYg3De2oAHSqCaMMDO1YjQ9onkunhaqUf0AoNnHnEXI3KsNlWcD8mYqvxQQrmrGDEIaxn oIv2ZY1hCFOCNxI8qwTDF+ChGzeNTlYrLJDrkfXMkcc+aTg9jd4igzt1tpVOmqMlhT3uF+/JL SZVYvDraN/gvyXO0n0EJIE5FciaF+bmRnYD1pZ4FmL9+woyNKSDnEZaY5+7ILFJFqqk915Sp+ WD3Y/AU92HAA+02k9fvA== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org A Wifi/BT chip is quite common for the Raspberry Pi boards. So move those definitions into a separate dtsi in order to avoid copy & paste. This change was inspired by a vendor tree patch from Phil Elwell. Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 38 +++++++----------------------- arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 31 +++++++----------------- arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts | 36 ++++++---------------------- arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 36 +++++++--------------------- arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 36 +++++++--------------------- arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi | 34 ++++++++++++++++++++++++++ 6 files changed, 74 insertions(+), 137 deletions(-) create mode 100644 arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts index abf8298..c54ba5cf 100644 --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts @@ -3,6 +3,7 @@ #include "bcm2711.dtsi" #include "bcm2711-rpi.dtsi" #include "bcm283x-rpi-usb-peripheral.dtsi" +#include "bcm283x-rpi-wifi-bt.dtsi" / { compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; @@ -26,11 +27,6 @@ }; }; - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; - }; - sd_io_1v8_reg: sd_io_1v8_reg { compatible = "regulator-gpio"; regulator-name = "vdd-sd-io"; @@ -56,6 +52,10 @@ }; }; +&bt { + shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; +}; + &ddc0 { status = "okay"; }; @@ -178,23 +178,6 @@ status = "okay"; }; -/* SDHCI is used to control the SDIO for wireless */ -&sdhci { - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&emmc_gpio34>; - bus-width = <4>; - non-removable; - mmc-pwrseq = <&wifi_pwrseq>; - status = "okay"; - - brcmf: wifi@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - }; -}; - /* EMMC2 is used to drive the SD card */ &emmc2 { vqmmc-supply = <&sd_io_1v8_reg>; @@ -236,13 +219,6 @@ pinctrl-names = "default"; pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>; uart-has-rtscts; - status = "okay"; - - bluetooth { - compatible = "brcm,bcm43438-bt"; - max-speed = <2000000>; - shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; - }; }; /* uart1 is mapped to the pin header */ @@ -259,3 +235,7 @@ &vec { status = "disabled"; }; + +&wifi_pwrseq { + reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts index 33b2b77..243236b 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts @@ -7,6 +7,7 @@ #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" #include "bcm283x-rpi-usb-otg.dtsi" +#include "bcm283x-rpi-wifi-bt.dtsi" / { compatible = "raspberrypi,model-zero-w", "brcm,bcm2835"; @@ -27,11 +28,10 @@ gpios = <&gpio 47 GPIO_ACTIVE_LOW>; }; }; +}; - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>; - }; +&bt { + shutdown-gpios = <&gpio 45 GPIO_ACTIVE_HIGH>; }; &gpio { @@ -110,19 +110,7 @@ }; &sdhci { - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>; - bus-width = <4>; - mmc-pwrseq = <&wifi_pwrseq>; - non-removable; - status = "okay"; - - brcmf: wifi@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - }; }; &sdhost { @@ -135,13 +123,6 @@ &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_gpio32 &uart0_ctsrts_gpio30>; - status = "okay"; - - bluetooth { - compatible = "brcm,bcm43438-bt"; - max-speed = <2000000>; - shutdown-gpios = <&gpio 45 GPIO_ACTIVE_HIGH>; - }; }; &uart1 { @@ -149,3 +130,7 @@ pinctrl-0 = <&uart1_gpio14>; status = "okay"; }; + +&wifi_pwrseq { + reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>; +}; diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts index 77099a7..d73daf5 100644 --- a/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts +++ b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts @@ -3,6 +3,7 @@ #include "bcm2837.dtsi" #include "bcm2836-rpi.dtsi" #include "bcm283x-rpi-usb-host.dtsi" +#include "bcm283x-rpi-wifi-bt.dtsi" / { compatible = "raspberrypi,3-model-a-plus", "brcm,bcm2837"; @@ -130,28 +131,6 @@ status = "okay"; }; -/* - * SDHCI is used to control the SDIO for wireless - * - * WL_REG_ON and BT_REG_ON of the CYW43455 Wifi/BT module are driven - * by a single GPIO. We can't give GPIO control to one of the drivers, - * otherwise the other part would get unexpectedly disturbed. - */ -&sdhci { - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&emmc_gpio34>; - status = "okay"; - bus-width = <4>; - non-removable; - - brcmf: wifi@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - }; -}; - /* SDHOST is used to drive the SD card */ &sdhost { pinctrl-names = "default"; @@ -160,16 +139,15 @@ bus-width = <4>; }; -/* uart0 communicates with the BT module */ +/* uart0 communicates with the BT module + * + * WL_REG_ON and BT_REG_ON of the CYW43455 Wifi/BT module are driven + * by a single GPIO. We can't give GPIO control to one of the drivers, + * otherwise the other part would get unexpectedly disturbed. + */ &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32 &gpclk2_gpio43>; - status = "okay"; - - bluetooth { - compatible = "brcm,bcm43438-bt"; - max-speed = <2000000>; - }; }; /* uart1 is mapped to the pin header */ diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts index 6101026..e12938b 100644 --- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts +++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts @@ -4,6 +4,7 @@ #include "bcm2836-rpi.dtsi" #include "bcm283x-rpi-lan7515.dtsi" #include "bcm283x-rpi-usb-host.dtsi" +#include "bcm283x-rpi-wifi-bt.dtsi" / { compatible = "raspberrypi,3-model-b-plus", "brcm,bcm2837"; @@ -31,11 +32,10 @@ linux,default-trigger = "default-on"; }; }; +}; - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; - }; +&bt { + shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; }; &firmware { @@ -137,23 +137,6 @@ status = "okay"; }; -/* SDHCI is used to control the SDIO for wireless */ -&sdhci { - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&emmc_gpio34>; - status = "okay"; - bus-width = <4>; - non-removable; - mmc-pwrseq = <&wifi_pwrseq>; - - brcmf: wifi@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - }; -}; - /* SDHOST is used to drive the SD card */ &sdhost { pinctrl-names = "default"; @@ -166,13 +149,6 @@ &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32 &gpclk2_gpio43>; - status = "okay"; - - bluetooth { - compatible = "brcm,bcm43438-bt"; - max-speed = <2000000>; - shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; - }; }; /* uart1 is mapped to the pin header */ @@ -181,3 +157,7 @@ pinctrl-0 = <&uart1_gpio14>; status = "okay"; }; + +&wifi_pwrseq { + reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; +}; diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts index dd4a486..42b5383 100644 --- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts @@ -4,6 +4,7 @@ #include "bcm2836-rpi.dtsi" #include "bcm283x-rpi-smsc9514.dtsi" #include "bcm283x-rpi-usb-host.dtsi" +#include "bcm283x-rpi-wifi-bt.dtsi" / { compatible = "raspberrypi,3-model-b", "brcm,bcm2837"; @@ -24,11 +25,10 @@ gpios = <&expgpio 2 GPIO_ACTIVE_HIGH>; }; }; +}; - wifi_pwrseq: wifi-pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; - }; +&bt { + shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; }; &firmware { @@ -134,13 +134,6 @@ &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; - status = "okay"; - - bluetooth { - compatible = "brcm,bcm43438-bt"; - max-speed = <2000000>; - shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; - }; }; /* uart1 is mapped to the pin header */ @@ -150,23 +143,6 @@ status = "okay"; }; -/* SDHCI is used to control the SDIO for wireless */ -&sdhci { - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&emmc_gpio34>; - status = "okay"; - bus-width = <4>; - non-removable; - mmc-pwrseq = <&wifi_pwrseq>; - - brcmf: wifi@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - }; -}; - /* SDHOST is used to drive the SD card */ &sdhost { pinctrl-names = "default"; @@ -174,3 +150,7 @@ status = "okay"; bus-width = <4>; }; + +&wifi_pwrseq { + reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; +}; diff --git a/arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi b/arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi new file mode 100644 index 0000000..0b64cc1 --- /dev/null +++ b/arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0 + +/ { + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + }; +}; + +/* SDHCI is used to control the SDIO for wireless */ +&sdhci { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_gpio34>; + bus-width = <4>; + non-removable; + mmc-pwrseq = <&wifi_pwrseq>; + status = "okay"; + + brcmf: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; + +/* uart0 communicates with the BT module */ +&uart0 { + status = "okay"; + + bt: bluetooth { + compatible = "brcm,bcm43438-bt"; + max-speed = <2000000>; + }; +}; From patchwork Sat Aug 7 11:06:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DB0DC41537 for ; Sat, 7 Aug 2021 11:07:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24AAA60F38 for ; Sat, 7 Aug 2021 11:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232076AbhHGLHq (ORCPT ); Sat, 7 Aug 2021 07:07:46 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:33471 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232025AbhHGLHp (ORCPT ); Sat, 7 Aug 2021 07:07:45 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N5FxN-1nB8Kg3CeT-01196G; Sat, 07 Aug 2021 13:07:11 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 07/10] dt-bindings: arm: bcm2835: Add Raspberry Pi Compute Module 4 Date: Sat, 7 Aug 2021 13:06:38 +0200 Message-Id: <1628334401-6577-8-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:cpT888lEhfDA5tu7NBafHh9QaEcmTrj4OEGSxUnl0wGK9NNEDvt VhxRJINhtPwXZk/1Kmo6ppb+5G6oWHJnDoMFjMN5+LJxeEXbKA77Sq1Xh4UShemIWXsaS+G H2IH+Ak+qjVCpGUTzU8mCm3RGbvGNv0GjLWj7sc4jqwfAHpNsDTiPZx9GLfCgNMi8rcYbAq f0GSAKbQVrArRK3Wt6WTA== X-UI-Out-Filterresults: notjunk:1;V03:K0:BiNKgemfDKg=:OU8IGaX1tnIOAXVP96H0CI YHmE+EYajk2IGMXF554em+izGCW0ChDDEIzLHwbR0WDgHUv5U2X8oCaHBk1WD+hzwzOxn7PBe bdLpvR3USR4ejATZh25qN0U1zJ99oQUkQNjXrIZ2LAvekUNxr6ohkF+3RnDe8qrRuPBfz9pRD xSXu4yXSZuVVDNIIcsKBSTUJyGz1gC1yyC9zufPfBChuLkMP4INUnabOpnVaJg4TtkuJFOB7y FeHWDBbU5zEPD3MZ5oyVY5ec+meoLu4ydh0P73oYpsPo3Ym7NcXUysWKf8gtXRmpRPpaQuQzm q1akbwbesRtyXcJUY1F8A0cjWo6g5i5FZFR/iHyDqMtpCKq66bYNciRBn4/h/s7R45MIoMDW8 Ocim7n5MBnaWk7CJDIqnmg+a53tt9iHflXBvB5yDPEQ/zGkoGRFg8GL/PD0N111sknjwj03qQ HvCvcoyxKqLumTQmR0jCAT6HYEthnGXfUShW0zLPcL4ZTOb5jTe9nMDbyv4bIAWrK1MwXxQVG CgF7rTaHBmIiGJ3bJmqfOIGnHRtnwmqiH3O3WryJtvQCgmH9qqAx4rB0E37C6TXh/CKcQ5l/i mGPJnH1pA1C6iY80QYE8+Qe0lMBkMMeVJ5x0ttjlscoox9NfTT24E0A5G7Tc1sa9pf+TVapww AsoIFohalMmljQQDUWyJFqM2SPBX0Jx+DTMa9HDkWuks4WNZnABg1aygy5V/vu1kg4nzw0AB3 fHLQ4u//Y5zzrXJO00b+18UvVco0JWVGfkScu9g3F0dgRXZJTLv2/2CUC5k6/HRG8j3iHVaiU 3C7qFCVc6gCMOS/zAh/b02LffcjZpsQWFBXzLcYBfQRj5Rd6jufJR7XQo7hAQrhS2+g8++Oub 7TeF2cr68HpM/y3n7BlA== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add the Raspberry Pi Compute Module 4 to DT schema. Signed-off-by: Stefan Wahren Acked-by: Rob Herring --- Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml index 230b80d..5dc4824 100644 --- a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml +++ b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml @@ -19,6 +19,7 @@ properties: items: - enum: - raspberrypi,400 + - raspberrypi,4-compute-module - raspberrypi,4-model-b - const: brcm,bcm2711 From patchwork Sat Aug 7 11:06:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27882C432BE for ; Sat, 7 Aug 2021 11:07:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D92161075 for ; Sat, 7 Aug 2021 11:07:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232090AbhHGLHq (ORCPT ); Sat, 7 Aug 2021 07:07:46 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:46425 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231922AbhHGLHp (ORCPT ); Sat, 7 Aug 2021 07:07:45 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mr8vG-1mxCNC1BZO-00oIwV; Sat, 07 Aug 2021 13:07:12 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 08/10] ARM: dts: Add Raspberry Pi Compute Module 4 Date: Sat, 7 Aug 2021 13:06:39 +0200 Message-Id: <1628334401-6577-9-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:z1mZouUGj1KSLt6JG7gJ6hCAzcPRyIuKEXT/vaWCB1Y2RqyjMSe nCkZq6aoa+rVcFvYWAG4Bd+653W4gmCMxr0YdOa1P3qyJFd2Lin192aiaJSRDP2trBnovur OyMU4ZT/4cxazGwzR/7pc+sRq/PDOft3DAT6eOu3TF8GEVGJiOaOFb4mR5oyI1cBLtmZrts lhX2Z8CJj7+f6IzjMEN9w== X-UI-Out-Filterresults: notjunk:1;V03:K0:PeNqOCBnRQk=:95qt8Y95AMUofADrOZlbdz wdIi9Y9WY3OMKbU57QWzJrxaOV54mAnH4yeV8Cqd+SI6amQl7FC/s+lqRUehopNZD7PT8sGbd EmeHfL0+/s4kuMEkXPvm+5uWpmtq3whDAUB+RIeDu7M4phnou4bNiWODx+V2iVcZOUq3yG0sg /0vsfXfQuAis684xJ4tGs5UzzkEkKqTRsP7PNXlW5EJtJWTbSdk52MZI9lVuUOR4/KJ5zHtXc mJ4BkAaeVUu5fgtUImR9Ls1P54rTpYF2//qYALjD5vvido8KVJTC0ANxpgGNqMxkl7WE/vjNi e5VlvcI564JmO6Z5BoDT8UGpi6zlyHnPqXHTpMrNl4Kl+KO/mwVSHaVyerEmg9sMt5eBJo/Bz YdFSxAAtNbQ2XPKNAgrv4bZU187/y/Cw6vf0XioSi3thAUnSFzuexcxJIt+UH9cvWLwmM+osp z/VYE1KJGW6Z3TM1rCnkgxOeFhR/EhVtriyUpcwap68SRkLN9uvzHPRS6SG7DdcRfZIYc5qsX qj7NDnYArxvSXlxbQhfD7U5Iw4na/m2aSecNTIWpyxE4W3KWLfT3t11jb6HEs1jSOkElWhECC 7d6csQqhbIkmnuMRcQAOolUBpONcOZaqgICri7p4u8/TPNLaDieXVRGlSNSxE4KkNVbwzZgIB gqJh/am9G+i/E/Qe8XiVzwcpQhOlyFYRZuuwW1QLjBhDCFhUmRS0wioY5WLXlXSM1mm046rXT 8V56tVheJfVfNVSwyHxyNBrWCoGp0Per+KX3d9hlgMKQcwjhfxXqAg9qk9PjCQYP+BpgHAJyF KWN48ns7E3KZWGsViPo3uJeRXQhV+j499awR7CXEEgAoXMeVCAAYBO0qWduTFOAtPqtMxH8xQ pnBTgE/99uoNHg8RyU4Q== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The Raspberry Pi Compute Module 4 (CM4) are SoMs which contain the following: * BCM2711 quad core processor * up to 8 GB RAM * up to 32 GB eMMC * a GPIO expander * Gigabit PHY BCM54210PE * Wifi/BT module with internal and external antenna The eMMC and the Wifi/BT module are optional. Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi | 113 +++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi b/arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi new file mode 100644 index 0000000..a2954d4 --- /dev/null +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +#include "bcm2711.dtsi" +#include "bcm2711-rpi.dtsi" +#include "bcm283x-rpi-wifi-bt.dtsi" + +/ { + compatible = "raspberrypi,4-compute-module", "brcm,bcm2711"; + + chosen { + /* 8250 auxiliary UART instead of pl011 */ + stdout-path = "serial1:115200n8"; + }; + + sd_io_1v8_reg: sd_io_1v8_reg { + compatible = "regulator-gpio"; + regulator-name = "vdd-sd-io"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + regulator-settling-time-us = <5000>; + gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>; + states = <1800000 0x1>, + <3300000 0x0>; + status = "okay"; + }; + + sd_vcc_reg: sd_vcc_reg { + compatible = "regulator-fixed"; + regulator-name = "vcc-sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + enable-active-high; + gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>; + }; +}; + +&bt { + shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; +}; + +/* EMMC2 is used to drive the eMMC */ +&emmc2 { + bus-width = <8>; + vqmmc-supply = <&sd_io_1v8_reg>; + vmmc-supply = <&sd_vcc_reg>; + broken-cd; + /* Even the IP block is limited to 100 MHz + * this provides a throughput gain + */ + mmc-hs200-1_8v; + status = "okay"; +}; + +&expgpio { + gpio-line-names = "BT_ON", + "WL_ON", + "PWR_LED_OFF", + "ANT1", + "VDD_SD_IO_SEL", + "CAM_GPIO", + "SD_PWR_ON", + "ANT2"; + + ant1: ant1-hog { + gpio-hog; + gpios = <3 GPIO_ACTIVE_HIGH>; + /* internal antenna enabled */ + output-high; + line-name = "ant1"; + }; + + ant2: ant2-hog { + gpio-hog; + gpios = <7 GPIO_ACTIVE_HIGH>; + /* external antenna disabled */ + output-low; + line-name = "ant2"; + }; +}; + +&genet { + phy-handle = <&phy1>; + phy-mode = "rgmii-rxid"; + status = "okay"; +}; + +&genet_mdio { + phy1: ethernet-phy@0 { + /* No PHY interrupt */ + reg = <0x0>; + }; +}; + +/* uart0 communicates with the BT module */ +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>; + uart-has-rtscts; +}; + +/* uart1 is mapped to the pin header */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_gpio14>; + status = "okay"; +}; + +&wifi_pwrseq { + reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; +}; From patchwork Sat Aug 7 11:06:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0065C43214 for ; Sat, 7 Aug 2021 11:07:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CAEFA60F38 for ; Sat, 7 Aug 2021 11:07:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232049AbhHGLHw (ORCPT ); Sat, 7 Aug 2021 07:07:52 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:59711 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232081AbhHGLHr (ORCPT ); Sat, 7 Aug 2021 07:07:47 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MmUcL-1muhOb3R9V-00iWJw; Sat, 07 Aug 2021 13:07:12 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 09/10] ARM: dts: Add Raspberry Pi Compute Module 4 IO Board Date: Sat, 7 Aug 2021 13:06:40 +0200 Message-Id: <1628334401-6577-10-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:SuvEoVp7435W5whLYgSE5HM9ejCZP6s+gICbnJcaKFi3dtoja+N HrgFmDdjoUj8XUEQOLvOnMRYo5CbaAkexgZxceu4zKH5VOVY0PqD+jGVCIvvJU82U/C4Qcf niH9NlOvy6MB8znFyhFxD2Q3LeDljyravZYT8vdDXzV5FC8f+4iQqHzac/6pjYrbYXth7c8 1QWoy+waSSV7rKQBYdbnQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:HiXX+88sNd0=:I8sSy+XlbU2In3PgpwfFlc Q2CnwXP4aG8Xw0oNbhtNDkhdR5O03M8JIJJa0px7XxOuikaMoEupcUv+JEYDIWHxQxOutyWVp LxsAifjMDD+6WGze+bAIR5tF/RwaZHzhC6GBNfMC6eATQ9PP3WJYfyjPnOkPBbb+kV7AKb9ya zPFqwQv+JFkehTDlZxJEStV9299uC2bzjVZ0+dN4fG95hVrUO+/vr4NrMsC3NcZarvUW3/EaV nrKRxohfdniBXs9CYuvtLuJF2urdDlfn7viPpVrxIMgqcR2zaLhXaj0N06MNYE70XOdqrtVfY 4O59ozLH9i7CX1FhZbKzZX8wykgZ5lyg167quXGHPUYYfxCHJqsPpV1hWo5R/AgfuKg4SsdTq VKsfJZdtmVrQh2RF8K2qHqU9zXGR+xb0BI5abqTjYvsaQFgn2Jxz9TQIe1CzJbsRbrxE1vxur +3UMY/Qpae5/MPHn5MFkCalTVhizuSPAKlU06vdunt5yhS8FuuT6wl7+YpDEmExmWPb4Nk5Sd IgkPz6jsSDvqmM0ifwpRP2OWF1IgnLF4Fj4kt+8YVfidDWBGkJTOJps08+jY3/AyYGY9mC0F5 /ZhuYzAI8CCGIbA9xRjBP5eTxqtZBBPfFVy9d30wGgxHMynSw6qcZZvVYHKGkN+XMDzf9IFVL u8Vx3/nq2m2zm9RWYM75SyEfPhjt5H3fFrXpZhAArUGdwwhL+AgNsNdqCllSoZTpjYXkckPld ifOoqUTTtdo2d985Kmq1lYTRusxCY5Y+Wp2WvmKX5SrFwYrKbAKWFXEQQ29PWJDvVWs/qPNTn GSUHiYoLhfT3WJYHC1nctkXlIlfl1EgwUQ74UzZw7n+yXxBEKT4RKQntV1TEncMqoEgLPY8AL sf/V7iqtkDfM6M5M4fBw== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This adds the matching carrier for Raspberry Pi Compute Module 4. Instead of xHCI USB host controller there is just a USB 2.0 interface connected to the DWC2 controller from the BCM2711. As a result there is a free PCIe Gen 2 socket. Also there are 2 full-size HDMI 2.0 connectors. Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts | 138 +++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 863347b..d3f25b9 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -90,6 +90,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2837-rpi-cm3-io3.dtb \ bcm2711-rpi-400.dtb \ bcm2711-rpi-4-b.dtb \ + bcm2711-rpi-cm4-io.dtb \ bcm2835-rpi-zero.dtb \ bcm2835-rpi-zero-w.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \ diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts new file mode 100644 index 0000000..19600b6 --- /dev/null +++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts @@ -0,0 +1,138 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +#include "bcm2711-rpi-cm4.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" + +/ { + model = "Raspberry Pi Compute Module 4 IO Board"; + + leds { + led-act { + gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; + }; + + led-pwr { + label = "PWR"; + gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; + default-state = "keep"; + linux,default-trigger = "default-on"; + }; + }; +}; + +&ddc0 { + status = "okay"; +}; + +&ddc1 { + status = "okay"; +}; + +&gpio { + /* + * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and + * the official GPU firmware DT blob. + * + * Legend: + * "FOO" = GPIO line named "FOO" on the schematic + * "FOO_N" = GPIO line named "FOO" on schematic, active low + */ + gpio-line-names = "ID_SDA", + "ID_SCL", + "SDA1", + "SCL1", + "GPIO_GCLK", + "GPIO5", + "GPIO6", + "SPI_CE1_N", + "SPI_CE0_N", + "SPI_MISO", + "SPI_MOSI", + "SPI_SCLK", + "GPIO12", + "GPIO13", + /* Serial port */ + "TXD1", + "RXD1", + "GPIO16", + "GPIO17", + "GPIO18", + "GPIO19", + "GPIO20", + "GPIO21", + "GPIO22", + "GPIO23", + "GPIO24", + "GPIO25", + "GPIO26", + "GPIO27", + "RGMII_MDIO", + "RGMIO_MDC", + /* Used by BT module */ + "CTS0", + "RTS0", + "TXD0", + "RXD0", + /* Used by Wifi */ + "SD1_CLK", + "SD1_CMD", + "SD1_DATA0", + "SD1_DATA1", + "SD1_DATA2", + "SD1_DATA3", + /* Shared with SPI flash */ + "PWM0_MISO", + "PWM1_MOSI", + "STATUS_LED_G_CLK", + "SPIFLASH_CE_N", + "SDA0", + "SCL0", + "RGMII_RXCLK", + "RGMII_RXCTL", + "RGMII_RXD0", + "RGMII_RXD1", + "RGMII_RXD2", + "RGMII_RXD3", + "RGMII_TXCLK", + "RGMII_TXCTL", + "RGMII_TXD0", + "RGMII_TXD1", + "RGMII_TXD2", + "RGMII_TXD3"; +}; + +&hdmi0 { + status = "okay"; +}; + +&hdmi1 { + status = "okay"; +}; + +&genet { + status = "okay"; +}; + +&pixelvalve0 { + status = "okay"; +}; + +&pixelvalve1 { + status = "okay"; +}; + +&pixelvalve2 { + status = "okay"; +}; + +&pixelvalve4 { + status = "okay"; +}; + +&vc4 { + status = "okay"; +}; + +&vec { + status = "disabled"; +}; From patchwork Sat Aug 7 11:06:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12424311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A5E3C04FE3 for ; Sat, 7 Aug 2021 11:07:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16E2360C51 for ; Sat, 7 Aug 2021 11:07:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232116AbhHGLHz (ORCPT ); Sat, 7 Aug 2021 07:07:55 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:59179 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232064AbhHGLHq (ORCPT ); Sat, 7 Aug 2021 07:07:46 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1McXwD-1mid7U1zRN-00czTE; Sat, 07 Aug 2021 13:07:13 +0200 From: Stefan Wahren To: Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Adrian Hunter , Ulf Hansson Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , iivanov@suse.de, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 10/10] arm64: dts: broadcom: Add reference to RPi CM4 IO Board Date: Sat, 7 Aug 2021 13:06:41 +0200 Message-Id: <1628334401-6577-11-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> References: <1628334401-6577-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:rHO+Q0xRykZ6BQicZFKXybShSWbEZeqOxy2nEgkMFgnHmdCHpgN pmBjG635/s05Mi1P4UG9MgfiwG7vtkeTGfOGhpdhEC1M39feErxnh5sFMWyheGbegk/lS6S mp4FGHeHeZqK+JGmnUUNtNLZJSmlP5zpeLyI8O3nSIkll8tMZaWugNO7ZHIf3p+jp9T0LAx 0qSEJxVvTBsVOMQHJev9w== X-UI-Out-Filterresults: notjunk:1;V03:K0:F1bWVXoxpWs=:pu7YD8k4Doe16zkcJrUWne GB5HtuTbLz++Bsogkny7vFXLKuKLl1I2RqP1UrHYyuwMabdf34Nb25HFmZb2iRjLueV3vo6hX 11Hv7IhUuI7MJ+1bR0bYe3DE8wf18O+RfRALvIkywSNuWmLZOCIu8LudrHl1LE5+Vqs0On7zj /Kp7Cjs7kJqfGPFfoXoqiA2HtrwXCn5D6TUqGnKCc+DN04jmijVjad1/7b/RGh5HMrVBjXN6n qAMAoTkHJu86kOukBLy5dM/v2pTplJU1lG8LdXP4P93YUaIf98Oeahw1o7Ol3XGGrjPpy3JZi 1ucEtSIgDg7HO7idWkjOznrln1R7U7Gazpa0t6Vcr1H29KgTq8Ac3gZIw2qDKfCtEq5cKWNOa j2pYpT9d/E+1Wn+pao4OcAxzlGhnq372PmUAUocxGg4HpgiFbSEgvXHoPQrTE/46v64Itjem3 b0n/8/MIBdCumxGGp11rJnc0GcR1OQ0976+xs1ODMUieCbcP6wrxRtCigSZ8+kHFw27WFLKMf AnFLXkYdFWS0jfreIj81TQRkS1XJIpQkBUUHvB8a40teO1wGBD8daTABv6Fx4UtotQ89sjmFE WRmXOikhoTEXSApVStLv9InEds+x2nhUMLVk0bEhjzna7IUqtXWV5uurGiQEE9lGR3YZWxuVg vqTvnHjTERFuVPI9Xe/0g24zS36NfJK189uJsHDjiHugbBBTdhy02v6Qp37SQLqDAt6HxjeQi +w7qFbxF+K0/5ymYBJEhZEXdakD/tpptqUr5QqL70xh3KDQZ+oZ4+0xQ3LjqW8958I9U8QgC9 yXdIC2Gg3Jtb+bTiBfvYJhGC5XCl6KyR0+qSUIbtOWt1Kv60LFfo40ETMeA5cdIuohMpaHS+Y Vl4KXx75HYr8989MjdLQ== Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org This adds a reference to the dts of the Raspberry Pi Compute Module 4 IO Board, so we don't need to maintain the content in arm64. Signed-off-by: Stefan Wahren --- arch/arm64/boot/dts/broadcom/Makefile | 1 + arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile index 11eae3e..c688203 100644 --- a/arch/arm64/boot/dts/broadcom/Makefile +++ b/arch/arm64/boot/dts/broadcom/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \ bcm2711-rpi-4-b.dtb \ + bcm2711-rpi-cm4-io.dtb \ bcm2837-rpi-3-a-plus.dtb \ bcm2837-rpi-3-b.dtb \ bcm2837-rpi-3-b-plus.dtb \ diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts new file mode 100644 index 0000000..e36d395 --- /dev/null +++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts @@ -0,0 +1,2 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "arm/bcm2711-rpi-cm4-io.dts"