From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 14/20] arm: rpi: Bring in kernel device tree files
Date: Tue, 7 Jul 2015 20:53:46 -0600 [thread overview]
Message-ID: <1436324032-17931-15-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1436324032-17931-1-git-send-email-sjg@chromium.org>
Bring in the device tree files from Linux v4.1.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/arm/dts/Makefile | 2 +
arch/arm/dts/bcm2835-rpi-b.dts | 23 ++++
arch/arm/dts/bcm2835-rpi.dtsi | 51 +++++++++
arch/arm/dts/bcm2835.dtsi | 192 ++++++++++++++++++++++++++++++++++
include/dt-bindings/pinctrl/bcm2835.h | 27 +++++
5 files changed, 295 insertions(+)
create mode 100644 arch/arm/dts/bcm2835-rpi-b.dts
create mode 100644 arch/arm/dts/bcm2835-rpi.dtsi
create mode 100644 arch/arm/dts/bcm2835.dtsi
create mode 100644 include/dt-bindings/pinctrl/bcm2835.h
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 9c735c6..b284a2d 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -49,6 +49,8 @@ dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \
zynq-zc770-xm013.dtb
dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb
+dtb-$(CONFIG_ARCH_BCM283X) += bcm2835-rpi-b.dtb
+
dtb-$(CONFIG_ARCH_SOCFPGA) += \
socfpga_arria5_socdk.dtb \
socfpga_cyclone5_socdk.dtb \
diff --git a/arch/arm/dts/bcm2835-rpi-b.dts b/arch/arm/dts/bcm2835-rpi-b.dts
new file mode 100644
index 0000000..ee89b79
--- /dev/null
+++ b/arch/arm/dts/bcm2835-rpi-b.dts
@@ -0,0 +1,23 @@
+/dts-v1/;
+#include "bcm2835-rpi.dtsi"
+
+/ {
+ compatible = "raspberrypi,model-b", "brcm,bcm2835";
+ model = "Raspberry Pi Model B";
+
+ leds {
+ act {
+ gpios = <&gpio 16 1>;
+ };
+ };
+};
+
+&gpio {
+ pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>;
+
+ /* I2S interface */
+ i2s_alt2: i2s_alt2 {
+ brcm,pins = <28 29 30 31>;
+ brcm,function = <BCM2835_FSEL_ALT2>;
+ };
+};
diff --git a/arch/arm/dts/bcm2835-rpi.dtsi b/arch/arm/dts/bcm2835-rpi.dtsi
new file mode 100644
index 0000000..46780bb
--- /dev/null
+++ b/arch/arm/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 = <BCM2835_FSEL_GPIO_OUT>;
+ };
+
+ alt0: alt0 {
+ brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>;
+ brcm,function = <BCM2835_FSEL_ALT0>;
+ };
+
+ alt3: alt3 {
+ brcm,pins = <48 49 50 51 52 53>;
+ brcm,function = <BCM2835_FSEL_ALT3>;
+ };
+};
+
+&i2c0 {
+ status = "okay";
+ clock-frequency = <100000>;
+};
+
+&i2c1 {
+ status = "okay";
+ clock-frequency = <100000>;
+};
+
+&sdhci {
+ status = "okay";
+ bus-width = <4>;
+};
diff --git a/arch/arm/dts/bcm2835.dtsi b/arch/arm/dts/bcm2835.dtsi
new file mode 100644
index 0000000..301c73f
--- /dev/null
+++ b/arch/arm/dts/bcm2835.dtsi
@@ -0,0 +1,192 @@
+#include <dt-bindings/pinctrl/bcm2835.h>
+#include "skeleton.dtsi"
+
+/ {
+ compatible = "brcm,bcm2835";
+ model = "BCM2835";
+ interrupt-parent = <&intc>;
+
+ chosen {
+ bootargs = "earlyprintk console=ttyAMA0";
+ };
+
+ soc {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x7e000000 0x20000000 0x02000000>;
+ dma-ranges = <0x40000000 0x00000000 0x20000000>;
+
+ timer at 7e003000 {
+ compatible = "brcm,bcm2835-system-timer";
+ reg = <0x7e003000 0x1000>;
+ interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
+ clock-frequency = <1000000>;
+ };
+
+ dma: dma at 7e007000 {
+ compatible = "brcm,bcm2835-dma";
+ reg = <0x7e007000 0xf00>;
+ interrupts = <1 16>,
+ <1 17>,
+ <1 18>,
+ <1 19>,
+ <1 20>,
+ <1 21>,
+ <1 22>,
+ <1 23>,
+ <1 24>,
+ <1 25>,
+ <1 26>,
+ <1 27>,
+ <1 28>;
+
+ #dma-cells = <1>;
+ brcm,dma-channel-mask = <0x7f35>;
+ };
+
+ intc: interrupt-controller at 7e00b200 {
+ compatible = "brcm,bcm2835-armctrl-ic";
+ reg = <0x7e00b200 0x200>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ watchdog at 7e100000 {
+ compatible = "brcm,bcm2835-pm-wdt";
+ reg = <0x7e100000 0x28>;
+ };
+
+ rng at 7e104000 {
+ compatible = "brcm,bcm2835-rng";
+ reg = <0x7e104000 0x10>;
+ };
+
+ mailbox: mailbox at 7e00b800 {
+ compatible = "brcm,bcm2835-mbox";
+ reg = <0x7e00b880 0x40>;
+ interrupts = <0 1>;
+ #mbox-cells = <0>;
+ };
+
+ gpio: gpio at 7e200000 {
+ compatible = "brcm,bcm2835-gpio";
+ reg = <0x7e200000 0xb4>;
+ /*
+ * The GPIO IP block is designed for 3 banks of GPIOs.
+ * Each bank has a GPIO interrupt for itself.
+ * There is an overall "any bank" interrupt.
+ * In order, these are GIC interrupts 17, 18, 19, 20.
+ * Since the BCM2835 only has 2 banks, the 2nd bank
+ * interrupt output appears to be mirrored onto the
+ * 3rd bank's interrupt signal.
+ * So, a bank0 interrupt shows up on 17, 20, and
+ * a bank1 interrupt shows up on 18, 19, 20!
+ */
+ interrupts = <2 17>, <2 18>, <2 19>, <2 20>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ uart at 7e201000 {
+ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
+ reg = <0x7e201000 0x1000>;
+ interrupts = <2 25>;
+ clock-frequency = <3000000>;
+ arm,primecell-periphid = <0x00241011>;
+ };
+
+ i2s: i2s at 7e203000 {
+ compatible = "brcm,bcm2835-i2s";
+ reg = <0x7e203000 0x20>,
+ <0x7e101098 0x02>;
+
+ dmas = <&dma 2>,
+ <&dma 3>;
+ dma-names = "tx", "rx";
+ status = "disabled";
+ };
+
+ spi: spi at 7e204000 {
+ compatible = "brcm,bcm2835-spi";
+ reg = <0x7e204000 0x1000>;
+ interrupts = <2 22>;
+ clocks = <&clk_spi>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c0: i2c at 7e205000 {
+ compatible = "brcm,bcm2835-i2c";
+ reg = <0x7e205000 0x1000>;
+ interrupts = <2 21>;
+ clocks = <&clk_i2c>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ sdhci: sdhci at 7e300000 {
+ compatible = "brcm,bcm2835-sdhci";
+ reg = <0x7e300000 0x100>;
+ interrupts = <2 30>;
+ clocks = <&clk_mmc>;
+ status = "disabled";
+ };
+
+ i2c1: i2c at 7e804000 {
+ compatible = "brcm,bcm2835-i2c";
+ reg = <0x7e804000 0x1000>;
+ interrupts = <2 21>;
+ clocks = <&clk_i2c>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ usb at 7e980000 {
+ compatible = "brcm,bcm2835-usb";
+ reg = <0x7e980000 0x10000>;
+ interrupts = <1 9>;
+ };
+
+ arm-pmu {
+ compatible = "arm,arm1176-pmu";
+ };
+ };
+
+ clocks {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ clk_mmc: clock at 0 {
+ compatible = "fixed-clock";
+ reg = <0>;
+ #clock-cells = <0>;
+ clock-output-names = "mmc";
+ clock-frequency = <100000000>;
+ };
+
+ clk_i2c: clock at 1 {
+ compatible = "fixed-clock";
+ reg = <1>;
+ #clock-cells = <0>;
+ clock-output-names = "i2c";
+ clock-frequency = <250000000>;
+ };
+
+ clk_spi: clock at 2 {
+ compatible = "fixed-clock";
+ reg = <2>;
+ #clock-cells = <0>;
+ clock-output-names = "spi";
+ clock-frequency = <250000000>;
+ };
+ };
+};
diff --git a/include/dt-bindings/pinctrl/bcm2835.h b/include/dt-bindings/pinctrl/bcm2835.h
new file mode 100644
index 0000000..6f0bc37
--- /dev/null
+++ b/include/dt-bindings/pinctrl/bcm2835.h
@@ -0,0 +1,27 @@
+/*
+ * Header providing constants for bcm2835 pinctrl bindings.
+ *
+ * Copyright (C) 2015 Stefan Wahren <stefan.wahren@i2se.com>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#ifndef __DT_BINDINGS_PINCTRL_BCM2835_H__
+#define __DT_BINDINGS_PINCTRL_BCM2835_H__
+
+/* brcm,function property */
+#define BCM2835_FSEL_GPIO_IN 0
+#define BCM2835_FSEL_GPIO_OUT 1
+#define BCM2835_FSEL_ALT5 2
+#define BCM2835_FSEL_ALT4 3
+#define BCM2835_FSEL_ALT0 4
+#define BCM2835_FSEL_ALT1 5
+#define BCM2835_FSEL_ALT2 6
+#define BCM2835_FSEL_ALT3 7
+
+#endif /* __DT_BINDINGS_PINCTRL_BCM2835_H__ */
--
2.4.3.573.g4eafbef
next prev parent reply other threads:[~2015-07-08 2:53 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 2:53 [U-Boot] [PATCH 00/20] arm: rpi: Enable USB and Ethernet driver model Raspberry Pi Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 01/20] dm: net: Support usbethaddr environment variable Simon Glass
2015-07-08 4:04 ` Joe Hershberger
2015-07-08 20:31 ` Simon Glass
2015-07-08 20:43 ` Joe Hershberger
2015-07-08 21:07 ` Simon Glass
2015-07-20 13:56 ` Simon Glass
2015-07-20 18:10 ` Joe Hershberger
2015-07-21 21:25 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 02/20] dm: usb: Allow USB Ethernet whenever CONFIG_DM_ETH is not defined Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 03/20] dm: usb: Add an errno.h header to usb_ether.c Simon Glass
2015-07-27 23:31 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 04/20] dm: usb: Prepare dwc2 driver for driver-model conversion Simon Glass
2015-07-27 23:31 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 05/20] dm: usb: Add driver-model support to dwc2 Simon Glass
2015-07-27 23:32 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 06/20] net: smsc95xx: Sort the include files Simon Glass
2015-07-27 23:32 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 07/20] net: smsc95xx: Rename AX_RX_URB_SIZE to RX_URB_SIZE Simon Glass
2015-07-27 23:32 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 08/20] net: smsc95xx: Correct the error numbers Simon Glass
2015-07-27 23:32 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 09/20] net: smsc95xx: Prepare for conversion to driver model Simon Glass
2015-07-27 23:32 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 10/20] net: smsc95xx: Add driver-model support Simon Glass
2015-07-27 23:32 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 11/20] dm: serial: Update binding for PL01x serial UART Simon Glass
2015-07-08 22:00 ` Vikas MANOCHA
[not found] ` <1436324032-17931-12-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2015-07-15 9:00 ` Linus Walleij
2015-07-15 9:00 ` [U-Boot] " Linus Walleij
[not found] ` <CACRpkdb=t21=qpqar5VXd4mtqTWrq6MvoX1OsVgmWpkyFqhj3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-15 9:38 ` Arnd Bergmann
2015-07-15 9:38 ` [U-Boot] " Arnd Bergmann
2015-07-15 10:08 ` Linus Walleij
2015-07-15 10:08 ` [U-Boot] " Linus Walleij
[not found] ` <CACRpkdakAVcBT8phhbFjE+mkfA0pTcHYiaL0dV4UNieH54fd+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-15 10:17 ` Arnd Bergmann
2015-07-15 10:17 ` [U-Boot] " Arnd Bergmann
2015-07-16 7:41 ` Geert Uytterhoeven
2015-07-16 7:41 ` [U-Boot] " Geert Uytterhoeven
2015-10-19 7:19 ` Linus Walleij
2015-10-19 7:19 ` [U-Boot] " Linus Walleij
2015-07-08 2:53 ` [U-Boot] [PATCH 12/20] dm: Support address translation for simple-bus Simon Glass
2015-07-27 23:32 ` Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 13/20] arm: rpi: Define CONFIG_TFTP_TSIZE to show tftp size info Simon Glass
2015-07-08 2:53 ` Simon Glass [this message]
2015-07-08 2:53 ` [U-Boot] [PATCH 15/20] arm: rpi: Device tree modifications for U-Boot Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 16/20] arm: rpi: Enable device tree control for Rasberry Pi Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 17/20] arm: rpi: Drop the UART console platform data Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 18/20] arm: rpi: Drop the GPIO " Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 19/20] arm: rpi: Move to driver model for USB Simon Glass
2015-07-08 2:53 ` [U-Boot] [PATCH 20/20] arm: rpi: Use driver model for Ethernet Simon Glass
2015-07-11 5:34 ` [U-Boot] [PATCH 00/20] arm: rpi: Enable USB and Ethernet driver model Raspberry Pi Stephen Warren
2015-07-11 14:04 ` Simon Glass
2015-07-14 4:52 ` Stephen Warren
2015-07-14 15:44 ` Simon Glass
2015-07-24 4:17 ` Stephen Warren
2015-07-24 13:44 ` Tom Rini
2015-07-28 3:10 ` Stephen Warren
2015-07-28 13:55 ` Tom Rini
2015-07-28 15:44 ` Simon Glass
2015-08-01 3:10 ` Stephen Warren
2015-08-01 3:01 ` Stephen Warren
2015-07-16 14:10 ` Pavel Machek
2015-07-20 14:25 ` Simon Glass
2015-07-24 4:20 ` Stephen Warren
2015-08-03 23:45 ` Marek Vasut
2015-08-04 0:07 ` Simon Glass
2015-08-04 0:37 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436324032-17931-15-git-send-email-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.