UPD: It is unresolved, because I ordered ASM1166 and solve it in this way. See one of the my last messages.
Context - fresh armbian for rock 5b and M.2 E key (The one for wifi M2 slot)
armbian version
v24.11.3 for Rock 5B running Armbian Linux 6.1.84-vendor-rk35xx
Packages: Debian stable (bookworm)
Updates: Kernel upgrade enabled and 20 packages available for upgrade
What I did:
I have read that overlay prefix is not working good that’s why I’m trying to use user-overlays.
Add user overlay rock-5b-sata.dtbo based on packed rock 5b:
If anybody see that, I’m doing something wrong - please give some clue what I need to do with that.
I would not be surprised if I need to do something else to add hdd, and just do not know about this, I’m not a Linux expert.
I have looked into the Radxa rock5b KDE image, it uses kernel 6.1.43-15-rk2312 and there is only 1 sata overlay:
/usr/lib/linux-image-6.1.43-15-rk2312/rockchip/overlays# ls -al rock-5b*sata*
-rw-r--r-- 1 root root 829 Aug 8 2024 rock-5b-sata.dtbo
For a latest updated armbian bookworm:
/usr/lib/linux-image-6.1.99-vendor-rk35xx/rockchip/overlay# ls -al rock-5b*sata*
-rw-r--r-- 1 root root 829 Feb 17 14:54 rock-5b-sata.dtbo
Although different timestamp, they are binary the same.
So I don’t know what is meant with ‘sata2’; it is not there. It is there for rock3a (in Radxa overlays), in Armbian overlays there is also only 1. In Radxa overlays it looks like you can also turn the USB3 ports into sata it seems, but I guess no-one will do that.
I could only get both NVMe and SATA on my Rock-3A working if I use older 2017.9 dated U-Boot and 6.1.99 kernel. I would hope/expect that the same will work on Rock5b as otherwise it makes not really sense to buy it in order to have a faster variant of the Rock3a.
So maybe check the U-Boot variant the board is started with, maybe SPI contains other version than on SD card image (or EMMC?).
sata module base address and irq is indeed different, but that should not matter (it is also different SBC and kernel).
You now show more info and if it says ‘SATA link down’, it could mean something electrical or timing.
I have had HDD and rock3a powered separately, so each there own 230V mains PSU, meaning only SATA cable is the electrical link and that worked. But that same Seagate 8TB SMR HDD sometimes refused to be detected in Intel J1900 board and currently also on AMD E350 it does not work reliably anymore. I also once thought the SATA cable was the problem, changed it, then it worked. But it also means complete power disconnect, so that could be the reason it worked atfer cable switch. So I thought lets try ARM SBC to operate those large HDDs.
U-Boot is the bootloader, it is loaded first by the Rockchip RK35xx SoC from the area on the SD-card location between partition table and first partition. It in turn loads the linux kernel. There are combinations of U-Boot variant and kernel variant that fail to get a correctly working NVMe+SATA. But U-Boot is specific per SBC, so it can setup things differently per board. That is why I ask for what version you run/have. You need a serial console cable to see it actually working when board is powered on. Make sure you have such a cable. Or make sure you understand how a Rock5b boots; See Radxa documentation;
I checked:
But I think software / programmatically is OK for your setup, I am not sure about the cabling. Maybe try a SATA SSD instead of SATA HDD. I might be a timing issue, the HDD may not initialize fast enough, I don’t know.
Hello,
Thanks for creating fresh topic, this i way easier to navigate and talk about specific version in right context,
As @Eric_Woudstra mentioned - 5A and 5B are different boards and SoCs on them, so they need may need specific dtbs for similar features.
Here it’s the one I talked about: https://github.com/armbian/build/blob/main/patch/kernel/archive/rockchip64-6.13/overlay/rockchip-rk3588-sata2.dtso
I needed to test my sata card, checked it on ROCK 3A, 3B, 5A and 5B. Only last one worked with same ssd, m.2 card and sata cable. I’m sure this worked on 5.x kernel before. Some workaround is to use any m.2 A+E pcie to sata adapter (one or two port) - its about the speed of native sata, or just use A+E to M adapter and some 2230 nvme (this don’t require any additional power line, it’s fast, but this one needs right adapter to fit in this slot).
Yeah - I ordered ASM1166 as I planned from the beginning, will continue with it.
I ordered radxa adapter first with hope, that it will just work, so I’ll be able to test whole system with minimal hardware. It was a mistake.
As I mentioned earlier - none of them worked for me on 3A,3B,5A on kernel >5.1
It worked perfectly with radxa image 5.1, I guess that something is wrong about new kernel/dtb for sata,
dtb brings up SATA link but it’s not stable,
Reconsider this choice,
If we are talking about A+E slot on all of those boards (3A,3B,5A,5B) we have there 1x pcie 2.1
native sata card would be about the same speed as downgraded (to 1x pcie 2) nvme.
additionally nvme don’t need separate power, but You need cheap, non active adapter A+E => M (and this is not easy, most of them will not fit)
ASM1166 in such slot is limited to 25% of its bandwidth. You will get 6 ports but only one at time will be able to work at about full speed. This still can be usable, especially for older hdds, but ssds will be quickly limited. ASM1166 can handle up to four sata devices at full speed (on 2x pcie 3.0)
So.. if we are still taking about A+E slot - just get any cheap jmb582 a+e card:
You don’t need any extender and adapter, fits perfectly
will work for one drive about the same as native sata card, second sata port is plus (will be limited, but someday You can plug card into newer SBC to get full speed)
Thank you for the explanation.
Did I understand correctly that in full-size M2 on the back of Rock5b ASM1166 should work fine? I don’t really need super-speed I just need relatively big storage.
Also, You have mentioned this jmb582 for smaller port. If I use 1 ssd with it would be full speed? (Sure, if it works at all)
Yes because ASM1166 uses 2x pcie 3.0, Rock 5B has 4x pcie 3.0 so m.2 will not limit the card,
You can even run two such card using bifurcation adapter, both will link at 2x/3.0, 5B+ has two m.2 ports like this,
As far as I remember tests 3x sata drives on this card work at full speed (560MB/s), 4x are slightly limited (about 500MB/s) and for 6x speed is 300-400MB/s. Not bad, but obviously 6x is more than 2x/3.0. Usually it’s not any real problem.
Yes, sata ssd can reach about 550MB/s,
I got about same ~510/s for nvme, ssd via asm and ssd via sata breakout board.
Of course same nvme could do much more in bottom slot
The ‘sata2’ is referring to the mainline armbian kernel, so latest I have installed is 6.13.4. For mainline rockchip64, there are:
rockchip-rk3566-sata2.dtbo
rockchip-rk3588-sata1.dtbo
rockchip-rk3588-sata2.dtbo
Comparing with rock-5b-sata.dtbo which is there in vendor kernel 6.1.99 confuses me a bit; I see there is
pcie2x1l0 and pcie2x1l1
What is on which connector I am not sure/don’t know; Comparing the decompiled:
This seems to match, so ‘sata1’ is enabled on ‘pcie2x1l0’
Or l0 l1 are also changed order in the main dts from vendor to mainline?
Now I don’t have Rock5B, but this might give me some hints for my Rock3A. The M.2 E-key slot is PCIe2x1, in the .dtso file I see ‘pcie2x1’. I looks like I have to compare main .dts and SoCs RK3568 and RK3588.
I think I need to try with single power source when it arrive. And probably disassemble old laptop to scavenge some sata ssd.
Also, I tried 2,5" hdd from the same laptop and it did not even spin with external power, I’m starting to think that they are selling special sata cable with 5v power sourced from 40pin connection for a reason.
About the 5B. But I have no 5B (yet) and have a SATA overlay working on 3A, with kernels: Radxa 5.10.160, Armbian vendor 6.1.99, Armbian current 6.12.x, Armbian edge 6.13.x (all with Linux boot+root from SD-card).
So I am interested in this getting to know that at least (a) SATA overlay works with 5B.
I think @ElRato likely has some power issue. I have seen and had a lot of troubles with my Rock3A getting it to work initially. Now U-Boot 2017.09 + kernel 6.1.99 + single source 12V 10A PSU I transferred 2TB of data to the system, with NVMe in M.2 M-key and HDD on M.2 E-key Radxa breakout (in complex caching setup). So I am trying to figure out if the same would be possible on 5B?
Ok, so I recently tried it with Armbian edge 6.13.x and worked with no issues. I could not make it to work on 3B and 5A, same stuff just different SBC. I’ll try with 3A, I’m quite sure that it was not working, it bring up sata, but was not stable on anything >5.1.
Those usually don’t come up on init and cause sbc reboot. For me there is something about dtb/kernel. I confirmed that same setup (ssd, sata card, ac adapter) work on 5B but not on 5A which should need less energy.
So, my 1166 had arrived. And working without any shenanigans on operation system or hardware. Separate power working fine as well.
But there is a note about this product itself. It contradict Euclidian geometry and can not be screwed correctly because of it’s thickness. It rests on some rock board element and plastic stand of radxa fan. I’d call it design flaws from radxa.
There is some sort of isolation screwed to the 1166 and I probably can slightly modify it with rasp, but I have no idea what to do with the fan stand anyway.