Skip to content

Commit 9f3236d

Browse files
committed
Merge pull request #987 from msperl/rpi-4.0.y-enable-spi-bcm2835-by-default
device-tree: spi: make spi-bcm2835 the default spi driver and prepare...
2 parents 1e1ac98 + 656c649 commit 9f3236d

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

arch/arm/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ dtb-$(RPI_DT_OVERLAYS) += sdhost-overlay.dtb
4141
dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb
4242
dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb
4343
dtb-$(RPI_DT_OVERLAYS) += spi-bcm2835-overlay.dtb
44+
dtb-$(RPI_DT_OVERLAYS) += spi-bcm2708-overlay.dtb
4445

4546
dtb-$(CONFIG_MACH_ASM9260) += \
4647
alphascale-asm9260-devkit.dtb

arch/arm/boot/dts/bcm2708_common.dtsi

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,21 @@
8484
};
8585

8686
spi0: spi@7e204000 {
87-
compatible = "brcm,bcm2708-spi";
87+
compatible = "brcm,bcm2835-spi";
8888
reg = <0x7e204000 0x1000>;
8989
interrupts = <2 22>;
9090
clocks = <&clk_spi>;
9191
#address-cells = <1>;
9292
#size-cells = <0>;
9393
status = "disabled";
94+
/* the dma channels */
95+
dmas = <&dma 6>, <&dma 7>;
96+
dma-names = "tx", "rx";
97+
/* the chipselects used - <0> means native GPIO
98+
* add more gpios if necessary as <&gpio 6 1>
99+
* (but do not forget to make them output!)
100+
*/
101+
cs-gpios = <0>, <0>;
94102
};
95103

96104
i2c0: i2c@7e205000 {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Device tree overlay for spi-bcm2835
3+
*/
4+
5+
/dts-v1/;
6+
/plugin/;
7+
8+
/ {
9+
compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
10+
/* setting up compatiblity to allow loading the spi-bcm2835 driver */
11+
fragment@0 {
12+
target = <&spi0>;
13+
__overlay__ {
14+
status = "okay";
15+
compatible = "brcm,bcm2708-spi";
16+
};
17+
};
18+
};

0 commit comments

Comments
 (0)