Skip to content

Commit

Permalink
Merge pull request #987 from msperl/rpi-4.0.y-enable-spi-bcm2835-by-d…
Browse files Browse the repository at this point in the history
…efault

device-tree: spi: make spi-bcm2835 the default spi driver and prepare...
  • Loading branch information
pelwell committed May 27, 2015
2 parents 1e1ac98 + 656c649 commit 9f3236d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/Makefile
Expand Up @@ -41,6 +41,7 @@ dtb-$(RPI_DT_OVERLAYS) += sdhost-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += spi-bcm2835-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += spi-bcm2708-overlay.dtb

dtb-$(CONFIG_MACH_ASM9260) += \
alphascale-asm9260-devkit.dtb
Expand Down
10 changes: 9 additions & 1 deletion arch/arm/boot/dts/bcm2708_common.dtsi
Expand Up @@ -84,13 +84,21 @@
};

spi0: spi@7e204000 {
compatible = "brcm,bcm2708-spi";
compatible = "brcm,bcm2835-spi";
reg = <0x7e204000 0x1000>;
interrupts = <2 22>;
clocks = <&clk_spi>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
/* the dma channels */
dmas = <&dma 6>, <&dma 7>;
dma-names = "tx", "rx";
/* the chipselects used - <0> means native GPIO
* add more gpios if necessary as <&gpio 6 1>
* (but do not forget to make them output!)
*/
cs-gpios = <0>, <0>;
};

i2c0: i2c@7e205000 {
Expand Down
18 changes: 18 additions & 0 deletions arch/arm/boot/dts/spi-bcm2708-overlay.dts
@@ -0,0 +1,18 @@
/*
* Device tree overlay for spi-bcm2835
*/

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
/* setting up compatiblity to allow loading the spi-bcm2835 driver */
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
compatible = "brcm,bcm2708-spi";
};
};
};

0 comments on commit 9f3236d

Please sign in to comment.