raspberry-pi-pcie-devices icon indicating copy to clipboard operation
raspberry-pi-pcie-devices copied to clipboard

JMB585 - IOCREST M.2 (PCIe 3.0) to 5 Ports SATA

Open Mes-ser opened this issue 3 years ago • 18 comments

Bought this IOCREST M.2 (PCIe 3.0) to 5 Ports (You can get them cheaper) and tried to make it work with cm4 4GB

IOCREST M.2 (PCIe 3.0)

Already increased the BAR memory, but I still got this BAR 0: no space for [io size 0x0080]

brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.149430] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.149532] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.149641] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x00ffffffff -> 0x0400000000
[    1.175024] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    1.175408] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.175445] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.175479] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    1.175587] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.175848] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.179131] PCI: bus0: Fast back to back transfers disabled
[    1.179173] pci 0000:00:00.0: bridge configuration invalid ([bus ff-ff]), reconfiguring
[    1.179458] pci 0000:01:00.0: [197b:0585] type 00 class 0x010601
[    1.179534] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x007f]
[    1.179585] pci 0000:01:00.0: reg 0x14: [io  0x0000-0x007f]
[    1.179635] pci 0000:01:00.0: reg 0x18: [io  0x0000-0x007f]
[    1.179684] pci 0000:01:00.0: reg 0x1c: [io  0x0000-0x007f]
[    1.179734] pci 0000:01:00.0: reg 0x20: [io  0x0000-0x007f]
[    1.179784] pci 0000:01:00.0: reg 0x24: [mem 0x00000000-0x00001fff]
[    1.179835] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    1.180107] pci 0000:01:00.0: PME# supported from D3hot
[    1.180216] pci 0000:01:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5.0 GT/s PCIe x1 link at 0000:00:00.0 (capable of 15.752 Gb/s with 8.0 GT/s PCIe x2 link)
[    1.183371] PCI: bus1: Fast back to back transfers disabled
[    1.183408] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.183534] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff]
[    1.183578] pci 0000:01:00.0: BAR 6: assigned [mem 0x600000000-0x60000ffff pref]
[    1.183617] pci 0000:01:00.0: BAR 5: assigned [mem 0x600010000-0x600011fff]
[    1.183658] pci 0000:01:00.0: BAR 0: no space for [io  size 0x0080]
[    1.183690] pci 0000:01:00.0: BAR 0: failed to assign [io  size 0x0080]
[    1.183722] pci 0000:01:00.0: BAR 1: no space for [io  size 0x0080]
[    1.183754] pci 0000:01:00.0: BAR 1: failed to assign [io  size 0x0080]
[    1.183786] pci 0000:01:00.0: BAR 2: no space for [io  size 0x0080]
[    1.183817] pci 0000:01:00.0: BAR 2: failed to assign [io  size 0x0080]
[    1.183849] pci 0000:01:00.0: BAR 3: no space for [io  size 0x0080]
[    1.183880] pci 0000:01:00.0: BAR 3: failed to assign [io  size 0x0080]
[    1.183912] pci 0000:01:00.0: BAR 4: no space for [io  size 0x0080]
[    1.183943] pci 0000:01:00.0: BAR 4: failed to assign [io  size 0x0080]
[    1.183979] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.184018] pci 0000:00:00.0:   bridge window [mem 0x600000000-0x6000fffff]
[    1.184439] pcieport 0000:00:00.0: enabling device (0140 -> 0142)
[    1.184683] pcieport 0000:00:00.0: PME: Signaling with IRQ 62
[    1.192597] iproc-rng200 fe104000.rng: hwrng registered

BAR memory

pcie@7d500000 {
                        ...
                        ranges = < 0x2000000 0x00 0xc0000000 0x06 0x00 0x00 0x40000000 >;
                        dma-ranges = < 0x2000000 0x00 0x00 0x00 0x00 0x00 0xc0000000 >;
                        ...
                };

sudo lspci -v shows

