RK3588 images

Hi,
I have a Radxa MiniITX5 and I have managed to get FreeBSD booting but with several things I would like to fix..
  • Ethernet doesn't work - the in tree driver wants MSIX but can't get one so fails
  • X (or Wayland) desktop
  • SD/eMMC (I installed by imaging to an NVME drive)
I have installed Tiano EDK2 into SPI flash, I tried a few other ways but that broke more things..

Some searching here shows people seem to have had good success but I can't find the code (or better yet bootable images..)

Thanks
 
 
I was hoping for something fresh as a lot changes in 3 years..
 
FWIW I have working:
  • ZFS on an M.2 NVME
  • M.2 card slot (put a wifi card in it and it is detected via PCI & USB, haven't done more)
  • SATA ports work (AsMedia ASM1164)
  • Network ports work (RTL8125 with realtek-re-kmod198, realtek-re-kmod panics on network activity)
  • USB2/3 ports work
  • HDMI works for text console
  • RTC (shows up as `efirtc0` and appears to remember time)
Things which don't work:
  • MMC (nothing SPI or MMC related shows up in dmesg)
  • SoC frequency control
  • SoC temperature monitoring
  • Graphical console (Xorg or whatever)
Things I haven't tried:
  • Camera in
  • LCD/eDP out
  • Audio / SPDIF
 
I built the code at https://github.com/jsm222/drm-subtree and loaded it but nothing attaches, it doesn't appear to build the panfrost code

I think this and the MMC issue are because I am using ACPI, I can switch to FDT by putting `kern.cfg.order=fdt` in loader.conf.

In that case I see a lot more stuff but everything fails to attach so overall it is less functional (no PCIe bus so no NVME or network) but MMC does appear to work in that case..
 
Digging into the PCIe problem it reports..
pcib0: <RockChip RK3568 PCI-express controller> mem 0xa40000000-0xa403fffff,0xfe150000-0xfe15ffff,0xf0000000-0xf00fffff irq 127,128,129,130,131 on ofwbus0
pcib0: Can not get reset
device_attach: pcib0 attach returned 6

Which is this code..
if (hwreset_get_by_ofw_name(dev, 0, "pipe", &sc->hwreset)) {
device_printf(dev, "Can not get reset\n");

However I think it _should_ find it because the DTB has..
pcie@fe180000 {
compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
...
reg = <0xa 0x40c00000 0x0 0x400000 0x0 0xfe180000 0x0 0x10000 0x0 0xf3000000 0x0 0x100000>;
reg-names = "dbi", "apb", "config";
resets = <0x21 0x129 0x21 0x12e>;
reset-names = "pwr", "pipe";
#address-cells = <0x3>;
#size-cells = <0x2>;
status = "okay";
...
 
I'm currently developing version 14.3 on a NanoPC-T6 LTS, but I chose u-boot instead of edk2.

Regarding the Ethernet card driver, you can try this: https://github.com/erikarn/if_rge_freebsd or version 1.102.01, which might be helpful.

Basically, all the adaptation work had to be redone. Looking back, choosing edk2 did handle many initialization issues.
 
I'm currently developing version 14.3 on a NanoPC-T6 LTS, but I chose u-boot instead of edk2.

Regarding the Ethernet card driver, you can try this: https://github.com/erikarn/if_rge_freebsd or version 1.102.01, which might be helpful.

Basically, all the adaptation work had to be redone. Looking back, choosing edk2 did handle many initialization issues.
I believe that was committed to base, I did test it (with 15.1) but does not attach (complains it can't setup an MSIX IRQ).
In any case the port I used is good enough for now for my application.

I think FDT would be nice because it does expose a lot more hardware but I suppose the downside is the OS has to init it all :)
 
Back
Top