msm-eeprom.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. * Qualcomm MSM EEPROM
  2. EEPROM is an one time programmed(OTP) device that stores the calibration data
  3. use for camera sensor. It may either be integrated in the sensor module or in
  4. the sensor itself. As a result, the power, clock and GPIOs may be the same as
  5. the camera sensor. The following describes the page block map, power supply,
  6. clock, GPIO and power on sequence properties of the EEPROM device.
  7. Required properties:
  8. - cell-index: eeprom hardware core index
  9. - compatible :
  10. - "qcom,eeprom"
  11. - reg : offset of eeprom device registers.
  12. - qcom,eeprom-name : should specify relevant names of the eeprom module
  13. library.
  14. - qcom,slave-addr : should specify the slave address of the eeprom.
  15. - qcom,cci-master : should specify the cci core index that eeprom use.
  16. - qcom,num-blocks : should specify the total block number that eeprom contains,
  17. every block should contains page poll and mem.
  18. - qcom,page%d : number %d page size, start address, address type, data,
  19. data type, delay in ms. size 0 stand for non-paged.
  20. - address type : 1 byte, 2 word.
  21. - data type : 1 byte, 2 word.
  22. - qcom,poll%d : number %d poll size, poll reg address, address type, data,
  23. data type, delay in ms. size 0 stand for not used.
  24. - address type : 1 byte, 2 word.
  25. - data type : 1 byte, 2 word.
  26. - qcom,mem%d : number %d memory size, start address, address type, data,
  27. data type, delay in ms. size 0 stand for not used.
  28. - address type : 1 byte, 2 word.
  29. - data type : 1 byte, 2 word.
  30. - cam_vio-supply : should contain regulator to be used for the IO vdd.
  31. - qcom,cam-vreg-name : should specify the regulator name to be used for
  32. this eeprom.
  33. - qcom,cam-vreg-type : should specify the regulator type to be used for
  34. this eeprom.
  35. - qcom,cam-vreg-min-voltage : should specify minimum voltage level
  36. for eeprom in uV.
  37. - qcom,cam-vreg-max-voltage : should specify maximum voltage level
  38. for eeprom in uV.
  39. - qcom,cam-vreg-op-mode : should specify current level for eeprom in uA.
  40. - qcom,gpio-no-mux : should specify the gpio mux type.
  41. - gpios : should specify the gpios to be used for the eeprom.
  42. - qcom,gpio-reset : should specify the reset gpio index.
  43. - qcom,gpio-standby : should specify the standby gpio index.
  44. - qcom,gpio-req-tbl-num : should specify the gpio table index.
  45. - qcom,gpio-req-tbl-flags : should specify the gpio functions.
  46. - qcom,gpio-req-tbl-label : should specify the gpio labels.
  47. - qcom,cam-power-seq-type : should specify the power on sequence types.
  48. - qcom,cam-power-seq-val : should specify the power on sequence values.
  49. - qcom,cam-power-seq-cfg-val : should specify the power on sequence config
  50. values.
  51. - qcom,cam-power-seq-delay : should specify the power on sequence delay
  52. time in ms.
  53. Optional properties:
  54. - qcom,pageen%d : number %d page enable reg size, start address, address type,
  55. data, data type, delay in ms. size 0 stand for not used.
  56. - cam_vdig-supply : should contain regulator to be used for the digital vdd.
  57. - qcom,saddr%d : property should specify the slave address for block (%d).
  58. Optional properties -EEPROM Camera Multimodule
  59. - qcom,mm-data-support - Camera Multimodule data capability flag.
  60. - qcom,mm-data-compressed - Camera Multimodule data compresion flag.
  61. - qcom,mm-data-offset - Camera Multimodule data start offset.
  62. - qcom,mm-data-size - Camera Multimodule data size.
  63. Example:
  64. eeprom0: qcom,eeprom@60 {
  65. cell-index = <0>;
  66. reg = <0x60 0x0>;
  67. qcom,eeprom-name = "msm_eeprom";
  68. compatible = "qcom,eeprom";
  69. qcom,slave-addr = <0x60>;
  70. qcom,cci-master = <0>;
  71. qcom,num-blocks = <2>;
  72. qcom,page0 = <1 0x0100 2 0x01 1 1>;
  73. qcom,poll0 = <0 0x0 2 0 1 1>;
  74. qcom,mem0 = <0 0x0 2 0 1 0>;
  75. qcom,page1 = <1 0x0200 2 0x8 1 1>;
  76. qcom,pageen1 = <1 0x0202 2 0x01 1 10>;
  77. qcom,poll1 = <0 0x0 2 0 1 1>;
  78. qcom,mem1 = <32 0x3000 2 0 1 0>;
  79. qcom,saddr1 = <0x62>;
  80. qcom,mm-data-support;
  81. qcom,mm-data-compressed;
  82. qcom,mm-data-offset = 0;
  83. qcom,mm-data-size = 0;
  84. cam_vdig-supply = <&pm8226_l5>;
  85. cam_vio-supply = <&pm8226_lvs1>;
  86. qcom,cam-vreg-name = "cam_vdig", "cam_vio";
  87. qcom,cam-vreg-type = <0 1>;
  88. qcom,cam-vreg-min-voltage = <1200000 0>;
  89. qcom,cam-vreg-max-voltage = <1200000 0>;
  90. qcom,cam-vreg-op-mode = <200000 0>;
  91. qcom,gpio-no-mux = <0>;
  92. gpios = <&msmgpio 26 0>,
  93. <&msmgpio 37 0>,
  94. <&msmgpio 36 0>;
  95. qcom,gpio-reset = <1>;
  96. qcom,gpio-standby = <2>;
  97. qcom,gpio-req-tbl-num = <0 1 2>;
  98. qcom,gpio-req-tbl-flags = <1 0 0>;
  99. qcom,gpio-req-tbl-label = "CAMIF_MCLK",
  100. "CAM_RESET1",
  101. "CAM_STANDBY";
  102. qcom,cam-power-seq-type = "sensor_vreg",
  103. "sensor_vreg", "sensor_clk",
  104. "sensor_gpio", "sensor_gpio";
  105. qcom,cam-power-seq-val = "cam_vdig",
  106. "cam_vio", "sensor_cam_mclk",
  107. "sensor_gpio_reset",
  108. "sensor_gpio_standby";
  109. qcom,cam-power-seq-cfg-val = <1 1 24000000 1 1>;
  110. qcom,cam-power-seq-delay = <1 1 5 5 10>;
  111. };