]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: bcm2835: add SPI device to DT
authorStephen Warren <swarren@wwwdotorg.org>
Wed, 20 Feb 2013 04:39:58 +0000 (21:39 -0700)
committerStephen Warren <swarren@wwwdotorg.org>
Tue, 12 Mar 2013 03:38:58 +0000 (21:38 -0600)
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 <swarren@wwwdotorg.org>
arch/arm/boot/dts/bcm2835.dtsi

index 4bf2a8774aa76ab53889c51208f5fa0cf6841c11..3eb60f7aa1fe8b82cdb2482d8f0453ca89db9c7b 100644 (file)
@@ -64,6 +64,16 @@ gpio: gpio {
                        #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 @@ clk_i2c: i2c {
                        #clock-cells = <0>;
                        clock-frequency = <150000000>;
                };
+
+               clk_spi: spi {
+                       compatible = "fixed-clock";
+                       reg = <2>;
+                       #clock-cells = <0>;
+                       clock-frequency = <250000000>;
+               };
        };
 };