Adding OpenWrt support for QNAP QHora-301W

root@QNAP:~# mdio 90000.mdio-1
 DEV      PHY-ID  LINK
0x00  0x00000000  down
0x08  0x00000000  down
0x10  0x004dd0b1  up
0x11  0x004dd0b1  up
0x12  0x004dd0b1  up
0x13  0x004dd0b1  up
0x14  0x004dd0b1  down
0x15  0x04820a05  down
root@QNAP:~# mdio 90000.mdio-1 mmd 0:4 raw 0xC441
0x0008

root@QNAP:~# mdio 90000.mdio-1 mmd 0x15:4 0xC441
0x0000
root@QNAP:~# mdio 90000.mdio-1 mmd 0x15:4 0xC440
0x0000
root@QNAP:~# mdio 90000.mdio-1 mmd 0x15:4 0xC442
0x0000

@robimarko Is this the needed info?
@rmandrad
With kernel 6.6.92 (latest build I have before switching to kernel 6.12) 10g-2 port doesn't work (device connected to it cannot get link) but there is no error message at all.
With kernel 6.12, 10g ports are reversed 10g-1 doesn't work with message autoneg time out but 10g-2 works OK.
Firmware load fails on 6.12 when I have device connected to the 10g-1 port at boot.
The registers are the same on k6.6 and 6.12.

2 Likes

those registers show the same on my qnap with 6.12

i agree it makes no sense ... but this is the only way I am able to get the ports working! ...

Hm, its rather weird that autoneg times out since its clearly enabled as 0xC441 is set to 0x8

1 Like

So for now a big warning to those who actively use 10G ports about future upgrades. Too bad if this device is stuck at this point.

Well, somebody has gotta debug this, I dont have the time currently to work on this

2 Likes

Yea, just to put the flag, the issues started around this commit on kernel 6.6.
@Ansuel

I think it's a pcie problem, because I have an ipq8072a using the 6.6 kernel and both PCIs are working fine. One of the pcie connections
root@openwrt:~# lspci
0000:00:00.0 PCI bridge: Qualcomm Technologies, Inc Device 1002
0000:01:00.0 USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03)
0001:00:00.0 PCI bridge: Qualcomm Technologies, Inc MDM9x55 LTE Modem [Snapdragon X16]
root@openwrt:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux 6.6.83 xhci-hcd xHCI Host Controller
Bus 002 Device 001: ID 1d6b:0003 Linux 6.6.83 xhci-hcd xHCI Host Controller
Bus 002 Device 002: ID 2c7c:0801 Quectel RM520N-GL
Bus 002 Device 003: ID 2c7c:0801 Quectel RM520N-GL
Bus 003 Device 001: ID 1d6b:0002 Linux 6.6.83 xhci-hcd xHCI Host Controller
Bus 004 Device 001: ID 1d6b:0003 Linux 6.6.83 xhci-hcd xHCI Host Controller
Bus 004 Device 002: ID 2c7c:0801 Quectel RM520N-GL
Bus 005 Device 001: ID 1d6b:0002 Linux 6.6.83 xhci-hcd xHCI Host Controller
Bus 006 Device 001: ID 1d6b:0003 Linux 6.6.83 xhci-hcd xHCI Host Controller
root@openwrt:~#
But after I used the 6.12 kernel, the Quectel RM520N-GL USB could not be recognized.

I created an issue on github.

3 Likes

I have loaded the firmware from @kirdes https://github.com/kirdesde/nbg7815_gpl/blob/master/target/linux/ipq/ipq807x_64/prebuilt_images/AQR_ethphyfw.mbn repo into the mtd10

and have bootcmd=aq_load_fw 0 && aq_load_fw 8 && bootipq

got both 10g-1 and 10g-2 to work … note this is qosmio nss version

[    2.503188] ssdk_dt_parse_interrupt[942]:INFO:intr-gpio does not exist
[    2.545397] aquantia_phy_api_ops_init[1485]:INFO:qca probe aquantia phy driver succeeded!
[    4.393241] regi_init[2525]:INFO:Initializing HPPE Done!!
[    4.393370] regi_init[2574]:INFO:qca-ssdk module init succeeded!
[    4.400080] EDMA ver 1 hw init
[    4.403962] EDMA HW Reset completed succesfully
[    4.406604] Num rings - TxDesc:1 (23-23) TxCmpl:1 (7-7)
[    4.410998] RxDesc:1 (15-15) RxFill:1 (7-7)
[    4.594033] Qualcomm QCA8075 90000.mdio-1:10: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:10, irq=POLL)
[    4.663530] Qualcomm QCA8075 90000.mdio-1:11: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:11, irq=POLL)
[    4.733515] Qualcomm QCA8075 90000.mdio-1:12: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:12, irq=POLL)
[    4.813545] Qualcomm QCA8075 90000.mdio-1:13: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:13, irq=POLL)
[    4.823258] Aquantia AQR113C 90000.mdio-1:08: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:08, irq=POLL)
[    4.833288] Aquantia AQR113C 90000.mdio-1:00: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:00, irq=POLL)

i haven’t made any changes apart from loading from uboot… don’t really know what is going on

1 Like

Is the NSS build a current one with all the latest commits?

@rmandrad

Can you check this mbn firmware with the command?

dd if=/dev/mtd10 | strings | grep v5

v5.4.4 DNI NBG7815 112019 17:28:07

yes latest

1 Like

ugh, main 10-g phy stopped working today, see this has become a thing… it’s been functional for 3 years.

+1 for no errors, phy reports connection, no sign it’s not functional, no DHCP and static fails

it’s the nss version only? (that was a lot of annoyance and made little to no difference for me, will try switching back).

^ same fw / v5.4.4 DNI NBG7815 112019

It is not consistent, powering it off for some time && removing both connections from 10g phy’s during boot and it works now..

1 Like

Have you always/peviously used that firmware or you used stock or any other 10G FW before @rmandrad suggested workaround using v5.4.4 DNI NBG7815 112019?

I have updated it in the past, but not recently.. it’s been using that firmware for some time.

@rmandrad Thanks a lot for providing this workaround. I've just tried it and It really works. Latest commits from the main branch.
Just a blind shot - maybe a firmware bug in other 10G FW versions.
There are at least several others 10G FW versions floating around the web. Maybe they deserve a try too.
@robimarko Maybe you can try it if that can give you any clue about the actual issue.

1 Like

I mean, I have used the same FW version from the start and only recently this started.

It really screams some kind of MDIO issue to me, but I cannot narrow it down

2 Likes

But I don't understand why the v5.4.4 DNI NBG7815 112019 17:28:07 version of the firmware works for @rmandrad and me.
Does that one work for you if loaded by U-boot?

Look, I dont care whether it works via U-Boot, it must work when loaded by the kernel as it worked just fine

1 Like