From f974d685d27fd1898e25390fbbdd3bf620d15082 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 11 Sep 2015 11:22:05 +0000 Subject: [PATCH 1/6] ARM: bcm2835: add the auxiliary spi1 and spi2 to the device tree This enables the use of the auxiliary spi1 and spi2 devices on the bcm2835 SOC. Note that this requires the use of the new clk-bcm2835-aux to work. Signed-off-by: Martin Sperl Acked-by: Stephen Warren [anholt: Rebased on 2835.dtsi -> 283x.dtsi change] Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm283x.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index 971e741e5467..f0d457312746 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -1,5 +1,6 @@ #include #include +#include #include "skeleton.dtsi" /* This include file covers the common peripherals and configuration between @@ -159,6 +160,26 @@ aux: aux@0x7e215000 { clocks = <&clocks BCM2835_CLOCK_VPU>; }; + spi1: spi@7e215080 { + compatible = "brcm,bcm2835-aux-spi"; + reg = <0x7e215080 0x40>; + interrupts = <1 29>; + clocks = <&aux BCM2835_AUX_CLOCK_SPI1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + spi2: spi@7e2150c0 { + compatible = "brcm,bcm2835-aux-spi"; + reg = <0x7e2150c0 0x40>; + interrupts = <1 29>; + clocks = <&aux BCM2835_AUX_CLOCK_SPI2>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + sdhci: sdhci@7e300000 { compatible = "brcm,bcm2835-sdhci"; reg = <0x7e300000 0x100>; From 40ad4499bafa0202f3a1880fc43718ae3a3e2c24 Mon Sep 17 00:00:00 2001 From: Remi Pommarel Date: Mon, 21 Dec 2015 21:12:59 +0100 Subject: [PATCH 2/6] ARM: bcm2835: Add PWM clock support to the device tree Signed-off-by: Remi Pommarel [anholt: Rebased on 2835.dtsi -> 283x.dtsi change] Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 ++++ arch/arm/boot/dts/bcm283x.dtsi | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi index 3afb9fefe2d1..a584a93f631d 100644 --- a/arch/arm/boot/dts/bcm2835-rpi.dtsi +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi @@ -58,3 +58,7 @@ &sdhci { status = "okay"; bus-width = <4>; }; + +&pwm { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index f0d457312746..e4a279261d72 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -180,6 +180,16 @@ spi2: spi@7e2150c0 { status = "disabled"; }; + pwm: pwm@7e20c000 { + compatible = "brcm,bcm2835-pwm"; + reg = <0x7e20c000 0x28>; + clocks = <&clocks BCM2835_CLOCK_PWM>; + assigned-clocks = <&clocks BCM2835_CLOCK_PWM>; + assigned-clock-rates = <10000000>; + #pwm-cells = <2>; + status = "disabled"; + }; + sdhci: sdhci@7e300000 { compatible = "brcm,bcm2835-sdhci"; reg = <0x7e300000 0x100>; From 68e2ef17a54401603c927e2bccf5e8ac8d5da9d3 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Sun, 17 Jan 2016 12:15:28 +0000 Subject: [PATCH 3/6] ARM: bcm2835: follow dt uart node-naming convention This patch fixes the naming of the device tree node: uart@7e201000 to conform to the standard of: serial@7e201000 Signed-off-by: Martin Sperl [anholt: Rebased on 2835.dtsi -> 283x.dtsi change] Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm283x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index e4a279261d72..c003f2d77de5 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -112,7 +112,7 @@ gpio: gpio@7e200000 { #interrupt-cells = <2>; }; - uart0: uart@7e201000 { + uart0: serial@7e201000 { compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; reg = <0x7e201000 0x1000>; interrupts = <2 25>; From 7a1298e339249f25f4ef97fed332c70e1d1507e4 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 25 Jan 2016 21:40:06 +0100 Subject: [PATCH 4/6] ARM: bcm2835: dt: Add Raspberry Pi Model A This one is essentially the same as revision 2 B board (with the I2S on P5 header). Signed-off-by: Lubomir Rintel Acked-by: Stephen Warren [anholt: Rebased on bcm2835.dtsi -> bcm283x.dtsi change] Signed-off-by: Eric Anholt --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm2835-rpi-a.dts | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2835-rpi-a.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index a4a6d70e8b26..d00081447c32 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -60,6 +60,7 @@ dtb-$(CONFIG_ARCH_AXXIA) += \ axm5516-amarillo.dtb dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2835-rpi-b.dtb \ + bcm2835-rpi-a.dtb \ bcm2835-rpi-b-rev2.dtb \ bcm2835-rpi-b-plus.dtb \ bcm2835-rpi-a-plus.dtb \ diff --git a/arch/arm/boot/dts/bcm2835-rpi-a.dts b/arch/arm/boot/dts/bcm2835-rpi-a.dts new file mode 100644 index 000000000000..ddbbbbd42dda --- /dev/null +++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts @@ -0,0 +1,24 @@ +/dts-v1/; +#include "bcm2835.dtsi" +#include "bcm2835-rpi.dtsi" + +/ { + compatible = "raspberrypi,model-a", "brcm,bcm2835"; + model = "Raspberry Pi Model A"; + + 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 = ; + }; +}; From 5ec6f2cd8ec4bcd38ba199ea8711a5ec906d85e7 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Wed, 16 Dec 2015 16:26:49 -0800 Subject: [PATCH 5/6] ARM: bcm2835: Add the Raspberry Pi power domain driver to the DT. This connects the USB driver to the USB power domain, so that USB can actually be turned on at boot if the bootloader didn't do it for us. Signed-off-by: Alexander Aring Signed-off-by: Eric Anholt Reviewed-by: Kevin Hilman --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 12 ++++++++++++ arch/arm/boot/dts/bcm283x.dtsi | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi index a584a93f631d..76bdbcafab18 100644 --- a/arch/arm/boot/dts/bcm2835-rpi.dtsi +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi @@ -1,3 +1,5 @@ +#include + / { memory { reg = <0 0x10000000>; @@ -18,6 +20,12 @@ firmware: firmware { compatible = "raspberrypi,bcm2835-firmware"; mboxes = <&mailbox>; }; + + power: power { + compatible = "raspberrypi,bcm2835-power"; + firmware = <&firmware>; + #power-domain-cells = <1>; + }; }; }; @@ -62,3 +70,7 @@ &sdhci { &pwm { status = "okay"; }; + +&usb { + power-domains = <&power RPI_POWER_DOMAIN_USB>; +}; diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index c003f2d77de5..05ff5ce91c95 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -218,7 +218,7 @@ i2c2: i2c@7e805000 { status = "disabled"; }; - usb@7e980000 { + usb: usb@7e980000 { compatible = "brcm,bcm2835-usb"; reg = <0x7e980000 0x10000>; interrupts = <1 9>; From 1305141d1a7254b53b35303ee84f4c4948007bd0 Mon Sep 17 00:00:00 2001 From: Martin Sperl Date: Fri, 12 Feb 2016 11:14:25 +0000 Subject: [PATCH 6/6] ARM: bcm2835: add bcm2835-aux-uart support to DT Add bcm2835-aux-uart support to the device tree. Signed-off-by: Martin Sperl Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm283x.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index 05ff5ce91c95..8aaf193711bf 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -160,6 +160,14 @@ aux: aux@0x7e215000 { clocks = <&clocks BCM2835_CLOCK_VPU>; }; + uart1: serial@7e215040 { + compatible = "brcm,bcm2835-aux-uart"; + reg = <0x7e215040 0x40>; + interrupts = <1 29>; + clocks = <&aux BCM2835_AUX_CLOCK_UART>; + status = "disabled"; + }; + spi1: spi@7e215080 { compatible = "brcm,bcm2835-aux-spi"; reg = <0x7e215080 0x40>;