blob: f951b21670124569e8ddaa0313d5c6ab89e0b468 [file] [log] [blame]
Pratap Nirujogi6e759912018-01-17 17:51:17 +05301* Qualcomm Technologies, Inc. MSM EEPROM
2
3EEPROM is an one time programmed(OTP) device that stores the calibration data
4use for camera sensor. It may either be integrated in the sensor module or in
5the sensor itself. As a result, the power, clock and GPIOs may be the same as
6the camera sensor. The following describes the page block map, power supply,
7clock, GPIO and power on sequence properties of the EEPROM device.
8
9Required properties if probe happens from camera daemon:
10- cell-index: eeprom hardware core index
11- compatible :
12 - "qcom,eeprom"
13- reg : offset of eeprom device registers.
14- qcom,cci-master : should specify the cci core index that eeprom use.
15- cam_vio-supply : should contain regulator to be used for the IO vdd.
16- qcom,cam-vreg-name : should specify the regulator name to be used for
17 this eeprom.
18- qcom,cam-vreg-type : should specify the regulator type to be used for
19 this eeprom.
20- qcom,cam-vreg-min-voltage : should specify minimum voltage level
21 for eeprom in uV.
22- qcom,cam-vreg-max-voltage : should specify maximum voltage level
23 for eeprom in uV.
24- qcom,cam-vreg-op-mode : should specify current level for eeprom in uA.
25- qcom,gpio-no-mux : should specify the gpio mux type.
26- gpios : should specify the gpios to be used for the eeprom.
27- qcom,gpio-reset : should specify the reset gpio index.
28- qcom,gpio-standby : should specify the standby gpio index.
29- qcom,gpio-req-tbl-num : should specify the gpio table index.
30- qcom,gpio-req-tbl-flags : should specify the gpio functions.
31- qcom,gpio-req-tbl-label : should specify the gpio labels.
32- qcom,cam-power-seq-type : should specify the power on sequence types.
33- qcom,cam-power-seq-val : should specify the power on sequence values.
34- qcom,cam-power-seq-cfg-val : should specify the power on sequence config
35 values.
36- qcom,cam-power-seq-delay : should specify the power on sequence delay
37 time in ms.
38
39Optional properties:
40- cam_vdig-supply : should contain regulator to be used for the digital vdd.
41
42
43
44Example:
45
46 eeprom0: qcom,eeprom@60 {
47 cell-index = <0>;
48 reg = <0x60 0x0>;
49 compatible = "qcom,eeprom";
50 qcom,cci-master = <0>;
51 cam_vdig-supply = <&pm8226_l5>;
52 cam_vio-supply = <&pm8226_lvs1>;
53 qcom,cam-vreg-name = "cam_vdig", "cam_vio";
54 qcom,cam-vreg-type = <0 1>;
55 qcom,cam-vreg-min-voltage = <1200000 0>;
56 qcom,cam-vreg-max-voltage = <1200000 0>;
57 qcom,cam-vreg-op-mode = <200000 0>;
58 qcom,gpio-no-mux = <0>;
59 gpios = <&msmgpio 26 0>,
60 <&msmgpio 37 0>,
61 <&msmgpio 36 0>;
62 qcom,gpio-reset = <1>;
63 qcom,gpio-standby = <2>;
64 qcom,gpio-req-tbl-num = <0 1 2>;
65 qcom,gpio-req-tbl-flags = <1 0 0>;
66 qcom,gpio-req-tbl-label = "CAMIF_MCLK",
67 "CAM_RESET1",
68 "CAM_STANDBY";
69 qcom,cam-power-seq-type = "sensor_vreg",
70 "sensor_vreg", "sensor_clk",
71 "sensor_gpio", "sensor_gpio";
72 qcom,cam-power-seq-val = "cam_vdig",
73 "cam_vio", "sensor_cam_mclk",
74 "sensor_gpio_reset",
75 "sensor_gpio_standby";
76 qcom,cam-power-seq-cfg-val = <1 1 24000000 1 1>;
77 qcom,cam-power-seq-delay = <1 1 5 5 10>;
78 };
79
80
81
82Required properties if eeprom probe is kernel probe:
83- cell-index: eeprom hardware core index
84- compatible :
85 - "qcom,eeprom"
86- reg : offset of eeprom device registers.
87- qcom,eeprom-name : should specify relevant names of the eeprom module
88 library.
89- qcom,slave-addr : should specify the slave address of the eeprom.
90- qcom,cci-master : should specify the cci core index that eeprom use.
91- qcom,num-blocks : should specify the total block number that eeprom contains,
92 every block should contains page poll and mem.
93- qcom,page%d : number %d page size, start address, address type, data,
94 data type, delay in ms. size 0 stand for non-paged.
95 - address type : 1 byte, 2 word.
96 - data type : 1 byte, 2 word.
97- qcom,poll%d : number %d poll size, poll reg address, address type, data,
98 data type, delay in ms. size 0 stand for not used.
99 - address type : 1 byte, 2 word.
100 - data type : 1 byte, 2 word.
101- qcom,mem%d : number %d memory size, start address, address type, data,
102 data type, delay in ms. size 0 stand for not used.
103 - address type : 1 byte, 2 word.
104 - data type : 1 byte, 2 word.
105- cam_vio-supply : should contain regulator to be used for the IO vdd.
106- qcom,cam-vreg-name : should specify the regulator name to be used for
107 this eeprom.
108- qcom,cam-vreg-type : should specify the regulator type to be used for
109 this eeprom.
110- qcom,cam-vreg-min-voltage : should specify minimum voltage level
111 for eeprom in uV.
112- qcom,cam-vreg-max-voltage : should specify maximum voltage level
113 for eeprom in uV.
114- qcom,cam-vreg-op-mode : should specify current level for eeprom in uA.
115- pinctrl-names : should specify the pin control groups followed by
116 the definition of each group
117- qcom,gpio-no-mux : should specify the gpio mux type.
118- gpios : should specify the gpios to be used for the eeprom.
119- qcom,gpio-reset : should specify the reset gpio index.
120- qcom,gpio-standby : should specify the standby gpio index.
121- qcom,gpio-req-tbl-num : should specify the gpio table index.
122- qcom,gpio-req-tbl-flags : should specify the gpio functions.
123- qcom,gpio-req-tbl-label : should specify the gpio labels.
124- qcom,cam-power-seq-type : should specify the power on sequence types.
125- qcom,cam-power-seq-val : should specify the power on sequence values.
126- qcom,cam-power-seq-cfg-val : should specify the power on sequence config
127 values.
128- qcom,cam-power-seq-delay : should specify the power on sequence delay
129 time in ms.
130
131Optional properties:
132- qcom,pageen%d : number %d page enable reg size, start address, address type,
133 data, data type, delay in ms. size 0 stand for not used.
134- cam_vdig-supply : should contain regulator to be used for the digital vdd.
135- qcom,saddr%d : property should specify the slave address for block (%d).
136- qcom,i2c-freq-mode : property should specify the I2C speed mode.
137
138Optional properties -EEPROM Camera Multimodule
139- qcom,cmm-data-support - Camera MultiModule data capability flag.
140- qcom,cmm-data-compressed - Camera MultiModule data compression flag.
141- qcom,cmm-data-offset - Camera MultiModule data start offset.
142- qcom,cmm-data-size - Camera MultiModule data size.
143
144
145
146Example:
147
148 eeprom0: qcom,eeprom@60 {
149 cell-index = <0>;
150 reg = <0x60 0x0>;
151 qcom,eeprom-name = "msm_eeprom";
152 compatible = "qcom,eeprom";
153 qcom,slave-addr = <0x60>;
154 qcom,cci-master = <0>;
155 qcom,num-blocks = <2>;
156 qcom,page0 = <1 0x0100 2 0x01 1 1>;
157 qcom,poll0 = <0 0x0 2 0 1 1>;
158 qcom,mem0 = <0 0x0 2 0 1 0>;
159 qcom,page1 = <1 0x0200 2 0x8 1 1>;
160 qcom,pageen1 = <1 0x0202 2 0x01 1 10>;
161 qcom,poll1 = <0 0x0 2 0 1 1>;
162 qcom,mem1 = <32 0x3000 2 0 1 0>;
163 qcom,saddr1 = <0x62>;
164
165 qcom,cmm-data-support;
166 qcom,cmm-data-compressed;
167 qcom,cmm-data-offset = <0>;
168 qcom,cmm-data-size = <0>;
169
170 cam_vdig-supply = <&pm8226_l5>;
171 cam_vio-supply = <&pm8226_lvs1>;
172 qcom,cam-vreg-name = "cam_vdig", "cam_vio";
173 qcom,cam-vreg-type = <0 1>;
174 qcom,cam-vreg-min-voltage = <1200000 0>;
175 qcom,cam-vreg-max-voltage = <1200000 0>;
176 qcom,cam-vreg-op-mode = <200000 0>;
177 qcom,gpio-no-mux = <0>;
178 gpios = <&msmgpio 26 0>,
179 <&msmgpio 37 0>,
180 <&msmgpio 36 0>;
181 qcom,gpio-reset = <1>;
182 qcom,gpio-standby = <2>;
183 qcom,gpio-req-tbl-num = <0 1 2>;
184 qcom,gpio-req-tbl-flags = <1 0 0>;
185 qcom,gpio-req-tbl-label = "CAMIF_MCLK",
186 "CAM_RESET1",
187 "CAM_STANDBY";
188 qcom,cam-power-seq-type = "sensor_vreg",
189 "sensor_vreg", "sensor_clk",
190 "sensor_gpio", "sensor_gpio";
191 qcom,cam-power-seq-val = "cam_vdig",
192 "cam_vio", "sensor_cam_mclk",
193 "sensor_gpio_reset",
194 "sensor_gpio_standby";
195 qcom,cam-power-seq-cfg-val = <1 1 24000000 1 1>;
196 qcom,cam-power-seq-delay = <1 1 5 5 10>;
197 };
198
199