mmc-dev-attrs.txt 2.9 KB

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