diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2018-02-07 17:19:59 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-03-13 21:45:37 -0400 |
commit | 167f2c90f6b4b0561db610fb24f9a5519e0baefd (patch) | |
tree | 1c5e85d1d53750d0b0c46bcd7a88696bcc10013a | |
parent | a72dd8ed95992be67a03073dd28dad27618e5a39 (diff) | |
download | u-boot-167f2c90f6b4b0561db610fb24f9a5519e0baefd.zip u-boot-167f2c90f6b4b0561db610fb24f9a5519e0baefd.tar.gz u-boot-167f2c90f6b4b0561db610fb24f9a5519e0baefd.tar.bz2 |
mmc: stm32: sdmmc2: add support for st, pin-ckinsdmmc_ckin
This patch adds "st,pin-ckin" support to activate sdmmc_ckin feature.
When using an external driver (a voltage switch transceiver),
it's advised to select SDMMC_CKIN feedback clock input to sample
the received data.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
-rw-r--r-- | drivers/mmc/stm32_sdmmc2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c index 3e57835..f5b21dd 100644 --- a/drivers/mmc/stm32_sdmmc2.c +++ b/drivers/mmc/stm32_sdmmc2.c @@ -72,7 +72,10 @@ struct stm32_sdmmc2_ctx { #define SDMMC_CLKCR_HWFC_EN BIT(17) #define SDMMC_CLKCR_DDR BIT(18) #define SDMMC_CLKCR_BUSSPEED BIT(19) -#define SDMMC_CLKCR_SELCLKRX GENMASK(21, 20) +#define SDMMC_CLKCR_SELCLKRX_MASK GENMASK(21, 20) +#define SDMMC_CLKCR_SELCLKRX_CK 0 +#define SDMMC_CLKCR_SELCLKRX_CKIN BIT(20) +#define SDMMC_CLKCR_SELCLKRX_FBCK BIT(21) /* SDMMC_CMD register */ #define SDMMC_CMD_CMDINDEX GENMASK(5, 0) @@ -535,6 +538,8 @@ static int stm32_sdmmc2_probe(struct udevice *dev) priv->clk_reg_msk |= SDMMC_CLKCR_NEGEDGE; if (dev_read_bool(dev, "st,dirpol")) priv->pwr_reg_msk |= SDMMC_POWER_DIRPOL; + if (dev_read_bool(dev, "st,pin-ckin")) + priv->clk_reg_msk |= SDMMC_CLKCR_SELCLKRX_CKIN; ret = clk_get_by_index(dev, 0, &priv->clk); if (ret) |