01:00.0 SATA controller: JMicron Technology Corp. Device 0585 (prog-if 01 [AHCI 1.0])
        Subsystem: JMicron Technology Corp. Device 0000
        Flags: fast devsel, IRQ 255
        I/O ports at <unassigned> [disabled]
        I/O ports at <unassigned> [disabled]
        I/O ports at <unassigned> [disabled]
        I/O ports at <unassigned> [disabled]
        I/O ports at <unassigned> [disabled]
        Memory at 600010000 (32-bit, non-prefetchable) [disabled] [size=8K]
        [virtual] Expansion ROM at 600000000 [disabled] [size=64K]
        Capabilities: [80] Power Management version 3
        Capabilities: [90] MSI: Enable- Count=1/8 Maskable- 64bit+
        Capabilities: [c0] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [150] Device Serial Number 00-00-00-00-00-00-00-00
        Capabilities: [160] Power Budgeting <?>
        Capabilities: [1b8] Latency Tolerance Reporting
        Capabilities: [300] #19
        Capabilities: [900] L1 PM Substates

ENV:

Linux raspberrypi 5.10.16-v7l+ #1402 SMP Tue Feb 16 14:12:18 GMT 2021 armv7l GNU/Linux

At this point I have no idea how to go further with this. Confirmed that it works - connected to windows PC and it shows HDD.

Mes-ser avatar Feb 22 '21 18:02 Mes-ser

pi@raspberrypi:~/tmp $ lspci -k
00:00.0 PCI bridge: Broadcom Limited Device 2711 (rev 10)
	Kernel driver in use: pcieport
01:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)
	Subsystem: VIA Technologies, Inc. VL805 USB 3.0 Host Controller
	Kernel driver in use: xhci_hcd

I suspect that you have no driver for the device, so there will be no kernel driver listed as in use.

If you're lucky then adding the configs CONFIG_ATA and CONFIG_SATA_AHCI to the kernel may bring it to life.

6by9 avatar Feb 22 '21 18:02 6by9

pi@raspberrypi:~/tmp $ lspci -k
00:00.0 PCI bridge: Broadcom Limited Device 2711 (rev 10)
	Kernel driver in use: pcieport
01:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)
	Subsystem: VIA Technologies, Inc. VL805 USB 3.0 Host Controller
	Kernel driver in use: xhci_hcd

I suspect that you have no driver for the device, so there will be no kernel driver listed as in use.

If you're lucky then adding the configs CONFIG_ATA and CONFIG_SATA_AHCI to the kernel may bring it to life.

Ah! I forgot about that. Thanks! Now it's working.

pi@raspberrypi:~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 238.5G  0 disk
├─sda1        8:1    0   499M  0 part
├─sda2        8:2    0   100M  0 part
├─sda3        8:3    0    16M  0 part
├─sda4        8:4    0 237.3G  0 part
└─sda5        8:5    0   561M  0 part
sdb           8:16   0 232.9G  0 disk
└─sdb1        8:17   0 232.9G  0 part
mmcblk0     179:0    0  59.5G  0 disk
├─mmcblk0p1 179:1    0   256M  0 part /boot
└─mmcblk0p2 179:2    0  59.2G  0 part /

I will close this issue after testing it with 5 drives connected at once.

Mes-ser avatar Feb 22 '21 19:02 Mes-ser

@Mes-ser - Go ahead and leave open the issue. If you can get this working, I'd love to add it to the database! Also, found it on Amazon too.

geerlingguy avatar Feb 22 '21 21:02 geerlingguy

Looks like this card is also available on Amazon, slightly cheaper than AliExpress.

geerlingguy avatar Feb 26 '21 18:02 geerlingguy

IOCREST is just a brand selling stuff. This JMB585 card uses key B-M coding (many other M.2 cards with this chip are key M only) and IO-M2TO585-V10 is silkscreened on it next to the SATA ports. By simply searching for JMB585 on Aliexpress you get the same card from various sellers, e.g. here for 20 bucks less.

ThomasKaiser avatar Feb 28 '21 14:02 ThomasKaiser

@ThomasKaiser - True, but fwiw, some people have an easier time buying from Amazon than AliExpress. Honestly it's always hit or miss no matter what the vendor lately. I'm still waiting on a few things I've ordered from both places over 2 months ago to finish off a couple projects :(

geerlingguy avatar Feb 28 '21 18:02 geerlingguy

I just ordered one for some of my own testing. I'll be adding this to the site soon!

geerlingguy avatar Mar 17 '21 19:03 geerlingguy

