Commit 3181788c authored by Linus Walleij's avatar Linus Walleij Committed by Olof Johansson

ARM: nomadik: fix up double inversion in DT

The GPIO pin connected to card detect was inverted twice: once by
the argument to the GPIO line itself where it was magically marked
as active low by the flag GPIO_ACTIVE_LOW (0x01) in the third cell,
and also marked active low AGAIN by explicitly stating
"cd-inverted" (a deprecated method).

After commit 78f87df2
"mmc: mmci: Use the common mmc DT parser" this results in the
line being inverted twice so it was effectively uninverted, while
the old code would not have this effect, instead disregarding the
flag on the GPIO line altogether, which is a bug. I admit the
semantics may be unclear but inverting twice is as good a
definition as any on how this should work.

So fix up the buggy device tree. Use proper #includes so the DTS
is clear and readable.

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent a1ae5b12
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*/ */
/dts-v1/; /dts-v1/;
/include/ "ste-nomadik-stn8815.dtsi" #include "ste-nomadik-stn8815.dtsi"
/ { / {
model = "Calao Systems USB-S8815"; model = "Calao Systems USB-S8815";
......
/* /*
* Device Tree for the ST-Ericsson Nomadik 8815 STn8815 SoC * Device Tree for the ST-Ericsson Nomadik 8815 STn8815 SoC
*/ */
/include/ "skeleton.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include "skeleton.dtsi"
/ { / {
#address-cells = <1>; #address-cells = <1>;
...@@ -842,8 +844,7 @@ mmcsd: sdi@101f6000 { ...@@ -842,8 +844,7 @@ mmcsd: sdi@101f6000 {
bus-width = <4>; bus-width = <4>;
cap-mmc-highspeed; cap-mmc-highspeed;
cap-sd-highspeed; cap-sd-highspeed;
cd-gpios = <&gpio3 15 0x1>; cd-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
cd-inverted;
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>; pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>;
vmmc-supply = <&vmmc_regulator>; vmmc-supply = <&vmmc_regulator>;
......
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