imx8mm-lpddr4 eMMC commands

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8mm-lpddr4 eMMC commands

1,244件の閲覧回数
vignesh-baskaran
Contributor III

Hi,

we were trying to perform all commands on eMMC  according to JEDEC 5.1 specs.

We facing some issues on the way. We booting from another memory.

We want confirmation regarding same.

 

1) How to test all the eMMC features on onboard device. If it has to be formatted, what is the right way to do it?

2) Can we explore all eMMC modes/features using on board device or not?

0 件の賞賛
返信
3 返答(返信)

1,206件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport
 
I hope you are doing well
 
1) How to test all the eMMC features on onboard device. If it has to be formatted, what is the right way to do it?
=> One can use mmc sub system commands from uboot to access the onboard emmc.
u-boot=> mmc help
mmc - MMC sub system

Usage:
mmc info - display info of the current MMC device
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
mmc wp - power on write protect boot partitions
mmc hwpartition [args...] - does hardware partitioning
  arguments (sizes in 512-byte blocks):
    [user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
    [gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
    [check|set|complete] - mode, complete set partitioning completed
  WARNING: Partitioning is a write-once setting once it is set to complete.
  Power cycling is required to initialize partitions after set to complete.
mmc bootbus <dev> <boot_bus_width> <reset_boot_bus_width> <boot_mode>
 - Set the BOOT_BUS_WIDTH field of the specified device
mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>
 - Change sizes of boot and RPMB partitions of specified device
mmc partconf <dev> [boot_ack boot_partition partition_access]
 - Show or change the bits of the PARTITION_CONFIG field of the specified device
mmc rst-function <dev> <value>
 - Change the RST_n_FUNCTION field of the specified device
   WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.
mmc rpmb read addr blk# cnt [address of auth-key] - block size is 256 bytes
mmc rpmb write addr blk# cnt <address of auth-key> - block size is 256 bytes
mmc rpmb key <address of auth-key> - program the RPMB authentication key.
mmc rpmb counter - read the value of the write counter
mmc setdsr <value> - set DSR register value
 
2) Can we explore all eMMC modes/features using on board device or not?
=> Can you elaborate on this sentence that which type of specific features you are trying to explore?
 
Thanks & Regards
Sanket Parekh
0 件の賞賛
返信

1,195件の閲覧回数
vignesh-baskaran
Contributor III

HI @Sanket_Parekh 

We were trying in Linux user space, We can able to see mmc-utility at Linux user space but it didn't cover all the commands we required.

We were trying to implement the state flow as mentioned in specs. We were exploring commands from CMD0 to CMD56.

1 ) is there limitation to do it so?

We were facing this issue regarding same.

 

And we were trying to format the eMMC memory using fdisk tool:

root@imx8mm-lpddr4-evk:~# fdisk /dev/mmcblk2                                    
                                                                                
Welcome to fdisk (util-linux 2.37.4).                                           
Changes will remain in memory only, until you decide to write them.             
Be careful before using the write command.                                      
                                                                                
Device does not contain a recognized partition table.                           
Created a new DOS disklabel with disk identifier 0x0a90c99b.                    
                                                                                
Command (m for help): p                                                         
Disk /dev/mmcblk2: 14.68 GiB, 15758000128 bytes, 30777344 sectors               
Units: sectors of 1 * 512 = 512 bytes                                           
Sector size (logical/physical): 512 bytes / 512 bytes                           
I/O size (minimum/optimal): 512 bytes / 512 bytes                               
Disklabel type: dos                                                             
Disk identifier: 0x0a90c99b                                                     
                                                                                
Command (m for help): d                                                         
No partition is defined yet! 

We can able to see

root@imx8mm-lpddr4-evk:~# ls /dev/mmcblk2                                       
mmcblk2       mmcblk2boot0  mmcblk2boot1  mmcblk2rpmb 

We trying to delete partition and format it.

2)  How can we achieve that?

0 件の賞賛
返信

1,153件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport
 
I hope you are doing well.
 
We were exploring commands from CMD0 to CMD56
=> From the Linux user space, one can access the emmc for reading, writing, and erasing the data.
i.e The 'cat' command in Linux will read the blocks from emmc. For that, it will call CMD17(for single block) or CMD18(for multiple blocks).
The 'touch' or the 'dd' command from the Linux user space will call the CMD24(for a single block) or CMD25(for multiple blocks) write operation.
The 'rm' command from the Linux user space will call the CMD32 - CMD38 for erasing operation.
For more information, kindly refer to Table 10-34. Commands for MMC/SD/SDIO cards from the IMX8MMRM.
 
we were trying to format the eMMC memory using fdisk tool:
=> "No partition is defined yet!" says that there is no such partition defined in the /dev/mmcblk2. One can check using the fdisk -l command.
Kindly try this command to erase the whole Emmc.
dd if=/dev/zero of=/dev/<mmc>
 
Thanks & Regards

Sanket Parekh

0 件の賞賛
返信