19 Mar, 2019

3 commits

  • After the commit b9a2a0e2e9c0 ("mmc: Add support for downgrading
    HS200/HS400 to HS mode"), it add a parameter in mmc_set_card_speed()
    which indicates that the HS200/HS400 to HS downgrade is happening.

    During the HS400 initialization, first select to HS200, and config
    the related clock rate, then downgrade to HS mode. So here also need
    to config the downgrade value to be true, make sure in the function
    mmc_set_card_speed(), after switch to HS mode, first config the
    clock rate, then read the EXT_CSD. Otherwise read EXT_CSD in HS mode
    at wrong clock rate, e.g. 200MHz, may lead to uncertain result.

    Test on i.MX8QM MEK board, some Micron eMMC will stuck in transfer
    mode in this case, and USDHC will never get data transfer complete
    status, cause the uboot hang.

    Signed-off-by: Haibo Chen
    (cherry picked from commit 0ba8e1c6efa2e9c34c9b54105d6c50ee293ec1d7)

    Haibo Chen
     
  • When using CMD6 to switch eMMC card timing from HS200/HS400 to HS/legacy,
    do not poll for the completion status using CMD13, but rather wait 50mS.

    Once the card receives the CMD6 and starts executing it, the bus is in
    undefined state until both the card finishes executing the command and
    until the controller switches the bus to matching timing configuration.
    During this time, it is not possible to transport any commands or data
    across the bus, which includes the CMD13.

    Signed-off-by: Marek Vasut
    Cc: Jaehoon Chung
    (cherry picked from commit 5dbade95cb7ebc1f3a309b00430ebf2b466d7aba)
    Signed-off-by: Haibo Chen

    Marek Vasut
     
  • The mmc_select_mode_and_width() function can be called while the card
    is in HS200/HS400 mode and can be used to downgrade the card to lower
    mode, e.g. HS. This is used for example by mmc_boot_part_access_chk()
    which cannot access the card in HS200/HS400 mode and which is in turn
    called by saveenv if env is in the MMC.

    In such case, forcing the card clock to legacy frequency cannot work.
    Instead, the card must be switched to HS mode first, from which it can
    then be reprogrammed as needed.

    However, this procedure needs additional code changes, since the current
    implementation checks whether the card correctly switched to HS mode in
    mmc_set_card_speed(). The check only expects that the card will be going
    to HS mode from lower modes, not from higher modes, hence add a parameter
    which indicates that the HS200/HS400 to HS downgrade is happening. This
    makes the code send the switch command first, reconfigure the controller
    next and finally perform the EXT_CSD readback check. The last two steps
    cannot be done in reverse order as the card is already in HS mode when
    the clock are being switched on the controller side.

    Signed-off-by: Marek Vasut
    Cc: Jaehoon Chung
    (cherry picked from commit 523f613609545252f08f01f346ba4b0403f78b7c)
    Signed-off-by: Haibo Chen

    Marek Vasut
     

13 Nov, 2018

1 commit


20 Aug, 2018

1 commit


13 Aug, 2018

1 commit


11 Aug, 2018

1 commit


13 Jun, 2018

1 commit


27 Apr, 2018

12 commits

  • Flash system partition with fastboot will earse the partition firstly
    The 1.2s timeout will fail on some SD Card.
    Enlarge it to 5s to make it works for most of sdcard

    Change-Id: I285df411c7a07025251fd19f4c8e8b549bee2421
    Signed-off-by: guoyin.chen
    (cherry picked from commit 642d77fb6d6412095faa6584eeef7bb0132cae57)

    guoyin.chen
     
  • Update for HS400 ES and enable iMX8QM/QXP for HS400 and HS400 ES.

    Signed-off-by: Ye Li

    Ye Li
     
  • The eMMC 5.1 supports the HS400 Enhanced Strobe mode, add this
    support to mmc.

    Signed-off-by: Ye Li

    Ye Li
     
  • 600ms is not enough to erase erase_grp_size for some sdcard.
    enlarge to to 1200ms.

    Change-Id: Ic980794fa3064f92b479b87380e694f853f83c6a
    Signed-off-by: zhang sanshan
    (cherry picked from commit 4a1db2cd700ea434e25c0692c545e571f5841a00)

    zhang sanshan
     
  • When sd/mmc work at DDR mode, like HS400/HS400ES/DDR52/DDR50 mode,
    the actual clock rate is just half of the expected clock.

    This patch set the DDR_EN bit first for DDR mode, hardware divide
    the usdhc clock automatically, then follow the original sdr clock
    setting method.

    Signed-off-by: Haibo Chen
    Signed-off-by: Ye Li

    Ye Li
     
  • Add CONFIG_MX8 to use the 64bits support in usdhc driver.

    Signed-off-by: Ye Li
    (cherry picked from commit ec3bed8d0a73cea364981839c7a8ea716640c92f)

    Ye Li
     
  • The formal production name starts with imx, so change relevant names
    in codes to use this prefix.

    Signed-off-by: Ye Li

    Ye Li
     
  • Add the fuse checking in drivers, when the module is disabled in fuse,
    the driver will not work.

    Changed drivers: BEE, GPMI, APBH-DMA, ESDHC, FEC, QSPI, ECSPI, I2C,
    USB-EHCI, GIS, LCDIF and EPDC.

    Signed-off-by: Ye Li
    (cherry picked from commit 1704e116f9b39aeb99201919a18bc2b1e19a980e)
    (cherry picked from commit 2d3b5df8530cd5ef883750378838dea7c40259af)

    Ye Li
     
  • The wp-gpios property is used for gpio, if this is set, the WP pin is muxed
    to gpio function, can't be used as internal WP checking.

    This patch changes to examine the "fsl,wp-controller" for using internal WP checking. And
    wp-gpios for using gpio pin.

    Signed-off-by: Ye Li
    (cherry picked from commit 733a7fde6fea35d6f2ea18c7759a06904b655e54)

    Ye Li
     
  • The strobe dll code is ported from Linux Kernel:
    drivers/mmc/host/sdhci-esdhc-imx.c
    The comments are from the above file,
    "For HS400 eMMC, there is a data_strobe line. This signal is generated
    by the device and used for data output and CRC status response output
    in HS400 mode. The frequency of this signal follows the frequency of
    CLK generated by host. The host receives the data which is aligned to the
    edge of data_strobe line. Due to the time delay between CLK line and
    data_strobe line, if the delay time is larger than one clock cycle,
    then CLK and data_strobe line will be misaligned, read error shows up.
    So when the CLK is higher than 100MHz, each clock cycle is short enough,
    host should configure the delay target. "

    Signed-off-by: Peng Fan
    Cc: Jaehoon Chung
    Cc: Stefano Babic

    Peng Fan
     
  • Add HS400 support.
    Selecting HS400 needs first select HS199 according to spec, so use
    a dedicated function for HS400.
    Add HS400 related macros.
    Remove the restriction of only using the low 6 bits of
    EXT_CSD_CARD_TYPE, using all the 8 bits.

    Signed-off-by: Peng Fan
    Cc: Jaehoon Chung
    Cc: Jean-Jacques Hiblot
    Cc: Stefano Babic
    Cc: Simon Glass
    Cc: Kishon Vijay Abraham I
    Cc: Bin Meng

    Peng Fan
     
  • sd_read_ssr returns 0, means no error.
    Fixes: 5b2e72f32721484("mmc: read ssr only if MMC write support is enabled")

    Signed-off-by: Peng Fan
    Cc: Jaehoon Chung
    Cc: Jean-Jacques Hiblot

    Peng Fan
     

06 Mar, 2018

1 commit


05 Mar, 2018

2 commits


01 Mar, 2018

2 commits


26 Feb, 2018

5 commits


23 Feb, 2018

3 commits


21 Feb, 2018

1 commit


19 Feb, 2018

6 commits