Sata M.2 Board PCIe gen2

I am getting round to seeing if I can get the 2 port Sata M.2 card running.

sudo dmesg | grep -E "pcie"
[    1.489159] of_get_named_gpiod_flags: parsed 'gpio' property of node '/vcc3v3-pcie-regulator[0]' - status (0)
[    1.489201] reg-fixed-voltage vcc3v3-pcie-regulator: Looking up vin-supply from device tree
[    1.489236] vcc3v3_pcie: supplied by vcc3v3_sys
[    1.489697] vcc3v3_pcie: at 3300 mV
[    1.489857] reg-fixed-voltage vcc3v3-pcie-regulator: vcc3v3_pcie supplying 0uV
[    1.623989] phy phy-pcie-phy.9: Looking up phy-supply from device tree
[    1.623999] phy phy-pcie-phy.9: Looking up phy-supply property in node /pcie-phy failed
[    1.625451] rockchip-pcie f8000000.pcie: GPIO lookup for consumer ep
[    1.625461] rockchip-pcie f8000000.pcie: using device tree for GPIO lookup
[    1.625490] of_get_named_gpiod_flags: parsed 'ep-gpios' property of node '/pcie@f8000000[0]' - status (0)
[    1.625725] rockchip-pcie f8000000.pcie: Looking up vpcie3v3-supply from device tree
[    1.625736] rockchip-pcie f8000000.pcie: Looking up vpcie3v3-supply property in node /pcie@f8000000 failed
[    1.625748] rockchip-pcie f8000000.pcie: no vpcie3v3 regulator found
[    1.626340] rockchip-pcie f8000000.pcie: Looking up vpcie1v8-supply from device tree
[    1.626350] rockchip-pcie f8000000.pcie: Looking up vpcie1v8-supply property in node /pcie@f8000000 failed
[    1.626360] rockchip-pcie f8000000.pcie: no vpcie1v8 regulator found
[    1.626951] rockchip-pcie f8000000.pcie: Looking up vpcie0v9-supply from device tree
[    1.626960] rockchip-pcie f8000000.pcie: Looking up vpcie0v9-supply property in node /pcie@f8000000 failed
[    1.626970] rockchip-pcie f8000000.pcie: no vpcie0v9 regulator found
[    2.172391] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[    2.173158] rockchip-pcie: probe of f8000000.pcie failed with error -110

I have edited hw_intfc.conf and uncommented but for some reason its trying PCIe link training gen1 still?

Dunno you guys have prob gone through this already with SSDs but I should be able to find and recognise or at least I think

We haven’t tested any m.2 to SATA adapters so far. A marvell 9235 m.2 to 4 sata adapter is on the way to our office now. Which chip is the adapter you use?

4 ports SATA M.2 adapter board works out of box.

lspci
00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 0100
01:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller (rev 11)

Some quick test on Lenovo 2.5 inch SATA SSD:

sudo fio --name=write --ioengine=libaio --iodepth=4 --rw=write --bs=1M --direct=1 --size=2G --numjobs=30 --runtime=60 --group_reporting --filename=/dev/sda
[sudo] password for rock:
write: (g=0): rw=write, bs=® 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=4

fio-3.1
Starting 30 processes
Jobs: 30 (f=30): [W(30)][100.0%][r=0KiB/s,w=267MiB/s][r=0,w=267 IOPS][eta 00m:00s]
write: (groupid=0, jobs=30): err= 0: pid=1829: Mon Jun 10 09:48:44 2019
write: IOPS=268, BW=269MiB/s (282MB/s)(15.9GiB/60443msec)
slat (usec): min=291, max=11505, avg=612.85, stdev=118.46
clat (msec): min=8, max=1782, avg=444.39, stdev=39.25
lat (msec): min=9, max=1782, avg=445.01, stdev=39.24
clat percentiles (msec):
| 1.00th=[ 351], 5.00th=[ 418], 10.00th=[ 430], 20.00th=[ 439],
| 30.00th=[ 439], 40.00th=[ 451], 50.00th=[ 451], 60.00th=[ 451],
| 70.00th=[ 451], 80.00th=[ 451], 90.00th=[ 464], 95.00th=[ 464],
| 99.00th=[ 464], 99.50th=[ 531], 99.90th=[ 676], 99.95th=[ 961],
| 99.99th=[ 1687]
bw ( KiB/s): min= 4145, max=32768, per=3.36%, avg=9263.72, stdev=1139.34, samples=3597
iops : min= 4, max= 32, avg= 8.89, stdev= 1.13, samples=3597
lat (msec) : 10=0.01%, 20=0.07%, 100=0.11%, 250=0.45%, 500=98.82%
lat (msec) : 750=0.47%, 1000=0.03%, 2000=0.04%
cpu : usr=0.36%, sys=0.51%, ctx=16451, majf=0, minf=565
IO depths : 1=0.2%, 2=0.4%, 4=99.4%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwt: total=0,16255,0, short=0,0,0, dropped=0,0,0
latency : target=0, window=0, percentile=100.00%, depth=4

