From patchwork Mon Aug 27 18:05:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10577451 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 D739E920 for ; Mon, 27 Aug 2018 18:07:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2C9029F6C for ; Mon, 27 Aug 2018 18:07:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B510A29FD7; Mon, 27 Aug 2018 18:07:36 +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,RCVD_IN_DNSWL_NONE 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 2154B29F6C for ; Mon, 27 Aug 2018 18:07:36 +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=8u1bu9ECQ5QQM1XD5PX7wrCPvKxhKDM12/K012N5ZI8=; b=QQKgp61NbR58CKGnKm0jKoeoaY 8mLWStk3hhLsYR4N+oK+7tWPHTJw/nkZAZvDx60vghnvwStzlmaP9ENZLK1v3e2tzohwn0JBp2wG+ Jf/xQo9ZnI2TGUKQgFWA5vbHUIHK9fMXeYzsoImMUBG9QZeKZGWGEDxt7R2ntyzxZyRw0Ar46mP3H lduo2RtGqWT9aQc2xHT24rr0ruE/OTnDhAK3qLuFjJZp3yvxZ/6BrGwdGr/sapebwcJ2HupY8eJdX GcfGkrnN3OeLbZSajEHI4BMoxiTFbHjS01OZmvG5nITHYSp6g7+aBcOAtkcILydL2+G1NfmO4zsUz JHBACgBg==; 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 1fuLvD-0004Ex-0E; Mon, 27 Aug 2018 18:07:27 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuLud-0003xY-35; Mon, 27 Aug 2018 18:06:52 +0000 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LZjFg-1fV8xe2gCi-00lTRf; Mon, 27 Aug 2018 20:06:30 +0200 From: Stefan Wahren To: Florian Fainelli Subject: [PATCH V2 2/3] ARM: dts: add Raspberry Pi Compute Module 3 and IO board Date: Mon, 27 Aug 2018 20:05:47 +0200 Message-Id: <1535393148-24163-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535393148-24163-1-git-send-email-stefan.wahren@i2se.com> References: <1535393148-24163-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:fnZB8sbllX3eVPXSUanQW7CA3IK/MMbpb2+9oOVKVr4oTtI/rsg vPlcD6lXZtvBeufudIzDpIZV4Dp+dOhI7of98+RcigFBcTT5j6mRAkU2/q718fEfLKVyCMa FoJHO+sbWVSYABLI7u2Dt8HTB0E1OsfZu9d+BYK/UGdfjcQMVlFKkQZ0S5Cus9TzvrJxCmR ebXq6+q5VsQtrGXxjJOAg== X-UI-Out-Filterresults: notjunk:1;V01:K0:2nhFgc1xLMw=:2a2dYyECTPjpaWR9sWYaOC voZTDLUYLTJuFZxKC3YGqm56k6wENEX9RfJobjAAWAq8cZ3540dXJ6BynvQ2wptRhkafgZiWC 9Y72r6jClES3hxNxRNLFM5JK/PQL/lPHC5zRrDilv6gyItXPq3Cp9wN9nYDIDJkjjlyaJL3E8 CjNpOq/TY3OKe3boHqr+uw7z00pb7np1pt1e2Nk6PGT2RtwNl2vuzD2L5V1hFor/rYpkdF4hu 8lhMxGMXvpkFAPXGC0rnuQb8Ln5Vzmy2cmLkXwXCFkJS78ul1OuFJ/tEv4SrqHGaWXdLn9r9p s06C2T2/BgZRMeYC+PR6vs9czS6Sgmpauya9RUjao+ZR6UAM96/92Ex4RWlm5ooZMFlZEkBSR 08ResvuuPKCca+vvqcZXvCzoTuZKIEIN+j3fblLE8MEn6vjxVa3HOF9KoVgsK5HSMEtVgKvG4 cYlAP2dOweC1AFGkjddQtR5Ur+MV5EfAvNYsMzwxTh+L5c16XcRnFbrqBWRiWUyEgtc1Y+tl/ GNaG86a0RYsBO2rthkYgJEwTlunsV1t7B0Ij/Mu4wrd89GVLtpX451GGYQggNBsdxclLPKRkI 8PRvJzFI4SKKehxE3PtDQEhdVYhrD0qEYmoAsdOMHYrtg6N+8kYMmUt9LEwhhR3giu6qLpFmW 1w++Ye3KuPdNwcho7iXIdbTRp+iIuiOCUvRxGMcHIJap2Izt04u1Qn8yGMyg6HHsG52U= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180827_110651_435049_EC302D48 X-CRM114-Status: GOOD ( 22.03 ) 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: Mark Rutland , devicetree@vger.kernel.org, Arnd Bergmann , Scott Branden , Ray Jui , Stefan Wahren , Phil Elwell , Alexander Graf , Eric Anholt , Rob Herring , 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 ++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts create mode 100644 arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi 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"; +};