Few weeks passed, but finally I've got my hand on hdds and enclosure so tested with 500GB drives (raid0 & individual) everything seems to work Installed OMV and no problems there either. 178757669_384952122554147_5572877229056967310_n

Mes-ser avatar Apr 25 '21 22:04 Mes-ser

I've bought a IO CREST branded card with this exact chipset and it worked out of the box with no modifications other than sawing the PCI-E x1 slot.

pi@raspberrypi:~ $ lspci
00:00.0 PCI bridge: Broadcom Limited Device 2711 (rev 20)
01:00.0 SATA controller: JMicron Technology Corp. Device 0585

pi@raspberrypi:~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda           8:0    0 465.8G  0 disk
`-sda1        8:1    0 465.8G  0 part
  `-md0       9:0    0 931.3G  0 raid5
sdb           8:16   0 465.8G  0 disk
`-sdb1        8:17   0 465.8G  0 part
  `-md0       9:0    0 931.3G  0 raid5
sdc           8:32   0 465.8G  0 disk
`-sdc1        8:33   0 465.8G  0 part
  `-md0       9:0    0 931.3G  0 raid5
mmcblk0     179:0    0 119.3G  0 disk
|-mmcblk0p1 179:1    0   256M  0 part  /boot
`-mmcblk0p2 179:2    0   119G  0 part  /

htruong avatar Jul 11 '21 21:07 htruong

sorry for humble questin, because i'am beginner to this can i use on raspberry pi 4 or only cm4 ? i want to build nas

dededoubled avatar Aug 05 '21 02:08 dededoubled

Basically only on a cm4. Technically it's possible to desolder the USB3.0 controller on a Pi 4 and get access to the PCIe bus that way, but since the cm4 exists now, there isn't really any point in doing that.

Coreforge avatar Aug 06 '21 20:08 Coreforge

Is it possible to connect PCIe switch to cm4 board, then connect 2 or 3 x pcie to m.2 adapters, and then connect multiple this JMB585 adapters? so I could connect 10 or 15 sata hdds to my PI?

mateuszbrzezinski avatar Aug 10 '21 15:08 mateuszbrzezinski

Is it possible to connect PCIe switch to cm4 board, then connect 2 or 3 x pcie to m.2 adapters, and then connect multiple this JMB585 adapters? so I could connect 10 or 15 sata hdds to my PI?

I just tested this board with a CM4 running Ubuntu Impish and a 4-drive port multiplier box (Mediasonic HF2-SU3S2) connected to a single port over eSATA. Writes to a 4xRAIDZ pool are really slow (40MB/s) but reads at a respectable 200MB/s. I believe that if combined with JMB575-based port multiplier boards, you should be able to connect 5x5=25 drives to a single JMB585 controller.

As a total aside, I also put this card into a cheap WavLink Thunderdrive (UTE-02) external nvme enclosure, and it works with my M1 Macbook Air, with no extra drivers needed. Neat!

BeauSlim avatar Oct 01 '21 22:10 BeauSlim

If you're lucky then adding the configs CONFIG_ATA and CONFIG_SATA_AHCI to the kernel may bring it to life.

@6by9 (or anyone else) could you elaborate on this a bit for beginners? What is cruicial for these configs and where to put them? Or is there at least a good link to a documentation to get information about what to do?

I have to admit, that I'm currently just following the topic and have never touched a kernel yet. But reading this, I'm more and more convinced to give it a try for a Raspi-SATA-Nas...

Or is this obsolete now, since Raspberry Pi OS received SATA support out of the box?

bigboipete avatar May 07 '22 10:05 bigboipete

Or is this obsolete now, since Raspberry Pi OS received SATA support out of the box?

So it's written here.

NetanelHarris avatar May 31 '22 06:05 NetanelHarris

I just ordered one for some of my own testing. I'll be adding this to the site soon!

@geerlingguyL any update on using IOCREST M.2 (PCIe 3.0) to 5 Ports with Raspberry Pi 5 ?

abidsamdani avatar Jan 12 '24 10:01 abidsamdani

I have tried it with random hat from aliexpress - works just fine. only did this sudo apt upgrade -y and added these lines to /boot/config.txt

dtparam=pciex1
dtparam=pciex1_gen=3

flaksirus avatar Jan 20 '24 20:01 flaksirus