Run status group 0 (all jobs):
WRITE: bw=269MiB/s (282MB/s), 269MiB/s-269MiB/s (282MB/s-282MB/s), io=15.9GiB (17.0GB), run=60443-60443msec

Disk stats (read/write):
sda: ios=79/16200, merge=0/0, ticks=40/7184136, in_queue=7202448, util=99.98%

1 Like

What do you get if you do an

apt-get install iozone3
iozone -a -e -I -i 0 -i 1 -i 2 -s 80M -r 4k

@jack I do actually think I have killed the pci-e bridge and probably more likely whilst farting around with images and the SD card I have had the ribbon unhooked from the extender and prob shorted the damn thing on my cluttered desk.
Heatsink has been off numerous times and have been rushing my evaluation and never checked the pcie bridge until I got some 5.5mm barrels with terminal connectors so it was stuck there for a couple of days with the ribbon like that.
To be honest I doubt very much it has anything to do with the ASM1061 and have another RockPi4b on the way from reichelt elektronik and blaming myself as I was a bit rough and ready and not particularly methodical.

I was pretty much expecting that the majority of m.2 boards should work out of the box and why having an m.2 on the RockPi4 is a really great addition to the SBC format especially a true Pi format.
I wouldn’t worry about it as I have a whole rake of items on the way from hex pillar sets, shim, fans, ribbon cable and another rockpi4.
The ASM1061 2 port was purely for evaluation and the Marvel 9235 that you have with native 4 ports rather than port multipliers is the one to get but Marvell seem to charge a premium for this looking at end prices.
The NAS possibilities with the RockPi4 but would really benefit from $30 4 port card that I am struggling to find.

Is it possible for you to include brand and model of the card you mentioned that works out of the box
Thanks in advance

I don’t think there are many ‘brands’ if any as basically its the chipset by Marvell or ASMedia.

The ASM1061 is a single lane gen 2 and for 2 ports ok.

http://www.asmedia.com.tw/eng/e_show_products.php?item=118

Then you have the 88SE9235 is dual lane gen 2 for 4 ports ok. There is a 6 port version but never seen one.

https://www.marvell.com/documents/xnzfwfktuicdpjakssrh/

Its basically any Gen2.0 2 lane device should really work out of the box but you just check the chipset to see if supported by Linux. M.2 B or B+M keyed only, not mini pci express or other.

I have tested the ASMedia ASM1061 and Jack a 88SE9235.

Both of those are the none hardware raid ones which actually for some is preferable as its likely Linux mdadm, LVM to if ZFS or BRTF software raid will be used with disks that do not have to go on exactly the same type of controller and can be transplanted.

IOCREST is about the nearest thing I can find to a consistent manufacturer of any size. I think Syba is just IOcrest rebranded products at least for this style.

https://iocrest.aliexpress.com/store/900661

2 ports £20+
4 ports £50+

Beware of single lane pcie that use a port multiplier to get 4 ports as they will not be nice for RAID.

The SATA power you need to supply yourself as if you are like me then a 12V transformer with a splitter powers RockPi4 and 12V Sata rail then either GPIO 5V or even better get a 5V buck and hang it off the 12V to provide the 5v Sata rail.

That is the same chipset and likely the same model as Jack tested. $50 unfortunately is about as cheap as they get for 2lane 4 port.

You should be able to make a really competitive NAS unit with a RockPi4 and 4 port Sata card and https://www.openmediavault.org/ or https://github.com/davestephens/ansible-nas

Ps just found another which is the top 4 port card that is the 88SE9230 its Syba which to be honest I think imports and rebrands IOcrest, but many do as how many companies where really Foxconn?

and £40 with free delivery is cheapest I have seen yet.

This one has some interesting options RAID 0/1/10 and AES Encryption 128/256-bit apart from the 6 port industrial one this is the top chipset in that series.
Also Marvell HyperDuo where you can pair up a ssd & hdd to make a 2 part hybrid drive which is extremely interesting as it always struck me that the ssd cache was always doomed to fail far before the hdd in a hybrid drive.

I just purchased one.

https://www.sybausa.com/index.php?route=product/product/download&download_id=909

http://www.sybausa.com/index.php?route=product/product&product_id=930

