is it possible to attach a SATA Port Multiplier to BPI-R1?
you can see here:
My problem seems to be the cabling: BPI-R1 has only female connector where the disk comes in. The SATA Port Multiplier seems to have also only female connectors. So I think I need a cable where both ends are male, to connect the PM to the R1; but finding such a male-to-male cable seems not that easy :-(. I haven’t ordered my PM yet, first checking the cabling problem, if it really is a problem.
Regarding the software-side: yes, I too have read on the net that PM should work with BPIs, also the documentation says so, and also at linux-sunxi they state that PM should be fine with BPIs.
I’m writing some SATA code. The following output of the CAPabilities port says that PMP is supported by the BPI SATA controller (field SPM):
mmio_base_addr=0x01c18000 len=4096 device="SATA controller in A20 SoC" off val bitval 0x0000: 0x6f26ff80 01101111001001101111111110000000 AHCI_CAP: len=4 : NP : 0x0(0 0b0) R-0 "Number of Ports" SXS : 0x0(0 0b0) R-0 "Supports External SATA" EMS : 0x0(0 0b0) R-0 "Enclosure Management Supported" CCCS : 0x1(1 0b1) R-1 "Command Completion Coalescing (CCC) Supported" NCS : 0x1f(31 0b11111) R-1Fh "Number of Command Slots (NCQ)" PSC : 0x1(1 0b1) R-1 "Partial State Capable (Power Mgmt State)" SSC : 0x1(1 0b1) R-1 "Slumber State Capable" PMD : 0x1(1 0b1) R-1 "PIO Multiple DRQ Block" Res1 : 0x0(0 0b0) R-0 "Reserved" SPM : 0x1(1 0b1) R-1 "Supports Port Multiplier (PMP)" SAM : 0x1(1 0b1) R-1 "Supports AHCI Mode Only" SNZO : 0x0(0 0b0) R-0 "Supports Non-Zero DMA Offsets" ISS : 0x2(2 0b10) R-2h "Interface Speed Support: 1=1.5Gbps, 2=3Gbps" SCLO : 0x1(1 0b1) R-1 "Supports Command List Override" SAL : 0x1(1 0b1) R-1 "Supports Activity LED" SALP : 0x1(1 0b1) R-1 "Supports Aggressive Link Power Management" SSS : 0x1(1 0b1) W/RO-0 "Supports Staggered Spin-Up" SMPS : 0x0(0 0b0) W/RO-0 "Supports Mechanical Presence Switch" SSNTF : 0x1(1 0b1) R-1 "Supports SNotification Register (P0SNTF)" SNCQ : 0x1(1 0b1) R-1 "Supports Native Command Queuing (NCQ)" S64A : 0x0(0 0b0) R-0 "Indicates Support for 64-Bit Addressing"
Btw, using SATA documentation from Texas Instruments, it’s not exactly the right documentation but much better than nothing https://www.ti.com/lit/ug/sprugj8c/sprugj8c.pdf
Unfortunately BPI/sinovoip/Allwinner have not provided me a documentation of the SATA interface in A20 SoC yet. Still waiting for an answer to my emails…
Btw, my own SATA driver (WIP) brings in the current version 120 MB/s write-speed (read-speed >200 MB/s); the standard ahci_sunxi driver in Linux brings only about 45 MB/s write-speed. If I only had the right documentation then I’m sure I can achieve >200 MB/s (maybe even 300 MB/s) write-speed on A20 devices (currently I don’t have any other boards but A20 boards for testing).