1 .. SPDX-License-Identifier: GPL-2.0+:
12 mmc read addr blk# cnt
13 mmc write addr blk# cnt
17 mmc dev [dev] [part] [mode]
20 mmc bootbus <dev> <boot_bus_width> <reset_boot_bus_width> <boot_mode>
21 mmc bootpart-resize <dev> <dev part size MB> <RPMB part size MB>
22 mmc partconf <dev> [[varname] | [<boot_ack> <boot_partition> <partition_access>]]
23 mmc rst-function <dev> <value>
28 The mmc command is used to control MMC(eMMC/SD) device.
30 The 'mmc info' command displays information (Manufacturer ID, OEM, Name, Bus Speed, Mode, ...) of MMC device.
32 The 'mmc read' command reads raw data to memory address from MMC device with block offset and count.
34 The 'mmc write' command writes raw data to MMC device from memory address with block offset and count.
43 The 'mmc erase' command erases *cnt* blocks on the MMC device starting at block *blk#*.
50 The 'mmc rescan' command scans the available MMC device.
54 CONFIG_MMC_SPEED_MODE_SET should be enabled. The required speed mode is
55 passed as the index from the following list.
71 A speed mode can be set only if it has already been enabled in the device tree
73 The 'mmc part' command displays the list available partition on current mmc device.
75 The 'mmc dev' command shows or set current mmc device.
78 device number to change
80 partition number to change
84 CONFIG_MMC_SPEED_MODE_SET should be enabled. The required speed mode is
85 passed as the index from the following list.
101 A speed mode can be set only if it has already been enabled in the device tree
103 The 'mmc list' command displays the list available devices.
105 The 'mmc wp' command enables "power on write protect" function for boot partitions.
107 The 'mmc bootbus' command sets the BOOT_BUS_WIDTH field. (*Refer to eMMC specification*)
111 x1 (sdr) or x4(ddr) buswidth in boot operation mode (default)
113 x4 (sdr/ddr) buswidth in boot operation mode
115 x8 (sdr/ddr) buswidth in boot operation mode
121 Reset buswidth to x1, Single data reate and backward compatible timing after boot operation (default)
123 Retain BOOT_BUS_WIDTH and BOOT_MODE value after boot operation. This is relevant to Push-pull mode operation only
127 Use single data rate + backward compatible timing in boot operation (default)
129 Use single data rate + High Speed timing in boot operation mode
131 Use dual data rate in boot operation
135 The 'mmc partconf' command shows or changes PARTITION_CONFIG field.
138 When showing the PARTITION_CONFIG, an optional environment variable to store the current boot_partition value into.
140 boot acknowledge value
142 boot partition to enable for boot
144 Device not boot enabled(default)
146 Boot partition1 enabled for boot
148 Boot partition2 enabled for boot
150 User area enabled for boot
156 The 'mmc bootpart-resize' command changes sizes of boot and RPMB partitions.
161 target size of boot partition
163 target size of RPMB partition
165 The 'mmc rst-function' command changes the RST_n_FUNCTION field.
166 **WARNING** : This is a write-once field. (*Refer to eMMC specification*)
170 RST_n signal is temporarily disabled (default)
172 RST_n signal is permanently enabled
174 RST_n signal is permanently disabled
182 The 'mmc info' command displays device's capabilities:
191 Mode: MMC DDR52 (52MHz)
197 Erase Group Size: 512 KiB
198 HC WP Group Size: 8 MiB
199 User Capacity: 14.7 GiB WRREL
200 Boot Capacity: 4 MiB ENH
201 RPMB Capacity: 4 MiB ENH
202 Boot area 0 is not write protected
203 Boot area 1 is not write protected
205 The raw data can be read/written via 'mmc read/write' command:
208 => mmc read 0x40000000 0x5000 0x100
209 MMC read: dev # 0, block # 20480, count 256 ... 256 blocks read: OK
211 => mmc write 0x40000000 0x5000 0x10
212 MMC write: dev # 0, block # 20480, count 256 ... 256 blocks written: OK
214 The partition list can be shown via 'mmc part' command:
218 Partition Map for MMC device 0 -- Partition Type: DOS
220 Part Start Sector Num Sectors UUID Type
221 1 8192 131072 dff8751a-01 0e Boot
222 2 139264 6291456 dff8751a-02 83
223 3 6430720 1048576 dff8751a-03 83
224 4 7479296 23298048 dff8751a-04 05 Extd
225 5 7481344 307200 dff8751a-05 83
226 6 7790592 65536 dff8751a-06 83
227 7 7858176 16384 dff8751a-07 83
228 8 7876608 22900736 dff8751a-08 83
230 The current device can be shown or set via 'mmc dev' command:
234 switch to partitions #0, OK
235 mmc0(part0) is current device
237 switch to partitions #0, OK
238 mmc2 is current device
240 switch to partitions #1, OK
241 mmc0(part 1) is current device
243 The list of available devices can be shown via 'mmc list' command:
248 EXYNOS DWMMC: 0 (eMMC)
254 The mmc command is only available if CONFIG_CMD_MMC=y.
255 Some commands need to enable more configuration.
259 bootbus, bootpart-resize, partconf, rst-function
260 CONFIG_SUPPORT_EMMC_BOOT=y