28
Technical Note TN-52-05 e.MMCLinux Enablement Introduction Linux supports e.MMCdevices and allows their integration within its subsystems. It supports most e.MMC features introduced by the JEDEC standard in releases 4.1 through 5.1, which are described in this technical note. An e.MMC device offers a low-cost, high-performance data storage solution. e.MMC is designed for use in a wide range of wireless and embedded applications. It can be used to store data and code. In addition, boot operation features enable the loading of boot and pre-boot code from an e.MMC device. e.MMC architecture combines a NAND Flash memory device with a high-speed e.MMC controller in a single package. Its managed interface runs data management firmware modules (such as FTL, WL and BBM) with error correction code (ECC), wear leveling, and bad block management. This architecture simplifies hardware and software inte- gration by providing a standard interface specification that minimizes the need for host software to accommodate process node migrations and vendor-specific NAND Flash characteristics. Figure 1: NAND vs. e.MMC Architecture NAND Flash Host Processor ECC Bad Block Management Wear Leveling NAND Flash Driver NAND Flash Managed NAND Controller ECC Bad Block Management Wear Leveling Host Processor Managed NAND Driver DATA I/Os ALE CLE RE# WE# RB# CE# WP# CMD CLK e.MMC Architecture NAND Architecture TN-52-05 e.MMC Linux Enablement Introduction CCMTD-1725822587-4445 tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 1 Micron Technology, Inc. reserves the right to change products or specifications without notice. © 2012 Micron Technology, Inc. All rights reserved. Products and specifications discussed herein are subject to change by Micron without notice.

e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

  • Upload
    ngodang

  • View
    337

  • Download
    8

Embed Size (px)

Citation preview

Page 1: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Technical NoteTN-52-05 e.MMC™ Linux Enablement

IntroductionLinux supports e.MMC™ devices and allows their integration within its subsystems. Itsupports most e.MMC features introduced by the JEDEC standard in releases 4.1through 5.1, which are described in this technical note.

An e.MMC device offers a low-cost, high-performance data storage solution. e.MMC isdesigned for use in a wide range of wireless and embedded applications. It can be usedto store data and code. In addition, boot operation features enable the loading of bootand pre-boot code from an e.MMC device.

e.MMC architecture combines a NAND Flash memory device with a high-speed e.MMCcontroller in a single package. Its managed interface runs data management firmwaremodules (such as FTL, WL and BBM) with error correction code (ECC), wear leveling,and bad block management. This architecture simplifies hardware and software inte-gration by providing a standard interface specification that minimizes the need for hostsoftware to accommodate process node migrations and vendor-specific NAND Flashcharacteristics.

Figure 1: NAND vs. e.MMC Architecture

NAND Flash

Host Processor

ECCBad Block Management

Wear LevelingNAND Flash Driver

NAND Flash

Managed NANDController

ECCBad Block Management

Wear Leveling

Host Processor

Managed NAND Driver

DA

TA

I/Os

ALE

CLE

RE#

WE#

RB

#C

E#W

P#

CM

DC

LK

e.MMC ArchitectureNAND Architecture

TN-52-05 e.MMC Linux EnablementIntroduction

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 1 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Products and specifications discussed herein are subject to change by Micron without notice.

Page 2: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Linux Support for e.MMCAs described in the previous section, e.MMC devices have a built-in controller that runsflash translation layer (FTL) firmware. All FTL devices have interfaces providing blockI/O access, and Linux provides an abstraction for block devices. This architecture allowsseveral general purpose file systems to interface with it, such as FAT, EXTx and so forth.

Figure 2: Linux Architecture for the e.MMC Subsystem

File SystemFile System(Sector Based)

CardBlock DeviceDriver

Coree·MMCDriver

HostHost Driver(Platform Dependent)

e.MMC Card Card

The e.MMC subsystem (./drivers/mmc) is organized into three layers:

• The card layer is the external interface. It is seen as a block device driver, dependingon the enablement of block layer support for the kernel and interfaces within the filesystem.

• The core layer implements all e.MMC-dependent functionality, such as main opera-tions, command management, host setting, management functions, and high-levelfunctions.

• The host layer implements the driver for most known platform controllers and is plat-form dependent.

Linux enables e.MMC device integration within its subsystems. However, it does notsupport all e.MMC features introduced by the JEDEC standard. The next sections de-scribe the supported and unsupported features and how to enable them.

TN-52-05 e.MMC Linux EnablementLinux Support for e.MMC

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 2 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 3: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Support History for e.MMC Features in the Linux KernelSupport for most e.MMC features was introduced and/or improved in the following Li-nux kernel releases.

Table 1: Linux Kernel e.MMC Feature Support

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

2.6.20 Support for MMC 4.0 high-speed and wide-bus modes

Support for high speed (50Hz clock speed) SD cards

SDHCI high-speed support

2.6.22 Support for MMC 4.2 sector-based cards

2.6.23 Bounce requests for simple hosts

ENE controller ID for SDHCI

2.6.24 SPI/SDIO support in the MMC layer

2.6.26 OMAP:Back cover switch supportNew multislot structureChanged driver to use the new multislot structure

MMC host test driver

2.6.27 S3C24XX MMC/SD driver

Host driver for Ricoh® Bay1 controllers

Support for card-detection polling

Removed multiwrite capability

SDHCI:Handle hot-removeSupport JMicron® secondary interfaceScatter-gather (ADMA) support

au1xmmc:Suspend/resume implementationSDIO IRQ support

Bounce buffer highmem support for mmc_block

mmc_spi: Support for card-detection polling

at91_mci: Support for block size not modulo 4

atmel-mci: Driver for Atmel® on-chip MMC controllers

2.6.28 sdio: High-speed support

s3cmci: cpufreq support

atmel-mci:Experimental DMA support (commit)Platform code for supporting multiple MMC slots

Support multiple MMC slots

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 3 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 4: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

2.6.29 Support for 8-bit bus width

sdricoh_cs: Support for bay controller devices

