I saw BPI-R3 has a M.2 KEY-M PCIe inerface. does it support something like
I saw BPI-R3 has a M.2 KEY-M PCIe inerface. does it support something like
r3 has m.2 slot with pcie-lanes, no sata- or usb-lanes,
so you require a card with pcie2sata controller (not only a port multiplier). I’m not sure the first one have such. there are some sata-breakout/port-multiplier boards which not working. cards using the pcie-signals should work.
But they will not fit into the official (metal) case.
in the chipset dataset page, it has keyword Multiplier, is that mean this one is not suitable for r3?
Support up to two lane of PCI Express Support PCIe link layer power saving mode Support 5 SATA ports Support command-based and FIS-based for Port Multiplier Support AHCI mode and IDE programming interface Support Native Command Queue (NCQ) Cascaded mode: support up to x75 SATA devices with JMB575
Jmb585 should be such pcie2sata controller so it should work,but i have none,so not tested yet…i have another controller,but do not remember which one,but untested.
Edit: it is a jmb585 can only test on my v0.1 board,but there i have sata power jack. My 1.0 board is mounted in metal case where m.2 slot cannot be accessed from outside.
1 port JMS539 : usb-3.0 2 port JMB582 : pci-gen3x1 5 port JMB585 : pci-gen3x2 2 port ASM1061 : pci-2.0x1 4 port ASM1064 : pci-gen3x1 6 port ASM1166 : pci-gen3x2
But haven’t tried it.
How many lanes we have? According schematic PCIe2.0 , 2 Lanes
So it depends on the speed of the sata device, if you want to ‘sacrifice’ the fastest connection (m.2) to SATA, or perhaps a USB3.0 adapter is already fast enough.
It was actually JMS539, instead of JM539 or JMB539
I have this USB adapter, but still need to try it… (less then 8 euro incl shipping)
An ASM1062 would best fit pci2.0x2, but there are no m.2 cards…
Then I guess to best utilize the 2 lanes, get a gen3x2 card, which should work on pcie2.0 too and will hopefully use both lanes…
For easy fit, maybe this model can be made to fit under, inside the metal case, (cut off 1 connector): /home/eric/Documents/Sfe593ecef2ed4458aff8c40e6f7532c5T.jpg
have tested my jmb585 in bpi-r4 where is is recognized and with CONFIG_SATA_AHCI enabled, i see ahci host entries in dmesg
root@bpi-r4:~# dmesg | grep -i ahci [ 3.369449] ahci 0002:01:00.0: vgaarb: pci_notify [ 3.374161] ahci 0002:01:00.0: assign IRQ: got 111 [ 3.378950] ahci 0002:01:00.0: version 3.0 [ 3.383040] ahci 0002:01:00.0: enabling device (0000 -> 0003) [ 3.456949] ahci 0002:01:00.0: SSS flag set, parallel bus scan disabled [ 3.463607] ahci 0002:01:00.0: AHCI 0001.0301 32 slots 5 ports 6 Gbps 0x1f impl SATA mode [ 3.471776] ahci 0002:01:00.0: flags: 64bit ncq sntf stag pm led clo pmp fbs pio slum part ccc apst boh [ 3.481248] ahci 0002:01:00.0: enabling bus mastering [ 3.487183] scsi host0: ahci [ 3.490301] scsi host1: ahci [ 3.493359] scsi host2: ahci [ 3.496424] scsi host3: ahci [ 3.499463] scsi host4: ahci [ 3.539863] ahci 0002:01:00.0: vgaarb: pci_notify root@bpi-r4:~# lspci 0002:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01) 0002:01:00.0 SATA controller: JMicron Technology Corp. JMB58x AHCI SATA controller root@bpi-r4:~#
on r3 it looks similar as expected:
root@bpi-r3:~# lspci 00:00.0 PCI bridge: MEDIATEK Corp. Device 1f32 (rev 01) 01:00.0 SATA controller: JMicron Technology Corp. JMB58x AHCI SATA controller root@bpi-r3:~# dmesg | grep -i ahci [ 3.020090] ahci 0000:01:00.0: vgaarb: pci_notify [ 3.024816] ahci 0000:01:00.0: assign IRQ: got 130 [ 3.029600] ahci 0000:01:00.0: version 3.0 [ 3.033698] ahci 0000:01:00.0: enabling device (0000 -> 0002) [ 3.107681] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled [ 3.114352] ahci 0000:01:00.0: AHCI 0001.0301 32 slots 5 ports 6 Gbps 0x1f impl SATA mode [ 3.122524] ahci 0000:01:00.0: flags: 64bit ncq sntf stag pm led clo pmp fbs pio slum part ccc apst boh [ 3.131993] ahci 0000:01:00.0: enabling bus mastering [ 3.138294] scsi host0: ahci [ 3.141563] scsi host1: ahci [ 3.144705] scsi host2: ahci [ 3.147851] scsi host3: ahci [ 3.151046] scsi host4: ahci [ 3.191556] ahci 0000:01:00.0: vgaarb: pci_notify root@bpi-r3:~#
wow, no need to re-compile/add anything? if yes, thats awesome, can you plug in few hard disk or ssd to test? thank you.
if somehow OpenWrt support some sort of software raid, like zfs. then we have a reliable NAS.
As i wrote you need CONFIG_SATA_AHCI enabled (was not in my kernel,don’t know if this is enabled in others (openwrt etc). For plugging hdd,i need a way to put power to the drive as i have not the power jack on v0.1 board (my 1.0 is mounted in metal case so m2 slot not accessable)
found a old powersupply from usb2(s)ata adapter which i could use to power the drive…my hdd is recognized.
here full bootlog:
r3_ahci.txt (35,2 KB)
basic mount test:
root@bpi-r3:~# cat /proc/partitions major minor #blocks name 31 0 20480 mtdblock0 31 1 10752 mtdblock1 31 2 512 mtdblock2 31 3 512 mtdblock3 31 4 256 mtdblock4 31 5 256 mtdblock5 179 0 31166976 mmcblk0 179 1 4079 mmcblk0p1 179 2 512 mmcblk0p2 179 3 2048 mmcblk0p3 179 4 2048 mmcblk0p4 179 5 102400 mmcblk0p5 179 6 6291456 mmcblk0p6 8 0 732574584 sda 8 1 307200 sda1 8 2 614400 sda2 8 3 131072 sda3 8 4 52068289 sda4 8 5 358400 sda5 8 6 15728640 sda6 8 7 227866624 sda7 8 8 414515200 sda8 8 9 20981760 sda9 root@bpi-r3:~# mount /dev/sda1 /mnt mount: (hint) your fstab has been modified, but systemd still uses the old version; use 'systemctl daemon-reload' to reload. root@bpi-r3:~# ls /mnt BOOTSECT.BAK EFI root@bpi-r3:~#
so the bpi-r3 only support M.2 KEY-M,
does not support M.2 KEY- B+M ?
as I saw in the above “8 Port SATA”, it seems use “B+M” design.
It is a jbm585 combined with a port multiplier…
B + M means you can use it on key-B and key-M.
is that means, it is support that 8 port SATA expansion card?
If you need some sort of guarantee, better ask your sales person.
do you really need 8 ports?? i would take (i have) a 5port and think it is enough i would not take the risk the pcie-switch or port-multiplier does not work correctly (independ of bpi-r3)…i guess when using more sata devices you will also run into powering issues…i guess r3 power socket is not enough to power more than 5 hdd (ssd may work).
Indeed, or the ASM1166 that has 6 ports, would be a better choice then the 8 port card… Technically speaking…
Sigh, soo many different forums and threads of related information…
Anywho, I would like to add a NVME drive to my BPI-R3. I current have it booting from eMMC, after finding some wonderful instructions. So, I am off of the SD card, good! As I understand things, you cannot yet boot from NVME drive. I guess at this stage, I just want to use it for storage, for more packages, etc. However, I don’t understand the backup scheme, etc. I understand linux, but, the IoT device partition scheme is totally alien to me… I was able to add a booting SATA NVME drive to my RPI-4B, and partition it to full use rather easy.
I found this mini pcie m2 extension cable, is it suitable?
mpcie slot on r3 is usb2 only. Pcie lanes are routed to m.2 slot on bottom of board
You cannot boot from nvme,but you can boot till linux kernel from emmc/sd and load rootfs from nvme. But i do not know how to do it with openwrt. But you can use my debian/ubuntu image and replace rootfs with openwrt roofs.but updates have to be done manually i guess
wait, seems I might make a mistake in my previous question. so BPI R3 got 2 PCIE slot
one is for Mini PCIe via USB 2.0 speed, mainly for 4G LTE, and it is located in the upper side of the board.
the other one is M.2 KEY-M PCIe inerface, I assume this is NOT usb 2 speed. which support the M2 SATA adapter we talked about in this thread. and located in the bottom of thr board.
the question I want to ask is, what kind of extension cable we should used in the M.2 KEY-M PCIe interface slot? will the one I listed in my previous reply work?
@frank-w are you saying the current openwrt build from openwrt.org does not recognize the M.2 KEY-M PCIe SATA extender chipset we talked about here? only the ubuntu you build for bpi r3 recongnize those chipset?
I dont want to boot from the M.2 KEY-M PCIe SATA extender hard disk(s)/ssd(s) I would like these M.2 KEY-M PCIe SATA extender hard disk(s)/ssd(s) to store files, if software raid works, form all the hdd(s)/ssd(s) as raid5/6, like NAS
No, mPCIe slot on r3 has only usb2,no pcie data lanes. So you cannot use such cable. Sata will only work on the m.2 slot on bottom of r3
The adapter above is mPCIe,not m.2…why do you need extender cable? Such cables mostly bring problems because signals are bot designed to be extended (voltage drop,interferences,etc).
For openwrt:you can only put rootfs to nmve/sata drive as you can only boot from mmc/spi and uboot does not yet support pcie on r3…so you need to boot till linux-kernel with one of the 4 ways and after kernel is loaded you can access nvme/sata. So only rootfs can be put there…or just use it as data only