How to use BPI-4G LTE module with BPI-R2

Hello @sinovoip. How can I make EC25-E 4G module work with BPI R64 with OpenWrt?

I installed the board to CN8 slot but after compiling OpenWrt image with kmod-usb-net-qmi-wwan support I have nothing listed under lsusb:

[email protected]:/# lsusb 
Bus 002 Device 001: ID 1d6b:0003 Linux 5.10.51 xhci-hcd xHCI Host Controller
Bus 001 Device 001: ID 1d6b:0002 Linux 5.10.51 xhci-hcd xHCI Host Controller
[email protected]:/# ls /dev/tty
tty    ttyS0  ttyS1

UPD: I’ve figured out that I need to enable USB support on CN8 slot by switching GPIO90 to high level. But I always get a “Resource busy” error:

[email protected]:/# cat /sys/kernel/debug/gpio 
gpiochip0: GPIOs 409-511, parent: platform/10211000.pinctrl, pinctrl_moore:
 gpio-409 (                    |reset               ) in  hi IRQ 
 gpio-463 (                    |reset               ) out hi 
 gpio-490 (                    |cd                  ) in  lo IRQ ACTIVE LOW
 gpio-494 (                    |bpi-r64:pio:blue    ) out lo 
 gpio-498 (                    |bpi-r64:pio:green   ) out lo 
 gpio-499 (                    |asm_sel             ) in  lo 
 gpio-511 (                    |wps                 ) in  hi IRQ 
[email protected]:/# echo 499 > /sys/class/gpio/export
ash: write error: Resource busy

I even have this line in dmesg, but GPIO90 (499 as 409+90) is still set to in/lo:

[    0.028706] gpio-499 (asm_sel): hogged as output/high

I have the same problem. And I think it’s a hardware issue. It doesn’t matter what driver you have compiled cause the board (not os) doesn’t see the module. GPIO90 is set to high while os is booting and gets low after that. To make sure you have pcie mode try fw_printenv bootconf.

If I remember correctly the issue was in my custom OpenWRT build. After I’ve reset my build environment to defaults everything started working correctly. I also resoldered CN8 resistor to increase port power ([BPI-R64] OpenWRT kernel 5.4.40 running from eMMC).