mmc_spi: Support for OpenFirmware bindings

ricoh_mmc: Handle newer models of Ricoh controllers

2.6.30 SDIO driver for Marvell® SoCs

OpenFirmware bindings for SDHCI driver

2.6.31 Platform driver for secure digital host controller interface

Support for hosts that are only capable of 1-bit transfers

pxamci: Regulator support

New via-sdmmc host controller driver

Driver for CB710/720 memory card reader (MMC part)

SDHCI:Platform driver for SDHCISupport for hosts that are only capable of 1-bit transferssdhci-s3c: Samsung® S3C-based SDHCI controller glue

2.6.32 Core SDIO "real" suspend/resume support

MMC sleep and wake support (JEDEC 4.3 specification).

msm_sdccc: Driver for the HTC® Dream™ devices

Added MMC card sleep and awake support

MMC/SD Support for dm365 EVM

2.6.33 Blackfin SD host controller driver

sdhci-of: Support for the Nintendo® Wii™ SDHCI controller

Reorganized driver to support additional hardware

2.6.36 ERASE, SECURE ERASE, TRIM, and SECURE TRIM operations (JEDEC 4.4)

mmc_block: Discard and secure discard support

SD-combo (IO+mem) support

Performance tests

2.6.37 New sdhci-pxa driver for Marvell SoCs

MMC 4.4 DDR support

sdhci-pltfm: Platform driver for imx35/51

USB SD host controller (USHC) driver

2.6.39 mxs-mmc: MMC host driver for i.MX23/28

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 4 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 5: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

3.0 MMC CMD+ACMD passthrough IOCTL reliable write support

MMC boot partition support

New VUB300 USB-to-SD/SDIO/MMC driver

SD: Support for signal voltage switch procedure

Reliable writes

DISCARD command

3.2 Enabled HPI for MMC cards that support this feature

Cache control for e.MMC 4.5 devices

e.MMC hardware reset support

Random fault injection

General-purpose MMC partition support (JEDEC 4.4)

SDHCI: e.MMC hardware reset support

sdhci-pci: Runtime PM support

mmc-test: e.MMC hardware reset test

SANITIZE command

Power-off notification

3.3 Boot partition read-only lock support

HS200 mode support (JEDEC 4.5)

3.4 Datatag support

PCI mode in the dw_mmc driver

3.7 Enabled background operations

3.8 Core:Limit MMC speed to 52 MHz if not HS200Expose access to RPMB partition extending the existing mmc_block ioctl.Add mmc_set_blockcount featureAdd SDIO powered-suspend DT properties to the core MMC DT binding.

Driver:Add SD/MMC Host Controller for Wondermedia WM8505/WM8650

3.9 Core:Support for packed commands in e.MMC 4.5. (This requires a host capability to be turned on. It in-creases write throughput by 20%+, but may also increase average write latency; more testing nee-ded.)

Drivers:omap_hsmmc: Fix boot hangs with RPMB partitions.sdhci-esdhc-imx: Add 8-bit data, auto CMD23 support, use slot-gpio.sh_mmcif: Add support for e.MMC DDR, bundled MMCIF IRQs.tmio_mmc: Add DT bindings, support for VCCQ regulator.

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 5 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 6: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

3.10 Core:Introduce MMC_CAP2_NO_PRESCAN_POWERUP to allow skipping mmc_power_up()at boot/initializa-tion time if it's already happened, for performanc (faster boot time) reasons.Fix a bit width test failure that resulted in old e.MMC cards being put into 1-bit mode when 4-bitmode was available.Expose fwrev/hwrev for MMCv4 parts.Improve card removal logic in the case where the card's removed slowly; we were missing card re-moval events if the card retained contact with the slot pads for long enough to reply to a CMD13while being removed.

Drivers:dw_mmc: Add support for Exynos4412.Add mpc512x SDHC supportsdhci-tegra: Add support for Tegra114 platforms, use mmc_of_parse().

3.11 Core:Add support for e.MMC 5.1 devices.Add MMC_CAP_AGGRESSIVE_PM capability for aggressive power management of e.MMC/SD be-tween requests, using runtime PM.Add an ioctl to perform the e.MMC 4.5 SANITIZE command.

Drivers:dw_mmc: Add support for Rockchip's Arm® Cortex®-A9-based SoCs.dw_mmc: Add support for Altera® SoCFPGAs.sdhci-esdhc-imx: Add support for 8-bit bus width, non-removable cards.sdhci-bcm-kona: New driver for Broadcom® Kona (281xx) SoCs.sdhi/tmio: Add DT DMA support.

3.12 Core:Support allocation units 8MB–64MB in SD3.0, previous MAX was 4MB.The slot-gpio helper can now handle GPIO debouncing card-detect.Read supported voltages from DT "voltage-ranges" property.Set data timeout for MMC BUS TEST commands (CMD14 and CMD19).

Drivers:dw_mmc: Add support for ARC architecture, and support exynos5420.mmc_spi: Support CD/RO GPIOs.sh_mobile_sdhi: Add compatibility for more Renesas SoCs.sh_mmcif: Add DT support for DMA channels.

3.13 Core:Improve runtime PM support, remove mmc_{suspend,resume}_host().Add MMC_CAP_RUNTIME_RESUME, for delaying MMC resume until we're outside of the resume se-quence (in runtime_resume) to decrease system resume time.

Drivers:dw_mmc: Support HS200 mode.sdhci-eshdc-imx: Support SD3.0 SDR clock tuning, DDR on IMX6.sdhci-pci: Add support for Intel's Clover Trail and Merrifield.

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 6 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 7: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

3.14 Core:Avoid get_cd() on cards marked nonremovable.

Drivers:arasan: New driver for controllers found in, for example, Xilinx® Zynq® SoC.dwmmc: Support Hisilicon® K3 SoC controllers.esdhc-imx: Support for HS200 mode, DDR modes on MX6, runtime PM.sdhci-pci: Support O2Micro®/BayHubTech controllers used in laptops like Lenovo™ ThinkPad® W540,Dell™ Latitude™ E5440, Dell Latitude E6540.tegra: Support Tegra124 SoCs.

