RockPi 4 PCIe only running at 2.5GT/s

Hi,

This RockPi 4 looks to be one of my worst purchasing decisions of all time. The designers must have been on drugs - for instance, you cannot get to the eMMC without removing the heatsink first.

Other things that you take for granted - like the TTY being correctly sized to your monitor on boot - are broken on the RockPi 4. It opens the TTYs to what looks like about 640x480 on a 1920x1080 monitor. I have to install the fbset command to fix it, and that has to be done on every TTY. Also the boot menu does not show, so there is no way to choose kernel. I am using extlinux on the Ubuntu Server image.

What is worse is that the onboard devices such as USB and the GPU are “magically” connected - they do not appear on the PCI busses. This is horrible for configuration and development purposes.

Anyway, the question I have is the following:

If I use a Samsung 950 Pro SSD, I only get 600MB/s, which is very slow for PCIe 2.0 x4. Looking into the configuration, it appears that it is only running at 2.5GT/s. How do I get it to work at 5.0GT/s?

It does not matter if I use the ribbon cable or shove the SSD straight in the board, sticking out of the side.

Thanks

I found you have to use dtbo to enable 5GT/s. This is a poor design - PCIe should automatically choose the highest link speed supported by the two endpoints.

Also, my Samsung 950 Pro is now reading at 645MB/s - only a tiny improvement, and much lower than advertised for NVMe speeds for this board.

Based on experiences with X86, PCIe 2.0 x4 or PCIe 3.0 x2 should be good for about 1500-1600MB/s for NVMe after overheads. Something is clearly still wrong here.

Thanks

Another issue is that the IOMMU is not working - it is enabled, but does not place the PCIe devices behind it. Only some other obscure devices.

Another strange thing is that there are six cores running, and two disabled - is the RK3399 actually an 8 core silicon with two cores disabled? Is there any way to enable them? Thanks.

https://wiki.radxa.com/Rockpi4/hardware/devtree_overlays

Name: pcie-gen2
Info: Overlay for activation of pcie running on GEN2 mode.
Load: intfc:dtoverlay=pcie-gen2
1 Like

Thanks. As I said, I figured that out.

But can you tell me why it is still only at 645MB/s sequential reads, even though it is running at 5GT/s? And how to get the IOMMU working?

Dunno here is an EVO 970 on the RockPi4

Command line used: iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
	Output is in kBytes/sec
	Time Resolution = 0.000001 seconds.
	Processor cache size set to 1024 kBytes.
	Processor cache line size set to 32 bytes.
	File stride size set to 17 * record size.
                                                              random    random     bkwd    record    stride                                    
              kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
          102400       4    52099    77524   104207   105324    48114    78504                                                          
          102400      16   160544   231475   276300   278531   160180   233806                                                          
          102400     512   738881   809485   685261   707192   676594   811610                                                          
          102400    1024   795915   841642   708547   730494   693498   851120                                                          
          102400   16384  1111519  1167200  1098700  1139913  1110364  1193693