i.MX 93 BSP Manual PD24.1.1 Documentation Rev.: imx8mp-pd22.1.2-51-ga548be7d
• Now, you can set enhanced attribute for the whole device, e.g. 3719168 KiB, by typing:
target:~$ mmc enh_area set -y 0 3719168 /dev/mmcblk0
You will get:
Done setting ENH_USR area on /dev/mmcblk0
setting OTP PARTITION_SETTING_COMPLETED!
Setting OTP PARTITION_SETTING_COMPLETED on /dev/mmcblk0 SUCCESS
Device power cycle needed for settings to take effect.
Confirm that PARTITION_SETTING_COMPLETED bit is set using 'extcsd read' after power cycle
• To ensure that the new setting has taken over, shut down the system:
target:~$ poweroff
and perform a power cycle. It is recommended that you verify the settings now.
• First, check the value of ENH_SIZE_MULT which must be 3719168 KiB:
target:~$ mmc extcsd read /dev/mmcblk0 | grep ENH_SIZE_MULT -A 1
You should receive:
Max Enhanced Area Size [MAX_ENH_SIZE_MULT]: 0x000764
i.e. 3719168 KiB
--
Enhanced User Data Area Size [ENH_SIZE_MULT]: 0x000764
i.e. 3719168 KiB
• Finally, check the size of the device:
target:~$ parted -m /dev/mmcblk0 unit B print
BYT;
/dev/mmcblk0:31742492672B:sd/mmc:512:512:unknown:MMC S0J58X:;
7.4.6 Erasing the Device
It is possible to erase the eMMC device directly rather than overwriting it with zeros. The eMMC block
management algorithm will erase the underlying MLC or TLC or mark these blocks as discard. The data
on the device is lost and will be read back as zeros.
• After booting from SD Card execute:
target:~$ blkdiscard -f --secure /dev/mmcblk0
The option –secure ensures that the command waits until the eMMC device has erased all blocks. The
-f (force) option disables all checking before erasing and it is needed when the eMMC device contains
existing partitions with data.
Tip
target:~$ dd if=/dev/zero of=/dev/mmcblk0 conv=fsync
Accessing Peripherals 53