3.15 Core:CONFIG_MMC_UNSAFE_RESUME=y is now default behavior.DT bindings for SDHCI UHS, e.MMC HS200, high-speed DDR, at 1.8/1.2V.Add GPIO descriptor based slot-gpio card detect API.Use generic CMD6 time while switching to e.MMC HS200 mode

Drivers:dw_mmc: Refactor SOCFPGA support as a variant inside dw_mmc-pltfm.c.mmci: Support HW busy detection on ux500.omap: Support MMC_ERASE.omap_hsmmc: Support MMC_PM_KEEP_POWER, MMC_PM_WAKE_SDIO_IRQ, (a)cmd23.rtsx: Support pre-req/post-req async.sdhci: Add support for Realtek® RTS5250 controllers.sdhci-acpi: Add support for 80860F16, fix 80860F14/SDIO card detect.sdhci-msm: Add new driver for Qualcomm® SDHCI chipset support.sdhci-pxav3: Add support for Marvell® Armada® 380 and 385 SoCs.

3.16-rc1 Core:support HS400 mode of e.MMC 5.0, via DT bindings mmc-hs400-1_{2,8}V if card init at 3.3V doesn'twork, try 1.8V and 1.2V too

Drivers:rtsx_usb_sdmmc: New driver for Realtek USB card readerssdhci: Large rework around IRQ/regulator handling, remove card_taskletsdhci-pci-o2micro: Add SeaBird SeaEagle SD3 supportsunxi: New driver for Allwinner® sunxi SoCsusdhi6rol0: New driver for Renesas SD/SDIO controller

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 7 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 8: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

3.17 MMC core:Forward compatibility for e.MMC.Fix some blacklisted cards with broken secure discard.

MMC host:mmci: Add support for Qualcomm variant.mmci: Fix regression for arm_variant.sdhci: Various fixes and cleanups.sdhci: Improve external VDD regulator support.sdhci: Support for DDR50 1.8V mode for BayTrail.sdhci-st: Add driver for ST SDHCI controller.sh-mmcif: DMA fixes.omap_hsmmc: Add support for SDIO interrupts.sdhci-pci: Add support for Intel® Quark™ X1000 SoC.dw_mmc: Update the reset sequence.s3cmci: port DMA code to dma engine API.

3.18 MMC core:Fix SDIO IRQ bug.MMC regulator improvements.Fix slot-gpio card detect bug.Add support for driver stage register.Convert the common MMC OF parser to use GPIO descriptors.Convert MMC_CAP2_NO_MULTI_READ into a callback, ->multi_io_quirk().Fix card detection regression.

MMC host:mmci: Support Qualcomm-specific DML layer for DMA.dw_mmc: Use common MMC regulators.dw_mmc: Add support for Rockchip's RK3288.tmio: Enable runtime PM support.tmio: Add support for R-Car Gen2 SoCs.tmio: Several fixes and improvements.omap_hsmmc: Removed Balaji from MAINTAINERS.jz4740: add DMA and pre/post support.sdhci: Add support for Intel Braswell.sdhci: Several fixes and improvements.

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 8 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 9: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

3.19 MMC core:Some improvements regarding error handling.Increase maximum amount of block devices.Use correct OCR mask for SDIO when restoring power.Fix prepared requests while doing BKOPS.Convert to modern PM ops.Add mmc_send_tuning() API and convert some hosts to use it.Fix selection of buswidth for mmc hosts supporting 1-bit only.

MMC host:toshsd: New Toshiba PCI SD controller driver.sdhci: 64-bit ADMA support.sdhci: HS400 support.sdhci: Various fixes cleanups.atmel-mci: Modernization and cleanups.atmel-mci: Runtime PM support.omap_hsmmc: Modernization and cleanups.omap_hsmmc: Fix UHS card with DDR50 support.dw_mmc: Support for ARM64 and Exynos® 7 variant.dw_mmc: Add support for IMG Pistachio variant.dw_mmc: Various fixes and cleanups.mvsdio: DMA fixes.mxs-mmc: Modernization and cleanups.mxcmmc: Various fixes.sdhci-pci|acpi: Support some new IDssdhci: Fix sleep from atomic contextsdhci-pxav3: Prevent hang during ->probe()sdhci: Disable re-tuning for HS400sdhci: Fix regulator regression for Qualcomm and Nvidia® boards

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 9 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 10: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

3.20-1 MMC core:Support for MMC power sequences.SDIO function devicetree subnode parsing.Refactor the hardware reset routines and enable it for SD cards.Various code quality improvements, especially for slot-gpio.Resolve BKOPS compatibility issue

MMC host:dw_mmc: Various fixes and cleanups.dw_mmc: Convert to mmc_send_tuning().sdhci: Various fixes and cleanupssdhci: Asynchronous request handling support.sdhci: switch voltage before sdhci_set_ios in runtime resumesdhci-pxav3: Various fixes and cleanups.sdhci-tegra: Fixes for T114, T124 and T132.tegra: Write xfer_mode, CMD regs in togetherrtsx: Various fixes and cleanups.rtsx: Support for SDIO.sdhi/tmio: Refactor and cleanup of header files.omap_hsmmc: Use slot-gpio and common MMC DT parser.Make all hosts to deal with errors from mmc_of_parse().sunxi: Various fixes and cleanups.sdhci: Support for Fujitsu SDHCI controller f_sdh30"sdhci-s3c: solve problem with sleeping in atomic contextdw_mmc: Rockchip: Remove incorrect __exit_p()dw_mmc: Exynos: Remove incorrect __exit_p()

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 10 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 11: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.1 MMC core:Add support for marking HPI as broken through devicetreeEnable runtime PM management of host devicesRemove the ->enable|disable() callbacks

