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.
12+
13+ Acronyms and definitions
14+ ************************
15+
16+ +---------------------------------------------------+
17+ | Acronyms in this guide |
18+ +===================================================+
19+ | Multimedia card secure digital (MMCSD) |
20+ +---------------------------------------------------+
21+ | Multimedia card (MMC) |
22+ +---------------------------------------------------+
23+ | Embedded multimedia card (eMMC) |
24+ +---------------------------------------------------+
25+ | Secure digital (SD) |
26+ +---------------------------------------------------+
27+ | Secure digital input/output (SDIO) |
28+ +---------------------------------------------------+
29+ | User data area (UDA) |
30+ +---------------------------------------------------+
31+ | Secure digital high capacity (SDHC) |
32+ +---------------------------------------------------+
33+ | Ultra high speed (UHS) |
34+ +---------------------------------------------------+
35+ | Local host (LH) |
36+ +---------------------------------------------------+
37+ | Digital signal processor (DSP) |
38+ +---------------------------------------------------+
39+ | Dual data rate (DDR) |
40+ +---------------------------------------------------+
41+ | Single data rate (SDR) |
42+ +---------------------------------------------------+
43+ | Filesystem (FS) |
44+ +---------------------------------------------------+
45+ | Root filesystem (rootfs) |
46+ +---------------------------------------------------+
47+ | Unmount (umount) |
48+ +---------------------------------------------------+
49+ | Fixed disk (fdisk) |
50+ +---------------------------------------------------+
51+ | Virtual file allocation table (vfat) |
52+ +---------------------------------------------------+
53+ | Fourth extended file system (ext4) |
54+ +---------------------------------------------------+
55+ | Microprocessor unit (MPU) |
56+ +---------------------------------------------------+
57+ | Joint electron device engineering council (JEDEC) |
58+ +---------------------------------------------------+
559
660Introduction
761************
862
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.
63+ The MMCSD host controller provides an interface between a LH such as a MPU or DSP and either eMMC,
64+ SD, or SDIO devices. The MMCSD host controller handles MMCSD and SDIO protocol with minimal LH intervention.
1465
1566.. ifconfig :: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')
1667
17- Main features of the MMC/SDIO host controllers:
68+ Main features of the MMCSD host controllers:
1869
19- - Full compliance with MMC/SD command/response sets as defined in the
70+ - Full compliance with MMCSD command/response sets as defined in the
2071 Specification.
2172
2273 - Support:
@@ -29,9 +80,9 @@ intervention.
2980 - Two slave DMA channels (1 for TX, 1 for RX)
3081 - Designed for low power and programmable clock generation
3182 - Maximum operating frequency of 48MHz
32- - MMC/SD card hot insertion and removal
83+ - MMCSD card hot insertion and removal
3384
34- The following image shows the MMC/SD Driver Architecture:
85+ The following image shows the MMCSD Driver Architecture:
3586
3687.. Image :: /images/Mmcsd_Driver.png
3788
@@ -41,23 +92,6 @@ References
4192#. `JEDEC eMMC homepage <http://www.jedec.org/category/technology-focus-area/flash-memory-ssds-ufs-emmc// >`__
4293#. `SD organization homepage <http://www.sdcard.org// >`__
4394
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-
6195Features
6296********
6397
@@ -87,10 +121,10 @@ Features
87121 - Support for both built-in and module mode
88122 - ext2/ext3/ext4 file system support
89123
90- .. _mmc-sd- supported-hs -modes :
124+ .. _mmc-supported-uhs -modes :
91125
92- SD: Supported High Speed Modes
93- ******************************
126+ Supported UHS modes
127+ *******************
94128
95129.. ifconfig :: CONFIG_part_family in ('General_family', 'AM57X_family', 'AM65X_family')
96130
@@ -153,9 +187,9 @@ SD: Supported High Speed Modes
153187 | PATRIOT 8G UHS CARD - Voltage switching fails and enumerates in high speed |
154188 +------------------------------------------------------------------------------+
155189
156- **Known Workaround **: For cards which doesn 't enumerate in UHS mode,
190+ **Known Workaround **: For cards that don 't enumerate in UHS mode,
157191 removing the PULLUP resistor in CLK line and changing the GPIO to
158- PULLDOWN increases the frequency in which the card enumerates in UHS
192+ PULLDOWN increases the frequency that the card enumerates in UHS
159193 modes.
160194
161195 +--------------------+-------+---------+
@@ -236,14 +270,14 @@ SD: Supported High Speed Modes
236270 am62px, Y, Y, N
237271 am62lx, Y, Y, N
238272
239- Driver Configuration
273+ Driver configuration
240274********************
241275
242276.. ifconfig :: CONFIG_part_family in ('General_family', 'AM335X_family', 'AM437X_family', 'AM57X_family')
243277
244- The default kernel configuration enables support for MMC/SD (built-in to kernel).
278+ The default kernel configuration enables support for MMCSD (built-in to kernel).
245279
246- The selection of MMC/SD /SDIO driver can be modified using the linux kernel
280+ The selection of MMCSD /SDIO driver can be modified using the linux kernel
247281 configuration tool. Launch it by the following command:
248282
249283 .. code-block :: console
@@ -270,7 +304,7 @@ Driver Configuration
270304
271305 $ sudo -E make modules_install ARCH=arm INSTALL_MOD_PATH=path/to/filesystem
272306
273- Boot the kernel upto kernel prompt and use modprobe to insert the driver
307+ Boot the kernel up-to kernel prompt and use modprobe to insert the driver
274308 module and all its dependencies.
275309
276310 .. code-block :: console
@@ -284,7 +318,7 @@ Driver Configuration
284318
285319.. ifconfig :: CONFIG_part_family in ('J7_family', 'AM62X_family', 'AM64X_family', 'AM62AX_family', 'AM62PX_family', 'AM62LX_family')
286320
287- The default kernel configuration enables support for MMC/SD driver as
321+ The default kernel configuration enables support for MMCSD driver as
288322 built-in to kernel. TI SDHCI driver is used. Following options need to be
289323 configured in Linux Kernel for successfully selecting SDHCI driver for
290324 |__PART_FAMILY_DEVICE_NAMES__ |.
@@ -331,7 +365,7 @@ Driver Configuration
331365 If an operation is delayed for too long, it becomes critical, taking
332366 priority over the regular read/write from host. This can cause host
333367 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
368+ issues the MMC HW and core driver provide a framework that can check
335369 for pending background operations and give the card some time to service
336370 them before they become critical. This feature is already part of the
337371 framework and to start using it the User needs to enable:
@@ -416,10 +450,10 @@ MMC support in Linux
416450
417451 There is no missing MMC support for |__PART_FAMILY_DEVICE_NAMES__ | device.
418452
419- .. ifconfig :: CONFIG_part_family not in ('General_family', 'AM57X_family', 'AM335X_family', 'AM437X_family')
453+ Steps for working around SD card issues in Linux
454+ ************************************************
420455
421- Steps for working around SD card issues in Linux
422- ********************************************** **
456+ .. ifconfig :: CONFIG_part_family not in ('General_family', 'AM57X_family', 'AM335X_family', 'AM437X_family')
423457
424458 In some cases, failures can be seen while using some SD cards:
425459
@@ -465,7 +499,7 @@ MMC support in Linux
465499 #. Restricting to a given speed mode
466500
467501 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:
502+ speed mode. Below is the order that the driver tries to enumerate an SD card:
469503
470504 - SDR104
471505 - DDR50
@@ -495,7 +529,7 @@ MMC support in Linux
495529 };
496530
497531 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
532+ **no-1-8-v **. This disables switching to 1.8V, which is required for
499533 UHS speed modes(SDR104, DDR50, SDR50, SDR25, SDR12):
500534
501535 .. code-block :: dts
@@ -532,16 +566,19 @@ MMC support in Linux
532566
533567 sdhci2: mmc@fa20000 {
534568
569+ .. ifconfig :: CONFIG_part_family in ('General_family', 'AM57X_family', 'AM335X_family', 'AM437X_family')
535570
571+ Steps for working around SD card issues in Linux documentation is pending for |__PART_FAMILY_DEVICE_NAMES__ |
572+ please reach out to: `Help e2e <https://e2e.ti.com// >`__ for additional information.
536573
537574|
538575
539576.. _mmc-listing-mmc-devices-linux :
540577
541578Listing MMC devices from Linux
542579******************************
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,
580+ eMMC and SD cards register with the MMC subsystem and are available as a block device
581+ as :file: `/dev/mmcblk{ n } `. To find the device index **n ** corresponding to an eMMC device,
545582check which device includes :file: `mmcblk{ n } boot0 ` and :file: `mmcblk{ n } boot1 `. Here,
546583mmcblk0* is in eMMC.
547584
@@ -557,9 +594,9 @@ mmcblk0* is in eMMC.
557594 brw-rw---- 1 root disk 179, 97 Jan 1 00:00 /dev/mmcblk1p1
558595 brw-rw---- 1 root disk 179, 98 Jan 8 2025 /dev/mmcblk1p2
559596
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 :
597+ The disk partitions for each MMC device are displayed as :file: `/dev/mmcblk{ n } p{ x } `.
598+ To check existing or mounted disk partitions for an eMMC device, use the
599+ command :command: `lsblk `, such as :
563600
564601.. code-block :: console
565602
@@ -572,8 +609,8 @@ command :command:`lsblk`, like so:
572609 |-mmcblk1p1 179:97 0 128M 0 part /run/media/boot-mmcblk1p1
573610 `-mmcblk1p2 179:98 0 1.9G 0 part /
574611
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.
612+ Use the :command: `mount ` and :command: `umount ` commands to mount and unmount formatted disk
613+ partitions, usually to vfat or ext4 types.
577614
578615.. _mmc-create-partitions-in-emmc-linux :
579616
@@ -582,30 +619,30 @@ Create partitions in eMMC UDA
582619
583620In eMMC, the User Data Area (UDA) HW partition is the primary storage space generally used
584621to 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 ,
622+ For ex: :samp: `fdisk /dev/mmcblk{ n } ` in which **n ** is typically 0 or 1. In the previous example ,
586623eMMC is :samp: `fdisk /dev/mmcblk0 `.
587624
588- For documentation on using fdisk, please go to: `fdisk how-to <https://tldp.org/HOWTO/Partition/fdisk_partitioning.html >`__.
625+ For documentation on using fdisk, go to: `fdisk how-to <https://tldp.org/HOWTO/Partition/fdisk_partitioning.html >`__.
589626
590627**Erase eMMC UDA **
591628
592- In Linux, before creating disk partitions, we can optionally erase eMMC UDA using :command: `dd `
629+ In Linux, before creating disk partitions, we can optionally erase eMMC UDA by using :command: `dd `
593630command:
594631
595632.. code-block :: console
596633
597634 root@<machine>:~# umount /dev/mmcblk0*
598635 root@<machine>:~# dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=n
599636
600- where ``n `` should be determined according the the following formula: ``count = total size UDA (bytes) / bs ``.
637+ where ``n `` should be determined according to the following formula: ``count = total size UDA (bytes) / bs ``.
601638
602639.. _mmc-create-boot-partition-emmc-linux :
603640
604641Create "boot" partition
605642=======================
606643
607644In this example create a "boot" partition of size 400 MiB which can be formatted to vfat type
608- and will store the bootloader binaries.
645+ and will store the boot loader binaries.
609646
610647.. code-block :: console
611648
@@ -648,7 +685,7 @@ and will store the bootloader binaries.
648685 Calling ioctl() to re-read partition table.
649686 Syncing disks.
650687
651- Make sure bootable flag is set for "boot" partition, ROM may not boot from this patitition
688+ Make sure bootable flag is set for "boot" partition, ROM might not boot from this partition
652689if bootable flag is not set.
653690
654691.. _mmc-create-root-partition-emmc-linux :
@@ -700,7 +737,7 @@ Linux kernel Image, DTB, and the rootfs.
700737Formatting eMMC partitions from Linux
701738*************************************
702739
703- After creating a partition/s, the partition can be formated with the :command: `mkfs ` command.
740+ After creating a partition/s, the partition can be formatted with the :command: `mkfs ` command.
704741For ex: :samp: `mkfs -t ext4 /dev/mmcblk{ n } ` where **mmcblk{n} ** is the MMC device with the new
705742disk partitions to format. The general syntax for formatting disk partitions in Linux is:
706743
@@ -754,10 +791,10 @@ Flash eMMC for MMCSD boot
754791*************************
755792
756793In 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 .
794+ eMMC UDA in FS mode. Know this is not the only method for flashing the eMMC for this
795+ boot mode .
759796
760- This example assumes the current bootmode is MMCSD boot from SD (FS mode)
797+ This example assumes the current boot mode is MMCSD boot from SD (FS mode)
761798
762799.. _mmc-flash-emmc-uda-boot :
763800
@@ -771,7 +808,7 @@ Flash to eMMC "boot" partition
771808 root@<machine>:~# mount /dev/mmcblk0p1 /mnt/eboot
772809 root@<machine>:~# mount /dev/mmcblk1p1 /mnt/sdboot
773810
774- Verify the partitions are mounted to the correct folders using :command: `lsblk ` command in the
811+ Verify the partitions are mounted to the correct folders by using :command: `lsblk ` command in the
775812column labeled :file: `MOUNTPOINTS `.
776813
777814.. code-block :: console
@@ -787,7 +824,7 @@ column labeled :file:`MOUNTPOINTS`.
787824 |-mmcblk1p1 179:97 0 128M 0 part /mnt/sdboot
788825 `-mmcblk1p2 179:98 0 8.7G 0 part /
789826
790- Now we can copy bootloader binaries to eMMC and umount the partitions when writes finish.
827+ Now we can copy boot loader binaries to eMMC and umount the partitions when writes finish.
791828
792829.. code-block :: console
793830
@@ -809,7 +846,7 @@ Flash to eMMC "root" partition
809846 [69229.982452] EXT4-fs (mmcblk0p2): mounted filesystem 74d40075-07e4-4bce-9401-6fccef68e934 r/w with ordered data mode. Quota mode: none.
810847 root@<machine>:~# mount /dev/mmcblk1p2 /mnt/sdroot
811848
812- Verify the partitions are mounted to the correct folders using :command: `lsblk ` command in the
849+ Verify the partitions are mounted to the correct folders by using :command: `lsblk ` command in the
813850column labeled :file: `MOUNTPOINTS `.
814851
815852.. code-block :: console
@@ -826,7 +863,7 @@ column labeled :file:`MOUNTPOINTS`.
826863 `-mmcblk1p2 179:98 0 8.7G 0 part /mnt/sdroot
827864 /
828865
829- Now we can copy rootfs to eMMC (either from SD rootfs or from tarball ) and umount the partitions
866+ Now we can copy rootfs to eMMC (either from SD rootfs or from tar file ) and umount the partitions
830867when writes finish.
831868
832869**From SD **
@@ -841,7 +878,7 @@ when writes finish.
841878 root@<machine>:~# umount /mnt/*
842879 [70154.205154] EXT4-fs (mmcblk0p2): unmounting filesystem 74d40075-07e4-4bce-9401-6fccef68e934.
843880
844- **From tarball **
881+ **From tar file **
845882
846883This sections requires for tisdk-base-image-<soc>evm.rootfs.tar.xz to have been previously copied
847884to the SD card rootfs.
0 commit comments