aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2018-06-07 15:59:26 +0200
committerJohn Crispin <john@phrozen.org>2018-06-08 09:31:35 +0200
commit55b4b1eba0af6d2240f48eb93d68fb2e9ff41b08 (patch)
treeb5a5d1b50bc181216fd6d2e7737d5fad88daebc9
parentc844d6a8e43a5b76f4aba0a7ab59fe8286482044 (diff)
downloadupstream-55b4b1eba0af6d2240f48eb93d68fb2e9ff41b08.tar.gz
upstream-55b4b1eba0af6d2240f48eb93d68fb2e9ff41b08.tar.bz2
upstream-55b4b1eba0af6d2240f48eb93d68fb2e9ff41b08.zip
ar71xx: fix USB switch to mPCIE for Mikrotik rb91x boards
Some devices like the Mikrotik RB912 only have 1 USB port which is shared between an USB A type port, and the mini PCIe socket. Toggling a gpio selects the output to which USB is connected. Since kernel 4.9, gpio base is rounded up to a value of 32. Commit 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values") accounts correctly for that. In this commit, rb912 sees it's value changed from AR934X_GPIO_COUNT (23) to 32 This means that the USB toggle gpio number actually also changes from 52 to 61. But .. Some of these GPIO numbers are also used in other locations, like the boardfile. The author forgot to also change them over there. Switching the USB port to mPCIe now shows my modem is correctly discovered again: [ 2863.864471] usb 1-1: new high-speed USB device number 4 using ehci-platform [ 2864.055303] usb 1-1: config 1 has an invalid interface number: 8 but max is 3 [ 2864.062728] usb 1-1: config 1 has no interface number 1 [ 2864.074567] qcserial 1-1:1.0: Qualcomm USB modem converter detected [ 2864.081474] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB0 [ 2864.111960] qcserial 1-1:1.2: Qualcomm USB modem converter detected [ 2864.118976] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB1 [ 2864.139808] qcserial 1-1:1.3: Qualcomm USB modem converter detected [ 2864.146777] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB2 [ 2864.165276] qmi_wwan 1-1:1.8: cdc-wdm0: USB WDM device [ 2864.171879] qmi_wwan 1-1:1.8 wwan0: register 'qmi_wwan' at usb-ehci-platform-1, WWAN/QMI device, 02:00:44:ed:3b:11 Fixes: 65da6f9ca164 ("ar71xx: fix secondary gpio controller base values") Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Cc: Robin Leblon <robin.leblon@ncentric.com> Cc: Felix Fietkau <nbd@nbd.name>
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/03_gpio_switches2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches b/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches
index 199a6ac08d..3bb2f635a3 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches
+++ b/target/linux/ar71xx/base-files/etc/board.d/03_gpio_switches
@@ -24,7 +24,7 @@ nanostation-m-xw)
;;
rb-912uag-2hpnd|\
rb-912uag-5hpnd)
- ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "52" "1"
+ ucidef_add_gpio_switch "usb_power_switch" "USB Power Switch" "61" "1"
;;
rb-750up-r2|\
rb-951ui-2nd|\