[BPI-R64] OpenWRT kernel 5.4.40 running from eMMC

Sorry, I haven’t seen this problem on my board.

We’re running an iperf for ~2hr now and mt7622 seems stable. How long did you take to see this problem?

@Ryder.Lee and @Kosyak, just to confirm: what board are you using? Is it the R64 rev 1.1? As per post #25, I wonder if you are using mt7633-rfb and not bpi-r64.

BPI-R64 V1.1, but I haven’t mt7615 board, only internal wmac. I also had problem with semaphore, but it gone after I made bluetooth support as module in kernel config.

I’m using this version: https://github.com/openwrt/mt76/commit/f85c1f3fc189c1d86392a88c645130ee124a86b2

There is only one commit after, and it’s related only to mt7615

The module unloading issue is fixed by the commit a69b0b30e661e.

Please check that again.

I don’t see any commit with hash a69b0b* in the log of the master branch of github.com/openwrt/mt76.git

please see above link. but that’s just for his module_unload issue.

As for disconnections of internal WiFi MT7622 after around hour.

I follow steps from here

https://github.com/openwrt/mt76/issues/391#issuecomment-621381769

With

echo 2 > /proc/irq/129/smp_affinity

So interrupt ow mt7615 driver is managed by second CPU.

So far 8 hours and my phone is still connected. New devices unfortunately cannot connect.

New devices unfortunately cannot connect.

what does that mean? oh, so you run both wifi simultaneously, right?

Can you guys join to our development IRC channel #mt76-devel for the prompt reply?

That issue we mentioning here are occurring only on new connections.

After reboot clients can connect successfully during 1 hour ±15 min. After that time new clients cannot connect with “authentication with … timed out” in their dmesg.

If client connected after reboot and don’t disconnecting it will work indefinitely.

I’ve tried several mt76 revision down to 7882bbd25c38be1b3d2a9d9a57381129e5662d4c (2020-01-30) - same behavior.

Restarting hostapd/wpa_supplicant doesn’t helps, reloading mt7615e/mt76 helps for another 1 hour.

Can you guys join to our development IRC channel #mt76-devel for discussion? since I’m not always here.

I set up AP with MT7622.

Within around hour-two I can connect and disconnect any devices to this network. But after this time when I try new device that was not connected before it failed. No error messages in logs.

Can you check temperature with infrared thermometer on your board?

I do have a radiator stick onto CPU and memories

And sys/kernel/debug/ieee80211/phy0/temperature shows 49 deg C

But Im running rtl-sdr USB stick with wmbusmeters to read water and electricity meters. It takes constantly around 25% load of one of CPU. Also Running Home Assistance on that R64.

Did you see this connection problem on mt7615 or only on mt7622? Also, try to use unencrypted connection.

Unfortunately I do not have mt7615 so only mt7622. Will check without encryption.

Enable “force 40MHz mode”

Always use 40MHz channels even if the secondary channel overlaps. Using this option does not comply with IEEE 802.11n-2009!

We can reproduce similar issue - mobile phone from time to time it disconnects and reconnects. I will take a look at that.

Hi. I have partial success to report. Once again for completeness, I am using the BPI R64 rev 1.1 board with BPI MT7615 IPA v1.0 PCIe card in slot CN25.

I used the split pcie-nodes patch and all the other 3 patches listed in post #31 by @frank-w. I also used the eeprom.c from @niebieski20 at https://github.com/m2LiJu/BPI_R64_OpenWRT I have disabled onboard mt7622 wifi (wmac node) and BT in the R64 DTS file.

Now I get the mt7615 enumerated by pcie and dmesg shows N9 firmware and CR4 firmware get loaded by the driver.

root@OpenWrt:/# lspci
01:00.0 Class 0002: 14c3:7615
00:00.0 Class 0604: 14c3:3258
root@OpenWrt:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-lan state UP group default qlen 1000
    link/ether 06:11:8d:b7:b4:e9 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 42:5e:26:0f:2d:a1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::405e:26ff:fe0f:2da1/64 scope link
       valid_lft forever preferred_lft forever
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 06:11:8d:b7:b4:e9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd98:13e6:dbdc::1/60 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::411:8dff:feb7:b4e9/64 scope link
       valid_lft forever preferred_lft forever
6: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
    link/ether 00:0c:43:26:60:00 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::20c:43ff:fe26:6000/64 scope link
       valid_lft forever preferred_lft forever
