NanoPi R6S & Linux 6.3 ARM SoC Updates

Yeah that's my patchset :slight_smile:

We should have reasonable mainline OpenWRT support when the mice to 6.1 kernel happens

6 Likes

The NanoPi R6C hardware configuration is almost the same as the R6S. They just traded one of the 2.5G ports for a M.2 port. Is your patch set compatible with the R6C?

Yes it should be, I'm waiting for OpenWRT to bring in 6.1.

When that happens we should have a relatively working setup

3 Likes

So does it mean the R6S/R6C would get a stable v6.1 kernel release soon?

Lets hope right :innocent:, my r6c is still in transit but should arrive early may.

I'm working with the R6C on my linux-6.4 branch, I have added testing OpenWrt firmware images for the R6S/R6C, untested on the R6S, so do not flash in the internal eMMC , USB3 port is not working, the driver not yet supported upstream.

9 Likes

@mj82 Nice work,I tested on my R6C, booted it from an SD Card, other the USB3 port everything seemed to just work and perform slightly better than friendlywrt.
2.5 Gb ethernet port iperf3 test

root@OpenWrt:~#  iperf3 -c 192.168.1.120
Connecting to host 192.168.1.100, port 5201
[  5] local 192.168.1.1 port 48040 connected to 192.168.1.120 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   275 MBytes  2.30 Gbits/sec   30    263 KBytes       
[  5]   1.00-2.00   sec   280 MBytes  2.34 Gbits/sec    6    263 KBytes       
[  5]   2.00-3.00   sec   275 MBytes  2.31 Gbits/sec    0    263 KBytes       
[  5]   3.00-4.00   sec   280 MBytes  2.35 Gbits/sec   17    185 KBytes       
[  5]   4.00-5.00   sec   280 MBytes  2.35 Gbits/sec    0    255 KBytes       
[  5]   5.00-6.00   sec   280 MBytes  2.35 Gbits/sec    5    247 KBytes       
[  5]   6.00-7.00   sec   274 MBytes  2.30 Gbits/sec   33    252 KBytes       
[  5]   7.00-8.00   sec   281 MBytes  2.36 Gbits/sec    0    252 KBytes       
[  5]   8.00-9.00   sec   279 MBytes  2.35 Gbits/sec   18    253 KBytes       
[  5]   9.00-10.00  sec   281 MBytes  2.35 Gbits/sec    0    253 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  2.72 GBytes  2.34 Gbits/sec  109             sender
[  5]   0.00-10.00  sec  2.72 GBytes  2.33 Gbits/sec                  receiver

iperf Done.
root@OpenWrt:~#  iperf3 -c 192.168.1.120 -R
Connecting to host 192.168.1.120, port 5201
Reverse mode, remote host 192.168.1.120 is sending
[  5] local 192.168.1.1 port 50414 connected to 192.168.1.120 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   273 MBytes  2.29 Gbits/sec                  
[  5]   1.00-2.00   sec   279 MBytes  2.34 Gbits/sec                  
[  5]   2.00-3.00   sec   280 MBytes  2.35 Gbits/sec                  
[  5]   3.00-4.00   sec   280 MBytes  2.35 Gbits/sec                  
[  5]   4.00-5.00   sec   280 MBytes  2.35 Gbits/sec                  
[  5]   5.00-6.00   sec   280 MBytes  2.35 Gbits/sec                  
[  5]   6.00-7.00   sec   280 MBytes  2.35 Gbits/sec                  
[  5]   7.00-8.00   sec   280 MBytes  2.35 Gbits/sec                  
[  5]   8.00-9.00   sec   279 MBytes  2.34 Gbits/sec                  
[  5]   9.00-10.00  sec   279 MBytes  2.34 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec  2.72 GBytes  2.34 Gbits/sec                  sender
[  5]   0.00-10.00  sec  2.72 GBytes  2.34 Gbits/sec                  receiver

iperf Done.

NVMe SSD on the m.2 slot

Device         Start        End    Sectors   Size Type
/dev/nvme0n1p1  2048 1953525134 1953523087 931.5G Linux filesystem
root@OpenWrt:~# hdparm -t /dev/nvme0n1p1

/dev/nvme0n1p1:
 Timing buffered disk reads: 1196 MB in  3.00 seconds = 398.05 MB/sec
3 Likes

I have been running some tests on the R6S with kernel 6.1 as a simple DHCP client router

Set eth1 (2.5Gbit/s) irq affinity to core 0 & eth2 (2.5Gbit/s) irq affinity to core 1

Was able to do SQM at my full 1Gbps downstream speed

With SQM


Without SQM


This platform (RK3588) is still missing some thermal and CPU scaling drivers on mainline, but at least for now it works well as a router for 1gbps with SQM and over 1gbps without SQM

2 Likes

Is CPU scaling working on your 6.4 branch (big and little cores) ?

Also are you able to set IRQ affinity to one of the big cores (i.e 4-7)?

I was unable to bove the irqs for the 2.5GbE interfaces on my R6S to big cores on 6.1. other than that it seems pretty good.

I have gotten CPU scaling working on R6S with kernel 6.1

