Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 651b8ba2 authored by Guoping Yu's avatar Guoping Yu
Browse files

mmc: sdhci-msm: add no-1-8-v to remove UHS SD card support



Some system physically doesn't support 1.8v, even if the sdhci
host support it. With no-1-8-v, SDHCI_QUIRK2_NO_1_8_V will be
set, and SDR104, SDR50, DDR50 capability will be removed which
work at 1.8v.

Change-Id: Ica88896e9db566c0fc7abb044ab6601023dcb8a2
Signed-off-by: default avatarGuoping Yu <guopingy@codeaurora.org>
parent 6c644c0f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@ Optional Properties:
	- qcom,nonhotplug - specifies the card in slot is not hot pluggable.
			    if card lost or removed manually at runtime, don't retry
			    to redetect it until next reboot probe.
	- qcom,no-1p8v - specifies the system physically doesn't support 1.8v, even if the
			  host does.
	- qcom,bus-speed-mode - specifies supported bus speed modes by host.
				The supported bus speed modes are :
				"HS400_1p8v" - indicates that host can support HS400 at 1.8v.
+7 −0
Original line number Diff line number Diff line
@@ -305,6 +305,7 @@ struct sdhci_msm_pltfm_data {
	struct sdhci_msm_slot_reg_data *vreg_data;
	bool nonremovable;
	bool nonhotplug;
	bool no_1p8v;
	bool pin_cfg_sts;
	struct sdhci_msm_pin_data *pin_data;
	struct sdhci_pinctrl_data *pctrl_data;
@@ -1591,6 +1592,9 @@ static struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev)
	if (of_get_property(np, "qcom,nonhotplug", NULL))
		pdata->nonhotplug = true;

	if (of_property_read_bool(np, "qcom,no-1p8v"))
		pdata->no_1p8v = true;

	if (!of_property_read_u32(np, "qcom,dat1-mpm-int",
				  &mpm_int))
		pdata->mpm_sdiowakeup_int = mpm_int;
@@ -3250,6 +3254,9 @@ static int sdhci_msm_probe(struct platform_device *pdev)
	host->quirks2 |= SDHCI_QUIRK2_IGN_DATA_END_BIT_ERROR;
	host->quirks2 |= SDHCI_QUIRK2_ADMA_SKIP_DATA_ALIGNMENT;

	if (msm_host->pdata->no_1p8v)
		host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;

	/* Setup PWRCTL irq */
	msm_host->pwr_irq = platform_get_irq_byname(pdev, "pwr_irq");
	if (msm_host->pwr_irq < 0) {