MMC host:dw_mmc: HS400 mode supportdw_mmc: Add the cmd11 timer to detect a timeoutdw_mmc: Endian agnostic IO accessorsdw_mmc: Bugfixessh_mmcif: Add exclusion between cmd and interruptomap_hsmmc: Hibernation supportomap_hsmmc: Rework and simplify cover/card detectomap_hsmmc: Stop using ->enable|disable() callbacksatmel-mci: Endian agnostic IOsunxi: Enable MMC_CAP_SDIO_IRQsdhci-st: Add support for the stih407 family siliconsdhci-st: UHS card support in SDR104 modesdhci-st: HS200 mode supportsdhci-esdhc-imx: Use common mmc DT parsersdhci-of-arasan: Use common mmc DT parsersdhci-iproc: Add new driver for Broadcom IPROC SDHCI controllersdhci-tegra: Convert to GPIO descriptorssdhci-tegra: Optmize write_w path for tegra114 and latersdhci-sirf: Update tuning proceduresdhci: Fix card presence logic

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 11 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 12: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.2 MMC core:Fix an error path in the mmc block layerFix PM domain attachment for the SDIO busAdd support for driver strength selectionIncrease a delay to let voltage stabilizeAdd support for disabling write-protect detectionAdd facility to support re-tuningRe-tune and retry in the recovery pathAdd reset option for SDIOConsolidations and clean-ups

MMC host:Add Mediatek MMC driverConstify platform_device_id for a couple of hostsFix modalias to make module auto-loading work for a couple of hostssdhci: Add support for sdhci-arasan4.9asdhci: Fix low memory corruptionsdhci: Restore behavior while creating OCR masksdhci: Add a callback to select drive strengthsdhci: Fix driver type B and D handlingsdhci: Add support for drive strength selection for SPTsdhci: Enable HS400 for some Intel host controllerssdhci: Convert to use the new re-tuning facilitysdhci: Various minor fixes and clean-upsdw_mmc: Add support for hi6220dw_mmc: Use core to handle absent write protect linedw_mmc: Add support to switch voltagetmio: Some fixes and modernizationssh_mmcif: Improve clock rate calculation"queue: prevent soft lockups on PREEMPT=nmediatek: Add PM support for MMC drivermediatek: Add Mediatek MMC driversdhci-of-esdhc: enable interrupt mode to detect cardsdhci-esdhc-imx: add quirk SDHCI_QUIRK2_BROKEN_HS200 for imx6qdl

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 12 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 13: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.3 MMC core:Fix a race condition in the request handlingSkip TRIM commands for some buggy kingston e.MMCsAn optimization and a correction for erase groupsSet CMD23 quirk for some Sandisk cards

MMC host:sdhci: Give GPIO CD higher precedence and don't poll when it's usedsdhci: Fix DMA memory leakagesdhci: Some updates for clock managementsdhci-of-at91: introduce driver for the Atmel SDMMCsdhci-of-arasan: Add support for sdhci-5.1sdhci-esdhc-imx: Add support for imx7d which also supports HS400sdhci: A collection of fixes and improvements for various sdhci hostsomap_hsmmc: Modernization of the regulator codedw_mmc: A couple of fixes for DMA and PIO modeusdhi6rol0: A few fixes and support probe deferral for regulatorspxamci: Convert to use dmaenginesh_mmcif: Fix the suspend process in a short term solutiontmio: Adjust timeout for commandssunxi: Fix timeout while gating/ungating clock"

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 13 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 14: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.4 MMC core:Add new API to set VCCQ voltage - mmc_regulator_set_vqmmc()Add new ioctl to allow userspace to send multi commandsWait for card busy signaling before starting SDIO requestsRemove MMC_CLKGATEEnable tuning for DDR50 modeSome code clean-up/improvements to mmc pwrseqUse highest priority for e.MMC restart handlerAdd DT bindings for e.MMC hardware reset supportExtend the mmc_send_tuning() APIImprove IOS show for debugfs

MMC host:sirf: Add support for DDR50sunxi: Add support for card busy detectionmediatek: Use MMC_CAP_RUNTIME_RESUMEmediatek: Add support for e.MMC HW-resetmediatek: Add support for HS400dw_mmc: Convert to use the new mmc_regulator_set_vqmmc() APIdw_mmc: Add external DMA interface supportdw_mmc: Some various improvementsdw_mmc-rockchip: MMC tuning with the clock phase frameworksdhci: Properly clear IRQs during resumesdhci: Enable tuning for DDR50 modesdhci-of-esdhc: Use IRQ mode for card detectionsdhci-of-esdhc: Support both BE and LE host controllersdhci-pci: Build o2micro support in the same modulesdhci-pci: Support for new Intel host controllerssdhci-acpi: Support for new Intel host controllers"

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 14 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 15: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.5 MMC core:Optimize boot time by detecting cards simultaneouslyMake runtime resume default behavior for MMC/SDEnable MMC/SD/SDIO devices to suspend/resume asynchronouslyAllow more than 8 partitions per cardIntroduce MMC_CAP2_NO_SDIO to prevent unsupported SDIO commandsSupport the standard DT wakeup-source propertyFix driver strength switching for HS200 and HS400Fix SWITCH command timeoutFix invalid VDD in voltage switch power cycle for SDIO

MMC host:sdhci: Restore behavior when setting VDD via external regulatorsdhci: A couple of changes/fixes related to the dma supportsdhci-tegra: Add Tegra210 supportsdhci-tegra: Support for UHS-I cards including tuning supportsdhci-of-at91: Add PM supportsh_mmcif: Rework dma channel handlingmvsdio: Delete platform data code path"

4.6 MMC core:Fix ABI regression of MMC BLK ioctlRemove the unused MMC_DATA_STREAM flagEnable asynchronous system PM for the host device

MMC host:mediatek: Add SD write protect supportsdhci-acpi: Add QCOM controllerssdhci-iproc: Add bcm2835 support , add support and PCI IDs for more Broxton host controllerssdhci-pic32: Add PIC32 SDHCI host controller driversdhi: Add r8a7795 supportsunxi: Support 8 bit e.MMC DDR transfer modes, support MMC_DDR52 timing modes, supportvqmmc regulator

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 15 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 16: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.7 MMC core:Add TRACE support to be able to debug request flowExtend/improve reset support for (e)MMCConvert MMC pwrseq to platform device driversUse IDA for indexesSome additional minor improvements

