aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-01-30 14:59:25 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-21 14:12:30 +0100
commit7cbd39421e6718f9320614b9d24370fb9822e056 (patch)
tree94ff0ec0e8422415688693d5b829a7bf451b7513
parent085f38351feb2dcae0a2c7cace0e60452928615d (diff)
downloadupstream-7cbd39421e6718f9320614b9d24370fb9822e056.tar.gz
upstream-7cbd39421e6718f9320614b9d24370fb9822e056.tar.bz2
upstream-7cbd39421e6718f9320614b9d24370fb9822e056.zip
ath79: add gpio4 pinmux on TL-WR841N/ND v8, WR842N v2, MR3420 v2
This adds a pinmux to the shared DTSI for TP-Link TL-WR841N/ND v8, TL-WR842N v2 and TL-MR3420 v2. It is supposed to be the equivalent of: /* config gpio4 as normal gpio function */ ath79_gpio_output_select(TL_MR3420V2_GPIO_USB_POWER,AR934X_GPIO_OUT_GPIO); This allows to enable USB power on these devices. While at it, move the jtag_disable_pins to &gpio node and remove the redundant status=okay there. Tested on TP-Link TL-WR842N v2. Fixes: FS#2753 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Tested-by: Armin Fuerst <armin@fuerst.priv.at> [backport: change individual DTS files, no mr3420-v2 present] (backported from commit 18c95c9d6ebea5cef1254ee917bff8aba993666d)
-rw-r--r--target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts12
-rw-r--r--target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts12
2 files changed, 16 insertions, 8 deletions
diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts
index ec89be5318..ccc0c195ca 100644
--- a/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts
+++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts
@@ -22,9 +22,6 @@
compatible = "gpio-keys-polled";
poll-interval = <20>;
- pinctrl-names = "default";
- pinctrl-0 = <&jtag_disable_pins>;
-
reset {
label = "Reset";
linux,code = <KEY_RESTART>;
@@ -96,7 +93,14 @@
};
&gpio {
- status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&jtag_disable_pins &pmx_usb_power>;
+};
+
+&pinmux {
+ pmx_usb_power: usb_power {
+ pinctrl-single,bits = <0x4 0x0 0xff>;
+ };
};
&spi {
diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
index c7a251cbf1..e64a822078 100644
--- a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
+++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
@@ -22,9 +22,6 @@
compatible = "gpio-keys-polled";
poll-interval = <20>;
- pinctrl-names = "default";
- pinctrl-0 = <&jtag_disable_pins>;
-
reset {
label = "Reset";
linux,code = <KEY_RESTART>;
@@ -113,7 +110,14 @@
};
&gpio {
- status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&jtag_disable_pins &pmx_usb_power>;
+};
+
+&pinmux {
+ pmx_usb_power: usb_power {
+ pinctrl-single,bits = <0x4 0x0 0xff>;
+ };
};
&spi {