Commit 55cd65e4 authored by Stephen Warren's avatar Stephen Warren Committed by Chris Ball

mmc: sdhci-tegra: Add 8-bit support to device tree binding.

The previous patch which implemented a DT binding for sdhci-tegra did not
allow all platform data fields to be initialized from DT. The following
were missing:

is_8bit: Implemented by this patch.

pm_flags: Not implemented yet. There are no mainline users of this field.
  I'm not quite sure what it's for, and hence how to represent this
  in DT; the value ends up being assigned to host->mmc->pm_caps.

While we're at it, fix the binding documentation to refer to "SD/MMC"
instead of "eSDHC", since that's the correct name; "eSDHC" was cut/paste
from the Freescale binding docs.
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 1a5c8e1f
...@@ -5,13 +5,14 @@ and SDIO types of memory cards. ...@@ -5,13 +5,14 @@ and SDIO types of memory cards.
Required properties: Required properties:
- compatible : Should be "nvidia,<chip>-sdhci" - compatible : Should be "nvidia,<chip>-sdhci"
- reg : Should contain eSDHC registers location and length - reg : Should contain SD/MMC registers location and length
- interrupts : Should contain eSDHC interrupt - interrupts : Should contain SD/MMC interrupt
Optional properties: Optional properties:
- cd-gpios : Specify GPIOs for card detection - cd-gpios : Specify GPIOs for card detection
- wp-gpios : Specify GPIOs for write protection - wp-gpios : Specify GPIOs for write protection
- power-gpios : Specify GPIOs for power control - power-gpios : Specify GPIOs for power control
- support-8bit : Boolean, indicates if 8-bit mode should be used.
Example: Example:
...@@ -22,4 +23,5 @@ sdhci@c8000200 { ...@@ -22,4 +23,5 @@ sdhci@c8000200 {
cd-gpios = <&gpio 69 0>; /* gpio PI5 */ cd-gpios = <&gpio 69 0>; /* gpio PI5 */
wp-gpios = <&gpio 57 0>; /* gpio PH1 */ wp-gpios = <&gpio 57 0>; /* gpio PH1 */
power-gpios = <&gpio 155 0>; /* gpio PT3 */ power-gpios = <&gpio 155 0>; /* gpio PT3 */
support-8bit;
}; };
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/of.h>
#include <linux/of_gpio.h> #include <linux/of_gpio.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/mmc/card.h> #include <linux/mmc/card.h>
...@@ -152,6 +153,8 @@ static struct tegra_sdhci_platform_data * __devinit sdhci_tegra_dt_parse_pdata( ...@@ -152,6 +153,8 @@ static struct tegra_sdhci_platform_data * __devinit sdhci_tegra_dt_parse_pdata(
plat->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0); plat->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
plat->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0); plat->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
plat->power_gpio = of_get_named_gpio(np, "power-gpios", 0); plat->power_gpio = of_get_named_gpio(np, "power-gpios", 0);
if (of_find_property(np, "support-8bit", NULL))
plat->is_8bit = 1;
return plat; return plat;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment