nvmem.txt 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. = NVMEM(Non Volatile Memory) Data Device Tree Bindings =
  2. This binding is intended to represent the location of hardware
  3. configuration data stored in NVMEMs like eeprom, efuses and so on.
  4. On a significant proportion of boards, the manufacturer has stored
  5. some data on NVMEM, for the OS to be able to retrieve these information
  6. and act upon it. Obviously, the OS has to know about where to retrieve
  7. these data from, and where they are stored on the storage device.
  8. This document is here to document this.
  9. = Data providers =
  10. Contains bindings specific to provider drivers and data cells as children
  11. of this node.
  12. Optional properties:
  13. read-only: Mark the provider as read only.
  14. = Data cells =
  15. These are the child nodes of the provider which contain data cell
  16. information like offset and size in nvmem provider.
  17. Required properties:
  18. reg: specifies the offset in byte within the storage device.
  19. Optional properties:
  20. bits: Is pair of bit location and number of bits, which specifies offset
  21. in bit and number of bits within the address range specified by reg property.
  22. Offset takes values from 0-7.
  23. For example:
  24. /* Provider */
  25. qfprom: qfprom@00700000 {
  26. ...
  27. /* Data cells */
  28. tsens_calibration: calib@404 {
  29. reg = <0x404 0x10>;
  30. };
  31. tsens_calibration_bckp: calib_bckp@504 {
  32. reg = <0x504 0x11>;
  33. bits = <6 128>
  34. };
  35. pvs_version: pvs-version@6 {
  36. reg = <0x6 0x2>
  37. bits = <7 2>
  38. };
  39. speed_bin: speed-bin@c{
  40. reg = <0xc 0x1>;
  41. bits = <2 3>;
  42. };
  43. ...
  44. };
  45. = Data consumers =
  46. Are device nodes which consume nvmem data cells/providers.
  47. Required-properties:
  48. nvmem-cells: list of phandle to the nvmem data cells.
  49. nvmem-cell-names: names for the each nvmem-cells specified. Required if
  50. nvmem-cells is used.
  51. Optional-properties:
  52. nvmem : list of phandles to nvmem providers.
  53. nvmem-names: names for the each nvmem provider. required if nvmem is used.
  54. For example:
  55. tsens {
  56. ...
  57. nvmem-cells = <&tsens_calibration>;
  58. nvmem-cell-names = "calibration";
  59. };