diff options
author | Jonas Karlman <jonas@kwiboo.se> | 2024-07-24 06:55:36 +0000 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2024-08-09 18:35:23 +0800 |
commit | 2dc3600d360a88861f076cda6769d7e1ad3204b0 (patch) | |
tree | c4bb477e4d4eb498d51a43833dab7cb7de5a865b /drivers | |
parent | 0cb1fddb743da8312be469920c17559bd2043f46 (diff) | |
download | u-boot-2dc3600d360a88861f076cda6769d7e1ad3204b0.tar.gz u-boot-2dc3600d360a88861f076cda6769d7e1ad3204b0.tar.bz2 u-boot-2dc3600d360a88861f076cda6769d7e1ad3204b0.zip |
mmc: rockchip_dw_mmc: Allow 4-bit mode when 8-bit mode is supported
Hosts capable of 8-bit can also do 4 bits, fix use of 4-bit mode when
8-bit mode is supported.
This fixes use of 1-bit mode with SD NAND on ROCK Pi S using the DT in
v6.11-rc1 that chage to use 8-bit bus to also support eMMC. With this
4-bit mode is used with SD NAND and 8-bit mode with eMMC, same as in
Linux kernel.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/rockchip_dw_mmc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c index 1a10b7057a..549fb80f19 100644 --- a/drivers/mmc/rockchip_dw_mmc.c +++ b/drivers/mmc/rockchip_dw_mmc.c @@ -159,6 +159,10 @@ static int rockchip_dwmmc_probe(struct udevice *dev) host->mmc->dev = dev; upriv->mmc = host->mmc; + /* Hosts capable of 8-bit can also do 4 bits */ + if (host->buswidth == 8) + plat->cfg.host_caps |= MMC_MODE_4BIT; + return dwmci_probe(dev); } |