From 6ce5f02ef7edd33ebdac27953b52c489a6005e6d Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 19 Feb 2013 21:39:58 -0700 Subject: [PATCH 1/2] ARM: bcm2835: add SPI device to DT The BCM2835 has a single instance of the "SPI0"-type SPI master controller. Instantiate it in the SoC .dtsi file, Don't enable it in the Raspberry Pi board .dts file, since we have no idea what is actually connected, and hence no idea what to set the bus clock rate to. Signed-off-by: Stephen Warren --- arch/arm/boot/dts/bcm2835.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index 4bf2a8774aa7..3eb60f7aa1fe 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi @@ -64,6 +64,16 @@ #interrupt-cells = <2>; }; + spi: spi@20204000 { + compatible = "brcm,bcm2835-spi"; + reg = <0x7e204000 0x1000>; + interrupts = <2 22>; + clocks = <&clk_spi>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + i2c0: i2c@20205000 { compatible = "brcm,bcm2835-i2c"; reg = <0x7e205000 0x1000>; @@ -107,5 +117,12 @@ #clock-cells = <0>; clock-frequency = <150000000>; }; + + clk_spi: spi { + compatible = "fixed-clock"; + reg = <2>; + #clock-cells = <0>; + clock-frequency = <250000000>; + }; }; }; From a1bf70828ea0547b4e3d7eaeb63ae3eb2400cb93 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 28 Mar 2013 07:12:04 +0100 Subject: [PATCH 2/2] ARM: bcm2835: add Broadcom BCM2835 RNG to the device tree This adds a device tree binding for random number generator present on Broadcom BCM2835 SoC, used in Raspberry Pi and Roku 2 devices. Signed-off-by: Lubomir Rintel Tested-by: Stephen Warren Signed-off-by: Stephen Warren --- arch/arm/boot/dts/bcm2835.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index 3eb60f7aa1fe..0db295ec8f62 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi @@ -34,6 +34,11 @@ reg = <0x7e100000 0x28>; }; + rng { + compatible = "brcm,bcm2835-rng"; + reg = <0x7e104000 0x10>; + }; + uart@20201000 { compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell"; reg = <0x7e201000 0x1000>;