Skip to contentSkip to conversation

mmc: add no-1-8-v device tree flag

PATCH In review Daniel Drake 2 participants 2 messages Nov 25, 2012 – Dec 3, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 mmc: add no-1-8-v device tree flag

The OLPC XO-1.75 laptop includes a SDHCI controller which is 1.8v capable, and it truthfully reports so in its capabilities. This alternate voltage is used for driving new "UHS-I" SD cards at their full speed.

However, what the controller doesn't know is that the motherboard physically doesn't have a 1.8v supply available, so attempting to switch to the 1.8v level will result in a situation that cannot be recovered from without physically replugging the SD card.

Add a device tree flag that can be used on systems like these, and hook it up to the equivalent SDHCI quirk.

---
 Documentation/devicetree/bindings/mmc/mmc.txt | 2 ++
 drivers/mmc/host/sdhci-pltfm.c                | 3 +++
 2 files changed, 5 insertions(+)
Documentation/devicetree/bindings/mmc/mmc.txt +2 -0
index 8e2e0ba..3f13702 100644
@@ -21,6 +21,8 @@ Optional properties:
 - cd-inverted: when present, polarity on the cd gpio line is inverted
 - wp-inverted: when present, polarity on the wp gpio line is inverted
 - max-frequency: maximum operating clock frequency
+- no-1-8-v: when present, denotes that 1.8v card voltage is not supported on
+  this system, even if the controller claims it is.
 
 Example:
 
drivers/mmc/host/sdhci-pltfm.c +3 -0
index 2716445..0a16534 100644
@@ -78,6 +78,9 @@ void sdhci_get_of_property(struct platform_device *pdev)
 		if (of_get_property(np, "broken-cd", NULL))
 			host->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
 
+		if (of_get_property(np, "no-1-8-v", NULL))
+			host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
+
 		if (of_device_is_compatible(np, "fsl,p2020-rev1-esdhc"))
 			host->quirks |= SDHCI_QUIRK_BROKEN_DMA;
 
Signature · 1 line
1.7.11.7
#1 lore raw

Hi,

Quoted 10 lines · Daniel Drake

The OLPC XO-1.75 laptop includes a SDHCI controller which is 1.8v capable, and it truthfully reports so in its capabilities. This alternate voltage is used for driving new "UHS-I" SD cards at their full speed.

However, what the controller doesn't know is that the motherboard physically doesn't have a 1.8v supply available, so attempting to switch to the 1.8v level will result in a situation that cannot be recovered from without physically replugging the SD card.

Quoted 4 lines

Add a device tree flag that can be used on systems like these, and hook it up to the equivalent SDHCI quirk.

Thanks, pushed to mmc-next for 3.8.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child