mmc-dev-attrs.rst 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ==================================
  2. SD and MMC Block Device Attributes
  3. ==================================
  4. These attributes are defined for the block devices associated with the
  5. SD or MMC device.
  6. The following attributes are read/write.
  7. ======== ===============================================
  8. force_ro Enforce read-only access even if write protect switch is off.
  9. ======== ===============================================
  10. SD and MMC Device Attributes
  11. ============================
  12. All attributes are read-only.
  13. ====================== ===============================================
  14. cid Card Identification Register
  15. csd Card Specific Data Register
  16. scr SD Card Configuration Register (SD only)
  17. date Manufacturing Date (from CID Register)
  18. fwrev Firmware/Product Revision (from CID Register)
  19. (SD and MMCv1 only)
  20. hwrev Hardware/Product Revision (from CID Register)
  21. (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)
  25. prv Product Revision (from CID Register)
  26. (SD and MMCv4 only)
  27. serial Product Serial Number (from CID Register)
  28. erase_size Erase group size
  29. preferred_erase_size Preferred erase size
  30. raw_rpmb_size_mult RPMB partition size
  31. rel_sectors Reliable write sector count
  32. ocr Operation Conditions Register
  33. dsr Driver Stage Register
  34. cmdq_en Command Queue enabled:
  35. 1 => enabled, 0 => not enabled
  36. ====================== ===============================================
  37. Note on Erase Size and Preferred Erase Size:
  38. "erase_size" is the minimum size, in bytes, of an erase
  39. operation. For MMC, "erase_size" is the erase group size
  40. reported by the card. Note that "erase_size" does not apply
  41. to trim or secure trim operations where the minimum size is
  42. always one 512 byte sector. For SD, "erase_size" is 512
  43. if the card is block-addressed, 0 otherwise.
  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. "erase_size" is not the most efficient unit to erase
  60. (especially for SD where it is just one sector),
  61. hence "preferred_erase_size" provides a good chunk
  62. size for erasing large areas.
  63. For MMC, "preferred_erase_size" is the high-capacity
  64. erase size if a card specifies one, otherwise it is
  65. based on the capacity of the card.
  66. For SD, "preferred_erase_size" is the allocation unit
  67. size specified by the card.
  68. "preferred_erase_size" is in bytes.
  69. Note on raw_rpmb_size_mult:
  70. "raw_rpmb_size_mult" is a multiple of 128kB block.
  71. RPMB size in byte is calculated by using the following equation:
  72. RPMB partition size = 128kB x raw_rpmb_size_mult