Skip to content

Commit ed80a13

Browse files
Carlo Caionestorulf
authored andcommitted
mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs
Add a driver for the SDIO/MMC host found on the Amlogic Meson SoCs. This is an MMC controller which provides an interface between the application processor and various memory cards. It supports the SD specification v2.0 and the eMMC specification v4.41. The controller provides an internal "mux" which allows connecting up to three MMC devices to it. Only one device can be used at a time though since the registers are shared across all devices. The driver takes care of synchronizing access (similar to the dw_mmc driver). The maximum supported bus-width is 4-bits. Amlogic's GPL kernel sources call the corresponding driver "aml_sdio" to differentiate it from the other MMC controller in (at least the Meson8 and Meson8b) the SoCs (they call the other drivers aml_sdhc and aml_sdhc_m8, which seem to support a bus-width of up to 8-bits). This means that there are three different MMC host controller IP blocks from Amlogic (each of them with completely own register layout and features): - "SDIO": 1 and 4 bit bus width, support for high-speed modes up to UHS-I SDR50, part of Meson6, Meson8 and Meson8b (the driver from this patch targets this controller) - "SDHC": 1, 4 and 8 bit bus width, compatible with standard iNAND interface, support for speeds up to HS200 and MMC spec up to version 4.5x, part of Meson8 and Meson8b SoCs (there is no mainline driver for this controller yet) - "SDEMMC": 1, 4 and 8 bit bus width, support for speeds up to HS400 and MMC spec up to version 5.0, part of the Meson GX (64-bit) SoCs (supported by the meson-gx MMC host driver) Signed-off-by: Carlo Caione <[email protected]> Signed-off-by: Martin Blumenstingl <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent 17f5e71 commit ed80a13

File tree

3 files changed

+783
-0
lines changed

3 files changed

+783
-0
lines changed

drivers/mmc/host/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,19 @@ config MMC_MESON_GX
352352

353353
If you have a controller with this interface, say Y here.
354354

355+
config MMC_MESON_MX_SDIO
356+
tristate "Amlogic Meson6/Meson8/Meson8b SD/MMC Host Controller support"
357+
depends on ARCH_MESON || COMPILE_TEST
358+
depends on COMMON_CLK
359+
depends on HAS_DMA
360+
depends on OF
361+
help
362+
This selects support for the SD/MMC Host Controller on
363+
Amlogic Meson6, Meson8 and Meson8b SoCs.
364+
365+
If you have a controller with this interface, say Y or M here.
366+
If unsure, say N.
367+
355368
config MMC_MOXART
356369
tristate "MOXART SD/MMC Host Controller support"
357370
depends on ARCH_MOXART && MMC

drivers/mmc/host/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ obj-$(CONFIG_MMC_VUB300) += vub300.o
6464
obj-$(CONFIG_MMC_USHC) += ushc.o
6565
obj-$(CONFIG_MMC_WMT) += wmt-sdmmc.o
6666
obj-$(CONFIG_MMC_MESON_GX) += meson-gx-mmc.o
67+
obj-$(CONFIG_MMC_MESON_MX_SDIO) += meson-mx-sdio.o
6768
obj-$(CONFIG_MMC_MOXART) += moxart-mmc.o
6869
obj-$(CONFIG_MMC_SUNXI) += sunxi-mmc.o
6970
obj-$(CONFIG_MMC_USDHI6ROL0) += usdhi6rol0.o

0 commit comments

Comments
 (0)