
13 Jan
2022
13 Jan
'22
8:29 p.m.
On 12/01/2022 05:03, 赵仪峰 wrote:
The Synopsys DWC MSHC for RK3568 and RK3588 need config DWCMSHC_EMMC_CONTROL.bit0 = 1 (CARD_IS_EMMC) to enable Data Strobe pin for HS400 and HS400ES.
reference code: #define DWCMSHC_EMMC_CONTROL 0x52c #define DWCMSHC_CARD_IS_EMMC BIT(0)
/* set CARD_IS_EMMC bit to enable Data Strobe for HS400 and HS400ES */ ctrl = sdhci_readw(host, DWCMSHC_EMMC_CONTROL); ctrl |= DWCMSHC_CARD_IS_EMMC; sdhci_writew(host, ctrl, DWCMSHC_EMMC_CONTROL);
I think I'll do this in rk3568_emmc_phy_init() and set/unset the bit based on IS_MMC(host->mmc).
(FWIW, it doesn't look like the Linux driver [1] sets this bit.)
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...