Description
The “Arasan SD3.0 / SDIO3.0 / eMMC4.51 Host Controller”(3MCR Host Controller) is a Host Controller with a AHB/AXI/OCP processor interface.
This product conforms to SD Host Controller Standard Specification Version 3.00.
The 3MCR Host Controller handles SDIO/SD Protocol at transmission level, packing data, adding cyclic redundancy check (CRC), Start/End bit, and checking for
transaction format correctness.
The 3MCR Host Controller provides Programmed IO method and DMA data transfer method. In programmed IO method, the Host processor transfers data using the
Buffer Data Port Register. Host controller support for DMA can be determined by checking the DMA support in the Capabilities register. DMA allows a peripheral
to read or write memory without the intervention from the CPU. The 3MCR Host Controller’s Host Controller system address register points to the first data
address, and data is then accessed sequentially from that address.
HW/IP features
Compliance
-------------------------
• SD Host Controller Standard Specification Version 3.00
• SDIO card specification Version 3.0
• SD Memory Card Specification Version 3.01
• SD Memory Card Security Specification version 1.01
• MMC Specification version 4.51
• OCP specification version 2.01(For the Host Controller with OCP Interface)
• AMBA AHB Specification version 2.00 (For the Host Controller with AHB Interface)
• AMBA AXI Specification version 3.00 (For Host Controller with AXI Interface)
System/Host Interface
-------------------------
• Supports one of the following System/Host Interfaces: AHB, AXI or OCP
• Data transfer using PIO mode on the Host Bus Slave interface, using DMA mode on the Host Bus Master interface. Here the Host Bus is AHB or AXI or OCP
Interface.
SD/ SDIO Card interface
-------------------------
• Host clock rate variable between 0 and 208 MHz
• Up to 832Mbits per second data rate using 4 parallel data lines (SDR104 mode)
• Transfers the data in 1 bit and 4 bit SD modes
• Transfers the data in SDR104, SDR50, DDR50 modes.
• Cyclic Redundancy Check CRC7 for command and CRC16 for data integrity
• Variable-length data transfers
• Performs Read wait Control, Suspend/Resume operation SDIO CARD.
• Designed to work with I/O cards, Read-only cards and Read/Write cards
• Supports Read wait Control, Suspend/Resume operation
MMC card interface
------------------------
• Host clock rate variable between 0 and 208 MHz
• Up to 1664Mbits per second data rate using 8 bit parallel data lines (mmc8 bit SDR mode)
• Up to 832Mbits per second data rate using 8 bit parallel data lines (mmc8 bit DDR mode)
• Transfers the data in 1 bit, 4 bit and 8 bit modes
• Cyclic Redundancy Check CRC7 for command and CRC16 for data integrity
• Supports MMC Plus and MMC Mobile
• Card Detection (Insertion / Removal)
Missing features and Known Issues/limitations in Driver
UHS mode support is disabled in the driver currently due to tap delay dependencies.
MMC HS200 and DDR50 mode support is disabled in the driver currently due to tap delay dependencies.
Linux SD Framework
Ronaldo SD Host driver is same as Zynq driver with no changes.
boot partitions, boot mode alternate boot mode
RPMB partitions
Devicetree
dts entries:
SD:
sdhci0: sdhci@ff160000 {
compatible = "arasan,sdhci-8.9a";
interrupt-parent = <&gic>;
interrupts = <0 48 4>;
reg = <0x0 0xff160000 0x1000>;
clock-names = "clk_xin", "clk_ahb";
};
eMMC:
sdhci1: sdhci@ff170000 {
compatible = "arasan,sdhci-8.9a";
interrupt-parent = <&gic>;
interrupts = <0 49 4>;
reg = <0x0 0xff170000 0x1000>;
clock-names = "clk_xin", "clk_ahb";
};
MenuconfigKernel config
config MMC_SDHCI_OF_ARASAN
tristate "SDHCI OF support for the Arasan SDHCI controllers"
< > ENE CB710 MMC/SD Interface support
< > VIA SD/MMC Card Reader Driver
Changelog
2016.3
Added support for Tap delays required for 3.0 modesDevicetree
dts entries:
SD and high speed modes.
Added new workaround for auto tuning.
Added "SDHCI_QUIRK_BROKEN_ADMA" quirk to the sdhci arasan controller based on DT property. With 4.6 kernel ADMA2 is broken, so added this quirk as a workaround and can be reverted once it is fixed.
Sanity testingeMMC:
sdhci@ff160000 {
compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
interrupt-parent = <&gic>;
interrupts = <0x0 0x30 0x4>;
reg = <0x0 0xff160000 0x0 0x1000>;
clock-names = "clk_xin", "clk_ahb";
xlnx,device_id = <0x0>;
};
sdhci@ff170000 {
compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
interrupt-parent = <&gic>;
interrupts = <0x0 0x31 0x4>;
reg = <0x0 0xff170000 0x0 0x1000>;
clock-names = "clk_xin", "clk_ahb";
xlnx,device_id = <0x0>;
};
Testing
Read/Write test using File System
mkfs.vfat -F 32 /dev/mmcblk0(p1)
root@Xilinx-ZynqMP-2015_3:~# vi /mnt/sd/sd.txt
root@Xilinx-ZynqMP-2015_3:~# umount /mnt
Changelog
2016.3
Added support for Tap delays required for 3.0 modes and high speed modes.
Added new workaround for auto tuning.
Added "SDHCI_QUIRK_BROKEN_ADMA" quirk to the sdhci arasan controller based on DT property. With 4.6 kernel ADMA2 is broken, so added this quirk as a workaround and can be reverted once it is fixed.
Related Links
Source file Link:
https://github.com/Xilinx/linux-xlnx/blob/master/drivers/mmc/host/sdhci-of-arasan.c
Boot log for SD
sdhci: Secure Digital Host Controller Interface driver