root@OpenWrt:/#
root@OpenWrt:/# dmesg|grep -E 'mtk|mt76'
[    0.000000] Kernel command line: board=bpi-r64 console=ttyS0,115200n1 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 rootwait service=linux debug=7 initcall_debug=0 androidboot.hardware=mt7622 swiotlb=512
[    0.049689] mtk-tphy 1a0c4000.usb-phy: failed to get ref_clk(id-1)
[    0.747661] mtk_soc_eth 1b100000.ethernet: generated random MAC address d2:72:9c:f8:d2:3e
[    0.756107] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xffffffc011520000, irq 132
[    0.765261] mtk_soc_eth 1b100000.ethernet: generated random MAC address 9e:cb:72:29:93:7d
[    0.773639] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xffffffc011520000, irq 132
[    0.817541] rtc_mt7622 10212800.rtc: registered as rtc0
[    0.828787] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values
[    0.837980] mtk-wdt 10212000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    0.898941] mtk-msdc 11240000.mmc: Got CD GPIO
[    0.956527] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    0.963081] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    0.968916] mtk-pcie 1a143000.pcie:   MEM 0x20000000..0x27ffffff -> 0x20000000
[    0.976246] mtk-pcie mtk_pcie_startup_port_v2. training timeout set to 1000. portbase=10afd000
[    1.000643] mtk-pcie 1a143000.pcie: PCI host bridge to bus 0000:00
[    1.169104] mtk-pcie 1a145000.pcie: host bridge /pcie@1a145000 ranges:
[    1.175632] mtk-pcie 1a145000.pcie: Parsing ranges property...
[    1.181466] mtk-pcie 1a145000.pcie:   MEM 0x28000000..0x2fffffff -> 0x28000000
[    1.188763] mtk-pcie 1a145000.pcie: IRQ index 1 not found
[    1.194202] mtk-pcie mtk_pcie_startup_port_v2. training timeout set to 1000. portbase=10b0d000
[    1.212728] mtk-msdc 11230000.mmc: phase: [map:3fffffff] [maxlen:30] [final:10]
[    2.194226] mtk-pcie mtk_pcie_startup_port_v2. poll timeout. err=-110
[    2.194234] mtk-pcie 1a145000.pcie: Port1 link down
[    2.205657] mtk-pcie 1a145000.pcie: PCI host bridge to bus 0001:00
[    2.239305] mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-requests property
[    2.247485] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver registered
[    7.460869] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[    7.466106] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 1
[    7.475151] xhci-mtk 1a0c0000.usb: hcc params 0x01403198 hci version 0x96 quirks 0x0000000000210010
[    7.484221] xhci-mtk 1a0c0000.usb: irq 128, io mem 0x1a0c0000
[    7.498340] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[    7.503570] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 2
[    7.510967] xhci-mtk 1a0c0000.usb: Host supports USB 3.0 SuperSpeed
[    7.533589] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01T00:00:07 UTC (946684807)
[    7.924297] mtk_soc_eth 1b100000.ethernet: PPE started
[    7.929474] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    7.937789] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   13.192120] __pci_register_driver--> mod_name=mt7615e
[   13.197336] mt7615e 0000:01:00.0: assign IRQ: got 137
[   13.213059] mt7615e 0000:01:00.0: enabling device (0000 -> 0002)
[   13.219141] mt7615e 0000:01:00.0: enabling bus mastering
[   13.235595] __pci_register_driver--> mod_name=mt7615e ret=0
[   13.256493] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   13.297006] mt7615e 0000:01:00.0: N9 Firmware Version: 2.0, Build Time: 20200131181812
[   13.314934] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190121161307
[   14.673574] mtk_soc_eth 1b100000.ethernet eth0: Link is Down
[   14.682066] mtk_soc_eth 1b100000.ethernet: 0x100 = 0xffff9070, 0x10c = 0x100808ff
[   14.689616] mtk_soc_eth 1b100000.ethernet: reset pse
[   14.774577] mtk_soc_eth 1b100000.ethernet: PPE started
[   14.779781] debugfs: Directory 'mtk_ppe' with parent '/' already present!
[   14.786619] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   14.794960] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   14.839456] mtk_soc_eth 1b100000.ethernet eth1: configuring for fixed/rgmii link mode
[   14.847929] mtk_soc_eth 1b100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
root@OpenWrt:/#
F0: 102B 0000
F6: 3800 00A0
F3: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0000 0041 [0000]
G0: 0190 0000
T0: 0000 0335 [000F]
Jump to BL

UNIVPLL_CON0 = 0xFE000000!!!
mt_pll_init: Set pll frequency for 25M crystal
RAM_CONSOLE preloader last status: 0x0 0x0 0x0 0x0 0x0 0x0
[PMIC_WRAP]wrap_init pass,the return value=0.
[pmic_init] Preloader Start..................
[pmic_init] MT6380 CHIP Code, reg_val = 0, 1:E2  0:E3
[pmic_init] Done...................
Chip part number:7622A
MT7622 Version: 1.2.7, (iPA)
SSC OFF
mt_pll_post_init: mt_get_cpu_freq = 1350000Khz
mt_pll_post_init: mt_get_mem_freq = 1600000Khz
mt_pll_post_init: mt_get_bus_freq = 1119920Khz
[PLFM] Init I2C: OK(0)

I don’t know how to enable radio and setup wifi from the command line. So using a wired ethernet connection between my laptop and R64, I access LUCI from the browser. I setup the wifi with no encryption.

The radio shows only 802.11 modes of “Legacy” or “N”. No “AC”.

I am then able to connect my laptop to that SSID. But that is about it. The BPI-R64 completely freezes. The console shell is frozen too. After about 15-30sec, it shows the bootloader messages and brings back to the BL bootmenu.

This is now new realm for me to debug further. @sinovoip, can you help in any way to resolve this?

@frank-w, have you gotten R64 and MT7615 PCIe card to work satisfactorily with debian? I would prefer to use openwrt. But if there is a working version with Debian, I think I can learn the ropes to setup debian based router.

Thanks.