blob: 4ad0bb17f3436bcf99c0dac12e1c199e31f7fc30 [file] [log] [blame]
Andrei Warkentin371a6892011-04-11 18:10:25 -05001SD and MMC Block Device Attributes
2==================================
3
4These attributes are defined for the block devices associated with the
5SD or MMC device.
6
7The following attributes are read/write.
8
9 force_ro Enforce read-only access even if write protect switch is off.
10
Adrian Hunterdfe86cb2010-08-11 14:17:46 -070011SD and MMC Device Attributes
12============================
13
14All attributes are read-only.
15
Tamara Diaconita80352232017-03-17 20:00:34 +020016 cid Card Identification Register
Adrian Hunterdfe86cb2010-08-11 14:17:46 -070017 csd Card Specific Data Register
18 scr SD Card Configuration Register (SD only)
19 date Manufacturing Date (from CID Register)
20 fwrev Firmware/Product Revision (from CID Register) (SD and MMCv1 only)
21 hwrev Hardware/Product Revision (from CID Register) (SD and MMCv1 only)
22 manfid Manufacturer ID (from CID Register)
23 name Product Name (from CID Register)
24 oemid OEM/Application ID (from CID Register)
Bernie Thompson51e7e8b2013-02-27 12:19:17 -080025 prv Product Revision (from CID Register) (SD and MMCv4 only)
Adrian Hunterdfe86cb2010-08-11 14:17:46 -070026 serial Product Serial Number (from CID Register)
27 erase_size Erase group size
28 preferred_erase_size Preferred erase size
Loic Pallardy188cc042012-08-06 17:12:29 +020029 raw_rpmb_size_mult RPMB partition size
30 rel_sectors Reliable write sector count
Bojan Prtvar5fb06af2016-07-04 13:56:55 +020031 ocr Operation Conditions Register
Bojan Prtvar6825a602016-07-19 11:16:38 +020032 dsr Driver Stage Register
Adrian Hunterb658af72017-03-13 14:36:37 +020033 cmdq_en Command Queue enabled: 1 => enabled, 0 => not enabled
Adrian Hunterdfe86cb2010-08-11 14:17:46 -070034
35Note on Erase Size and Preferred Erase Size:
36
37 "erase_size" is the minimum size, in bytes, of an erase
38 operation. For MMC, "erase_size" is the erase group size
39 reported by the card. Note that "erase_size" does not apply
40 to trim or secure trim operations where the minimum size is
41 always one 512 byte sector. For SD, "erase_size" is 512
42 if the card is block-addressed, 0 otherwise.
43
44 SD/MMC cards can erase an arbitrarily large area up to and
45 including the whole card. When erasing a large area it may
46 be desirable to do it in smaller chunks for three reasons:
47 1. A single erase command will make all other I/O on
48 the card wait. This is not a problem if the whole card
49 is being erased, but erasing one partition will make
50 I/O for another partition on the same card wait for the
51 duration of the erase - which could be a several
52 minutes.
53 2. To be able to inform the user of erase progress.
54 3. The erase timeout becomes too large to be very
55 useful. Because the erase timeout contains a margin
56 which is multiplied by the size of the erase area,
57 the value can end up being several minutes for large
58 areas.
59
60 "erase_size" is not the most efficient unit to erase
61 (especially for SD where it is just one sector),
62 hence "preferred_erase_size" provides a good chunk
63 size for erasing large areas.
64
65 For MMC, "preferred_erase_size" is the high-capacity
66 erase size if a card specifies one, otherwise it is
67 based on the capacity of the card.
68
69 For SD, "preferred_erase_size" is the allocation unit
70 size specified by the card.
71
72 "preferred_erase_size" is in bytes.
Sujit Reddy Thumma597dd9d792011-11-14 13:53:29 +053073
Loic Pallardy188cc042012-08-06 17:12:29 +020074Note on raw_rpmb_size_mult:
Tamara Diaconita80352232017-03-17 20:00:34 +020075 "raw_rpmb_size_mult" is a multiple of 128kB block.
Loic Pallardy188cc042012-08-06 17:12:29 +020076 RPMB size in byte is calculated by using the following equation:
77 RPMB partition size = 128kB x raw_rpmb_size_mult