From patchwork Thu Nov 20 10:52:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 5347441 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 11416C11AC for ; Thu, 20 Nov 2014 10:55:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D5E12021B for ; Thu, 20 Nov 2014 10:55:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 28F5B2018E for ; Thu, 20 Nov 2014 10:55:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XrPMp-0000WR-QO; Thu, 20 Nov 2014 10:53:39 +0000 Received: from mail.kernel.org ([198.145.19.201]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XrPMl-0000CN-Rs for linux-arm-kernel@lists.infradead.org; Thu, 20 Nov 2014 10:53:36 +0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 525642018E; Thu, 20 Nov 2014 10:53:13 +0000 (UTC) Received: from localhost.localdomain (host86-177-158-220.range86-177.btcentralplus.com [86.177.158.220]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 58A1020131; Thu, 20 Nov 2014 10:53:11 +0000 (UTC) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: bcm2835: Add device tree for Raspberry Pi model B+ Date: Thu, 20 Nov 2014 10:52:45 +0000 Message-Id: <1416480765-13449-1-git-send-email-lee@kernel.org> X-Mailer: git-send-email 1.9.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141120_025336_020884_0D5FF657 X-CRM114-Status: GOOD ( 13.40 ) X-Spam-Score: -5.0 (-----) Cc: arm@kernel.org, Lee Jones , Matthias Klein X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 From: Matthias Klein The model B and B+ differ in the GPIO lines for ACT and PWR leds, and the I2S interface. Signed-off-by: Matthias Klein Tested-by: Stephen Warren Signed-off-by: Lee Jones --- As requested by Arnd. arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 30 +++++++++++++++++++ arch/arm/boot/dts/bcm2835-rpi-b.dts | 46 ++-------------------------- arch/arm/boot/dts/bcm2835-rpi.dtsi | 51 ++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 43 deletions(-) create mode 100644 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts create mode 100644 arch/arm/boot/dts/bcm2835-rpi.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 38c89ca..cbf7db6 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -54,6 +54,7 @@ dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb +dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b-plus.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \ diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts new file mode 100644 index 0000000..e479515 --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts @@ -0,0 +1,30 @@ +/dts-v1/; +/include/ "bcm2835-rpi.dtsi" + +/ { + compatible = "raspberrypi,model-b-plus", "brcm,bcm2835"; + model = "Raspberry Pi Model B+"; + + leds { + act { + gpios = <&gpio 47 0>; + }; + + pwr { + label = "PWR"; + gpios = <&gpio 35 0>; + default-state = "keep"; + linux,default-trigger = "default-on"; + }; + }; +}; + +&gpio { + pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>; + + /* I2S interface */ + i2s_alt0: i2s_alt0 { + brcm,pins = <18 19 20 21>; + brcm,function = <4>; /* alt0 */ + }; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts index 58a0d60..bafa46f 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts @@ -1,63 +1,23 @@ /dts-v1/; -/include/ "bcm2835.dtsi" +/include/ "bcm2835-rpi.dtsi" / { compatible = "raspberrypi,model-b", "brcm,bcm2835"; model = "Raspberry Pi Model B"; - memory { - reg = <0 0x10000000>; - }; - leds { - compatible = "gpio-leds"; - act { - label = "ACT"; gpios = <&gpio 16 1>; - default-state = "keep"; - linux,default-trigger = "heartbeat"; }; }; }; &gpio { - pinctrl-names = "default"; - pinctrl-0 = <&gpioout &alt0 &alt2 &alt3>; - - gpioout: gpioout { - brcm,pins = <6>; - brcm,function = <1>; /* GPIO out */ - }; - - alt0: alt0 { - brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>; - brcm,function = <4>; /* alt0 */ - }; - - alt3: alt3 { - brcm,pins = <48 49 50 51 52 53>; - brcm,function = <7>; /* alt3 */ - }; + pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>; /* I2S interface */ - alt2: alt2 { + i2s_alt2: i2s_alt2 { brcm,pins = <28 29 30 31>; brcm,function = <6>; /* alt2 */ }; }; - -&i2c0 { - status = "okay"; - clock-frequency = <100000>; -}; - -&i2c1 { - status = "okay"; - clock-frequency = <100000>; -}; - -&sdhci { - status = "okay"; - bus-width = <4>; -}; diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi new file mode 100644 index 0000000..c706448 --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi @@ -0,0 +1,51 @@ +/include/ "bcm2835.dtsi" + +/ { + memory { + reg = <0 0x10000000>; + }; + + leds { + compatible = "gpio-leds"; + + act { + label = "ACT"; + default-state = "keep"; + linux,default-trigger = "heartbeat"; + }; + }; +}; + +&gpio { + pinctrl-names = "default"; + + gpioout: gpioout { + brcm,pins = <6>; + brcm,function = <1>; /* GPIO out */ + }; + + alt0: alt0 { + brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>; + brcm,function = <4>; /* alt0 */ + }; + + alt3: alt3 { + brcm,pins = <48 49 50 51 52 53>; + brcm,function = <7>; /* alt3 */ + }; +}; + +&i2c0 { + status = "okay"; + clock-frequency = <100000>; +}; + +&i2c1 { + status = "okay"; + clock-frequency = <100000>; +}; + +&sdhci { + status = "okay"; + bus-width = <4>; +};