The Marvell HyperDuo offers a breakthrough embedded technology for new generation 6Gb/s SATA Controllers,
enabled on the Marvell 88SE9230 and 88SE9220. Based on years of research and patent-pending software and
hardware, HyperDuo enables 80 percent of the performance of an SSD at less than half the cost. Configured with
one hard drive and multiple SSDs, HyperDuo uses intelligent algorithms to automatically migrate hot data to the
SSD while enabling all data to be safely stored on a larger capacity SATA HDD for higher input/output operations per
second (IOPS), throughput and capacity.
The Marvell 88SE9235 and 88SE9215 can be used for embedded platform applications such as home NAS/media
servers, DVR/NVR and set-top boxes, or by HBA vendors to develop their own RAID software or in-box OS drivers.
Fully programmable on-chip transceivers support SATA, eSATA, and xSATA at 6 Gb/s and are backward compatible
to 1.5 Gb/s and 3 Gb/s. Built-in support for SATA Port Multipliers with FIS-based switching ensures maximum
performance. The small footprint of the device, and the few required external components, take up minimal board
space, easing system design and reducing cost. Embedded enclosure management via I2C protocol, further reduces
system cost.

https://www.marvell.com/documents/pxevoqurnigtyabbisjm/

Marvel 9230 is recognised but seems to fail to connect to the SSD.
I guess this is due to having no bios and why Jacks specific embedded non bios 9235 works.

vendor storage:20160801 ret = -1
Jun 16 15:22:10 localhost kernel: [    9.007354] ata8.00: qc timeout (cmd 0xa1)
Jun 16 15:22:10 localhost kernel: [    9.007418] ata2.00: qc timeout (cmd 0xec)
Jun 16 15:22:10 localhost kernel: [    9.015445] ata2.00: failed to IDENTIFY (I/O error, err_mask=0x4)
Jun 16 15:22:10 localhost kernel: [    9.019150] ata8.00: failed to IDENTIFY (I/O error, err_mask=0x4)
Jun 16 15:22:10 localhost kernel: [    9.343283] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Jun 16 15:22:10 localhost kernel: [    9.347329] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Jun 16 15:22:10 localhost kernel: [   19.343290] ata2.00: qc timeout (cmd 0xec)
Jun 16 15:22:10 localhost kernel: [   19.347345] ata8.00: qc timeout (cmd 0xa1)
Jun 16 15:22:10 localhost kernel: [   19.351260] ata2.00: failed to IDENTIFY (I/O error, err_mask=0x4)
Jun 16 15:22:10 localhost kernel: [   19.351287] ata2: limiting SATA link speed to 3.0 Gbps
Jun 16 15:22:10 localhost kernel: [   19.355279] ata8.00: failed to IDENTIFY (I/O error, err_mask=0x4)
Jun 16 15:22:10 localhost kernel: [   19.355313] ata8: limiting SATA link speed to 1.5 Gbps
Jun 16 15:22:10 localhost kernel: [   19.679289] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 320)
Jun 16 15:22:10 localhost kernel: [   19.683337] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
Jun 16 15:22:10 localhost kernel: [   27.123251] random: nonblocking pool is initialized
Jun 16 15:22:10 localhost kernel: [   49.679279] ata2.00: qc timeout (cmd 0xec)
Jun 16 15:22:10 localhost kernel: [   49.683341] ata8.00: qc timeout (cmd 0xa1)
Jun 16 15:22:10 localhost kernel: [   49.687260] ata2.00: failed to IDENTIFY (I/O error, err_mask=0x4)
Jun 16 15:22:10 localhost kernel: [   49.691283] ata8.00: failed to IDENTIFY (I/O error, err_mask=0x4)
Jun 16 15:22:10 localhost kernel: [   50.015288] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 320)
Jun 16 15:22:10 localhost kernel: [   50.019321] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

On the asmedia 2 port I get with iozone 3

Auto Mode
        Include fsync in write timing
        O_DIRECT feature enabled
        File size set to 81920 kB
        Record Size 4 kB
        Command line used: iozone -a -e -I -i 0 -i 1 -i 2 -s 80M -r 4k
        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
           81920       4    28607    34861    39915    40103    16139    30980

Cheap £7 usb3.0 x4 does work
rock@linux:~/ssd$ lspci
00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd Device 0100
01:00.0 USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03)

Performance not great though.

        Auto Mode
        Include fsync in write timing
        O_DIRECT feature enabled
        File size set to 81920 kB
        Record Size 4 kB
        Command line used: iozone -a -e -I -i 0 -i 1 -i 2 -s 80M -r 4k
        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
           81920       4     6753     7480     9676    14717     8234    11011 

but not that much different to rockpi4 usb3.0 port

        Auto Mode
        Include fsync in write timing
        O_DIRECT feature enabled
        File size set to 81920 kB
        Record Size 4 kB
        Command line used: iozone -a -e -I -i 0 -i 1 -i 2 -s 80M -r 4k
        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
           81920       4     7799     9204    10030     9834    11577    17782