0001 ==================================
0002 SD and MMC Block Device Attributes
0003 ==================================
0004
0005 These attributes are defined for the block devices associated with the
0006 SD or MMC device.
0007
0008 The following attributes are read/write.
0009
0010 ======== ===============================================
0011 force_ro Enforce read-only access even if write protect switch is off.
0012 ======== ===============================================
0013
0014 SD and MMC Device Attributes
0015 ============================
0016
0017 All attributes are read-only.
0018
0019 ====================== ===============================================
0020 cid Card Identification Register
0021 csd Card Specific Data Register
0022 scr SD Card Configuration Register (SD only)
0023 date Manufacturing Date (from CID Register)
0024 fwrev Firmware/Product Revision (from CID Register)
0025 (SD and MMCv1 only)
0026 hwrev Hardware/Product Revision (from CID Register)
0027 (SD and MMCv1 only)
0028 manfid Manufacturer ID (from CID Register)
0029 name Product Name (from CID Register)
0030 oemid OEM/Application ID (from CID Register)
0031 prv Product Revision (from CID Register)
0032 (SD and MMCv4 only)
0033 serial Product Serial Number (from CID Register)
0034 erase_size Erase group size
0035 preferred_erase_size Preferred erase size
0036 raw_rpmb_size_mult RPMB partition size
0037 rel_sectors Reliable write sector count
0038 ocr Operation Conditions Register
0039 dsr Driver Stage Register
0040 cmdq_en Command Queue enabled:
0041
0042 1 => enabled, 0 => not enabled
0043 ====================== ===============================================
0044
0045 Note on Erase Size and Preferred Erase Size:
0046
0047 "erase_size" is the minimum size, in bytes, of an erase
0048 operation. For MMC, "erase_size" is the erase group size
0049 reported by the card. Note that "erase_size" does not apply
0050 to trim or secure trim operations where the minimum size is
0051 always one 512 byte sector. For SD, "erase_size" is 512
0052 if the card is block-addressed, 0 otherwise.
0053
0054 SD/MMC cards can erase an arbitrarily large area up to and
0055 including the whole card. When erasing a large area it may
0056 be desirable to do it in smaller chunks for three reasons:
0057
0058 1. A single erase command will make all other I/O on
0059 the card wait. This is not a problem if the whole card
0060 is being erased, but erasing one partition will make
0061 I/O for another partition on the same card wait for the
0062 duration of the erase - which could be a several
0063 minutes.
0064 2. To be able to inform the user of erase progress.
0065 3. The erase timeout becomes too large to be very
0066 useful. Because the erase timeout contains a margin
0067 which is multiplied by the size of the erase area,
0068 the value can end up being several minutes for large
0069 areas.
0070
0071 "erase_size" is not the most efficient unit to erase
0072 (especially for SD where it is just one sector),
0073 hence "preferred_erase_size" provides a good chunk
0074 size for erasing large areas.
0075
0076 For MMC, "preferred_erase_size" is the high-capacity
0077 erase size if a card specifies one, otherwise it is
0078 based on the capacity of the card.
0079
0080 For SD, "preferred_erase_size" is the allocation unit
0081 size specified by the card.
0082
0083 "preferred_erase_size" is in bytes.
0084
0085 Note on raw_rpmb_size_mult:
0086
0087 "raw_rpmb_size_mult" is a multiple of 128kB block.
0088
0089 RPMB size in byte is calculated by using the following equation:
0090
0091 RPMB partition size = 128kB x raw_rpmb_size_mult