TS-7180 EMMC: Difference between revisions

From embeddedTS Manuals
mNo edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
This board includes a Micron eMMC module.  Our off-the-shelf builds are 4GiB, but up to 64GiB are available for larger builds.  The eMMC flash appears to Linux as an SD card at /dev/mmcblk1.  Our default programming will include one partition programmed with our Debian image.
This board includes a Micron eMMC module.  Our off-the-shelf builds are 4GiB, but up to 64GiB are available for larger builds.  The eMMC flash appears to Linux as an SD card at /dev/mmcblk1.  Our default programming will include one partition programmed with our Debian image.


The eMMC module has a similar concern by default to SD cards in that they should not be powered down during a write/erase cycle. However, this eMMC module includes support for setting a fuse for a "Write Reliability" mode, and a "psuedo SLC" mode.  With both of these enabled then any writes will be atomic to 512B.  If a sector is being written during a power loss, a block is guaranteed to have either the old or new data.  Even in cases where the wrong data is present on the next boot, fsck is able to deal with the older data being present in a 512B block.  The downsides to setting these modes are that it will about halve the size of the eMMC module to 1.759Gib by default, and write speed will be slightly slower.
eMMC also provides ways to estimate the wear on the module. First, determine your eMMC chipset revision:
<console>
root@tsimx6:~# mmc extcsd read /dev/mmcblk1 | grep "CSD rev"
[64446.059203]  mmcblk1: p1
  Extended CSD rev 1.7 (MMC 5.0)
</console>
or
<console>
root@tsimx6:~# mmc extcsd read /dev/mmcblk1 | grep "CSD rev"
[64446.059203]  mmcblk1: p1
  Extended CSD rev 1.5 (MMC 4.41)
</console>
 
In eMMC revision 5.0 and above, part of the specification includes a way to estimate lifetime of the chipset.  For example:
<console>
root@tsimx6:~# mmc extcsd read /dev/mmcblk1 | grep -e EXT_CSD_DEVICE_LIFE_TIME -e PRE_EOL
[64618.159298]  mmcblk1: p1
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x01
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x01
eMMC Pre EOL information [EXT_CSD_PRE_EOL_INFO]: 0x01
</console>
 
If you have reconfigured your device as SLC, use TYP_A.  If you are using the default MLC setting, use TYP_B. These LIFE_TIME_EST values indicate in 10s of percent how much of the reserve blocks are still available.  The 0x1 value indicates < 10%.  0x7 would indicate < 70%.
 
EXT_CSD_PRE_EOL_INFO can also be used as an early warning indicator.
{| class=wikitable
|+ EXT_CSD_PRE_EOL_INFO values
! Value
! Description
|-
| 0x1
| Normal (< 80% blocks used)
|-
| 0x2
| Warning (> 80% blocks used)
|-
| 0x3
| Urgent (>90% blocks used)
|}
 
If this is below 5.0, you must use a vendor specific utility. Micron eMMC uses the [https://www.micron.com/products/managed-nand/emmc/emmc-software emmcparm] utility.  Refer to Micron's TN-FC-25 for the emmcparm utility and related documentation.
 
<!-- The eMMC module has a similar concern by default to SD cards in that they should not be powered down during a write/erase cycle. However, this eMMC module includes support for setting a fuse for a "Write Reliability" mode, and a "psuedo SLC" mode.  With both of these enabled then any writes will be atomic to 512B.  If a sector is being written during a power loss, a block is guaranteed to have either the old or new data.  Even in cases where the wrong data is present on the next boot, fsck is able to deal with the older data being present in a 512B block.  The downsides to setting these modes are that it will about halve the size of the eMMC module to 1.759Gib by default, and write speed will be slightly slower.


The mmc-utils package is used to enable these modes.  
The mmc-utils package is used to enable these modes.  


{{Warning|If you are using a custom built TS-7180 with an eMMC sized larger than 4GB, contact us before using these commands.  The SLC partition will be specified different on larger disks.}}
{{Warning|If you are using a custom built TS-7180 with an eMMC sized larger than 4GB, contact us before using these commands.  The SLC partition will be specified different on larger disks.}}


<source lang=bash>
<source lang=bash>
Line 12: Line 53:
mmc enh_area set -y 0 1847296 /dev/mmcblk1
mmc enh_area set -y 0 1847296 /dev/mmcblk1
</source>
</source>


{{Warning|Setting either of those modes is permanent and using the wrong value it is possible to essentially brick eMMC which will not be covered by the warranty.  Evaluation units with fuses set will not be accepted through returns.}}
{{Warning|Setting either of those modes is permanent and using the wrong value it is possible to essentially brick eMMC which will not be covered by the warranty.  Evaluation units with fuses set will not be accepted through returns.}}


After this is run, reboot the board.  On all future boots the eMMC will be detected at the smaller size.
After this is run, reboot the board.  On all future boots the eMMC will be detected at the smaller size.
-->

Latest revision as of 10:37, 24 June 2021

This board includes a Micron eMMC module. Our off-the-shelf builds are 4GiB, but up to 64GiB are available for larger builds. The eMMC flash appears to Linux as an SD card at /dev/mmcblk1. Our default programming will include one partition programmed with our Debian image.

eMMC also provides ways to estimate the wear on the module. First, determine your eMMC chipset revision:

root@tsimx6:~# mmc extcsd read /dev/mmcblk1 | grep "CSD rev"
[64446.059203]  mmcblk1: p1
  Extended CSD rev 1.7 (MMC 5.0)

or

root@tsimx6:~# mmc extcsd read /dev/mmcblk1 | grep "CSD rev"
[64446.059203]  mmcblk1: p1
  Extended CSD rev 1.5 (MMC 4.41)

In eMMC revision 5.0 and above, part of the specification includes a way to estimate lifetime of the chipset. For example:

root@tsimx6:~# mmc extcsd read /dev/mmcblk1 | grep -e EXT_CSD_DEVICE_LIFE_TIME -e PRE_EOL
[64618.159298]  mmcblk1: p1
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x01
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x01
eMMC Pre EOL information [EXT_CSD_PRE_EOL_INFO]: 0x01

If you have reconfigured your device as SLC, use TYP_A. If you are using the default MLC setting, use TYP_B. These LIFE_TIME_EST values indicate in 10s of percent how much of the reserve blocks are still available. The 0x1 value indicates < 10%. 0x7 would indicate < 70%.

EXT_CSD_PRE_EOL_INFO can also be used as an early warning indicator.

EXT_CSD_PRE_EOL_INFO values
Value Description
0x1 Normal (< 80% blocks used)
0x2 Warning (> 80% blocks used)
0x3 Urgent (>90% blocks used)

If this is below 5.0, you must use a vendor specific utility. Micron eMMC uses the emmcparm utility. Refer to Micron's TN-FC-25 for the emmcparm utility and related documentation.