11.. http://processors.wiki.ti.com/index.php/Linux_Core_MMC/SD_User%27s_Guide
22
3- MMC/SD
4- ######
3+ MMCSD
4+ #####
5+
6+ .. ifconfig :: CONFIG_part_family in ('AM62X_family', 'AM62PX_family')
7+
8+ .. warning ::
9+
10+ There is important information on multimedia card (MMC) support for |__PART_FAMILY_DEVICE_NAMES__ | device, go
11+ :ref: `here <mmc-support-linux >` for more information.
512
613Introduction
714************
815
9- The multimedia card high-speed/SDIO (MMC/SDIO) host controller provides
10- an interface between a local host (LH) such as a microprocessor unit
11- (MPU) or digital signal processor (DSP) and either MMC, SD® memory
12- cards, or SDIO cards and handles MMC/SDIO transactions with minimal LH
13- intervention.
16+ The multimedia card secure digital (MMCSD) host controller provides an interface between a local host (LH)
17+ such as a microprocessor unit (MPU) or digital signal processor (DSP) and either embedded multimedia card (eMMC),
18+ secure digital (SD), or secure digital input/output (SDIO) devices. The MMCSD host controller handles MMCSD and
19+ SDIO protocol with minimal LH intervention.
1420
1521.. ifconfig :: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')
1622
17- Main features of the MMC/SDIO host controllers:
23+ Main features of the MMCSD host controllers:
1824
19- - Full compliance with MMC/SD command/response sets as defined in the
25+ - Full compliance with MMCSD command/response sets as defined in the
2026 Specification.
2127
2228 - Support:
@@ -29,9 +35,9 @@ intervention.
2935 - Two slave DMA channels (1 for TX, 1 for RX)
3036 - Designed for low power and programmable clock generation
3137 - Maximum operating frequency of 48MHz
32- - MMC/SD card hot insertion and removal
38+ - MMCSD card hot insertion and removal
3339
34- The following image shows the MMC/SD Driver Architecture:
40+ The following image shows the MMCSD Driver Architecture:
3541
3642.. Image :: /images/Mmcsd_Driver.png
3743
@@ -41,23 +47,6 @@ References
4147#. `JEDEC eMMC homepage <http://www.jedec.org/category/technology-focus-area/flash-memory-ssds-ufs-emmc// >`__
4248#. `SD organization homepage <http://www.sdcard.org// >`__
4349
44- Acronyms & Definitions
45- **********************
46-
47- +-----------+--------------------+
48- | Acronym | Definition |
49- +===========+====================+
50- | MMC | Multimedia Card |
51- +-----------+--------------------+
52- | HS-MMC | High Speed MMC |
53- +-----------+--------------------+
54- | SD | Secure Digital |
55- +-----------+--------------------+
56- | SDHC | SD High Capacity |
57- +-----------+--------------------+
58- | SDIO | SD Input/Output |
59- +-----------+--------------------+
60-
6150Features
6251********
6352
@@ -66,12 +55,12 @@ Features
6655 The SD driver supports the following features:
6756
6857 - The driver is built in-kernel (part of vmlinux)
69- - SD cards including SD High Speed and SDHC cards
58+ - SD cards including SD High Speed and secure digital high capacity ( SDHC) cards
7059 - Uses block bounce buffer to aggregate scattered blocks
7160
7261.. ifconfig :: CONFIG_part_family in ('J7_family')
7362
74- The SD/MMC driver supports the following features:
63+ The MMCSD driver supports the following features:
7564
7665 - Support ADMA for DMA transfers
7766 - HS400 speed mode
@@ -80,17 +69,17 @@ Features
8069
8170.. ifconfig :: CONFIG_part_family in ('AM62X_family', 'AM62AX_family', 'AM64X_family', 'AM62LX_family', 'AM62PX_family')
8271
83- The SD/MMC driver supports the following features:
72+ The MMCSD driver supports the following features:
8473
8574 - Support ADMA for DMA transfers
8675 - HS200 speed mode
8776 - Support for both built-in and module mode
8877 - ext2/ext3/ext4 file system support
8978
90- .. _mmc-sd- supported-hs -modes :
79+ .. _mmc-supported-uhs -modes :
9180
92- SD: Supported High Speed Modes
93- ******************************
81+ Supported ultra high speed (UHS) modes
82+ **************************************
9483
9584.. ifconfig :: CONFIG_part_family in ('General_family', 'AM57X_family', 'AM65X_family')
9685
@@ -153,9 +142,9 @@ SD: Supported High Speed Modes
153142 | PATRIOT 8G UHS CARD - Voltage switching fails and enumerates in high speed |
154143 +------------------------------------------------------------------------------+
155144
156- **Known Workaround **: For cards which doesn 't enumerate in UHS mode,
145+ **Known Workaround **: For cards that don 't enumerate in UHS mode,
157146 removing the PULLUP resistor in CLK line and changing the GPIO to
158- PULLDOWN increases the frequency in which the card enumerates in UHS
147+ PULLDOWN increases the frequency that the card enumerates in UHS
159148 modes.
160149
161150 +--------------------+-------+---------+
@@ -236,14 +225,14 @@ SD: Supported High Speed Modes
236225 am62px, Y, Y, N
237226 am62lx, Y, Y, N
238227
239- Driver Configuration
228+ Driver configuration
240229********************
241230
242231.. ifconfig :: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')
243232
244- The default kernel configuration enables support for MMC/SD (built-in to kernel).
233+ The default kernel configuration enables support for MMCSD (built-in to kernel).
245234
246- The selection of MMC/SD /SDIO driver can be modified using the linux kernel
235+ The selection of MMCSD /SDIO driver can be modified using the linux kernel
247236 configuration tool. Launch it by the following command:
248237
249238 .. code-block :: console
@@ -270,7 +259,7 @@ Driver Configuration
270259
271260 $ sudo -E make modules_install ARCH=arm INSTALL_MOD_PATH=path/to/filesystem
272261
273- Boot the kernel upto kernel prompt and use modprobe to insert the driver
262+ Boot the kernel up-to kernel prompt and use modprobe to insert the driver
274263 module and all its dependencies.
275264
276265 .. code-block :: console
@@ -284,7 +273,7 @@ Driver Configuration
284273
285274.. ifconfig :: CONFIG_part_family in ('J7_family', 'AM62X_family', 'AM64X_family', 'AM62AX_family', 'AM62PX_family', 'AM62LX_family')
286275
287- The default kernel configuration enables support for MMC/SD driver as
276+ The default kernel configuration enables support for MMCSD driver as
288277 built-in to kernel. TI SDHCI driver is used. Following options need to be
289278 configured in Linux Kernel for successfully selecting SDHCI driver for
290279 |__PART_FAMILY_DEVICE_NAMES__ |.
@@ -331,7 +320,7 @@ Driver Configuration
331320 If an operation is delayed for too long, it becomes critical, taking
332321 priority over the regular read/write from host. This can cause host
333322 operations to be delayed or take more time than expected. To avoid such
334- issues the MMC HW and core driver provide a framework which can check
323+ issues the multimedia card ( MMC) HW and core driver provide a framework that can check
335324 for pending background operations and give the card some time to service
336325 them before they become critical. This feature is already part of the
337326 framework and to start using it the User needs to enable:
@@ -347,8 +336,8 @@ Driver Configuration
347336
348337 root@<machine>:mmc bkops enable /dev/mmcblk0
349338
350- You can find the instance of eMMC by reading the ios timing spec form
351- debugfs:
339+ You can find the instance of eMMC by reading the ios timing spec from
340+ debug filesystem ( debugfs) :
352341
353342 .. code-block :: console
354343
@@ -416,10 +405,10 @@ MMC support in Linux
416405
417406 There is no missing MMC support for |__PART_FAMILY_DEVICE_NAMES__ | device.
418407
419- .. ifconfig :: CONFIG_part_family not in ('General_family', 'AM57X_family', 'AM335X_family', 'AM437X_family')
408+ Steps for working around SD card issues in Linux
409+ ************************************************
420410
421- Steps for working around SD card issues in Linux
422- ********************************************** **
411+ .. ifconfig :: CONFIG_part_family not in ('General_family', 'AM57X_family', 'AM335X_family', 'AM437X_family')
423412
424413 In some cases, failures can be seen while using some SD cards:
425414
@@ -465,7 +454,7 @@ MMC support in Linux
465454 #. Restricting to a given speed mode
466455
467456 By default the kernel driver tries to enumerate an SD card in the highest supported
468- speed mode. Below is the order in which the driver tries to enumerate an SD card:
457+ speed mode. Below is the order that the driver tries to enumerate an SD card:
469458
470459 - SDR104
471460 - DDR50
@@ -495,7 +484,7 @@ MMC support in Linux
495484 };
496485
497486 Limiting to SD HS speed mode can also be done by using the property
498- **no-1-8-v **. This disables switching to 1.8V which is required for
487+ **no-1-8-v **. This disables switching to 1.8V, which is required for
499488 UHS speed modes(SDR104, DDR50, SDR50, SDR25, SDR12):
500489
501490 .. code-block :: dts
@@ -532,16 +521,19 @@ MMC support in Linux
532521
533522 sdhci2: mmc@fa20000 {
534523
524+ .. ifconfig :: CONFIG_part_family in ('General_family', 'AM57X_family', 'AM335X_family', 'AM437X_family')
535525
526+ Steps for working around SD card issues in Linux documentation is pending for |__PART_FAMILY_DEVICE_NAMES__ |
527+ please reach out to: `Help e2e <https://e2e.ti.com// >`__ for additional information.
536528
537529|
538530
539531.. _mmc-listing-mmc-devices-linux :
540532
541533Listing MMC devices from Linux
542534******************************
543- eMMC and SD cards are registered to the MMC subsystem and availiable as a block device
544- as :file: `/dev/mmcblk{ n } `. To find which device index **n ** corresponds to eMMC device,
535+ eMMC and SD cards register with the MMC subsystem and are available as a block device
536+ as :file: `/dev/mmcblk{ n } `. To find the device index **n ** corresponding to an eMMC device,
545537check which device includes :file: `mmcblk{ n } boot0 ` and :file: `mmcblk{ n } boot1 `. Here,
546538mmcblk0* is in eMMC.
547539
@@ -557,9 +549,9 @@ mmcblk0* is in eMMC.
557549 brw-rw---- 1 root disk 179, 97 Jan 1 00:00 /dev/mmcblk1p1
558550 brw-rw---- 1 root disk 179, 98 Jan 8 2025 /dev/mmcblk1p2
559551
560- The disk partitions for each MMC device are displayed as :file: `/dev/mmcblk{ n } p{ x } `,
561- to see what disk partitions exist for an eMMC device and if they are mounted , use the
562- command :command: `lsblk `, like so :
552+ The disk partitions for each MMC device are displayed as :file: `/dev/mmcblk{ n } p{ x } `.
553+ To check existing or mounted disk partitions for an eMMC device, use the
554+ command :command: `lsblk `, such as :
563555
564556.. code-block :: console
565557
@@ -572,40 +564,40 @@ command :command:`lsblk`, like so:
572564 |-mmcblk1p1 179:97 0 128M 0 part /run/media/boot-mmcblk1p1
573565 `-mmcblk1p2 179:98 0 1.9G 0 part /
574566
575- Use the :command: `mount ` and :command: `umount ` commands to mount and unmount disk partitions
576- if they are formated, usally to vfat or ext4 types.
567+ Use the :command: `mount ` and :command: `umount ` commands to mount and unmount formatted disk
568+ partitions, usually to virtual file allocation table ( vfat) or fourth extended file system ( ext4) types.
577569
578570.. _mmc-create-partitions-in-emmc-linux :
579571
580572Create partitions in eMMC UDA
581573*****************************
582574
583- In eMMC, the User Data Area (UDA) HW partition is the primary storage space generally used
584- to flash the rootfs. To create disk partitions in UDA, use the :command: `fdisk ` command.
585- For ex: :samp: `fdisk /dev/mmcblk{ n } ` in which **n ** is typically 0 or 1. In the example above ,
575+ In eMMC, the user data area (UDA) HW partition is the primary storage space generally used
576+ to flash the root filesystem ( rootfs) . To create disk partitions in UDA, use the :command: `fdisk ` command.
577+ For ex: :samp: `fdisk /dev/mmcblk{ n } ` in which **n ** is typically 0 or 1. In the previous example ,
586578eMMC is :samp: `fdisk /dev/mmcblk0 `.
587579
588- For documentation on using fdisk, please go to: `fdisk how-to <https://tldp.org/HOWTO/Partition/fdisk_partitioning.html >`__.
580+ For documentation on using fdisk command, go to: `fdisk how-to <https://tldp.org/HOWTO/Partition/fdisk_partitioning.html >`__.
589581
590582**Erase eMMC UDA **
591583
592- In Linux, before creating disk partitions, we can optionally erase eMMC UDA using :command: `dd `
584+ In Linux, before creating disk partitions, we can optionally erase eMMC UDA by using :command: `dd `
593585command:
594586
595587.. code-block :: console
596588
597589 root@<machine>:~# umount /dev/mmcblk0*
598590 root@<machine>:~# dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=n
599591
600- where ``n `` should be determined according the the following formula: ``count = total size UDA (bytes) / bs ``.
592+ where ``n `` should be determined according to the following formula: ``count = total size UDA (bytes) / bs ``.
601593
602594.. _mmc-create-boot-partition-emmc-linux :
603595
604596Create "boot" partition
605597=======================
606598
607599In this example create a "boot" partition of size 400 MiB which can be formatted to vfat type
608- and will store the bootloader binaries.
600+ and will store the boot loader binaries.
609601
610602.. code-block :: console
611603
@@ -648,7 +640,7 @@ and will store the bootloader binaries.
648640 Calling ioctl() to re-read partition table.
649641 Syncing disks.
650642
651- Make sure bootable flag is set for "boot" partition, ROM may not boot from this patitition
643+ Make sure bootable flag is set for "boot" partition, ROM might not boot from this partition
652644if bootable flag is not set.
653645
654646.. _mmc-create-root-partition-emmc-linux :
@@ -700,7 +692,7 @@ Linux kernel Image, DTB, and the rootfs.
700692Formatting eMMC partitions from Linux
701693*************************************
702694
703- After creating a partition/s, the partition can be formated with the :command: `mkfs ` command.
695+ After creating a partition/s, the partition can be formatted with the :command: `mkfs ` command.
704696For ex: :samp: `mkfs -t ext4 /dev/mmcblk{ n } ` where **mmcblk{n} ** is the MMC device with the new
705697disk partitions to format. The general syntax for formatting disk partitions in Linux is:
706698
@@ -754,10 +746,10 @@ Flash eMMC for MMCSD boot
754746*************************
755747
756748In this example, we show one simple method for flashing to eMMC for MMCSD boot from
757- eMMC UDA in FS mode. Please know this is not the only method for flashing the eMMC
758- for this bootmode .
749+ eMMC UDA in filesystem (FS) mode. Know this is not the only method for flashing the eMMC for this
750+ boot mode .
759751
760- This example assumes the current bootmode is MMCSD boot from SD (FS mode)
752+ This example assumes the current boot mode is MMCSD boot from SD (FS mode)
761753
762754.. _mmc-flash-emmc-uda-boot :
763755
@@ -771,7 +763,7 @@ Flash to eMMC "boot" partition
771763 root@<machine>:~# mount /dev/mmcblk0p1 /mnt/eboot
772764 root@<machine>:~# mount /dev/mmcblk1p1 /mnt/sdboot
773765
774- Verify the partitions are mounted to the correct folders using :command: `lsblk ` command in the
766+ Verify the partitions are mounted to the correct folders by using :command: `lsblk ` command in the
775767column labeled :file: `MOUNTPOINTS `.
776768
777769.. code-block :: console
@@ -787,7 +779,7 @@ column labeled :file:`MOUNTPOINTS`.
787779 |-mmcblk1p1 179:97 0 128M 0 part /mnt/sdboot
788780 `-mmcblk1p2 179:98 0 8.7G 0 part /
789781
790- Now we can copy bootloader binaries to eMMC and umount the partitions when writes finish.
782+ Now we can copy boot loader binaries to eMMC and umount the partitions when writes finish.
791783
792784.. code-block :: console
793785
@@ -809,7 +801,7 @@ Flash to eMMC "root" partition
809801 [69229.982452] EXT4-fs (mmcblk0p2): mounted filesystem 74d40075-07e4-4bce-9401-6fccef68e934 r/w with ordered data mode. Quota mode: none.
810802 root@<machine>:~# mount /dev/mmcblk1p2 /mnt/sdroot
811803
812- Verify the partitions are mounted to the correct folders using :command: `lsblk ` command in the
804+ Verify the partitions are mounted to the correct folders by using :command: `lsblk ` command in the
813805column labeled :file: `MOUNTPOINTS `.
814806
815807.. code-block :: console
@@ -826,7 +818,7 @@ column labeled :file:`MOUNTPOINTS`.
826818 `-mmcblk1p2 179:98 0 8.7G 0 part /mnt/sdroot
827819 /
828820
829- Now we can copy rootfs to eMMC (either from SD rootfs or from tarball ) and umount the partitions
821+ Now we can copy rootfs to eMMC (either from SD rootfs or from tar file ) and umount the partitions
830822when writes finish.
831823
832824**From SD **
@@ -841,7 +833,7 @@ when writes finish.
841833 root@<machine>:~# umount /mnt/*
842834 [70154.205154] EXT4-fs (mmcblk0p2): unmounting filesystem 74d40075-07e4-4bce-9401-6fccef68e934.
843835
844- **From tarball **
836+ **From tar file **
845837
846838This sections requires for tisdk-base-image-<soc>evm.rootfs.tar.xz to have been previously copied
847839to the SD card rootfs.
0 commit comments