diff options
author | Kristian Evensen <kristian.evensen@gmail.com> | 2017-09-12 18:27:10 +0200 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2017-09-13 08:07:54 +0200 |
commit | 133815ad8f5641d2728fe3925a6bab1663fd7399 (patch) | |
tree | f6c3ae46d1594e5eadb2776c4fd020aa185e9186 | |
parent | 161a3be5adb21135eb75da81247fa5e04b6ea676 (diff) | |
download | upstream-133815ad8f5641d2728fe3925a6bab1663fd7399.tar.gz upstream-133815ad8f5641d2728fe3925a6bab1663fd7399.tar.bz2 upstream-133815ad8f5641d2728fe3925a6bab1663fd7399.zip |
ramips: fix D240 mini-PCIe power control GPIOs
In commit b11c51916cb9 ("ramips: Improve Sanlinking D240 config") I made
a mistake with regards GPIO numbering. And in addition to specifying the
wrong GPIO for controling the power of one of the mini-PCIe, I recently
discovered that the power of both slots can be controlled.
This patch specifies the correct GPIO for the left-most mini-PCIe slot
of the D240 (labeled power_mpcie2 since the slot is attached to SIM2),
and adds a GPIO that can be used to control the power of the other
mini-PCIe slot (labeled power_mpcie1).
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
[do not use the gpio active macros for the gpio-export value]
Signed-off-by: Mathias Kresin <dev@kresin.me>
-rw-r--r-- | target/linux/ramips/dts/D240.dts | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/target/linux/ramips/dts/D240.dts b/target/linux/ramips/dts/D240.dts index 4f3da8d316..392e92d466 100644 --- a/target/linux/ramips/dts/D240.dts +++ b/target/linux/ramips/dts/D240.dts @@ -52,9 +52,16 @@ power_mpcie2 { gpio-export,name = "power_mpcie2"; - gpio-export,output = <GPIO_ACTIVE_LOW>; - gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + gpio-export,output = <1>; + gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; }; + + power_mpcie1 { + gpio-export,name = "power_mpcie1"; + gpio-export,output = <1>; + gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; + }; + }; gpio-leds { @@ -94,6 +101,10 @@ status = "okay"; }; +&gpio2 { + status = "okay"; +}; + &gpio3 { status = "okay"; }; @@ -157,7 +168,7 @@ &pinctrl { state_default: pinctrl0 { default { - ralink,group = "i2c", "uartf", "wled", "spi refclk", "pa"; + ralink,group = "i2c", "uartf", "wled", "spi refclk", "pa", "nd_sd"; ralink,function = "gpio"; }; }; |