Add support for MikroTik RB5009UG

The one I am using was thatI saved with a name of rb5009_patch_openwrt_6.1-20231018-482115.txt. I added some kmods of crypto, spi-dev(for mtpoe tool) in dts file, and today QCA808x replaced AT803x. No more else.

Thanks, that's basically the 2023-09-18 patch but with the performance instead of the schedutil governor.

I've removed the 2024-02-02 patch set from the wiki for now.

I saw errors repeating in dmesg, p1 connects my LAN wireless AP, ethtool show it's now at 100MB speed. this is not good, anybody could help?

==dmesg==
[21460.989929] br-lan: port 1(p1) entered disabled state
[21460.995292] mv88e6085 f212a200.mdio-mii:00 p1: Link is Down
[21482.941052] Qualcomm QCA8081 !cp0!config-space@f2000000!mdio@12a200!switch@0!mdio1:00: Downshift occurred from negotiated speed 1Gbps to actual speed 100Mbps, check cabling!
[21482.972954] mv88e6085 f212a200.mdio-mii:00 p1: Link is Up - 100Mbps/Full - flow control rx/tx

Use code tags please. And actually read what the messages say, there's a very good suggestion in there.

I have been poking at the 2.5G support since its extremely weird but I cannot seem to find what is causing it to not advertise 2.5G

2 Likes

Doesn't look encouraging but I really believe you'll be able to find the reason and fix it.
Thank you.
So in this case with kernel 6.1 it will work only in 1G, right?

Well, I actually managed to get the current linux-next running on this device to test whether something changed regarding the 2.5G advertising and nope, its still limited to 1G.

But now I can upstream the SMI GPIO fix for the switch so that MDIO bus actually works.

5 Likes

Thanks for your efforts robimarko :slightly_smiling_face:.

Thanks for the working @robimarko

I got the upstream 5.15 kernel working and its working at 2.5G on QCA8081, so time to bisect between it and 6.1.

Status:

  • 5.15 - OKAY
  • 5.16 - OKAY
  • 5.17 - OKAY
  • 5.18 - NOT OK

And I tracked it down to conversion do use phylink_generic_validate:

6 Likes

And I figured out why the kernel was not seeing 2.5G as being supported, it is because the PHY does not currently advertise supporting multiple PHY interface modes so Phylink after it does the union of supported interface modes limits to the common mode and only one is SGMII so thus 1G only.

Its an easy fix that I will send upstream today.

8 Likes

Thanks robimarko!!!

4 Likes

Is there a way to pull these patches off the net-next mailing list? I'm not seeing any option on there to download the raw patches.

You can download the patches, but they are not useful without the possible_interfaces support and Phylink support for that, I still need to backport those to 6.1 and its a major pain

Oh, okay. Thanks for the warning.

I finally backported everything that is required and 2.5G is working again, you can find my tree:

5 Likes

Thanks a lot!
Do we just clone and build from it?
Do we still need to apply RB5009UG patch set for 6.1?
I suppose I can use my RB5009UG config from 23.05?

@Borromini Have you already tried it?

You can just clone and build, everything is supposed to be there

4 Likes

It's still fresh and I can't take down my home router during the day, so no. But robimarko's abilities obviously exceed mine :slight_smile:. I have full confidence it's just peachy.

I will update the patch set linked on the wiki tonight if time permits.

Thanks again for the time you spent on this robimarko!

2 Likes

@sppmaster I just updated the patch set, link was added to the wiki. I also ran a build myself - I think I know where the breakage came from with my latest 6.1 update. Seems to be humming along nicely here (no time to test 2.5 GbE).

@robimarko I saw your 6.1 config refresh, I suppose my not enabling the Qualcomm PHY lib symbol is what probably broke my last patch. Should selecting the QCA808x symbol in the kernel config not enable QCOM_NET_PHYLIB? Or am I looking at this the wrong way?

1 Like