Skip to content

rockchip: sdhci: Add HS400 Enhanced Strobe support

Alper Nebi Yasak u-boot 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 5 repliesIn review
  2. v44 patches 6 repliesSuperseded
  3. v34 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches5 repliesSuperseded
v13 patches13 repliesSuperseded

Changes in v5 from the cover letter

- Incorporate RK3568 HS400ES fixes from Yifeng Zhao:
- Use DWCMSHC_CTRL_HS400 = 0x7, instead of SDHCI_CTRL_HS400 = 0x5
- Configure DWCMSHC_CARD_IS_EMMC in rk3568_sdhci_set_ios_post()
- Configure DLL_STRBIN and DLL_TXCLK for HS400.
- Drop re-init fix already merged to master

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mmc: sdhci: Add HS400 Enhanced Strobe supportdrivers/mmc/sdhci.c include/sdhci.h+30 -01 reply
2/3rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399drivers/mmc/rockchip_sdhci.c+53 -01 reply
3/3rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568drivers/mmc/rockchip_sdhci.c+58 -62 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJaehoon ChungKever Yang
1/3R-b R-b
2/3R-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/3] rockchip: sdhci: Add HS400 Enhanced Strobe support

This series implements support for the HS400 Enhanced Strobe mode on the Rockchip SDHCI driver, for both RK3399 and RK3568. To test, I'm building for chromebook_kevin with the following configs enabled:

    +CONFIG_MMC_SPEED_MODE_SET=y
     [...]
     CONFIG_MMC_PWRSEQ=y
    +CONFIG_MMC_IO_VOLTAGE=y
    +CONFIG_MMC_UHS_SUPPORT=y
    +CONFIG_MMC_HS400_ES_SUPPORT=y
    +CONFIG_MMC_HS400_SUPPORT=y
     CONFIG_MMC_DW=y
     CONFIG_MMC_DW_ROCKCHIP=y
     CONFIG_MMC_SDHCI=y
    +CONFIG_MMC_SDHCI_SDMA=y
     CONFIG_MMC_SDHCI_ROCKCHIP=y

and running roughly:

    $ mmc rescan [0|1|3|10|11|12]
    $ mmc info
    $ mmc part
    $ load mmc 0:1 0xd0000000 256MiB.bin
    $ load mmc 0:1 0xd0000000 16MiB.bin
    $ load mmc 0:1 0xd0000000 8MiB.bin

Here's the differences in info and speeds I get with this:

    Mode                   | Bus Speed    | Bus Width
    -----------------------+--------------+--------------
    MMC Legacy             | 25000000     | 8-bit
    MMC High Speed (26MHz) | 26000000     | 8-bit
    MMC High Speed (52MHz) | 52000000     | 8-bit
    HS200 (200MHz)         | 200000000    | 8-bit
    HS400 (200MHz)         | 200000000    | 8-bit DDR
    HS400ES (200MHz)       | 200000000    | 8-bit DDR

    Mode                   | 256 MiB Load | 16 MiB Load  | 8 MiB Load
    -----------------------+--------------+--------------+--------------
    MMC Legacy             | ~22.1  MiB/s | ~21.9  MiB/s | ~21.6  MiB/s
    MMC High Speed (26MHz) | ~22.1  MiB/s | ~21.9  MiB/s | ~21.6  MiB/s
    MMC High Speed (52MHz) | ~43.7  MiB/s | ~42.8  MiB/s | ~41.7  MiB/s
    HS200 (200MHz)         | ~161.2 MiB/s | ~149.5 MiB/s | ~137.9 MiB/s
    HS400 (200MHz)         | ~254.5 MiB/s | ~235.3 MiB/s | ~216.2 MiB/s
    HS400ES (200MHz)       | ~254.7 MiB/s | ~238.8 MiB/s | ~216.2 MiB/s

Hope I haven't missed anything. Enabling the configs above for each board is left to board maintainers as I can't test on those boards.

Changes in v5:
- Incorporate RK3568 HS400ES fixes from Yifeng Zhao:
- Use DWCMSHC_CTRL_HS400 = 0x7, instead of SDHCI_CTRL_HS400 = 0x5
- Configure DWCMSHC_CARD_IS_EMMC in rk3568_sdhci_set_ios_post()
- Configure DLL_STRBIN and DLL_TXCLK for HS400.
- Drop re-init fix already merged to master

v4: https://patchwork.ozlabs.org/project/uboot/list/?series=283482&state=*

Changes in v4:
- Add comment for SDHCI set_enhanced_strobe() operation
- Add comment for Rockchip SDHCI set_enhanced_strobe() driver data op

v3: https://patchwork.ozlabs.org/project/uboot/list/?series=281327&state=*

Changes in v3:
- Set DWCMSHC_CARD_IS_EMMC bit in rk3568_emmc_phy_init()

v2: https://patchwork.ozlabs.org/project/uboot/list/?series=280494&state=*

Changes in v2:
- Unset ES bit in rk3399 set_control_reg() to fix a reinit issue
- Don't use unnecessary & for function pointer in ops struct
- Rename rk3399_set_enhanced_strobe -> rk3399_sdhci_set_enhanced_strobe
- Rename rk3568_set_enhanced_strobe -> rk3568_sdhci_set_enhanced_strobe
- Let set_enhanced_strobe() unset the ES bit if mode is not HS400_ES
- Rewrote cover letter

v1: https://patchwork.ozlabs.org/project/uboot/list/?series=269768&state=*

Alper Nebi Yasak (3):
mmc: sdhci: Add HS400 Enhanced Strobe support
rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3399
rockchip: sdhci: Add HS400 Enhanced Strobe support for RK3568

 drivers/mmc/rockchip_sdhci.c | 117 +++++++++++++++++++++++++++++++++--
 drivers/mmc/sdhci.c          |  18 ++++++
 include/sdhci.h              |  12 ++++
 3 files changed, 141 insertions(+), 6 deletions(-)
Signature · 1 line
2.35.1