NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

AM335x MMC/SD Driver's Guide

From Texas Instruments Wiki
Jump to: navigation, search
{{#switchcategory:MSP430=<McuHitboxHeader/>|C2000=<McuHitboxHeader/>|Stellaris=<McuHitboxHeader/>|TMS570=<McuHitboxHeader/>|MCU=<McuHitboxHeader/>|MAVRK=<MAVRKHitboxHeader/>|<HitboxHeader/>}}
TIBanner.png
AM335X MMC/SD Driver's Guide
Linux PSP

Introduction[edit]

AM335x has 3 instances MMC/SD/SDIO host controller, which provides an interface between microprocessor and either MMC, SD memory cards, or SDIO cards. The current version of the user guide talks about the MMC/SD controller.

The MMC/SD driver is implemented as a block driver on top of host controller as a HSMMC controller driver and supports SD, SD High Speed and SDHC cards. This driver only supports for 4 bit modes(no SPI mode, 1/8 Bit). Both DMA & polled mode of data transfer is supported.


MMC/SD Driver Architecture

Mmcsd Driver.png


Useful Links[edit]

  1. [MMCA Homepage]
  2. [SD ORG Homepage]


Acronyms & Definitions[edit]

Audio Driver: Acronyms
Acronym Definition
MMC Multimedia Card
HS-MMC High Speed MMC
SD Secure Digital
SDHC SD High Capacity
SDIO SD Input/Output


Driver Configuration[edit]

The default kernel configuration enables support for MMC/SD(built-in to kernel). OMAP MMC/SD driver is reused for AM335x.

The selection of MMC/SD/SDIO driver can be modified as follows: start Linux Kernel Configuration tool.

$ make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm menuconfig
  • Select Device Drivers from the main menu.
...
...
Kernel Features  --->
Boot options  --->
CPU Power Management  --->
Floating point emulation  --->
Userspace binary formats  --->
Power management options  --->
[*] Networking support  --->
Device Drivers  --->
...
...


Building into Kernel [edit]

  • Select MMC/SD/SDIO card support from the menu.
...
...
[*] USB support  --->
<*> MMC/SD/SDIO card support  --->
< > Sony MemoryStick card support (EXPERIMENTAL)  --->
...
...
  • Select OMAP HS MMC driver
 [ ]   MMC debugging
 [*]   Assume MMC/SD cards are non-removable (DANGEROUS)
 [ ]   MMC host clock gating (EXPERIMENTAL)
       *** MMC/SD/SDIO Card Drivers ***
 <*> MMC block device driver                 
 (8)     Number of minors per block device                
 [*]     Use bounce buffer for simple hosts
 <*>   SDIO UART/GPS class support
 < >   MMC host test driver         
 ...
 < >   TI OMAP Multimedia Card Interface support       
 <*>   TI OMAP High Speed Multimedia Card Interface support
 ...


Building as Loadable Kernel Module[edit]

  • To build the above components as modules, press 'M' key on every config entries shown below to build them as module:
<M> MMC/SD/SDIO card support  --->
<M> MMC block device driver                 
<M> TI OMAP High Speed Multimedia Card Interface support
  • After doing module selection, exit and save the kernel configuration when prompted.
  • Now build the kernel and modules form Linux build host as
$ make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm uImage
$ make CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm modules
  • Following modules will be built
mmc_core.ko
mmc_block.ko
omap_hsmmc.ko
  • Boot the newly built kernel and transfer the above mentioned .ko files to the filesystem
  • Navigate to the directory containing these modules and insert them form type the following commands in console to insert the modules in specified order:
# insmod mmc_core.ko
# insmod mmc_block.ko
# insmod omap_hsmmc.ko


  • If 'udev' is running and the SD card is already inserted, the devices nodes will be created and filesystem will be automatically mounted if exists on the card. Block device nodes(such as /dev/mmcblockp1, /dev/mmcblockp2) are created for user space access.


E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article AM335x MMC/SD Driver's Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article AM335x MMC/SD Driver's Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article AM335x MMC/SD Driver's Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article AM335x MMC/SD Driver's Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article AM335x MMC/SD Driver's Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article AM335x MMC/SD Driver's Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article AM335x MMC/SD Driver's Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article AM335x MMC/SD Driver's Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article AM335x MMC/SD Driver's Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity

{{#switchcategory:MSP430=<McuHitboxFooter/>|C2000=<McuHitboxFooter/>|Stellaris=<McuHitboxFooter/>|TMS570=<McuHitboxFooter/>|MCU=<McuHitboxFooter/>|MAVRK=<MAVRKHitboxFooter/>|<HitboxFooter/>}}