From patchwork Tue Feb 1 17:27:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12732078 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1E520C433EF for ; Tue, 1 Feb 2022 17:28:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id C97E3C340EE; Tue, 1 Feb 2022 17:28:24 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 3258AC340ED; Tue, 1 Feb 2022 17:28:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 3258AC340ED Authentication-Results: smtp.kernel.org; dmarc=none (p=none dis=none) header.from=i2se.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=i2se.com Received: from localhost.localdomain ([37.4.249.169]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MowbA-1mS6zq0FAM-00qPtn; Tue, 01 Feb 2022 18:28:12 +0100 From: Stefan Wahren To: Rob Herring , Florian Fainelli , Nicolas Saenz Julienne List-Id: Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Arnd Bergmann , Olof Johansson , Phil Elwell , devicetree@vger.kernel.org, soc@kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 1/3] dt-bindings: arm: bcm2835: Add Raspberry Pi Zero 2 W Date: Tue, 1 Feb 2022 18:27:45 +0100 Message-Id: <1643736467-17764-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1643736467-17764-1-git-send-email-stefan.wahren@i2se.com> References: <1643736467-17764-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:qr6V6I+2EcTePhk4gEKDRcYEC4ApGXxDQy+o63pmeAZeoLnxISW BpAhXfpNW5BB95xLHD/BUYh/OoQdGARATNCjw6XOHXKQs+DuyejUTwcjc7sIDeWU7jH7cQl laGMXXOGBD5zUriyJ2wNwh2xKy6xlQcShRi6FaZDNvDvw0OKmohot/fYomO6DqRML+KixUB 3Jx0bsaGlDrpQuTfbj1Ow== X-UI-Out-Filterresults: notjunk:1;V03:K0:jdKjzavzWBI=:kcGe48fEQ+Q5DhWuFggG19 Mln3O/VIiQ9YUJx+wcvIGmQVHRfqWWle9WndSSXvBfo8K8FeV6ng9iH5E9BZP+tsg6/vhLwVn c/QBT7FrMaff8buvwMdAC1RTe6URmJGhTmw2SS5h1edfLCv5XyJ9zF5bQlg+cQm2RgYNLx84K e7xWNDzKpnWVUeUhQzO9x7vOry1Fs3guN5rPtxLHD96ahw5h1zrai5RBkFKoKB927XVJkXYd9 96VxTmOETnqGEqWKTt5VuUoPMy//wcLNOFJLBXP9PxHnEjBZs5Tr9fUC1VmqWx2YqZNJZLEux mh7AvgQOBe9c2ELvHgkO2/f4skYwtjfwrL6bRr7uJ+PGJqgKrIDlkHXxlaYdhlTfaTHTEYVTr XtNbB9YhMLrKCgzu96EgijhTIb/146MxXjj+QyaDjT5tPeCzfFs0PtkVYWzgnKc7YXrbBMm9+ HGcvdNhvWRpPK3+Wsxl6EjEZ9U9o/0AcA5wI3HX2IlvAZCAsWBC4AQJ4OhxBWAaXLCtabo7Br 2/LuhWov9NYoU+81vmbdrEHD8XKnvvpx3j7lRBbme0uLZd8BkECkMqUfft7szhAmWsmxEa4Il LNzpTvfxd1Ikh+NY0AFLBYD0uWVpkXLy5xyzpO4NGq+ol0kiqz9qUcBbglhuKgheYdJL6RiLZ lUA1/uUAj9zyzVZ4ihB3zi97u268HqxbxHo6nKpEvbMpLXiQRfbwLhHR1rq/b4HcOd5CJe7z0 T6YQ6yv4uzUhMCip Add the Raspberry Pi Zero 2 W 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 5dc4824..8051a75 100644 --- a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml +++ b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml @@ -51,6 +51,7 @@ properties: - raspberrypi,3-model-b-plus - raspberrypi,3-compute-module - raspberrypi,3-compute-module-lite + - raspberrypi,model-zero-2-w - const: brcm,bcm2837 additionalProperties: true From patchwork Tue Feb 1 17:27:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12732079 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 52AA5C433FE for ; Tue, 1 Feb 2022 17:28:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 2716EC340F4; Tue, 1 Feb 2022 17:28:25 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 4486FC340EB; Tue, 1 Feb 2022 17:28:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 4486FC340EB Authentication-Results: smtp.kernel.org; dmarc=none (p=none dis=none) header.from=i2se.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=i2se.com Received: from localhost.localdomain ([37.4.249.169]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Md66H-1mgAIR2Egl-00aCE6; Tue, 01 Feb 2022 18:28:12 +0100 From: Stefan Wahren To: Rob Herring , Florian Fainelli , Nicolas Saenz Julienne List-Id: Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Arnd Bergmann , Olof Johansson , Phil Elwell , devicetree@vger.kernel.org, soc@kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 2/3] ARM: dts: Add Raspberry Pi Zero 2 W Date: Tue, 1 Feb 2022 18:27:46 +0100 Message-Id: <1643736467-17764-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1643736467-17764-1-git-send-email-stefan.wahren@i2se.com> References: <1643736467-17764-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:5N4koCStL57Z+yDGLpr/nE4J/nbJUku+HoCjThPavhRjpU4WS4R AvFDNcOjWzizNZFag/vguuJxVECuawTQt0D8sXOTX5Y4S01A0cmfPmB8avfJUIVT75bfbCL mvh/jM3Wu91veA3IlSqaL41B1zW7Cs8q8d9Hmj9Vw1WeBJM0eSjxjE6BzNLsGGWfgxp5atI +pv0JILooqFR88SdeLLfQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:iZ5uyo5FviI=:vpfXj0Iv5Yjs28agoRz0+a M5GqMPUhazzXpyscY1tXxvK7/zacOwH2kxFClZfOXm6L1i2NkrgSodCkiY+hejmCIw07ZZBla aDcQB7nz9+eWg0N6YZ86pS1kDTn/COjLVNO3dLVP/+dNnH2mKA18zhQoFYtxdNhb+BazjQCzq MIO/yqLZEZQJHW2ct69lj/9HfFw+CyFKv2AC60MVNrBGdtElKJbV6uxFFD3c/J2DQ+c/8WPO1 bab4LSLIyoVxvjCQMJDSg9vhWGDijMv1Y/NlHuF8cHUtFuVBeXyD9LLzCtbYJCyAcYRdjM/dN qbqDpaQKSFqCOEsPXEbdaMA7u2PEyVzJp7DTwgWVDAliaNU2C4+Wac6yiby9J77SfZFwGWZMr pgfq2zcgPdwuQ0vwRvnipiN1YpO07nS7gccRW6JyOmvvxCk/WqmcBY3YuiqWWLjHkMAB2x+v1 cQ/rKOKwsSrarUY+qaeoWNZpGHXMVx0wIAmDvP6bfouDUShiJoduKpT6jCCFbLm2DUwykR7K3 fI1DcknY6Q5bXtzokGwSKkzoV9qKSJHCXQX5D2u9znfoAnRq7nfgoZofIR8krflQWzn4MxxIQ 8/In7+D/I0PCvWnC+9XjGkDg614B5mNSeV3He5bhyUFVK2JICyMYEBWLG+hK1pRsEKSNDkYtf Skb+sgMUO1mr92SupY+NAQxbzu+ncZlRQNpLNwSFfQg15DLWw/3Zoq285uPjBadw7YOjO0JjK nHFTCwZk18K031XL The Raspberry Pi Zero 2 W mostly bases on the Raspberry Pi Zero W with the following differences: * Broadcom BCM2710A1, quad-core 64-bit SoC @ 1 GHz * Synaptics BCM43436 (reported as BCM43430B0) IEEE 802.11b/g/n wireless LAN Contrary to the Raspberry Pi 3 boards there is no GPIO expander. Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts | 136 +++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 235ad55..fe31d14 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -93,6 +93,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2837-rpi-3-b.dtb \ bcm2837-rpi-3-b-plus.dtb \ bcm2837-rpi-cm3-io3.dtb \ + bcm2837-rpi-zero-2-w.dtb \ bcm2711-rpi-400.dtb \ bcm2711-rpi-4-b.dtb \ bcm2711-rpi-cm4-io.dtb \ diff --git a/arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts b/arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts new file mode 100644 index 0000000..4a76856 --- /dev/null +++ b/arch/arm/boot/dts/bcm2837-rpi-zero-2-w.dts @@ -0,0 +1,136 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2022 Stefan Wahren + */ + +/dts-v1/; +#include "bcm2837.dtsi" +#include "bcm2836-rpi.dtsi" +#include "bcm283x-rpi-usb-otg.dtsi" +#include "bcm283x-rpi-wifi-bt.dtsi" + +/ { + compatible = "raspberrypi,model-zero-2-w", "brcm,bcm2837"; + model = "Raspberry Pi Zero 2 W"; + + memory@0 { + device_type = "memory"; + reg = <0 0x20000000>; + }; + + chosen { + /* 8250 auxiliary UART instead of pl011 */ + stdout-path = "serial1:115200n8"; + }; + + leds { + led-act { + gpios = <&gpio 29 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&bt { + shutdown-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; +}; + +&gpio { + /* + * This is based on the official GPU firmware DT blob. + * + * Legend: + * "NC" = not connected (no rail from the SoC) + * "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 */ + "TXD0", + "RXD0", + "GPIO16", + "GPIO17", + "GPIO18", + "GPIO19", + "GPIO20", + "GPIO21", + "GPIO22", + "GPIO23", + "GPIO24", + "GPIO25", + "GPIO26", + "GPIO27", + "HDMI_HPD_N", + "STATUS_LED_N", + "NC", /* GPIO30 */ + "NC", /* GPIO31 */ + "NC", /* GPIO32 */ + "NC", /* GPIO33 */ + "NC", /* GPIO34 */ + "NC", /* GPIO35 */ + "NC", /* GPIO36 */ + "NC", /* GPIO37 */ + "NC", /* GPIO38 */ + "NC", /* GPIO39 */ + "CAM_GPIO0", /* GPIO40 */ + "WL_ON", /* GPIO41 */ + "BT_ON", /* GPIO42 */ + "WIFI_CLK", /* GPIO43 */ + "SDA0", /* GPIO44 */ + "SCL0", /* GPIO45 */ + "SMPS_SCL", + "SMPS_SDA", + /* Used by SD Card */ + "SD_CLK_R", + "SD_CMD_R", + "SD_DATA0_R", + "SD_DATA1_R", + "SD_DATA2_R", + "SD_DATA3_R"; + + pinctrl-0 = <&gpioout &alt0>; +}; + +&hdmi { + hpd-gpios = <&gpio 28 GPIO_ACTIVE_LOW>; + power-domains = <&power RPI_POWER_DOMAIN_HDMI>; + status = "okay"; +}; + +&sdhci { + pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>; +}; + +&sdhost { + pinctrl-names = "default"; + pinctrl-0 = <&sdhost_gpio48>; + bus-width = <4>; + status = "okay"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio32 &uart0_ctsrts_gpio30>; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_gpio14>; + status = "okay"; +}; + +&wifi_pwrseq { + reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>; +}; From patchwork Tue Feb 1 17:27:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12732081 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 30CF1C433EF for ; Tue, 1 Feb 2022 17:28:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 1FA6AC340EE; Tue, 1 Feb 2022 17:28:33 +0000 (UTC) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 0349DC340ED; Tue, 1 Feb 2022 17:28:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 0349DC340ED Authentication-Results: smtp.kernel.org; dmarc=none (p=none dis=none) header.from=i2se.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=i2se.com Received: from localhost.localdomain ([37.4.249.169]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MX0TX-1mha7A0Zj7-00XMoK; Tue, 01 Feb 2022 18:28:13 +0100 From: Stefan Wahren To: Rob Herring , Florian Fainelli , Nicolas Saenz Julienne List-Id: Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Arnd Bergmann , Olof Johansson , Phil Elwell , devicetree@vger.kernel.org, soc@kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 3/3] arm64: dts: broadcom: Add reference to RPi Zero 2 W Date: Tue, 1 Feb 2022 18:27:47 +0100 Message-Id: <1643736467-17764-4-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1643736467-17764-1-git-send-email-stefan.wahren@i2se.com> References: <1643736467-17764-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:SNEJNs6YGwPtyDb+zpnlpozFTxgkUv9qPG3TM4hpeH5KH/luNep +KXXTjvhbtZzhW/qnqfACvpTsIvraxFKCwo/U7tkeaeTEHcbCHX6WzampWTVcVlO1QjZBBK yEEBcCbPhjWlaMrZ2uhjyELp9ohKOaFUee0EWaeKCtJEDhkHZRmma8rVyi6PPwlLXPmqNmr 8pIvcHmaDrxc6fRBxmd8Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:GXn5l1VXBBI=:A3qY9z/9xXCvrnRCL63H4n eQKyEOTqDdmjGg+uZmnVSaGCa86EtOluWYGzrqF7+DYr+TaAKq7+5g+LG7RRVGhJ7k0xduePR B854dAxNkKRrYDT09ucoP6sgypZQeNlRr4/JV61h9Mqfa+qKwm90BRY9YskbqVUaAACNyLrlM ziNVIwD6IuWHWL+7JNXWpQuYUXFztW+4D5VqbWk/5ysc0vGBJuuJAKvjR/nmmF3I6dVxy1l0B MNvWL93+0k1ffUntVx7K0hfH3HT/0PcxX9ftjnT8q8kmNpkQy2SIIFAB9Z5ZpyLPElrwWzUns W8wGpEQp7K6yYfQ18TG/h2ipMG3O3W3Nzis3WE7b7k2O21gMBwMNN1921sZFnfVYLF4Glx6RC BC9RbPIE9B1FaZzhSOXW4cN9QI1/yzhyPIUEUsntFPYmGiINmf6hKehqHiYDQsKiOxRkPzVHr /oZGZLFMtWpUJGjTruEBZHWIDoh1eWL7cJVUaG5gJ+6tlkIuMN979Pczb2XFMTPbTuhNdTENH lqAoyuWqpe04SeLXNkz9xb3J3mQIWSiqEqgg8aaUbdKnYeVF2rqKmW/YCbUsrKX9fKeRB1x85 54ocuQos0ZPERl0Ax0+8I9v882kP9gXYV3em5a74Fb9bwi2w48tDy63pfNbJ7m9WS3fcBdiDS ZZ5yrpcBZDGNMKcEocJkLMwfkPUFYy5+BPoYUOgFCb8Ggxr0dw+WBeA9DGgOtwhBglV5Zlygv B1ihduVrWqBzDFb6 This adds a reference to the dts of the Raspberry Pi Zero 2 W, so we don't need to maintain the content in arm64. Signed-off-by: Stefan Wahren --- arch/arm64/boot/dts/broadcom/Makefile | 3 ++- arch/arm64/boot/dts/broadcom/bcm2837-rpi-zero-2-w.dts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-zero-2-w.dts diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile index c688203..5082fcd 100644 --- a/arch/arm64/boot/dts/broadcom/Makefile +++ b/arch/arm64/boot/dts/broadcom/Makefile @@ -5,7 +5,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \ bcm2837-rpi-3-a-plus.dtb \ bcm2837-rpi-3-b.dtb \ bcm2837-rpi-3-b-plus.dtb \ - bcm2837-rpi-cm3-io3.dtb + bcm2837-rpi-cm3-io3.dtb \ + bcm2837-rpi-zero-2-w.dtb subdir-y += bcm4908 subdir-y += northstar2 diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-zero-2-w.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-zero-2-w.dts new file mode 100644 index 0000000..307ae69 --- /dev/null +++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-zero-2-w.dts @@ -0,0 +1,2 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "arm/bcm2837-rpi-zero-2-w.dts"