03 Dec, 2018

14 commits

  • Enable the HS400 support code on H3, M3W, M3N Salvator-X(S)
    and ULCB boards as well as E3 Ebisu board.

    Signed-off-by: Marek Vasut
    Cc: Nobuhiro Iwamatsu

    Marek Vasut
     
  • Enable the HS400 support in DT on H3, M3W, M3N Salvator-X(S)
    and ULCB boards as well as E3 Ebisu board.

    Signed-off-by: Marek Vasut
    Cc: Nobuhiro Iwamatsu

    Marek Vasut
     
  • Add regulators and pinmuxes for SDHI0 and SDHI1 SD and microSD
    slots on E3 Ebisu and mark them as capable of up to SDR104 mode
    of operation. With the SDHI fixes in place, it is now possible
    to use SDR104.

    Signed-off-by: Marek Vasut
    Cc: Nobuhiro Iwamatsu

    Marek Vasut
     
  • Enable SDR104 modes on M3W and H3 boards. With the SDHI fixes
    in place, it is now possible to use SDR104.

    Signed-off-by: Marek Vasut
    Cc: Nobuhiro Iwamatsu

    Marek Vasut
     
  • Add pinmux entry for the eMMC DS line, as it is connected on these boards.

    Signed-off-by: Marek Vasut
    Cc: Nobuhiro Iwamatsu

    Marek Vasut
     
  • Add support for the HS400 mode to SDHI driver. This uses the up-tune
    mechanism from already supported HS200 tuning.

    Signed-off-by: Marek Vasut
    Cc: Masahiro Yamada

    Marek Vasut
     
  • Move the tap_pos variable, which is the HS200/HS400/SDR104 calibration
    offset, into private data, so it can be passed around. This is done in
    preparation for the HS400 mode, which needs to adjust this value.

    Signed-off-by: Marek Vasut
    Cc: Masahiro Yamada

    Marek Vasut
     
  • Filter out HS400 support on SoCs where HS400 is not supported yet.

    Signed-off-by: Marek Vasut
    Cc: Masahiro Yamada

    Marek Vasut
     
  • Reorder the tmio_sd_set_clk_rate() function such that it handles all
    of the clock requiests correctly. Specifically, before this patch,
    clock request with (mmc->clock == 0 && mmc->clk_disable) could leave
    the clock enabled, as the function would exit on if (!mmc->clock)
    condition on top and will not handle the mmc->clk_disable at all.

    Rather than band-aid fixing just that particular problem, reorder
    the entire function to make it easier to understand and verify that
    all the cases are covered. The function has three sections now:

    First, if mmc->clock != 0, we calculate divider for the SD block.
    Second, if mmc->clock != 0 and SD block clock are enabled and
    current divider is not equal to the new divider, then
    stop the clock and update the divider.
    Third, if mmc->clk_disable is set, disable the clock, otherwise
    enable the clock. This happens independently of divider
    update now.

    Signed-off-by: Marek Vasut
    Cc: Masahiro Yamada

    Marek Vasut
     
  • The TMIO core has a feature where it can automatically disable clock output
    when the bus is not in use. While this is useful, it also interferes with
    switching the bus to 1.8V and other background tasks of the SD/MMC cards,
    which require clock to be enabled.

    This patch respects the mmc->clk_disable and only disables the clock when
    the MMC core requests it. Otherwise the clock are continuously generated
    on the bus.

    Signed-off-by: Marek Vasut
    Cc: Masahiro Yamada

    Marek Vasut
     
  • The TMIO core has a quirk where divider == 1 must not be set in DDR modes.
    Handle this by setting divider to 2, as suggested in the documentation.

    Signed-off-by: Marek Vasut
    Cc: Masahiro Yamada

    Marek Vasut
     
  • Switch the driver to using clk_get_rate()/clk_set_rate() instead of
    caching the mclk frequency in it's private data. This is required on
    the SDHI variant of the controller, where the upstream mclk need to
    be adjusted when using UHS modes.

    Platforms which do not support clock framework or do not support it
    in eg. SPL default to 100 MHz clock.

    Signed-off-by: Marek Vasut
    Cc: Masahiro Yamada
    ---
    V2: - Fix build on certain platforms using SPL without clock framework
    V3: - Turn clk_get_rate into a callback and fill it as needed on both
    renesas and socionext platforms

    Marek Vasut
     
  • Add HS400 properties parsing support to mmc_of_parse().

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

    Marek Vasut
     
  • The SDHI clock must be configured differently for HS200/HS400/SDR104
    modes. Add support for reconfiguring the SDHI clock settings into the
    clock driver.

    Signed-off-by: Marek Vasut
    Cc: Nobuhiro Iwamatsu

    Marek Vasut
     

02 Dec, 2018

2 commits


01 Dec, 2018

23 commits


30 Nov, 2018

1 commit