On 11/02/2018 04:58 AM, Masahiro Yamada wrote: > On Thu, Nov 1, 2018 at 9:14 PM Marek Vasut <marek.va...@gmail.com> wrote: >> >> On 11/01/2018 12:38 PM, Masahiro Yamada wrote: >>> On Thu, Nov 1, 2018 at 2:21 AM Marek Vasut <marek.va...@gmail.com> wrote: >>>> >>>> The SD UHS SDR12, SDR25, SDR50, SDR104, DDR50 and MMC HS200, HS400 >>>> modes all use 1.8V signaling, while all the legacy modes use 3.3V >>>> signaling. While there are extra modes which use 1.2V signaling, >>>> the existing hardware does not support those. >>>> >>>> Simplify the pinmux such that 3.3V signaling implies legacy mode >>>> pinmux and the rest implies UHS mode pinmux. This prevents the >>>> massive case statement from growing further. Moreover, it fixes >>>> an edge case where during SD 1.8V switch, the bus mode is still >>>> set to default while the signaling is already set to 1.8V, which >>>> results in an attempt to communicate with a 1.8V card using pins >>>> in 3.3V mode and thus communication failure. >>>> >>>> Signed-off-by: Marek Vasut <marek.vasut+rene...@gmail.com> >>>> Cc: Masahiro Yamada <yamada.masah...@socionext.com> >>>> --- >>>> drivers/mmc/tmio-common.c | 22 +++------------------- >>>> 1 file changed, 3 insertions(+), 19 deletions(-) >>>> >>>> diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c >>>> index 138de59470..5f927c6150 100644 >>>> --- a/drivers/mmc/tmio-common.c >>>> +++ b/drivers/mmc/tmio-common.c >>>> @@ -622,26 +622,10 @@ static void tmio_sd_set_pins(struct udevice *dev) >>>> #endif >>>> >>>> #ifdef CONFIG_PINCTRL >>>> - switch (mmc->selected_mode) { >>>> - case MMC_LEGACY: >>>> - case SD_LEGACY: >>>> - case MMC_HS: >>>> - case SD_HS: >>>> - case MMC_HS_52: >>>> - case MMC_DDR_52: >>>> - pinctrl_select_state(dev, "default"); >>>> - break; >>>> - case UHS_SDR12: >>>> - case UHS_SDR25: >>>> - case UHS_SDR50: >>>> - case UHS_DDR50: >>>> - case UHS_SDR104: >>>> - case MMC_HS_200: >>>> + if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) >>>> pinctrl_select_state(dev, "state_uhs"); >>>> - break; >>>> - default: >>>> - break; >>>> - } >>>> + else >>>> + pinctrl_select_state(dev, "default"); >>>> #endif >>>> } >>> >>> >>> Looks a nice clean-up >>> although the current code is already screwed up, I guess. >>> >>> "state_uhs" is Renesas-specific DT binding >>> while it is sitting in the common code. >> >> Is there any socionext device which supports 1V8 signaling with this core ? >> > > Yes.
You think I can get one ? :) btw are you OK if I queue up patch 1,7,8 already for this cycle, as they are fixes ? I'd also like to pick 4 and 6 if you don't mind? -- Best regards, Marek Vasut _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot