diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2014-03-18 05:46:37 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-05-12 06:52:37 -0400 |
commit | ae94cafe293343c2680c638c7af8499d708e4d71 (patch) | |
tree | 29ac23704dd941dab3e49e5cfe156359052e4a01 | |
parent | dc03294ac0b71ab110ad503ca18fc50f0eb15576 (diff) |
mmc: mmci: Add DT bindings for signal direction
Some variants have support for indicating the bus signal directions,
which currently are configured through platform data.
Add corresponding DT bindings to enable us to move away from using the
platform data.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/mmc/mmci.txt | 11 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.c | 11 |
2 files changed, 21 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/mmc/mmci.txt b/Documentation/devicetree/bindings/mmc/mmci.txt index ff233d1eb190..9bd2ffa704a7 100644 --- a/Documentation/devicetree/bindings/mmc/mmci.txt +++ b/Documentation/devicetree/bindings/mmc/mmci.txt | |||
@@ -4,7 +4,8 @@ The ARM PrimeCell MMCI PL180 and PL181 provides an interface for | |||
4 | reading and writing to MultiMedia and SD cards alike. | 4 | reading and writing to MultiMedia and SD cards alike. |
5 | 5 | ||
6 | This file documents differences between the core properties described | 6 | This file documents differences between the core properties described |
7 | by mmc.txt and the properties used by the mmci driver. | 7 | by mmc.txt and the properties used by the mmci driver. Using "st" as |
8 | the prefix for a property, indicates support by the ST Micro variant. | ||
8 | 9 | ||
9 | Required properties: | 10 | Required properties: |
10 | - compatible : contains "arm,pl18x", "arm,primecell". | 11 | - compatible : contains "arm,pl18x", "arm,primecell". |
@@ -18,6 +19,11 @@ Optional properties: | |||
18 | - mmc-cap-sd-highspeed : indicates whether SD is high speed capable. | 19 | - mmc-cap-sd-highspeed : indicates whether SD is high speed capable. |
19 | - vqmmc-supply : phandle to the regulator device tree node, mentioned | 20 | - vqmmc-supply : phandle to the regulator device tree node, mentioned |
20 | as the VCCQ/VDD_IO supply in the eMMC/SD specs. | 21 | as the VCCQ/VDD_IO supply in the eMMC/SD specs. |
22 | - st,sig-dir-dat0 : bus signal direction pin used for DAT[0]. | ||
23 | - st,sig-dir-dat2 : bus signal direction pin used for DAT[2]. | ||
24 | - st,sig-dir-dat31 : bus signal direction pin used for DAT[3] and DAT[1]. | ||
25 | - st,sig-dir-dat74 : bus signal direction pin used for DAT[4] to DAT[7]. | ||
26 | - st,sig-dir-cmd : cmd signal direction pin used for CMD. | ||
21 | 27 | ||
22 | Example: | 28 | Example: |
23 | 29 | ||
@@ -38,6 +44,9 @@ sdi0_per1@80126000 { | |||
38 | mmc-cap-sd-highspeed; | 44 | mmc-cap-sd-highspeed; |
39 | mmc-cap-mmc-highspeed; | 45 | mmc-cap-mmc-highspeed; |
40 | cd-gpios = <&gpio2 31 0x4>; // 95 | 46 | cd-gpios = <&gpio2 31 0x4>; // 95 |
47 | st,sig-dir-dat0; | ||
48 | st,sig-dir-dat2; | ||
49 | st,sig-dir-cmd; | ||
41 | 50 | ||
42 | vmmc-supply = <&ab8500_ldo_aux3_reg>; | 51 | vmmc-supply = <&ab8500_ldo_aux3_reg>; |
43 | vqmmc-supply = <&vmmci>; | 52 | vqmmc-supply = <&vmmci>; |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 57cfd5f7cb24..aa26e810b7ad 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -1392,6 +1392,17 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np, | |||
1392 | { | 1392 | { |
1393 | int bus_width = 0; | 1393 | int bus_width = 0; |
1394 | 1394 | ||
1395 | if (of_get_property(np, "st,sig-dir-dat0", NULL)) | ||
1396 | pdata->sigdir |= MCI_ST_DATA0DIREN; | ||
1397 | if (of_get_property(np, "st,sig-dir-dat2", NULL)) | ||
1398 | pdata->sigdir |= MCI_ST_DATA2DIREN; | ||
1399 | if (of_get_property(np, "st,sig-dir-dat31", NULL)) | ||
1400 | pdata->sigdir |= MCI_ST_DATA31DIREN; | ||
1401 | if (of_get_property(np, "st,sig-dir-dat74", NULL)) | ||
1402 | pdata->sigdir |= MCI_ST_DATA74DIREN; | ||
1403 | if (of_get_property(np, "st,sig-dir-cmd", NULL)) | ||
1404 | pdata->sigdir |= MCI_ST_CMDDIREN; | ||
1405 | |||
1395 | pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0); | 1406 | pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0); |
1396 | pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0); | 1407 | pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0); |
1397 | 1408 | ||