diff options
author | Marek Vasut <marex@denx.de> | 2023-10-31 13:20:17 +0100 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2023-11-01 10:09:21 +0900 |
commit | b5f403936d037e0bc08e78b8af64adf53da13b90 (patch) | |
tree | 56be5dcdd139e0a1e199ce3d7e69239fe96bb810 /doc | |
parent | 21c84bb1112695f9bd49379f7e32c251b55a3cad (diff) | |
download | u-boot-b5f403936d037e0bc08e78b8af64adf53da13b90.zip u-boot-b5f403936d037e0bc08e78b8af64adf53da13b90.tar.gz u-boot-b5f403936d037e0bc08e78b8af64adf53da13b90.tar.bz2 |
cmd: mmc: Add mmc reg read command for reading card registers
Add extension to the 'mmc' command to read out the card registers.
Currently, only the eMMC OCR/CID/CSD/EXTCSD/RCA/DSR register are
supported. A register value can either be displayed or read into
an environment variable.
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/usage/cmd/mmc.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/usage/cmd/mmc.rst b/doc/usage/cmd/mmc.rst index 71a0303..c0924ba 100644 --- a/doc/usage/cmd/mmc.rst +++ b/doc/usage/cmd/mmc.rst @@ -21,6 +21,7 @@ Synopsis mmc bootpart-resize <dev> <dev part size MB> <RPMB part size MB> mmc partconf <dev> [[varname] | [<boot_ack> <boot_partition> <partition_access>]] mmc rst-function <dev> <value> + mmc reg read <reg> <offset> [env] Description ----------- @@ -183,6 +184,31 @@ The 'mmc rst-function' command changes the RST_n_FUNCTION field. 0x3 Reserved +The 'mmc reg read <reg> <offset> [env]' reads eMMC card register and +either print it to standard output, or store the value in environment +variable. + +<reg> with +optional offset <offset> into the register array, and print it to +standard output or store it into environment variable [env]. + + reg + cid + The Device IDentification (CID) register. Uses offset. + csd + The Device-Specific Data (CSD) register. Uses offset. + dsr + The driver stage register (DSR). + ocr + The operation conditions register (OCR). + rca + The relative Device address (RCA) register. + extcsd + The Extended CSD register. Uses offset. + offset + For 'cid'/'csd' 128 bit registers '[0..3]' in 32-bit increments. For 'extcsd' 512 bit register '[0..512,all]' in 8-bit increments, or 'all' to read the entire register. + env + Optional environment variable into which 32-bit value read from register should be stored. Examples -------- |