MMC host:sdhci: Re-factoring, clean-ups and improvementssdhci-acpi|pci: Use MMC_CAP_AGGRESSIVE_PM for Broxtonomap/omap_hsmmc: Convert to use dma_request_chan()usdhi6rol0: Add support for UHS modessh_mmcif: Update runtime PM supporttmio: Wolfram Sang steps in as maintainertmio: Add UHS-I mode supportsh_mobile_sdhi: Add UHS-I mode supporttmio/sdhi: Re-factoring, clean-ups and improvementsdw_mmc: Re-factoring and clean-upsdavinci: Convert to use dma_request_chan()

4.8 MMC core:A couple of changes to improve the support for erase/discard/trim cmdsAdd e.MMC HS400 enhanced strobe supportShow OCR and DSR registers in SYSFS for MMC/SD cardsCorrect and improve busy detection logic for MMC switch (CMD6) cmdsDisable HPI cmds for certain broken Hynix e.MMC cardsAllow MMC hosts to specify non-support for SD and MMC cmds

MMC host:sdhci: Re-works, fixes and clean-upssdhci: Add HW auto re-tuning supportsdhci: Re-factor code to prepare for adding support for e.MMC CMDQsdhci-esdhc-imx: Fixes and clean-upssdhci-esdhc-imx: Update system PM supportsdhci-esdhc-imx: Enable HW auto re-tuningsdhci-bcm2835: Remove driver as sdhci-iproc is used insteadsdhci-brcmstb: Add new driver for Broadcom BRCMSTB SoCssdhci-msm: Add support for UHS cardssdhci-tegra: Improve support for UHS cardssdhci-of-arasan: Update phy support for Rockchip™ SoCssdhci-of-arasan: Deploy enhanced strobe supportdw_mmc: Some fixes and clean-upsdw_mmc: Enable support for erase/discard/trim cmdsdw_mmc: Enable CMD23 supportmediatek: Some fixes related to the e.MMC HS400 supportsh_mmcif: Improve support for HW busy detectionrtsx_pci: Enable support for erase/discard/trim cmds"

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 16 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 17: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.9 MMC core:Add support for sending commands during data transferErase/discard/trim improvementsImproved error handlingExtend sysfs with SD status registerDocument info about the vmmc/vmmcq regulatorsExtend pwrseq-simple to manage an optional post-power-on-delay

MMC host:dw_mmc: Add reset supportdw_mmc: Return -EILSEQ for EBE and SBE errordw_mmc: Some cleanupsdw_mmc-k3: Add UHS-I support Hisilicon Hikeytmio: Add e.MMC supportsh_mobile_sdhi: Add r8a7796 supportsunxi: Don't use sample clocks for sun4i/sun5isunxi: Add support for A64 mmc controllersunxi: Some cleanups and improvementssdhci: Support for sending commands during data transfersdhci: Do not allow tuning procedure to be interruptedsdhci-pci: Enable SD/SDIO on Merrifieldsdhci-pci|acpi: Enable MMC_CAP_CMD_DURING_TFRsdhci-pci: Some cleanupssdhci-of-arasan: Set controller to test mode when no CD bitsdhci-of-arasan: Some fixes for clocks and physsdhci-brcmstb: Don't use ADMA 64-bit when not supportedsdhci-tegra: Mark 64-bit DMA broken on Tegra124sdhci-esdhc-imx: Fixups related to data timeouts

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 17 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 18: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.10 MMC core:Delete e.MMC packed command supportIntroduce mmc_abort_tuning() to enable e.MMC tuning to fail gracefullyIntroduce mmc_can_retune() to see if a host can be retunedRework and improve the sequence when sending a CMD6 for mmcEnable CDM13 polling when switching to HS and HS DDR mode for mmcRelax checking for CMD6 errors after switch to HS200Re-factoring the code dealing with the mmc block queue

MMC host:sdhci: Fix tuning sequence and clean-up the related codesdhci: Add support to via DT override broken SDHCI cap register bitssdhci-cadence: Add new driver for Cadence SD4HC SDHCI variantsdhci-msm: Update clock managementImprove error handling and drop meaningless BUG_ONs()Increase MMC_IOC_MAX_BYTES to support bigger firmware binariesDon't power off the card when starting the hostFix 4K native sector checkRecognize whether the e.MMC card supports CMDQsdhci-msm: Add support for e.MMC HS400 modesdhci-msm: Deploy runtime/system PM supportsdhci-iproc: Extend driver support to newer IP versionssdhci-pci: Add support for Intel GLKsdhci-pci: Add support for Intel NI byt sdiosdhci-acpi: Add support for 80860F14 UID 2 SDIO bussdhci: Lots of various small improvements and clean-upstmio: Add support for tuningsh_mobile_sdhi: Add support for tuningsh_mobile_sdhi: Extend driver to support SDHI IP on R7S72100 SoCsh_mobile_sdhi: Remove support for sh7372davinci: Use mmc_of_parse() to enable generic mmc DT bindingsmeson: Add new driver to support GX platformsdw_mmc: Deploy generic runtime/system PM supportdw_mmc: Lots of various small improvements

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 18 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 19: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.11 MMC core:Add support for Marvell SD8787 Wifi/BT chipImprove UHS support for SDIOInvent MMC_CAP_3_3V_DDR and a DT binding for e.MMC DDR 3.3V modeDetect Auto BKOPS enable bitExport e.MMC device lifetime information through sysfsFirst take to slim down the public mmc headers to avoid abuseRe-factoring of the mmc block device driver to prepare for blkmq

