This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3352: eMMC-5 Health Reporting Functionality using eMMC-4.3 + Software

Part Number: AM3352
Other Parts Discussed in Thread: CSD

Tool/software: Linux

My customer requires eMMC-5 "health reporting" functionality, but AM3352 only supports eMMC-4.3. My customer understands the high-speed mode limitations of eMMC-4.3 vs. eMMC-5 and is fine with it.  However, they still require health reporting.  This appears to be just a response back from the eMMC device.  Does this capability exist in any MMC utilities that are currently included in Processor SDK? 

There is an open source package called mmc-utils which currently is not in the SDK. Here is the link:

https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git/

Thanks,

RJ Hall

 

  • Hello RJ,

    I am currently looking into the mmc-utils and I will keep you posted on any updates.

    Regards,
    Krunal
  • Thank you sir!

    RJ

  • HI, RJ,

    I cross-compiled the mmc-utils from the link in your previous post. From the mmc-utils' help menu, I don't think it provides what customer wants. I'll consult further internally before submitting a requirement for it.

    root@am57xx-evm:~/mmc_utils# ./mmc help
    Usage:
    mmc extcsd read <device>
    Print extcsd data from <device>.
    mmc writeprotect boot get <device>
    Print the boot partitions write protect status for <device>.
    mmc writeprotect boot set <device>
    Set the boot partitions write protect status for <device>.
    This sets the eMMC boot partitions to be write-protected until
    the next boot.
    mmc writeprotect user set <type><start block><blocks><device>
    Set the write protect configuration for the specified region
    of the user area for <device>.
    <type> must be "none|temp|pwron".
    "none" - Clear temporary write protection.
    "temp" - Set temporary write protection.
    "pwron" - Set write protection until the next poweron.
    <start block> specifies the first block of the protected area.
    <blocks> specifies the size of the protected area in blocks.
    NOTE! The area must start and end on Write Protect Group
    boundries, Use the "writeprotect user get" command to get the
    Write Protect Group size.
    mmc writeprotect user get <device>
    Print the user areas write protect configuration for <device>.
    mmc disable 512B emulation <device>
    Set the eMMC data sector size to 4KB by disabling emulation on
    <device>.
    mmc gp create <-y|-n|-c> <length KiB> <partition> <enh_attr> <ext_attr> <device>
    Create general purpose partition for the <device>.
    Dry-run only unless -y or -c is passed.
    Use -c if more partitioning settings are still to come.
    NOTE! This is a one-time programmable (unreversible) change.
    To set enhanced attribute to general partition being created set
    <enh_attr> to 1 else set it to 0.
    To set extended attribute to general partition
    set <ext_attr> to 1,2 else set it to 0
    mmc enh_area set <-y|-n|-c> <start KiB> <length KiB> <device>
    Enable the enhanced user area for the <device>.
    Dry-run only unless -y or -c is passed.
    Use -c if more partitioning settings are still to come.
    NOTE! This is a one-time programmable (unreversible) change.
    mmc write_reliability set <-y|-n|-c> <partition> <device>
    Enable write reliability per partition for the <device>.
    Dry-run only unless -y or -c is passed.
    Use -c if more partitioning settings are still to come.
    NOTE! This is a one-time programmable (unreversible) change.
    mmc status get <device>
    Print the response to STATUS_SEND (CMD13).
    mmc bootpart enable <boot_partition> <send_ack> <device>
    Enable the boot partition for the <device>.
    Disable the boot partition for the <device> if <boot_partition> is set to 0.
    To receive acknowledgment of boot from the card set <send_ack>
    to 1, else set it to 0.
    mmc bootbus set <boot_mode> <reset_boot_bus_conditions> <boot_bus_width> <device>
    Set Boot Bus Conditions.
    <boot_mode> must be "single_backward|single_hs|dual"
    <reset_boot_bus_conditions> must be "x1|retain"
    <boot_bus_width> must be "x1|x4|x8"
    mmc bkops enable <device>
    Enable the eMMC BKOPS feature on <device>.
    NOTE! This is a one-time programmable (unreversible) change.
    mmc hwreset enable <device>
    Permanently enable the eMMC H/W Reset feature on <device>.
    NOTE! This is a one-time programmable (unreversible) change.
    mmc hwreset disable <device>
    Permanently disable the eMMC H/W Reset feature on <device>.
    NOTE! This is a one-time programmable (unreversible) change.
    mmc sanitize <device>
    Send Sanitize command to the <device>.
    This will delete the unmapped memory region of the device.
    mmc rpmb write-key <rpmb device> <key file>
    Program authentication key which is 32 bytes length and stored
    in the specified file. Also you can specify '-' instead of
    key file path to read the key from stdin.
    NOTE! This is a one-time programmable (unreversible) change.
    Example:
    $ echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | \
    mmc rpmb write-key /dev/mmcblk0rpmb -
    mmc rpmb read-counter <rpmb device>
    Counter value for the <rpmb device> will be read to stdout.
    mmc rpmb read-block <rpmb device> <address> <blocks count> <output file> [key file]
    Blocks of 256 bytes will be read from <rpmb device> to output
    file or stdout if '-' is specified. If key is specified - read
    data will be verified. Instead of regular path you can specify
    '-' to read key from stdin.
    Example:
    $ echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | \
    mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block -
    or read two blocks without verification
    $ mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block
    mmc rpmb write-block <rpmb device> <address> <256 byte data file> <key file>
    Block of 256 bytes will be written from data file to
    <rpmb device>. Also you can specify '-' instead of key
    file path or data file to read the data from stdin.
    Example:
    $ (awk 'BEGIN {while (c++<256) printf "a"}' | \
    echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH) | \
    mmc rpmb write-block /dev/mmcblk0rpmb 0x02 - -
    mmc cache enable <device>
    Enable the eMMC cache feature on <device>.
    NOTE! The cache is an optional feature on devices >= eMMC4.5.
    mmc cache disable <device>
    Disable the eMMC cache feature on <device>.
    NOTE! The cache is an optional feature on devices >= eMMC4.5.
    mmc csd read <device path>
    Print CSD data from <device path>.
    The device path should specify the csd file directory.
    mmc cid read <device path>
    Print CID data from <device path>.
    The device path should specify the cid file directory.
    mmc scr read <device path>
    Print SCR data from <device path>.
    The device path should specify the scr file directory.
    mmc ffu <image name> <device>
    Run Field Firmware Update with <image name> on <device>.


    mmc help|--help|-h
    Show the help.

    mmc <cmd> --help
    Show detailed help for a command or subset of commands.


    Rex
  • Thanks Rex. I will run this by the customer support team.
  • Hello RJ,

    After cloning the git repo, I modified line 1760 (file=mmc_cmds.c) to print the eMMC life time information. 

    After running the command “./mmc extcsd read /dev/mmcblk1”, I got the following information: 

    Kingston's eMMC datasheet translates 0x01 as "0% - 10% Device Life Time Used".

    Regards,

    Krunal

  • Thanks Krunal,

    I think that this provides us enough information at this point in time. If the customer does indeed select TI as it product source, there may be a follow-up post.  

    Best,

    RJ