[BPI-R2 Pro] Mainline Linux Support

But you may need other patches as well.

etc

I have already

And for analog:

Wonder you have patch for switch…this needs modified driver to work…see my patches on patchwork

got hdmi and analog audio and rtc (found by driver after patch from peter) working:

last state (branches in my repo):

  • hdmi: 5.18-r2pro-hdmiv11
  • switch (mt7531): 5.18-mt7531-mainline2 (currently limited to 100M RX on r2pro by port5)
  • pcie3: 5.18-r2pro-pcie3-mainline3
2 Likes

hi frank-w,

Can linux-5.18 kernel support MT7531’s DSA feature, we hope that R2pro can support it. many peoples are

I have it basicly working,but not yet merged for 5.18. Try to get this state in 5.19. Mainline has still fixed CPU-port (6) which needs changes (currently reviewd by dsa maintainer but not yet mtk).

But it looks like there is something wrong in rgmii setup as tx on cpu-port is only 100mbit/s

what do you mean here?

have sent out v3 for pcie3-support

https://patchwork.kernel.org/project/linux-rockchip/list/?series=641646

@balbes150 , maybe you want to include it into your armbian

Hi frank-w, I’m trying to make it work OpenWrt on 5.18, not having the device,wonder if can boot with the quartz64 dtb.

do not use another dtb as iodomain will differ and may brick your board!

you’ll find the right dts-patches in my kernel-repo

I was referring to the u-boot , now I found your patches, I see you are using the evb.dts ,I will update that.

Yes,but this is save only if iodomain is not set…uboot does not set it in dts and not in code, so dts can be used.

Evb have same config for basic function like sd/emmc/clocks/main pinctrl like r2pro,so it can be used here…enough for bootup :slight_smile:

Btw. This thread is about linux,not uboot :slight_smile:

I’ll check out a new set of patches and create new versions of the images.

  • hdmi and rtc dts patches are added for next
  • rtc driver fix is unreviewed, but we have 5 Weeks left for 5.20
  • mt7531 patches for basic support are in net-next too
1 Like

Seems like upper usb-port is broken in 5.19,have not found out why (works in 5.18-main).already set drd-role back to host,but does not fix.

At least pcie ranges are now good without gap, wait for response on bindings and then send out new version with adding missing pinctrl.

I checked the latest version 5.19-rc5 with this set of patches (pay attention to patches 200 and 181) with them, USB works on two ports.

By the way, I’m currently downloading new images with kernel 5.19 for BPIR2pro where USB works.

Thx,200 looks indeed interesting

This patch was published earlier in the patchword.

Can you point to the patch in patchwork?

It seems a revert of this fix

https://www.spinics.net/lists/stable/msg556940.html

And additional change (i guess dropping initialization value does not change anything)

Edit this fixes usb issue:

https://patchwork.kernel.org/project/linux-rockchip/patch/[email protected]/

And of course the dts patch needed you’ll already have and i pushed to mainline today

https://patchwork.kernel.org/project/linux-rockchip/patch/[email protected]/

Hi @frank-w

Before anything else I just want to say I really appreciate all the time and effort you’ve put in to mainline support for the R2Pro!

I’ve checked out your wiki and repos and patchsets, and not having much experience in the kernel I wanted to ask directly where things stand with mainline support these days.

Your wiki mentions that the mt7531 support is partial, with no traffic yet, as well as your own reduced driver. Is that still the case, or maybe waiting on upstream support in net-next?

Also, is there any difference in overall functionality in kernel 5.18-5.20?

If you have a few minutes and are willing to share a general update, it would mean a lot!

Thanks!

dsa network support will be in 5.20,there is traffic…state before was because upstream-port of switch was fixed to p6 and r2pro uses p5…fixed this in my patch-series that land in 5.20

but i experienced a speed limitation (not in phy driver)…have not figured out why this happens @DeadMeat did not see this. in my tests rockchip gmac goes into mii-mode=100M, i guess because of no autoneg is sent from dsa driver

pcie3 is not yet upstreamed, rtc misses driver patch, 5.18 misses hdmi support as dts-pateches are merged with 5.19

analog audio is also not upstreamed as i have not figured out how the mic-switch should work

Understood. That’s very helpful.

Thank you Frank!

For what it’s worth, I have a 1.0 device that I purchased not realizing the state of software support. Mostly intend to use as a linux router with the extra options from sata, gpio, and pci.

Your work goes much deeper than anything I have experience with, but if you’d ever like to check how something behaves on another device, I’d be happy to help however I can.