MMC host:Don't rely on public mmc headers to include non-mmc related headersmeson: Add support for e.MMC HS400 modemeson: Various cleanups and improvementsomap_hsmmc: Use the proper provided busy timeout from the coresunxi: Enable new timings for the A64 MMC controllerssunxi: Improvements for clock managementtmio: Improvements for SDIO interruptsmxs-mmc: Add CMD23 supportsdhci-msm: Enable HS400 enhanced strobe mode supportsdhci-msm: Correct HS400 tuning sequencesdhci-acpi: Support deferred probesdhci-pci: Add support for e.MMC HS200 tuning mode on AMDmediatek: Correct the implementation of card busy detectiondw_mmc: Initial support for ZX mmc controllersh_mobile_sdhi: Enable support for e.MMC HS200 modesh_mmcif: Various cleanups and improvements

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 19 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 20: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.12 MMC core:Continue to re-factor code to prepare for e.MMC CMDQ and blkmq supportIntroduce queue semantics to prepare for e.MMC CMDQ and blkmq supportAdd helper functions to manage temporary enable/disable of e.MMC CMDQImprove wait-busy detection for SDIO

MMC host:cavium: Add driver to support Cavium™ controllerscavium: Extend Cavium driver to support Octeon SOCs and ThunderX® SOCsbcm2835: Add new driver for Broadcom BCM2835 controllersdhci-xenon: Add driver to support Marvell Xenon SDHCI controllersdhci-tegra: Add support for the Tegra186 variantsdhci-of-esdhc: Support for UHS-I SD cardssdhci-of-esdhc: Support for e.MMC HS200 cardssdhci-cadence: Add e.MMC HS400 enhanced strobe supportsdhci-esdhc-imx: Reset tuning circuit when neededsdhci-pci: Modernize and clean-up some PM related codesdhci-pci: Avoid re-tuning at runtime PM for some Intel devicessdhci-pci|acpi: Use aggressive PM for some Intel BYT controllerssdhci: Re-factoring and modernizationssdhci: Optimize delay loopssdhci: Improve register dump print formatsdhci: Add support for the command queue enginemeson-gx: Various improvements and clean-upsmeson-gx: Add support for CMD23meson-gx: Basic tuning support to avoid CRC errorss3cmci: Enable probing via DTmediatek: Improve tuning support for e.MMC HS200 and HS400 modetmio: Improve DMA supporttmio: Use correct response for CMD12dw_mmc: Minor improvements and clean-ups

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 20 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 21: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.13 MMC core:Add support to enable irq wake for slot gpioRemove MMC_CAP2_HC_ERASE_SZ and make it the default behaviourImprove R1 response error checks for STOP commandsCleanup and clarify some MMC specific codeKeep card runtime resumed while adding SDIO function devicesUse device_property_read instead of of_property_read in mmc_of_parse()Move boot partition locking into a driver op to enable proper I/O schedulingMove multi/single-ioctl() to use block layer to enable proper I/O schedulingDelete bounce buffer Kconfig optionImprove the e.MMC HW reset support provided via the e.MMC pwrseqAdd host API to manage SDIO IRQs from a workqueue

MMC host:dw_mmc: Drop support for multiple slotsdw_mmc: Use device_property_read instead of of_property_readdw_mmc-rockchip: Optional improved tuning to greatly decrease tuning timedw_mmc: Prevent rpm suspend for SDIO IRQs instead of always for SDIO cardsdw_mmc: Convert to use MMC_CAP2_SDIO_IRQ_NOTHREAD for SDIO IRQsomap_hsmmc: Convert to mmc regulator APIs to consolidate codeomap_hsmmc: Deprecate "vmmc_aux" in DT and use "vqmmc" insteadtmio: Make sure SDIO gets reinitialized after resumesdhi: Add CMD23 support to R-Car Gen2 and Gen3tmio: Add CMD23 supportsdhi/tmio: Refactor code and rename files to simplify Kconfig optionssdhci-pci: Enable card detect wake for Intel BYT-related SD controllerssdhci-pci: Add support for Intel CNPsdhci-esdhc-imx: Remove ENGcm07207 workaround - allow multi block transferssdhci-esdhc-imx: Allow all supported prescaler valuessdhci-esdhc-imx: Fix DAT line software resetsdhci-esdhc: Add SDHCI_QUIRK_32BIT_DMA_ADDR– atmel-mci: Drop AVR32 support

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 21 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 22: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.14 MMC core:Continue to refactor the mmc block code to prepare for blkmqMove mmc block debugfs into block moduleNext step for e.MMC CMDQ by adding a new mmc host interface for itMove Kconfig option MMC_DEBUG from core to host

MMC host:Declare structs as const when applicableExplicitly request exclusive reset control when applicableImprove some error paths and other various cleanupssdhci: Preparations to support SDHCI OMAPsdhci: Improve some PM related codesdhci: Re-factoring and modernizationssdhci-xenon: Add runtime PM and system sleep supportsdhci-xenon: Add support for e.MMC HS400 Enhanced Strobesdhci-cadence: Add system sleep supportsdhci-of-at91: Improve system sleep supportdw_mmc: Add support for Hisilicon hi3660sunxi: Add support for A83T e.MMCsunxi: Add support for DDR52 modemeson-gx: Add support for UHS-I SD-cardsmeson-gx: Cleanups and improvementstmio: Fix CMD12 (STOP) handlingtmio: Cleanups and improvementsrenesas_sdhi: Add r8a7743/5 supportrenesas-sdhi: Add support for R-Car Gen3 SDHI DMACrenesas_sdhi: Cleanups and improvements

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 22 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 23: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.15 MMC core:Introduce host claiming by context to support blkmqPreparations for enabling CQE (e.MMC CMDQ) requestsRe-factorizations to prepare for blkmq supportRe-factorizations to prepare for CQE supportFix signal voltage switch for SD cards without power cycleConvert RPMB to a character deviceExport e.MMC revision via sysfsSupport e.MMC DT binding for fixed driver typeDocument mmc_regulator_get_supply() API

