@klukonin has already done most of the hard part of adding support for this router in his pull request and later improved in a branch. Similar patch has been also shared by @drwatson32.
All of the essentials like ethernet, wireless, sysupgrade, leds and reset work.
However, I'm struggling to get the mniPCIe modem working. The software part appears to have been solved with kmod-acm kmod-usb-net-rndis
. Similar solution here.
The biggest pain is that the modem almost never shows up after triggering the relevant GPIO13
, instead, I'm just getting a Marvell Nezha device with Vendor=1286 ProdID=8130
:
lsusb
Bus 001 Device 006: ID 1286:8130 Marvell Semiconductor, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
cat /sys/kernel/debug/usb/devices
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs= 1
P: Vendor=1286 ProdID=8130 Rev= 0.00
S: Manufacturer=MARVELL
S: Product=NEZHA
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 10mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
dmesg
[ 1114.475335] usb 1-1: new high-speed USB device number 5 using ehci-platform
[ 1114.677742] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 64
[ 1114.687037] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 64
[ 1148.524813] usb 1-1: USB disconnect, device number 5
Somehow, right on the very first couple of tries it did show up, but I couldn't replicate it since then:
cat /sys/kernel/debug/usb/devices
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=2cd2 ProdID=0001 Rev= 1.00
S: Manufacturer=MikroTik
S: Product=R11e-LTE
S: SerialNumber=000000000000
C #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
dmesg
[ 3375.219882] usb 1-1: new high-speed USB device number 4 using ehci-platform
[ 3380.541662] rndis_host 1-1:1.0 eth1: register 'rndis_host' at usb-ehci-platform-1, RNDIS device, ac:ff:ff:00:00:100
I think we could be missing a GPIO to disable the USB power. Interestingly though, there seems to be nothing like that in the ROS 6.44 patch:
+static struct platform_device ltap_hb_led_device = {
+ .name = "leds-rb",
+ .id = -1,
+ .dev = {
+ .platform_data = &(unsigned[]) {
+ PLD(user_led, 14, GPIO),
+ PLD(wlan_led, 11, GPIO),
+ PLD(sfp_led, 4, GPIO),
+ PLDI(button, 16, GPIOLIB),
+ PLDI(mode_button, 3, GPIOLIB),
+ PLDI(pcie_power_off, 13, GPIOLIB),
+ PLD(sim_select, 15, GPIOLIB),
+ PLED(gps_mux, 0, GPIOLIB, PLED_CFG_KEEP),
+ PLD(gps_ant_select, 1, GPIOLIB),
+ PLD(gps_reset, 2, GPIOLIB),
+ 0
+ },
+ },
+};