Skip to content

Commit c8baa97

Browse files
author
Phil Elwell
committed
BCM270X_DT: Add SDIO overlay
Enable SDIO from MMC interface via GPIOs 22-27. Includes the sdhost overlay to free up the MMC interface.
1 parent 5a63610 commit c8baa97

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ dtb-$(RPI_DT_OVERLAYS) += rpi-ft5406-overlay.dtb
4444
dtb-$(RPI_DT_OVERLAYS) += rpi-proto-overlay.dtb
4545
dtb-$(RPI_DT_OVERLAYS) += rpi-sense-overlay.dtb
4646
dtb-$(RPI_DT_OVERLAYS) += sdhost-overlay.dtb
47+
dtb-$(RPI_DT_OVERLAYS) += sdio-overlay.dtb
4748
dtb-$(RPI_DT_OVERLAYS) += spi-bcm2708-overlay.dtb
4849
dtb-$(RPI_DT_OVERLAYS) += spi-bcm2835-overlay.dtb
4950
dtb-$(RPI_DT_OVERLAYS) += spi-dma-overlay.dtb

arch/arm/boot/dts/overlays/README

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,21 @@ Params: overclock_50 Clock (in MHz) to use when the MMC framework
513513
debug Enable debug output (default off)
514514

515515

516+
Name: sdio
517+
Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock,
518+
and enables SDIO via GPIOs 22-27.
519+
Load: dtoverlay=sdio,<param>=<val>
520+
Params: overclock_50 Clock (in MHz) to use when the MMC framework
521+
requests 50MHz
522+
523+
force_pio Disable DMA support (default off)
524+
525+
pio_limit Number of blocks above which to use DMA
526+
(default 1)
527+
528+
debug Enable debug output (default off)
529+
530+
516531
Name: spi-bcm2708
517532
Info: Selects the bcm2708-spi SPI driver
518533
Load: dtoverlay=spi-bcm2708
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* Enable SDIO from MMC interface via GPIOs 22-27. Includes sdhost overlay. */
2+
3+
/include/ "sdhost-overlay.dts"
4+
5+
/{
6+
compatible = "brcm,bcm2708";
7+
8+
fragment@3 {
9+
target = <&mmc>;
10+
__overlay__ {
11+
compatible = "brcm,bcm2835-mmc";
12+
pinctrl-names = "default";
13+
pinctrl-0 = <&sdio_pins>;
14+
non-removable;
15+
status = "okay";
16+
};
17+
};
18+
19+
fragment@4 {
20+
target = <&gpio>;
21+
__overlay__ {
22+
sdio_pins: sdio_pins {
23+
brcm,pins = <22 23 24 25 26 27>;
24+
brcm,function = <7 7 7 7 7 7>; /* ALT3 = SD1 */
25+
brcm,pull = <0 2 2 2 2 2>;
26+
};
27+
};
28+
};
29+
};

0 commit comments

Comments
 (0)