diff options
| author | Pavan Anamula <pavana@codeaurora.org> | 2015-10-16 14:38:28 +0530 |
|---|---|---|
| committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-31 15:27:46 -0700 |
| commit | b4b3041ed65694ab5005a2d53ac36778d25bcca6 (patch) | |
| tree | 34212a502209615dc1ff08b71496b115f8a5c492 | |
| parent | fb4ab70fc2db99bf8319dde6e046de56dd78b1e0 (diff) | |
mmc: sdhci-msm: add the ability to fake 3.0v support for SDIO devices
As SDIO spec doesn't allow advertisement of 1.8v support, some SDIO
devices advertise support of only 3.0v even though they support 1.8v
as well.
sdhc3 host controller only supports 1.8v and rejects the initialization
of SDIO devices that advertise 3.0v support.
This change adds fake support for 3.0v to sdhc host controller.
This will allow initialization of SDIO devices that supports 1.8v but
advertise 3.0v support.
Change-Id: I5a98c54ad4998e6439f83081628c9c083e95bbf0
Signed-off-by: Pavan Anamula <pavana@codeaurora.org>
| -rw-r--r-- | Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 2 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-msm.c | 11 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-msm.h | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt index 6c8c13f335df..39f22c3e1ba5 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt @@ -65,6 +65,8 @@ Optional Properties: when load is high (performance mode) and the second is for low loads (power saving mode). These values will be used for cpu group voting for command-queueing mode or legacy respectively. + - qcom,core_3_0v_support: an optional property that is used to fake + 3.0V support for SDIO devices. In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltage). - qcom,<supply>-always-on - specifies whether supply should be kept "on" always. diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 620391fe7010..1b7185a1a56b 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -1738,6 +1738,9 @@ struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev, sdhci_msm_pm_qos_parse(dev, pdata); + if (of_get_property(np, "qcom,core_3_0v_support", NULL)) + pdata->core_3_0v_support = true; + return pdata; out: return NULL; @@ -3724,6 +3727,14 @@ static void sdhci_set_default_hw_caps(struct sdhci_msm_host *msm_host, (minor == 0x49))) msm_host->use_14lpp_dll = true; + /* Fake 3.0V support for SDIO devices which requires such voltage */ + if (msm_host->pdata->core_3_0v_support) { + caps |= CORE_3_0V_SUPPORT; + writel_relaxed( + (readl_relaxed(host->ioaddr + SDHCI_CAPABILITIES) | + caps), host->ioaddr + CORE_VENDOR_SPEC_CAPABILITIES0); + } + if ((major == 1) && (minor >= 0x49)) msm_host->rclk_delay_fix = true; /* diff --git a/drivers/mmc/host/sdhci-msm.h b/drivers/mmc/host/sdhci-msm.h index 0a90409a7409..01c07a7b881e 100644 --- a/drivers/mmc/host/sdhci-msm.h +++ b/drivers/mmc/host/sdhci-msm.h @@ -151,6 +151,7 @@ struct sdhci_msm_pltfm_data { u32 ice_clk_max; u32 ice_clk_min; struct sdhci_msm_pm_qos_data pm_qos_data; + bool core_3_0v_support; }; struct sdhci_msm_bus_vote { |