root@OpenWrt:/proc/irq/89# cat /sys/devices/system/cpu/cpu5/cpufreq/stats/time_in_state 
408000 0
600000 0
816000 273115
1008000 3300
1200000 3338
1416000 962
1608000 281
1800000 13
2016000 10
2208000 438
root@OpenWrt:/proc/irq/89# cat /sys/devices/system/cpu/cpu2/cpufreq/stats/time_in_state 
408000 0
600000 0
816000 0
1008000 256242
1200000 1269
1416000 1951
1608000 17709
1800000 4854
root@OpenWrt:/proc/irq/89# 

Also can now distribute the IRQs for the 2.5GbE ports across the BIG cores (se below ... cores 0-3 little, cores 4-7 BIG)

root@OpenWrt:/proc/irq/89# cat /proc/interrupts 
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7       
 19:     743213     662452     685228     242939    1030936     351579     604673     667857     GICv3  26 Level     arch_timer
 30:          1          0          0          0          0          0          0          0     GICv3 425 Level     rockchip_usb2phy
 31:          2          0          0          0          0          0          0          0     GICv3 423 Level     rockchip_usb2phy
 32:          0          0          0          0          0          0          0          0     GICv3 118 Level     fea10000.dma-controller
 33:          0          0          0          0          0          0          0          0     GICv3 119 Level     fea10000.dma-controller
 34:          0          0          0          0          0          0          0          0     GICv3 120 Level     fea30000.dma-controller
 35:          0          0          0          0          0          0          0          0     GICv3 121 Level     fea30000.dma-controller
 36:          0          0          0          0          0          0          0          0     GICv3 122 Level     fed10000.dma-controller
 37:          0          0          0          0          0          0          0          0     GICv3 123 Level     fed10000.dma-controller
 38:       2139          0          0          0          0          0          0          0     GICv3 365 Level     ttyS2
 39:      21523          0          0          0          0          0          0          0     GICv3 360 Level     feb20000.spi
 40:          1          0          0          0          0          0          0          0  rockchip_gpio_irq   7 Level     rk806
 41:          0          0          0          0          0          0          0          0     rk806   0 Edge      rk805_pwrkey_fall
 42:          0          0          0          0          0          0          0          0     rk806   1 Edge      rk805_pwrkey_rise
 57:      84769          0          0          0          0          0          0          0     GICv3 266 Level     eth0
 58:          0          0          0          0          0          0          0          0     GICv3 265 Level     eth0
 59:          0          0          0          0          0          0          0          0     GICv3 252 Level     xhci-hcd:usb1
 60:          0          0          0          0          0          0          0          0     GICv3 247 Level     ehci_hcd:usb4
 61:          0          0          0          0          0          0          0          0     GICv3 248 Level     ohci_hcd:usb2
 62:      79791          0          0          0          0          0          0          0     GICv3 349 Level     fd880000.i2c
 63:       1871          0          0          0          0          0          0          0     GICv3 429 Level     rockchip_thermal
 64:         57          0          0          0          0          0          0          0     GICv3 237 Level     mmc0
 65:       3681          0          0          0          0          0          0          0     GICv3 235 Level     dw-mci
 76:          0          0          0          0          0          0          0          0   ITS-MSI 427819016 Edge      PCIe PME
 77:     435100    3781927    4547759          0          0     352686          0       4322   ITS-MSI 428343296 Edge      eth1
 88:          0          0          0          0          0          0          0          0   ITS-MSI 570425352 Edge      PCIe PME
 89:    4227196          0          0    1731679          0          0        134          0   ITS-MSI 570949632 Edge      eth2
IPI0:      2566       2971       4124       3196        837        545        772        649       Rescheduling interrupts
IPI1:    443568     464955     364510     193128     537689     332212     535751     533602       Function call interrupts
IPI2:         0          0          0          0          0          0          0          0       CPU stop interrupts
IPI3:         0          0          0          0          0          0          0          0       CPU stop (for crash dump) interrupts
IPI4:      6369       6108       7569       7739       5121       7137      10705       9160       Timer broadcast interrupts
IPI5:     18250      14285      12750      11255       8764      10066      12360       8702       IRQ work interrupts
IPI6:         0          0          0          0          0          0          0          0       CPU wake-up interrupts
4 Likes

How does that impact the power usage?

Quiet honestly, I have no idea.

I don't have a USB-C power draw tester

Too bad :upside_down_face: but, just in case you want one, aliexpress

I’ve been using one of these USB-C to USB-C cables with a power meter for my R5C and while not super accurate it’s pretty neat: USB C to USB C, Mcdodo...

I tested the power consumption on the R6C, setting SQM at 1Gbps and there's not much difference that when is idle.

Idle

at 1Gbps download

3 Likes

Idle= 3.53w
Load = 4.59w
~ 30% increase

I suspect that if you are running a VPN it will increase a bit more, but this is great for my energy bill :heart_eyes:

Yay!

2 Likes

With the current build USB3 works fine:

lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M

to a M.2 adapter with a 970 EVO

dd if=/dev/zero of=/dev/sda bs=4M count=1000
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 11.6502 s, 360 MB/s

I noticed /proc/cpuinfo does not show the serial number which is different from Armbian. Might you have any idea what passes this information to /proc/cpuinfo ? and how to disable it, so I can pass this to along to Armbian?

Thank you

I think you ought to use:

dd if=/dev/zero of=/dev/sda bs=4M count=1000 conv=sync

It might still be syncing which gives an unrealistic outcome :slightly_smiling_face:, so you could add the conv=sync.

Doesn't change anything, always around 350-370 MB/s