1. 24 6月, 2020 1 次提交
    • H
      mmc: fsl_esdhc_imx: disable the CMD CRC check for standard tuning · ba61676f
      Haibo Chen 提交于
      In current code, we add 1ms dealy after each tuning command for standard
      tuning method. Adding this 1ms dealy is because USDHC default check the
      CMD CRC and DATA line. If detect the CMD CRC, USDHC standard tuning
      IC logic do not wait for the tuning data sending out by the card, trigger
      the buffer read ready interrupt immediately, and step to next cycle. So
      when next time the new tuning command send out by USDHC, card may still
      not send out the tuning data of the upper command,then some eMMC cards
      may stuck, can't response to any command, block the whole tuning procedure.
      
      If do not check the CMD CRC for tuning, then do not has this issue. USDHC
      will wait for the tuning data of each tuning command and check them. If the
      tuning data pass the check, it also means the CMD line also okay for tuning.
      
      So this patch disable the CMD CRC check for tuning, save some time for the
      whole tuning procedure.
      Signed-off-by: NHaibo Chen <haibo.chen@nxp.com>
      ba61676f
  2. 15 6月, 2020 2 次提交
    • M
      mmc: fsl_esdhc: Gracefully fail on unsupported voltage switch · 50a17a69
      Marek Vasut 提交于
      Unsupported voltage on voltage switch is not an error, do not
      print error message in such a case. This happens e.g. if the
      eMMC is already in 1V8 mode or when testing 1V2 mode operation
      on systems which only do 3V3/1V8 switching.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com>
      50a17a69
    • M
      mmc: fsl_esdhc: Fix SDR104 and HS200 support · 406df853
      Marek Vasut 提交于
      The 3V3/1V8 switching could never have worked on any of the iMXes
      ever since 51313b49 ("mmc: fsl_esdhc: support SDR104 and HS200"),
      because that commit uses priv->vqmmc_dev when switching voltages on
      mode switch, while local vqmmc_dev in probe to store the regulator
      pointer. Those are two different variables with the same name. So
      the priv->vqmmc_dev was always NULL and thus voltage switch between
      modes never really suceeded.
      
      Fix this by assigning priv->vqmmc_dev with value of the vqmmc_dev
      in probe.
      
      Fixes: 51313b49 ("mmc: fsl_esdhc: support SDR104 and HS200")
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Peng Fan <peng.fan@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com>
      406df853
  3. 19 5月, 2020 4 次提交
  4. 09 3月, 2020 1 次提交
  5. 06 2月, 2020 2 次提交
  6. 16 1月, 2020 1 次提交
  7. 15 1月, 2020 3 次提交
  8. 15 12月, 2019 1 次提交
    • S
      dm: gpio: Allow control of GPIO uclass in SPL · bcee8d67
      Simon Glass 提交于
      At present if CONFIG_SPL_GPIO_SUPPORT is enabled then the GPIO uclass
      is included in SPL/TPL without any control for boards. Some boards may
      want to disable this to reduce code size where GPIOs are not needed in
      SPL or TPL.
      
      Add a new Kconfig option to permit this. Default it to 'y' so that
      existing boards work correctly.
      
      Change existing uses of CONFIG_DM_GPIO to CONFIG_IS_ENABLED(DM_GPIO) to
      preserve the current behaviour. Also update the 74x164 GPIO driver since
      it cannot build with SPL.
      
      This allows us to remove the hacks in config_uncmd_spl.h and
      Makefile.uncmd_spl (eventually those files should be removed).
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      bcee8d67
  9. 03 12月, 2019 1 次提交
  10. 05 11月, 2019 2 次提交
  11. 15 7月, 2019 5 次提交
  12. 23 6月, 2019 2 次提交
  13. 19 6月, 2019 1 次提交
  14. 23 5月, 2019 2 次提交
  15. 20 5月, 2019 1 次提交
    • L
      Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue" · b6a04275
      Lukasz Majewski 提交于
      This reverts commit 72a89e0d, which
      causes the imx53 HSC to hang as the eMMC is not working properly anymore.
      
      The exact error message:
      MMC write: dev # 0, block # 2, count 927 ... mmc write failed
      0 blocks written: ERROR
      
      imx53 is not using the DDR mode.
      
      Debugging of pre_div and div generation showed that those values are
      generated in a way, which is not matching the ones from working setup.
      
      As the original patch was performing code refactoring, let's revert this
      change, so all imx53 boards would work again.
      Signed-off-by: NLukasz Majewski <lukma@denx.de>
      b6a04275
  16. 03 5月, 2019 2 次提交
    • Y
      mmc: fsl_esdhc: Fix wp_enable issue · da8e1f3c
      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. However the codes
      remain to use internal WP checking.
      
      This patch changes to examine the "fsl,wp-controller" for enabling internal WP
      checking, and "wp-gpios" for muxing to gpio.
      Signed-off-by: NYe Li <ye.li@nxp.com>
      da8e1f3c
    • Y
      mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue · 72a89e0d
      Ye Li 提交于
      When sd/mmc work at DDR mode, like HS400/HS400ES/DDR52/DDR50 mode,
      the output clock rate is half of the internal clock rate.
      
      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: NHaibo Chen <haibo.chen@nxp.com>
      Signed-off-by: NYe Li <ye.li@nxp.com>
      72a89e0d
  17. 16 2月, 2019 1 次提交
  18. 29 1月, 2019 1 次提交
  19. 26 1月, 2019 1 次提交
  20. 18 1月, 2019 1 次提交
  21. 15 1月, 2019 1 次提交
    • F
      mmc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common() · 29c2edb4
      Fabio Estevam 提交于
      The following hang is observed on a Hummingboard 2 MicroSOM
      i2eX iMX6D - rev 1.3 with no eMMC populated on board:
      
      U-Boot SPL 2018.11+gf6206f85 (Nov 16 2018 - 00:56:34 +0000)
      Trying to boot from MMC1
      
      U-Boot 2018.11+gf6206f85 (Nov 16 2018 - 00:56:34 +0000)
      
      CPU:   Freescale i.MX6D rev1.5 996 MHz (running at 792 MHz)
      CPU:   Extended Commercial temperature grade (-20C to 105C) at 33C
      Reset cause: POR
      Board: MX6 HummingBoard2
      DRAM:  1 GiB
      MMC:   FSL_SDHC: 0, FSL_SDHC: 1
      Loading Environment from MMC... *** Warning - bad CRC, using default environment
      
      No panel detected: default to HDMI
      Display: HDMI (1024x768)
      In:    serial
      Out:   serial
      Err:   serial
      ---> hangs
      
      which is caused by the following infinite loop inside esdhc_send_cmd_common()
      
      	while (!(esdhc_read32(&regs->irqstat) & flags))
      		;
      
      Instead of looping forever, provide an exit path so that a timeout
      error can be propagated in the case irqstat does not report
      any interrupts, which may happen when no eMMC is populated on
      board.
      Reported-by: NRicardo Salveti <rsalveti@rsalveti.net>
      Signed-off-by: NFabio Estevam <festevam@gmail.com>
      Tested-by: NPeter Robinson <pbrobinson@gmail.com>
      Tested-by: NRicardo Salveti <rsalveti@rsalveti.net>
      29c2edb4
  22. 01 1月, 2019 1 次提交
  23. 22 10月, 2018 2 次提交
  24. 11 9月, 2018 1 次提交
    • P
      mmc: fsl_esdhc: enable HS400 feature · c76382ff
      Peng Fan 提交于
      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: NPeng Fan <peng.fan@nxp.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Stefano Babic <sbabic@denx.de>
      c76382ff