Enable eMMC and SD card support for QCS615
v3 cover Enable eMMC and SD card support for QCS615
This patch series enables eMMC and SD card support on the Qualcomm QCS615 platform by adding the necessary clock support, fixing device type detection for proper EFI boot handling, and addressing controller timeout issues.
---
Changes in v3:
- Add proper error handle for bdesc in msm_sdc_probe while setting
removable property of bdesc
- Link to v2: https://lore.kernel.org/u-boot/[email protected]/
Changes in v2:
- Moved removable flag update from generic mmc-uclass.c to platform-
specific msm_sdhci.c driver.
- Set CONFIG_SYS_MMC_MAX_BLK_COUNT to deal with controller timeout.
- Link to v1: https://lore.kernel.org/u-boot/[email protected]/
---
Balaji Selvanathan (3):
clk: qcom: qcs615: Add SDCC1 and SDCC2 clock support
drivers: mmc: uclass: Set removable flag based on device tree property
configs: qcom_defconfig: Limit MMC transfer size to prevent controller timeout
configs/qcom_defconfig | 1 + drivers/clk/qcom/clock-qcom.h | 2 ++ drivers/clk/qcom/clock-qcs615.c | 46 +++++++++++++++++++++++++++++++++++++++++ drivers/mmc/msm_sdhci.c | 8 +++++++ 4 files changed, 57 insertions(+)
---
base-commit: 042e45e026c77227319a426940577856ffe62e7b
change-id: 20260721-emmc-ca0e6f3c5e9a
Best regards,
Signature · 1 line
Balaji Selvanathan <[email protected]>
PATCH v3 1/3 clk: qcom: qcs615: Add SDCC1 and SDCC2 clock support
Add clock support for SDCC1 (eMMC) and SDCC2 (SD card) controllers on QCS615 platform. This enables proper clock configuration for both storage interfaces.
---
Changes in v3:
- No changes
Changes in v2:
- No changes
--- drivers/clk/qcom/clock-qcom.h | 2 ++ drivers/clk/qcom/clock-qcs615.c | 46 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+)
drivers/clk/qcom/clock-qcom.h +2 -0
@@ -14,6 +14,8 @@#define CFG_CLK_SRC_GPLL0_AUX2 (2 << 8)#define CFG_CLK_SRC_GPLL2 (2 << 8)#define CFG_CLK_SRC_GPLL2_MAIN (2 << 8) +#define CFG_CLK_SRC_GPLL6_OUT_MAIN (2 << 8) +#define CFG_CLK_SRC_GPLL8 (2 << 8)#define CFG_CLK_SRC_GPLL9 (2 << 8)#define CFG_CLK_SRC_GPLL0_ODD (3 << 8)#define CFG_CLK_SRC_GPLL6 (4 << 8)
drivers/clk/qcom/clock-qcs615.c +46 -0
70 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 2/3 drivers: mmc: uclass: Set removable flag based on device tree property
In reply to Balaji Selvanathan via U-BootThe block device removable flag should reflect whether the MMC device is physically removable (SD card) or soldered (eMMC). This information is specified in the device tree via the "non-removable" property and stored in the MMC_CAP_NONREMOVABLE capability flag.
Update the removable flag in the block device descriptor during controller probe to properly reflect the device's removable status. This allows the block layer and upper layers (particularly EFI boot manager) to distinguish between eMMC and SD cards for appropriate handling.
The default removable=1 is set in mmc_bind(), and this change overrides it only for non-removable devices after mmc_of_parse() has set the MMC_CAP_NONREMOVABLE capability from the device tree.
---
Changes in v3:
- Add proper error handle for bdesc in msm_sdc_probe while setting removable property of bdesc
Changes in v2:
- Moved removable flag update from generic mmc-uclass.c to platform- specific msm_sdhci.c driver
--- drivers/mmc/msm_sdhci.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/mmc/msm_sdhci.c +8 -0
@@ -187,6 +187,7 @@ static int msm_sdc_probe(struct udevice *dev)struct sdhci_host *host = &prv->host;u32 core_version, core_minor, core_major;struct reset_ctl bcr_rst; +struct blk_desc *bdesc;u32 caps;int ret;
@@ -250,6 +251,13 @@ static int msm_sdc_probe(struct udevice *dev)if (ret)return ret; +if (plat->cfg.host_caps &MMC_CAP_NONREMOVABLE ) { + bdesc =mmc_get_blk_desc (&plat->mmc); +if (!bdesc) +return -ENODEV ; + bdesc->removable =0 ; + } + host->mmc = &plat->mmc; host->mmc->dev = dev; host->ops = &msm_sdhci_ops;
Signature · 1 line
2.34.1
PATCH v3 3/3 configs: qcom_defconfig: Limit MMC transfer size to prevent controller timeout
In reply to Balaji Selvanathan via U-BootSet CONFIG_SYS_MMC_MAX_BLK_COUNT to 16384 blocks to limit the maximum transfer size per operation. This prevents controller timeouts.
---
Changes in v3:
- No changes in v3
Changes in v2:
- Set CONFIG_SYS_MMC_MAX_BLK_COUNT to deal with controller timeout.
--- configs/qcom_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/qcom_defconfig +1 -0
@@ -100,6 +100,7 @@ CONFIG_MISC=y CONFIG_NVMEM=y CONFIG_QCOM_GENI=y CONFIG_I2C_EEPROM=y +CONFIG_SYS_MMC_MAX_BLK_COUNT=16384 CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ADMA=y CONFIG_MMC_SDHCI_MSM=y
Signature · 1 line
2.34.1