Radxa M.2 E key to SATA breakout card on Armbian. HDD is not visible. [UNRESOLVED]

Hello.
I’m trying to make this my M.2 E card working on Armbian and it’s not working for some reason.

I did try various approaches without any luck:
Compile from source code: DeviceTree overlay for enabling ROCK 5A’s SATA on m2 slot - ROCK 5 Series / 5A - Radxa Community
Take existing one: # Radxa M.2 E key to SATA breakout card

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.

  1. Add user overlay rock-5b-sata.dtbo based on packed rock 5b:
mkdir overlay-user
cp /boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/rock-5b-sata.dtbo  /boot/overlay-user
  1. Add user_overlays=rock-5b-sata to armbianEnv.txt
  2. Reboot.

As a result after reboot I started to see new messages in dmesg, but hdd seems not working. I still do not see it in lsblk:

root@rock-5b:~# dmesg | grep sata
[    9.262023] ahci-dwc fe220000.sata: Looking up ahci-supply from device tree
[    9.262035] ahci-dwc fe220000.sata: Looking up ahci-supply property in node /sata@fe220000 failed
[    9.262065] ahci-dwc fe220000.sata: supply ahci not found, using dummy regulator
[    9.262204] ahci-dwc fe220000.sata: Looking up phy-supply from device tree
[    9.262209] ahci-dwc fe220000.sata: Looking up phy-supply property in node /sata@fe220000 failed
[    9.262217] ahci-dwc fe220000.sata: supply phy not found, using dummy regulator
[    9.262557] ahci-dwc fe220000.sata: Looking up target-supply from device tree
[    9.262562] ahci-dwc fe220000.sata: Looking up target-supply property in node /sata@fe220000 failed
[    9.262572] ahci-dwc fe220000.sata: supply target not found, using dummy regulator
[    9.262642] ahci-dwc fe220000.sata: PMPn is limited up to 5 ports
[    9.262725] ahci-dwc fe220000.sata: forcing port_map 0x0 -> 0x1
[    9.262744] ahci-dwc fe220000.sata: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode
[    9.262749] ahci-dwc fe220000.sata: flags: ncq sntf pm led clo only pmp fbs pio slum part ccc apst
[    9.262759] ahci-dwc fe220000.sata: port 0 is not capable of FBS

@dominik suggested to use bundled sata2, but I don’t see any appropriate dtbo:

root@rock-5b:/boot# find / -type f -name sata.dt*
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/orangepi-5-sata.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/rk3566-roc-pc-sata2.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/turing-rk1-sata2.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/radxa-cm5-io-sata.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/rock-5b-sata.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/mixtile-blade3-sata2.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/yy3568-sata2.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/rock-3a-sata.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/orangepi-5-plus-sata2.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/rk3588s-roc-pc-sata0.dtbo
/usr/lib/linux-image-6.1.84-vendor-rk35xx/rockchip/overlay/rock-5a-sata.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/orangepi-5-sata.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/rk3566-roc-pc-sata2.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/turing-rk1-sata2.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/radxa-cm5-io-sata.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/rock-5b-sata.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/mixtile-blade3-sata2.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/yy3568-sata2.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/rock-3a-sata.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/orangepi-5-plus-sata2.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/rk3588s-roc-pc-sata0.dtbo
/boot/dtb-6.1.84-vendor-rk35xx/rockchip/overlay/rock-5a-sata.dtbo

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.

Here you mention the overlay of the 5a, but 5b is different. Are you sure you are using the 5b version?

I hope so, I took the one for rock 5b. It mentioned later in the same post.

I also tried official image with this instruction, but there was no ‘update_exlinux.sh‘ and extlinux package was missed in apt.

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?).

The sata messages look similar for my rock3a, but also the HDD is detected. Maybe check power, cables etc:

root@rock3a:~# dmesg | grep -e sata -e ata1
[   13.818506] ahci-dwc fc800000.sata: Looking up ahci-supply from device tree
[   13.818556] ahci-dwc fc800000.sata: Looking up ahci-supply property in node /sata@fc800000 failed
[   13.818661] ahci-dwc fc800000.sata: supply ahci not found, using dummy regulator
[   13.819439] ahci-dwc fc800000.sata: Looking up phy-supply from device tree
[   13.819491] ahci-dwc fc800000.sata: Looking up phy-supply property in node /sata@fc800000 failed
[   13.819590] ahci-dwc fc800000.sata: supply phy not found, using dummy regulator
[   13.820073] ahci-dwc fc800000.sata: Looking up target-supply from device tree
[   13.820114] ahci-dwc fc800000.sata: Looking up target-supply property in node /sata@fc800000 failed
[   13.820206] ahci-dwc fc800000.sata: supply target not found, using dummy regulator
[   13.820662] ahci-dwc fc800000.sata: PMPn is limited up to 5 ports
[   13.821189] ahci-dwc fc800000.sata: forcing port_map 0x0 -> 0x1
[   13.821301] ahci-dwc fc800000.sata: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode
[   13.821322] ahci-dwc fc800000.sata: flags: ncq sntf pm led clo only pmp fbs pio slum part ccc apst  
[   13.821365] ahci-dwc fc800000.sata: port 0 is not capable of FBS
[   13.854652] ata1: SATA max UDMA/133 mmio [mem 0xfc800000-0xfc800fff] port 0x100 irq 123
[   14.326426] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[   14.327966] ata1.00: ATA-9: ST8000AS0002-1NA17Z, AR13, max UDMA/133
[   14.328007] ata1.00: 15628053168 sectors, multi 0: LBA48 NCQ (depth 32)
[   14.329337] ata1.00: configured for UDMA/133

