From patchwork Sat Aug 4 11:10:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10555669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C193F13AC for ; Sat, 4 Aug 2018 11:11:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7C0E29F4E for ; Sat, 4 Aug 2018 11:11:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B32A2A26D; Sat, 4 Aug 2018 11:11:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8DFE929F4E for ; Sat, 4 Aug 2018 11:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ShUmysGzPw/O5c9U5PipY8QpPIr7o0x1rh6Jt+yNWrI=; b=KAWx1p3MvRAGGl8QLTE7dl/CuY 7JCjx/aZ1bHa5Iu5RRp4/WcBMV7GWlqsRG2Mjuf2Wq4dZRWeNSN2+/FPA0/cn32w+phDybrsiy4+7 /JvhrrtofxFuWECMJwnBw7l5T/xeKpvljc/BexgCbCKx1RoaBUVHB9LcLewRwp9RQ+PGTJOjc7boD tv4OVktm2kkO0+d0EZOltaUY7lXUgTNQw8nOLc6lPpNEaoBHQ9/yv9m/N9klFqOaDy24wlGufhDKj eV6br8bsKcXopGYQc7p/l+G0jGf0eLDouoJT+yqI/rjtHlQspzOECx96OK5wzjF818XA6DxxgLSS6 LexAhIKQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fluTP-0002Km-NH; Sat, 04 Aug 2018 11:11:51 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fluTF-0002BB-6e; Sat, 04 Aug 2018 11:11:43 +0000 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MgJWc-1fYFiy3zhG-00Nf8E; Sat, 04 Aug 2018 13:11:19 +0200 From: Stefan Wahren To: Rob Herring , Mark Rutland , Eric Anholt Subject: [PATCH 2/2] ARM: dts: add Raspberry Pi Compute Module 3 and IO board Date: Sat, 4 Aug 2018 13:10:03 +0200 Message-Id: <1533381003-13367-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533381003-13367-1-git-send-email-stefan.wahren@i2se.com> References: <1533381003-13367-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:ueEylXHm+3VK0FmzL8YMfm/LPnoX+mCWr0fR3D9iHwz/mFF3I4B CtahxChGFmEpnN4fvzAr0QjqO/tA1/ypncJJ920+L5KfD5EowgX45gkMSaix5mW4Yha6vNj D/oulYKPDhKXwYT3r+pRhUkxqTacRGIU+FUcnB+sLxUiXJ5lmgwNXJ7HISPaqEXsVurINK4 RkmsUFU1WJi1xsfZ6POBw== X-UI-Out-Filterresults: notjunk:1;V01:K0:8rZ2yNPSLys=:O56qpdoyNc4xq41toK4FUv zCCtpYSOD3zvlkCjZEOJlau8AALV+Zz5WcCtf+d40+0lSluG41DStGh54z2G8thhSqWSqBv2k 3sDYwemwMrCEAc8FR5ktCuSjezQY6XRlSseKyPbpJQl2VquF1S3T332f7xfeGNzdhTBK9n+rX fsAKozhXNOe5CYr+Xh+Gelbes+1eagZ+Da4EBDGQag14/w8DpLS9fZNvvOPidw0C9cQKsvybr RHlamyCjBFXLQt0VTXborCy8kNVYIoba9scMDdTIYs9d1xMk99KSIrPCOuvP+iMslbYOURY3q KwQ0vdb4FVU5powCvUBvDgtjnXn0KlnFmvOVVElmwi33rb30xyrjitrkEKlzj/SUSUh/UWhRM ue/TPiHuvyH/5LY+plp+TlX0DY6iVtzoU8Xa1BzIXMq6s7rG6GLZE+R6dGxDlsiSSl7h90iuc WZjFeDcim+ztkdM3amqx2UJem1tmEuM3ZOOnpEgu/zXFSkSoxIRBhXt3zzjbVL49Iw4gQFc/b nCm8wo3KFO4aGYzTtRi0cLR3ngOCKsWIPh27V8kPK1J9o3mR61Crd+GdeJKMpI4MSlm032xqG lIjZp9jDVgs0YKy2d/eyJf3TRSe5Bhhaxiaqyq9UBKjbXtqp2S4dBxtqQ6hm3rpqP4vY5mogC xVECChz37tpRitXdLGJjDsKYyk+5ozIrPi8GuOdA/POZFi6kTSeblkOjcOKH031w4JN0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180804_041141_547439_4FE49318 X-CRM114-Status: GOOD ( 21.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , devicetree@vger.kernel.org, Florian Fainelli , Scott Branden , Arnd Bergmann , Ray Jui , Phil Elwell , Alexander Graf , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Raspberry Pi Compute Module 3 (CM3) and the Raspberry Pi Compute Module 3 Lite (CM3L) are SoMs which contains a BCM2837 processor, 1 GB RAM and a GPIO expander. The CM3 has a 4 GB eMMC, but on the CM3L the eMMC is unpopulated and it's up to the user to connect their own SD/MMC device. The dtsi file is designed to work for both modules. There is also a matching carrier board which is called Compute Module IO Board V3. Signed-off-by: Stefan Wahren --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts | 87 ++++++++++++++++++++++ arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 52 +++++++++++++ arch/arm64/boot/dts/broadcom/Makefile | 3 +- .../boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts | 2 + 5 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts create mode 100644 arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index b5bd3de..35c749f 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -81,6 +81,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2836-rpi-2-b.dtb \ bcm2837-rpi-3-b.dtb \ bcm2837-rpi-3-b-plus.dtb \ + bcm2837-rpi-cm3-io3.dtb \ bcm2835-rpi-zero.dtb \ bcm2835-rpi-zero-w.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \ diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts b/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts new file mode 100644 index 0000000..6c8233a --- /dev/null +++ b/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +#include "bcm2837-rpi-cm3.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" + +/ { + compatible = "raspberrypi,3-compute-module", "brcm,bcm2837"; + model = "Raspberry Pi Compute Module 3 IO board V3.0"; +}; + +&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 = "GPIO0", + "GPIO1", + "GPIO2", + "GPIO3", + "GPIO4", + "GPIO5", + "GPIO6", + "GPIO7", + "GPIO8", + "GPIO9", + "GPIO10", + "GPIO11", + "GPIO12", + "GPIO13", + "GPIO14", + "GPIO15", + "GPIO16", + "GPIO17", + "GPIO18", + "GPIO19", + "GPIO20", + "GPIO21", + "GPIO22", + "GPIO23", + "GPIO24", + "GPIO25", + "GPIO26", + "GPIO27", + "GPIO28", + "GPIO29", + "GPIO30", + "GPIO31", + "GPIO32", + "GPIO33", + "GPIO34", + "GPIO35", + "GPIO36", + "GPIO37", + "GPIO38", + "GPIO39", + "GPIO40", + "GPIO41", + "GPIO42", + "GPIO43", + "GPIO44", + "GPIO45", + "GPIO46", + "GPIO47", + /* Used by eMMC */ + "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 = <&expgpio 1 GPIO_ACTIVE_LOW>; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio14>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi new file mode 100644 index 0000000..7b7ab6a --- /dev/null +++ b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +#include "bcm2837.dtsi" +#include "bcm2835-rpi.dtsi" + +/ { + memory { + reg = <0 0x40000000>; + }; + + reg_3v3: fixed-regulator { + compatible = "regulator-fixed"; + regulator-name = "3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + reg_1v8: fixed-regulator { + compatible = "regulator-fixed"; + regulator-name = "1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; +}; + +&firmware { + expgpio: gpio { + compatible = "raspberrypi,firmware-gpio"; + gpio-controller; + #gpio-cells = <2>; + gpio-line-names = "HDMI_HPD_N", + "EMMC_EN_N", + "NC", + "NC", + "NC", + "NC", + "NC", + "NC"; + status = "okay"; + }; +}; + +&sdhost { + pinctrl-names = "default"; + pinctrl-0 = <&sdhost_gpio48>; + bus-width = <4>; + vmmc-supply = <®_3v3>; + vqmmc-supply = <®_1v8>; + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile index 1193a9e..3d98f5f 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) += bcm2837-rpi-3-b.dtb \ - bcm2837-rpi-3-b-plus.dtb + bcm2837-rpi-3-b-plus.dtb \ + bcm2837-rpi-cm3-io3.dts subdir-y += northstar2 subdir-y += stingray diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts new file mode 100644 index 0000000..b1c4ab2 --- /dev/null +++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts @@ -0,0 +1,2 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "arm/bcm2837-rpi-cm3-io3.dts"