summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorPhil Elwell <phil@raspberrypi.org>2015-03-25 17:49:47 +0000
committerpopcornmix <popcornmix@gmail.com>2015-05-18 14:12:38 +0100
commit9aef777973b8a710a0baff2573eb262659d7f6d9 (patch)
tree4face4aef1a621a5dd947e35fc41493202906e41 /arch/arm
parente638019cdf8414feb2789e82f586fa63bc6db646 (diff)
downloadlinux-9aef777973b8a710a0baff2573eb262659d7f6d9.tar.gz
Adding bcm2835-sdhost driver, and an overlay to enable it
BCM2835 has two SD card interfaces. This driver uses the other one.
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/sdhost-overlay.dts73
-rw-r--r--arch/arm/configs/bcm2709_defconfig1
-rw-r--r--arch/arm/configs/bcmrpi_defconfig1
4 files changed, 76 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 2b8c692aab1e..5effb3c2502f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -34,6 +34,7 @@ dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb
+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
diff --git a/arch/arm/boot/dts/sdhost-overlay.dts b/arch/arm/boot/dts/sdhost-overlay.dts
new file mode 100644
index 000000000000..33db96e571ab
--- /dev/null
+++ b/arch/arm/boot/dts/sdhost-overlay.dts
@@ -0,0 +1,73 @@
+/dts-v1/;
+/plugin/;
+
+/{
+ compatible = "brcm,bcm2708";
+
+ fragment@0 {
+ target = <&soc>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ sdhost: sdhost@7e202000 {
+ compatible = "brcm,bcm2835-sdhost";
+ reg = <0x7e202000 0x100>;
+ interrupts = <2 24>;
+ clocks = <&clk_sdhost>;
+ dmas = <&dma 13>,
+ <&dma 13>;
+ dma-names = "tx", "rx";
+ brcm,delay-after-stop = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdhost_pins>;
+ status = "okay";
+ };
+
+ clocks {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ clk_sdhost: clock@3 {
+ compatible = "fixed-clock";
+ reg = <0>;
+ #clock-cells = <0>;
+ clock-output-names = "sdhost";
+ clock-frequency = <250000000>;
+ };
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&gpio>;
+ __overlay__ {
+ sdhost_pins: sdhost_pins {
+ brcm,pins = <48 49 50 51 52 53>;
+ brcm,function = <4>; /* alt0 */
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&mmc>;
+ __overlay__ {
+ /* Find a way to disable the other driver */
+ compatible = "";
+ status = "disabled";
+ };
+ };
+
+ fragment@3 {
+ target-path = "/__overrides__";
+ __overlay__ {
+ sdhost_freq = <&clk_sdhost>,"clock-frequency:0";
+ };
+ };
+
+ __overrides__ {
+ delay_after_stop = <&sdhost>,"brcm,delay-after-stop:0";
+ force_pio = <&sdhost>,"brcm,force-pio?";
+ sdhost_freq = <&clk_sdhost>,"clock-frequency:0";
+ };
+};
diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig
index 7cec5f845cc5..367a04abee52 100644
--- a/arch/arm/configs/bcm2709_defconfig
+++ b/arch/arm/configs/bcm2709_defconfig
@@ -956,6 +956,7 @@ CONFIG_MMC=y
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_BCM2835=y
CONFIG_MMC_BCM2835_DMA=y
+CONFIG_MMC_BCM2835_SDHOST=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SPI=m
diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig
index e77173bad398..db287f3a40e4 100644
--- a/arch/arm/configs/bcmrpi_defconfig
+++ b/arch/arm/configs/bcmrpi_defconfig
@@ -949,6 +949,7 @@ CONFIG_MMC=y
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_BCM2835=y
CONFIG_MMC_BCM2835_DMA=y
+CONFIG_MMC_BCM2835_SDHOST=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SPI=m