linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: add Device Tree properties for UHS modes
@ 2013-07-26 15:51 Guennadi Liakhovetski
  2013-07-26 15:51 ` [PATCH/RFC 2/2] ARM: shmobile: kzm9g: support DDR50 mode with 1.8V VccQ on MMCIF Guennadi Liakhovetski
  2013-07-26 17:10 ` [PATCH 1/2] mmc: add Device Tree properties for UHS modes Stephen Warren
  0 siblings, 2 replies; 21+ messages in thread
From: Guennadi Liakhovetski @ 2013-07-26 15:51 UTC (permalink / raw)
  To: linux-sh; +Cc: linux-mmc, Magnus Damm, Chris Ball, devicetree, Simon Horman

Add DT properties for UHS SDR12, SDR25, SDR50, SDR104 and DDR50 modes and
for supported by the host in DDR mode VccQ values. Adding them to DT will
automatically enable respective MMC host capabilities.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
---
 Documentation/devicetree/bindings/mmc/mmc.txt |    7 +++++++
 drivers/mmc/core/host.c                       |   14 ++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
index 458b57f..de4a716 100644
--- a/Documentation/devicetree/bindings/mmc/mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -29,6 +29,13 @@ Optional properties:
 - cap-power-off-card: powering off the card is safe
 - cap-sdio-irq: enable SDIO IRQ signalling on this interface
 - full-pwr-cycle: full power cycle of the card is supported
+- uhs-sdr12: the host supports UHS SDR12 mode
+- uhs-sdr25: the host supports UHS SDR25 mode
+- uhs-sdr50: the host supports UHS SDR50 mode
+- uhs-sdr104: the host supports UHS SDR104 mode
+- uhs-ddr50: the host supports UHS DDR50 mode
+- ddr-1v2: the host can support DDR, using 1.2V VccQ
+- ddr-1v8: the host can support DDR, using 1.8V VccQ
 
 *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line
 polarity properties, we have to fix the meaning of the "normal" and "inverted"
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 6fb6f77..e12fba0 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -423,6 +423,20 @@ int mmc_of_parse(struct mmc_host *host)
 		host->caps |= MMC_CAP_POWER_OFF_CARD;
 	if (of_find_property(np, "cap-sdio-irq", &len))
 		host->caps |= MMC_CAP_SDIO_IRQ;
+	if (of_find_property(np, "uhs-sdr12", &len))
+		host->caps |= MMC_CAP_UHS_SDR12;
+	if (of_find_property(np, "uhs-sdr25", &len))
+		host->caps |= MMC_CAP_UHS_SDR25;
+	if (of_find_property(np, "uhs-sdr50", &len))
+		host->caps |= MMC_CAP_UHS_SDR50;
+	if (of_find_property(np, "uhs-sdr104", &len))
+		host->caps |= MMC_CAP_UHS_SDR104;
+	if (of_find_property(np, "uhs-ddr50", &len))
+		host->caps |= MMC_CAP_UHS_DDR50;
+	if (of_find_property(np, "ddr-1v2", &len))
+		host->caps |= MMC_CAP_1_2V_DDR;
+	if (of_find_property(np, "ddr-1v8", &len))
+		host->caps |= MMC_CAP_1_8V_DDR;
 	if (of_find_property(np, "full-pwr-cycle", &len))
 		host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE;
 	if (of_find_property(np, "keep-power-in-suspend", &len))
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-07-30  2:18 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-26 15:51 [PATCH 1/2] mmc: add Device Tree properties for UHS modes Guennadi Liakhovetski
2013-07-26 15:51 ` [PATCH/RFC 2/2] ARM: shmobile: kzm9g: support DDR50 mode with 1.8V VccQ on MMCIF Guennadi Liakhovetski
2013-07-30  2:18   ` Simon Horman
2013-07-26 17:10 ` [PATCH 1/2] mmc: add Device Tree properties for UHS modes Stephen Warren
2013-07-26 20:23   ` Guennadi Liakhovetski
2013-07-26 21:36     ` Stephen Warren
2013-07-29  6:20       ` Guennadi Liakhovetski
2013-07-29  7:18         ` Guennadi Liakhovetski
2013-07-29 10:50           ` Pawel Moll
2013-07-29 11:27             ` Guennadi Liakhovetski
2013-07-29 11:42               ` Pawel Moll
2013-07-29 12:05                 ` Guennadi Liakhovetski
2013-07-29 13:07                   ` Pawel Moll
2013-07-29 13:30                     ` Guennadi Liakhovetski
2013-07-29 13:37                       ` Pawel Moll
2013-07-29 17:21                       ` Stephen Warren
2013-07-29 13:39           ` Rob Herring
2013-07-29 14:40             ` Guennadi Liakhovetski
2013-07-29 17:28         ` Stephen Warren
2013-07-29 10:57   ` Pawel Moll
2013-07-29 11:10     ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).