Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>

authored by

Stephen Warren and committed by
Chris Ball
55cd65e4 1a5c8e1f

+7 -2
+4 -2
Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt
··· 5 5 6 6 Required properties: 7 7 - compatible : Should be "nvidia,<chip>-sdhci" 8 - - reg : Should contain eSDHC registers location and length 9 - - interrupts : Should contain eSDHC interrupt 8 + - reg : Should contain SD/MMC registers location and length 9 + - interrupts : Should contain SD/MMC interrupt 10 10 11 11 Optional properties: 12 12 - cd-gpios : Specify GPIOs for card detection 13 13 - wp-gpios : Specify GPIOs for write protection 14 14 - power-gpios : Specify GPIOs for power control 15 + - support-8bit : Boolean, indicates if 8-bit mode should be used. 15 16 16 17 Example: 17 18 ··· 23 22 cd-gpios = <&gpio 69 0>; /* gpio PI5 */ 24 23 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 25 24 power-gpios = <&gpio 155 0>; /* gpio PT3 */ 25 + support-8bit; 26 26 };
+3
drivers/mmc/host/sdhci-tegra.c
··· 17 17 #include <linux/platform_device.h> 18 18 #include <linux/clk.h> 19 19 #include <linux/io.h> 20 + #include <linux/of.h> 20 21 #include <linux/of_gpio.h> 21 22 #include <linux/gpio.h> 22 23 #include <linux/mmc/card.h> ··· 153 152 plat->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0); 154 153 plat->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0); 155 154 plat->power_gpio = of_get_named_gpio(np, "power-gpios", 0); 155 + if (of_find_property(np, "support-8bit", NULL)) 156 + plat->is_8bit = 1; 156 157 157 158 return plat; 158 159 }