Yes - it’s identical except irq and link status.
Does it mean that programmatically it is correct?

I’s using external power from my PC’s PSU and literally the same sata cable from the same PC, that I have used to ensure that disk itself is working.

Could it be because powers sources for board and HDD are different? Any other ideas?

Sorry, I have no idea what is U-boot? Is it some other image?

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:

~# dd if=Armbian_24.11.3_Rock-5b_bookworm_vendor_6.1.84_minimal.img count=32k of=imgheaddump
16777216 bytes (17 MB, 16 MiB) copied, 0.231042 s, 72.6 MB/s
~# strings imgheaddump | grep "U-Boot SPL"
U-Boot SPL board init
U-Boot SPL 2017.09-armbian-2017.09-S2284-Pe069-H331a-Vec5e-Bb703-R448a (Jan 07 2025 - 09:55:23)

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:


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).

Hello,

Hm, it looks really close to 5A one, tried it. Unfortunately, result is the same for now.

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.

Thank you all.

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:

with 5A:

  • 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)
  • cheaper than ASM1166

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 :slight_smile:

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:

~# diff -y --color rock-5b-sata.dtso  rockchip-rk3588-sata2.dtso
/dts-v1/;                                                       /dts-v1/;

/ {                                                             / {

        metadata {                                            <
                title = "Enable SATA1";                       <
                compatible = "radxa,rock-5b";                 <
                category = "misc";                            <
                description = "Enable SATA1.\nWhen SATA1 is e <
        };                                                    <
                                                              <
        fragment@0 {                                                    fragment@0 {
                target = <0xffffffff>;                                          target = <0xffffffff>;

                __overlay__ {                                                   __overlay__ {
                        status = "disabled";                                            status = "disabled";
                };                                                              };
        };                                                              };

        fragment@1 {                                                    fragment@1 {
                target = <0xffffffff>;                                          target = <0xffffffff>;

                __overlay__ {                                                   __overlay__ {
                        status = "disabled";                  <
                };                                            <
        };                                                    <
                                                              <
        fragment@2 {                                          <
                target = <0xffffffff>;                        <
                                                              <
                __overlay__ {                                 <
                        status = "disabled";                  <
                };                                            <
        };                                                    <
                                                              <
        fragment@3 {                                          <
                target = <0xffffffff>;                        <
                                                              <
                __overlay__ {                                 <
                        status = "okay";                                                status = "okay";
                };                                                              };
        };                                                              };

        __fixups__ {                                                    __fixups__ {
                wifi_disable = "/fragment@0:target:0";        |                 pcie2x1l1 = "/fragment@0:target:0";
                bt_wake = "/fragment@1:target:0";             |                 sata2 = "/fragment@1:target:0";
                pcie2x1l0 = "/fragment@2:target:0";           <
                sata1 = "/fragment@3:target:0";               <
        };                                                              };
};                                                              };

This seems to be different, would not work; instead:

~# diff -y --color rock-5b-sata.dtso  rockchip-rk3588-sata1.dtso
/dts-v1/;                                                       /dts-v1/;

/ {                                                             / {

        metadata {                                            <
                title = "Enable SATA1";                       <
                compatible = "radxa,rock-5b";                 <
                category = "misc";                            <
                description = "Enable SATA1.\nWhen SATA1 is e <
        };                                                    <
                                                              <
        fragment@0 {                                                    fragment@0 {
                target = <0xffffffff>;                                          target = <0xffffffff>;

                __overlay__ {                                                   __overlay__ {
                        status = "disabled";                                            status = "disabled";
                };                                                              };
        };                                                              };

        fragment@1 {                                                    fragment@1 {
                target = <0xffffffff>;                                          target = <0xffffffff>;

                __overlay__ {                                                   __overlay__ {
                        status = "disabled";                  <
                };                                            <
        };                                                    <
                                                              <
        fragment@2 {                                          <
                target = <0xffffffff>;                        <
                                                              <
                __overlay__ {                                 <
                        status = "disabled";                  <
                };                                            <
        };                                                    <
                                                              <
        fragment@3 {                                          <
                target = <0xffffffff>;                        <
                                                              <
                __overlay__ {                                 <
                        status = "okay";                                                status = "okay";
                };                                                              };
        };                                                              };

        __fixups__ {                                                    __fixups__ {
                wifi_disable = "/fragment@0:target:0";        |                 pcie2x1l0 = "/fragment@0:target:0";
                bt_wake = "/fragment@1:target:0";             |                 sata1 = "/fragment@1:target:0";
                pcie2x1l0 = "/fragment@2:target:0";           <
                sata1 = "/fragment@3:target:0";               <
        };                                                              };
};                                                              };

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.

Another piece of info, from schematics https://dl.radxa.com/rock5/5b/docs/hw/radxa_rock_5b_v1423_sch.pdf

image

So on the M.2 E key the sata number is 1
Number 0 would disable RJ45, number 2 would disable USB if I understand correctly.

I think I do not understand something, because if this ^ true, network should be down when I turned on this overlay:

	fragment@2 {
		target = <&pcie2x1l0>;

		__overlay__ {
			status = "disabled";
		};
	};

But it did not.

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.

Are we talking about 5B or 3A?

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.

Use some insulation tape for this non-Euclidean part