aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorLech Perczak <lech.perczak@gmail.com>2019-12-08 15:23:54 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-12-19 15:40:49 +0100
commitb1e8a390ea7bde59eb47bdd729228cb377aa6f6f (patch)
treeb637df9c9c7bcb30d59403e1ec3d0a7facbe432e /target
parent60de1fdbb4492b5270edf49d634979c0cfd1e743 (diff)
downloadupstream-b1e8a390ea7bde59eb47bdd729228cb377aa6f6f.tar.gz
upstream-b1e8a390ea7bde59eb47bdd729228cb377aa6f6f.tar.bz2
upstream-b1e8a390ea7bde59eb47bdd729228cb377aa6f6f.zip
ath79: restore gpio-export on TL-WDR3600/4300
This partially reverts commit 32144ba275d163ce6e7d93546ab4414f03f508fb. This commit replaced gpio-exports in favor of gpio-hogs for enabling USB power at boot, but this rids the user of control of the USB port power present on this device for a long time. It was agreed on a mailing list [1] that this is not the way to go, and this patch breaks a very common use-case of WWAN modem reset by power cycle, used on a lot USB equipped routers, hence revert this change until a better solution can be found. [1] http://lists.infradead.org/pipermail/openwrt-devel/2019-November/020151.html Tested-by: Sungbo Eo <mans0n@gorani.run> Signed-off-by: Lech Perczak <lech.perczak@gmail.com> [adjusted commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi58
1 files changed, 28 insertions, 30 deletions
diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
index 9ca96cc7cd..7071d35e24 100644
--- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
+++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
@@ -6,6 +6,34 @@
aliases {
label-mac-device = &ath9k;
};
+
+ gpio-export {
+ compatible = "gpio-export";
+
+ gpio_usb1_power {
+ gpio-export,name = "tp-link:power:usb1";
+ gpio-export,output = <1>;
+ gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio_usb2_power {
+ gpio-export,name = "tp-link:power:usb2";
+ gpio-export,output = <1>;
+ gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio_ext_lna0 {
+ gpio-export,name = "tp-link:ext:lna0";
+ gpio-export,output = <1>;
+ gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio_ext_lna1 {
+ gpio-export,name = "tp-link:ext:lna1";
+ gpio-export,output = <1>;
+ gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
+ };
+ };
};
&leds {
@@ -24,36 +52,6 @@
};
};
-&gpio {
- lna0 {
- gpio-hog;
- gpios = <18 GPIO_ACTIVE_HIGH>;
- output-high;
- line-name = "tp-link:ext:lna0";
- };
-
- lna1 {
- gpio-hog;
- gpios = <19 GPIO_ACTIVE_HIGH>;
- output-high;
- line-name = "tp-link:ext:lna1";
- };
-
- usb1_power {
- gpio-hog;
- gpios = <22 GPIO_ACTIVE_HIGH>;
- output-high;
- line-name = "tp-link:power:usb1";
- };
-
- usb2_power {
- gpio-hog;
- gpios = <21 GPIO_ACTIVE_HIGH>;
- output-high;
- line-name = "tp-link:power:usb2";
- };
-};
-
&usb {
#address-cells = <1>;
#size-cells = <0>;