MMC host:omap_hsmmc: Updated regulator management for PBIASsdhci-omap: Add new OMAP SDHCI drivermeson-mx-sdio: New driver for the Amlogic Meson8 and Meson8b SoCssdhci-pci: Add support for Intel CDFsdhci-acpi: Fix voltage switch for some Intel host controllerssdhci-msm: Enable delay circuit calibration clockssdhci-msm: Manage power IRQ properlymediatek: Add support of mt2701/mt2712mediatek: Updates management of clocks and tuningsmediatek: Upgrade e.MMC HS400 supportrtsx_pci: Update tuning for gen3 PCI-Expressrenesas_sdhi: Support R-Car Gen[123] fallback compatibility stringsCatch all errors when getting regulators

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 23 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 24: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.16 There are two major achievements for MMC in this release that deserve to be specially highlighted.

First, we have converted the MMC block device from using the legacy blk interface into using themodern blkmq interface. Not only do we get all the nice effects from using blkmq, but it also meansthat new fresh nice code replaces old rusty code. Great news to everybody that cares about MMC/SD!

It should also be noted that converting to blkmq has not been trivial, mostly because of that we havebeen carrying too much of MMC specific optimizations for the I/O request path, rather than strivingto move these to the generic blk layer. Hopefully, we won't be making that mistake ever again.

Second, on top of the blkmq deployment, we have enabled full support the e.MMC command queu-ing feature, introduced in the e.MMC v.5.1 spec. This also includes an implementation of a host driv-er library, supporting the corresponding CQHCI HW. Ideally, those controllers that supports CQHCIshould only need some minor adaptations to make this play.

So far, the sdhci-pci driver for the Intel GLKs and the sdhci-of-arasan driver used on Rockchip RK3399,have enabled support for e.MMC command queueing.

Also worth highlighting is that implementing the e.MMC command queuing support has been a col-laborative effort, as several people from CodeAurora, Rockchip, Intel and Linaro™ have been in-volved. However, the work has been driven by Adrian Hunter (Intel).

In some shadow of the above, here are the rest of the highlights:

MMC core:Don't remove non-removable cards during system suspendAdd a slot-gpio helper to check capability of GPIO WP detection

MMC host:sdhci: Cleanups and improvements of some wakeup related codesdhci-pci-arasan: New variant to support Arasan PCI HW with integrated physdhci-acpi: Avoid broken UHS transfer modes on Intel CHTsdhci-acpi: Add support for ACPI HID of AMD Controller with HS400sdhci_f_sdh30: Add ACPI supportsdhci-esdhc-imx: Enable/disable clock at runtime suspend/resumesdhci-of-esdhc: A few minor fixesmmci: Add support for new STM32 variantrenesas_sdhi: enable R-Car D3 (r8a77995) supporttmio/renesas_sdhi: Re-structuring, cleanups and modernization

MMC host:sdhci: Cleanups and improvements of some wakeup related codesdhci-pci-arasan: New variant to support Arasan PCI HW with integrated physdhci-acpi: Avoid broken UHS transfer modes on Intel CHTsdhci-acpi: Add support for ACPI HID of AMD Controller with HS400sdhci_f_sdh30: Add ACPI supportsdhci-esdhc-imx: Enable/disable clock at runtime suspend/resumesdhci-of-esdhc: A few minor fixesmmci: Add support for new STM32 variantrenesas_sdhi: enable R-Car D3 (r8a77995) supporttmio/renesas_sdhi: Re-structuring, cleanups and modernization

TN-52-05 e.MMC Linux EnablementSupport History for e.MMC Features in the Linux Kernel

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 24 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 25: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Table 1: Linux Kernel e.MMC Feature Support (Continued)

Note: The information in the above table is from the mmc tag log on git repo, git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git, and has been reorganized for contextual clarity.

Kernel Version Feature Support Added

4.17 MMC core:Export host capabilities through debugfsExport card RCA register via sysfsImprove card initializing sequence while enabling 4-bit busExport a function to enable/disable wakeup for card detect IRQ

MMC host:dw_mmc: Add support for new hi3798cv200 variantdw_mmc: Remove support for some deprecated DT propertiesmediatek: Add support for new variant used on MT7622 SoCsdhci: Improve wakeup support for SDIO IRQssdhci: Improve wakeup support for card detect IRQssdhci-omap: Add tuning supportsdhci_omap: Add UHS-I mode supportsunxi: Prepare for runtime PM support via a few re-factoringstmio: deprecate "toshiba,mmc-wrprotect-disable" DT propertytmio/renesas_sdhi: Consolidate code supporting write protecttmio: Improve DMA vs. PIO handlingtmio: Add support for IP-builtin card detection logic

e.MMC EnablementAdditional unsupported e.MMC features can be enabled within the Linux kernel. Exam-ples of these features are provided in the following sections.

Access Protection (WRITE PROTECT and LOCK/UNLOCK) (JEDEC 4.3)

To enable the host to protect data against unwanted erases or writes, e.MMC supportstwo levels of WRITE PROTECT commands:

• The entire card may be write protected by setting the permanent or temporary writeprotect bits in the CSD.

• Specific segments of the cards may be write protected.

The CMD28, CMD29 and CMD 30 commands respectively protect, clear, and retrieveinformation about a write protect group against unwanted erases or writes. The proper-ties of write protection are coded in the card-specific data, which also dictates the typeof write protection.

The card LOCK/UNLOCK command (CMD42) enables the host to lock the card by pro-viding a password. The card LOCK/UNLOCK command can only be performed whenthe card operates in single data rate mode. The password protection feature can be dis-abled permanently by setting the permanent password disable bit in the extended CSD.

To enable the write protect and lock/unlock features:1. Enable EXT_CSD access (e.MMC driver).2. Add a new API that enables CMD28, CMD29 and CMD30 commands.3. Export it through the IOCTL operation.

TN-52-05 e.MMC Linux Enablemente.MMC Enablement

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 25 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 26: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Replay Protected Memory Block (RPMB) Area Partition (JEDEC 4.4)

