OpenWrt Forum Archive

Topic: [SOLVED] Problems with the MiniPCI-e slot on MikroTik board

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello list!
I've installed OpenWrt Chaos Calmer (r44972) on a Mikrotik RouterBoard RB912UAG-5HPnD and I'm facing troubles with the on-board MiniPCI Express slot: any device I connect is not detected (I've tried with "Huawei EM820W" HSPA+ module and "Huawei ME909u-512" LTE module).

I think it is just a matter of how the PCI/USB subsystems are initialized. In fact, the RB912UAG-5HPnD board has partially shared USB port and miniPCIe slot. Due to hardware restrictions it is possible to use only one at the time for 3G modem [1].

I don't know if relevant, but at boot I see the following messages.

root@OpenWrt:/# dmesg | grep -i pci
[    0.320000] ar724x-pci ar724x-pci: PCIe link is down
[    0.330000] registering PCI controller with io_map_base unset
[    0.330000] PCI host bridge to bus 0000:00
[    0.340000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.340000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.350000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.350000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.400000] PCI: CLS 0 bytes, default 32
[    5.450000] ehci-pci: EHCI PCI platform driver
root@OpenWrt:/# dmesg | grep -i usb
[    5.340000] usbcore: registered new interface driver usbfs
[    5.350000] usbcore: registered new interface driver hub
[    5.350000] usbcore: registered new device driver usb
[    5.380000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.400000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    5.430000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    5.430000] hub 1-0:1.0: USB hub found
[    5.460000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.470000] uhci_hcd: USB Universal Host Controller Interface driver

And after that:

root@OpenWrt:/# lspci
root@OpenWrt:/# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

On Mikrotik's RouterOS there is a setting in the '/system routerboard usb' menu to select the USB port type. The available properties are: USB-type-A and mini-PCIe. Once the USB port type is set to "mini-PCIe", Mikrotik's RouterOS recognizes my PCIe devices and ignores any USB device connected the USB port. On the other hand, OpenWrt only sees the USB device and does not detect any PCIe device.

Is there a way to tell OpenWrt the USB port type to use? Is it a matter of GPIO settings? Has anyone had the same problems?

Thank you and best regards,
Giorgio Buffa


[1]: http://wiki.mikrotik.com/wiki/Manual:US … _port_type

(Last edited by giorgiobuffa.work on 14 Apr 2015, 15:42)

Hello.
My boss has found a solution. The USB port is powered by GPIO 52, while the Mini-PCIe connector is enabled by GPIO 53.

At boot, they are both set as direction=out, value=1. Hence, in order to use the Mini-PCIe device, you need to issue the following commands to disable the USB port.

# Make GPIO available in Linux
echo "52" > /sys/class/gpio/export

# Power-off USB port.
echo "0" > /sys/class/gpio/gpio52/value

The discussion might have continued from here.