Skip to contentSkip to conversation

mmc: rockchip_dw_mmc: Enable by default for all supported SoCs

PATCH In review Chen-Yu Tsai 2 participants 3 messages Apr 29, 2025 MMC, SD and SDIO

lore
Share & tools
lore
#1 lore raw

PATCH 2/2 mmc: rockchip_sdhci: Enable by default for all supported SoCs

In reply to Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

The rockchip_sdhci driver supports the alternative MMC controller found in newer Rockchip SoCs. This controller is used for eMMC. Almost all defconfigs for Rockchip platforms with this controller have it enabled.

Enable it by default for all supported Rockchip SoCs. Disable it explicitly in defconfigs that previously didn't have it enabled, which is only the Orangepi 5.

Series-Version: 2
Series-Changes: 2
- Drop trivial defconfig syncs

---

 configs/orangepi-5-rk3588s_defconfig | 1 +
 drivers/mmc/Kconfig                  | 6 ++++++
 2 files changed, 7 insertions(+)
configs/orangepi-5-rk3588s_defconfig +1 -0
index 6e2ff7d338a8..098c0738d7c3 100644
@@ -56,6 +56,7 @@ CONFIG_MISC=y
 CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
+# CONFIG_MMC_SDHCI is not set
 CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_XMC=y
 CONFIG_PHY_MOTORCOMM=y
drivers/mmc/Kconfig +6 -0
index ec9e9d51fbf9..d4d49494fee7 100644
@@ -482,6 +482,11 @@ config MMC_SANDBOX
 
 config MMC_SDHCI
 	bool "Secure Digital Host Controller Interface support"
+	default y if ROCKCHIP_RK3399
+	default y if ROCKCHIP_RK3528
+	default y if ROCKCHIP_RK3568
+	default y if ROCKCHIP_RK3576
+	default y if ROCKCHIP_RK3588
 	help
 	  This selects the generic Secure Digital Host Controller Interface.
 	  It is used by manufacturers such as Texas Instruments(R), Ricoh(R)
@@ -714,6 +719,7 @@ config MMC_SDHCI_ROCKCHIP
 	bool "Arasan SDHCI controller for Rockchip support"
 	depends on ARCH_ROCKCHIP
 	depends on MMC_SDHCI
+	default y
 	help
 	  Support for Arasan SDHCI host controller on Rockchip ARM SoCs platform
 
Signature · 1 line
2.39.5
#0 lore raw

PATCH 1/2 mmc: rockchip_dw_mmc: Enable by default for all supported SoCs

From: Chen-Yu Tsai <[email protected]>

The rockchip_dw_mmc driver supports the MMC controller found in Rockchip SoCs. This controller is used for the SD card on all SoCs and eMMC on older SoCs. Almost all defconfigs for Rockchip platforms have this enabled.

Enable it by default for all supported Rockchip SoCs. Disable it explicitly in defconfigs that previously didn't have it enabled. Of these, only the Cool Pi GenBook w/ CM5 doesn't actually use the controller. The other two, the Geekbox and the RV1108 EVB, both have MMC enabled in their device trees. With this patch, they will gain support for MMC automatically.

Also limit the driver to Rockchip platforms only, like what is done for the other dw_mmc platform glue drivers.

---

Changes in v2:
- Made CONFIG_MMC_DW_ROCKCHIP depend on ARCH_ROCKCHIP

 configs/coolpi-cm5-genbook-rk3588_defconfig | 1 +
 drivers/mmc/Kconfig                         | 3 +++
 2 files changed, 4 insertions(+)
configs/coolpi-cm5-genbook-rk3588_defconfig +1 -0
index 3eb5dc968af6..92676ebb984a 100644
@@ -65,6 +65,7 @@ CONFIG_MMC_HS400_ES_SUPPORT=y
 CONFIG_SPL_MMC_HS400_ES_SUPPORT=y
 CONFIG_MMC_HS400_SUPPORT=y
 CONFIG_SPL_MMC_HS400_SUPPORT=y
+# CONFIG_MMC_DW is not set
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
drivers/mmc/Kconfig +3 -0
index 6740591a6533..ec9e9d51fbf9 100644
@@ -251,6 +251,7 @@ config MMC_DAVINCI
 config MMC_DW
 	bool "Synopsys DesignWare Memory Card Interface"
 	select BOUNCE_BUFFER
+	default y if ARCH_ROCKCHIP
 	help
 	  This selects support for the Synopsys DesignWare Mobile Storage IP
 	  block, this provides host support for SD and MMC interfaces, in both
@@ -286,6 +287,8 @@ config MMC_DW_ROCKCHIP
 	bool "Rockchip SD/MMC controller support"
 	depends on OF_CONTROL
 	depends on MMC_DW
+	depends on ARCH_ROCKCHIP
+	default y
 	help
 	  This enables support for the Rockchip SD/MMM controller, which is
 	  based on Designware IP. The device is compatible with at least
Signature · 1 line
2.39.5
#2 lore raw

Please ignore this. I accidentally sent out the patches with incorrect patman tags.

ChenYu

Quoted 64 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

The rockchip_dw_mmc driver supports the MMC controller found in Rockchip SoCs. This controller is used for the SD card on all SoCs and eMMC on older SoCs. Almost all defconfigs for Rockchip platforms have this enabled.

Enable it by default for all supported Rockchip SoCs. Disable it explicitly in defconfigs that previously didn't have it enabled. Of these, only the Cool Pi GenBook w/ CM5 doesn't actually use the controller. The other two, the Geekbox and the RV1108 EVB, both have MMC enabled in their device trees. With this patch, they will gain support for MMC automatically.

Also limit the driver to Rockchip platforms only, like what is done for the other dw_mmc platform glue drivers.

---

Changes in v2:
- Made CONFIG_MMC_DW_ROCKCHIP depend on ARCH_ROCKCHIP

 configs/coolpi-cm5-genbook-rk3588_defconfig | 1 +
 drivers/mmc/Kconfig                         | 3 +++
 2 files changed, 4 insertions(+)
configs/coolpi-cm5-genbook-rk3588_defconfig +1 -0
index 3eb5dc968af6..92676ebb984a 100644
@@ -65,6 +65,7 @@ CONFIG_MMC_HS400_ES_SUPPORT=y
 CONFIG_SPL_MMC_HS400_ES_SUPPORT=y
 CONFIG_MMC_HS400_SUPPORT=y
 CONFIG_SPL_MMC_HS400_SUPPORT=y
+# CONFIG_MMC_DW is not set
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
drivers/mmc/Kconfig +3 -1
index 6740591a6533..ec9e9d51fbf9 100644
@@ -251,6 +251,7 @@ config MMC_DAVINCI
 config MMC_DW
        bool "Synopsys DesignWare Memory Card Interface"
        select BOUNCE_BUFFER
+       default y if ARCH_ROCKCHIP
        help
          This selects support for the Synopsys DesignWare Mobile Storage IP
          block, this provides host support for SD and MMC interfaces, in both
@@ -286,6 +287,8 @@ config MMC_DW_ROCKCHIP
        bool "Rockchip SD/MMC controller support"
        depends on OF_CONTROL
        depends on MMC_DW
+       depends on ARCH_ROCKCHIP
+       default y
        help
          This enables support for the Rockchip SD/MMM controller, which is
          based on Designware IP. The device is compatible with at least
--

2.39.5