This function provides a means for the system to store data to a specific memory area inan authenticated and replay-protected manner. This is provided by first programmingauthentication key information to the e.MMC memory (shared secret).

As the system cannot yet be authenticated in this phase, programming the authentica-tion key must take place in a secure environment, such as in an OEM production facili-ty. Later, the authentication key is used to sign the READ and WRITE accesses made tothe replay-protected memory area with a message authentication code.

Usage of random number generation and count registers provide additional protectionagainst the replaying of messages where messages could be recorded and played backlater by an attacker.

To enable RPMB:

• Add support to READ/WRITE the RPMB partition access.• Extend the EXT_CSD decoding to catch and change the RPMB partition setting.• Add support to set the access to the RPMB partition (similar to GPAP partitions).• Add the new API in the core layer.• Export it through an IOCTL operation.

e.MMC Patch (4GB Used in Full SLC Mode)

When a 4GB device is used in full SLC mode, the total density is less than 2GB. In thiscase, there is a probing error on Linux V2.6.37 and V2.6.38.

Follow these steps for probing e.MMC on Linux systems:1. The device type is identified; e.MMC and SD card types are separated.2. Use the e.MMC command (CMD0,CMD1,CMD2,CMD3,CMD9 and CMD7) to ini-

tialize, and then transfer the e.MMC device from the idle state to the transfer state.3. Send CMD8 to the e.MMC device to get the device properties.4. According to the e.MMC device-supported properties and host features, send

CMD6 to select modes as needed.5. If needed, send CMD16.

Step 2 determines whether the e.MMC device is sector-address type or byte-addresstype.

In step 4, if e.MMC supports DDR mode, and the host also can support this feature,then DDR mode is selected. On original Linux code V2.6.37 and V2.6.38, the sector ad-dress flag is marked only when the density is greater than 2GB. But when the Micron4GB e.MMC device is fully converted into SLC mode, its density is less than 2GB, andthe sector address flag is not marked. Thus, on the following sequence, an e.MMC oper-ation error occurs.

Source Code Changediff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c--- a/drivers/mmc/core/mmc.c+++ b/drivers/mmc/core/mmc.c @@ -421,6 +421,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, int err, ddr = 0; u32 cid[4];

TN-52-05 e.MMC Linux Enablemente.MMC Enablement

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 26 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 27: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

unsigned int max_dtr; + u32 rocr;BUG_ON(!host); WARN_ON(!host->claimed);@@ -434,7 +435,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, mmc_go_idle(host); /* The extra bit indicates that we support high capacity */ - err = mmc_send_op_cond(host, ocr | (1 << 30), NULL); + err = mmc_send_op_cond(host, ocr | (1 << 30), &rocr); if (err) goto err;@@ -522,6 +523,15 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, err = mmc_read_ext_csd(card); if (err) goto free_card; + + /* If doing byte addressing, check if required to do sector + * addressing. Handle the case of <2GB cards needing sector + * addressing. See section 8.1 JEDEC Standard JED84-A441; + * ocr register has bit 30 set for sector ad-dressing. + */ + if (!(mmc_card_block-addr(card)) && (rocr & (1<<30))) + mmc_card_set_blockaddr(card); + /* Erase size depends on CSD and Extended CSD */ mmc_set_erase_size(card);

Additional Information and Linux SupportLinux supports e.MMC devices and allows their integration within its subsystems. Linuxdoes not support all e.MMC features introduced by the JEDEC standard. For support inenabling these features in the Linux kernel for Micron e.MMC, contact your Micron rep-resentative or visit micron.com.

See these resources for more information about e.MMC:

• Micron TN-FC-25: Understanding Linux Driver Support for e.MMC Embedded Mem-ory

TN-52-05 e.MMC Linux EnablementAdditional Information and Linux Support

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 27 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.

Page 28: e·MMC Linux Enablement - Micron Technology · TN-52-05 e·MMC Linux Enablement Linux Support for e·MMC ... † Host driver for Ricoh ... 2.6.30 † SDIO driver for Marvell SoCs

Revision History

Rev. E – 06/18

• Updated Support History for e·MMC Features in the Linux Kernel

Rev. D – 04/13

• Updated the following sections

– Introduction– Support History for e·MMC Features in the Linux Kernel and the Linux Kernel

e·MMC Feature Support table (added bullets to row 3.0 and added rows 3.3, 3.4, and3.7)

– e·MMC Enablement– e·MMC Patch (updated section heading only)– Conclusion (updated body text and renamed section heading)

• Deleted the following sections to reflect their integration into the standard releases ofthe kernel (Reliable Write starting 3.0, HPI starting 3.2, Background Ops starting 3.7)

– Reliable Write (JEDEC 4.3)– Background Operation and HPI (JEDEC 4.41)

Rev. C – 10/12

• Added e·MMC Patch and Source Code Change sections

Rev. B – 03/12

• Updated hypertext links in document• Updated the following sections

– Linux Kernel e·MMC Feature Support table– e·MMC Enablement– Background Operation and HPI (JEDEC 4.41)

• Removed the following sections

– Boot Partition Management (JDEC 4.3)– Partition Management (JDEC 4.4)– Secure Erase and Secure Trim Erase (JDEC 4.4)– Patches for Linux Enablement

Rev. A – 06/11

• Initial release.

8000 S. Federal Way, P.O. Box 6, Boise, ID 83707-0006, Tel: 208-368-4000www.micron.com/products/support Sales inquiries: 800-932-4992

Micron and the Micron logo are trademarks of Micron Technology, Inc.All other trademarks are the property of their respective owners.

This data sheet contains minimum and maximum limits specified over the power supply and temperature range set forth herein.Although considered final, these specifications are subject to change, as further product development and data characterization some-

times occur.

TN-52-05 e.MMC Linux EnablementRevision History

CCMTD-1725822587-4445tn5205_emmc_linux_enablement.fm - Rev. E 6/18 EN 28 Micron Technology, Inc. reserves the right to change products or specifications without notice.

© 2012 Micron Technology, Inc. All rights reserved.