summaryrefslogtreecommitdiff
path: root/bindings/msm-cam-eeprom.txt
blob: d77f337a9e3c0659db6966ee77025a9b7a8bb857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
* Qualcomm Technologies, Inc. MSM EEPROM

EEPROM is a one time programmed(OTP) device that stores the calibration data
use for camera sensor. It may either be integrated in the sensor module or in
the sensor itself. As a result, the power, clock and GPIOs may be the same as
the camera sensor. The following describes the page block map, power supply,
clock, GPIO and power on sequence properties of the EEPROM device.

=======================================================
Required Node Structure if probe happens from userspace
=======================================================
The EEPROM device is described in one level of the device node.

======================================
First Level Node - CAM EEPROM device
======================================
- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,eeprom".

- cell-index
  Usage: required
  Value type: <u32>
  Definition: Should specify the hardware index id.

- reg
  Usage: required
  Value type: <u32>
  Definition: Register values.

- regulator-names
  Usage: required
  Value type: <string>
  Definition: Name of the regulator resources for EEPROM HW.

- xxxx-supply
  Usage: required
  Value type: <phandle>
  Definition: Regulator reference corresponding to the names listed in
		"regulator-names".

- rgltr-cntrl-support
  Usage: required
  Value type: <bool>
  Definition: This property specifies if the regulator control is supported
		e.g. rgltr-min-voltage.

- rgltr-min-voltage
  Usage: required
  Value type: <u32>
  Definition: should contain minimum voltage level for regulators
		mentioned in regulator-names property.

- rgltr-max-voltage
  Usage: required
  Value type: <u32>
  Definition: should contain maximum voltage level for regulators
		mentioned in regulator-names property.

- rgltr-load-current
  Usage: required
  Value type: <u32>
  Definition: should contain the maximum current in microamps required for
		the regulators mentioned in regulator-names property.

- gpio-no-mux
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio mux type.

- gpios
  Usage: required
  Value type: <phandle>
  Definition: should specify the gpios to be used for the eeprom.

- gpio-reset
  Usage: required
  Value type: <u32>
  Definition: should specify the reset gpio index.

- gpio-standby
  Usage: required
  Value type: <u32>
  Definition: should specify the standby gpio index.

- gpio-req-tbl-num
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio table index.

- gpio-req-tbl-flags
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio functions.

- gpio-req-tbl-label
  Usage: required
  Value type: <string>
  Definition: should specify the gpio labels.

- sensor-position
  Usage: required
  Value type: <u32>
  Definition: should contain the mount angle of the camera sensor.

- cci-device
  Usage: required
  Value type: <u32>
  Definition: should contain i2c device id to be used for this camera
	sensor

- cci-master
  Usage: required
  Value type: <u32>
  Definition: should contain i2c master id to be used for this camera
		sensor.

- sensor-mode
  Usage: required
  Value type: <u32>
  Definition: should contain sensor mode supported.

- clock-names
  Usage: required
  Value type: <string>
  Definition: List of clock names required for EEPROM HW.

- clocks
  Usage: required
  Value type: <phandle>
  Definition: List of clocks used for EEPROM HW.

- clock-cntl-level
  Usage: required
  Value type: <string>
  Definition: says what all different clock levels eeprom node has.

- clock-rates
  Usage: required
  Value type: <u32>
  Definition: List of clocks rates.

Example:

	eeprom0: qcom,eeprom@0 {
	        cell-index = <0>;
		reg = <0x0>;
		compatible = "qcom,eeprom";
		cam_vdig-supply = <&pm8998_l5>;
		cam_vio-supply = <&pm8998_lvs1>;
		regulator-names = "cam_vdig", "cam_vio";
		rgltr-cntrl-support;
		rgltr-min-voltage = <1200000 0>;
		rgltr-max-voltage = <1200000 0>;
		rgltr-load-current = <0 80000 105000 0>;
		gpio-no-mux = <0>;
		gpios = <&msmgpio 26 0>,
			<&msmgpio 37 0>,
			<&msmgpio 36 0>;
		gpio-reset = <1>;
		gpio-standby = <2>;
		gpio-req-tbl-num = <0 1 2>;
		gpio-req-tbl-flags = <1 0 0>;
		gpio-req-tbl-label = "CAMIF_MCLK",
			"CAM_RESET1",
			"CAM_STANDBY";
		sensor-position = <0>;
		sensor-mode = <0>;
		cci-device = <0>;
		cci-master = <0>;
		status = "ok";
		clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
		clock-names = "cam_clk";
		clock-cntl-level = "turbo";
		clock-rates = <24000000>;
	};

=======================================================
Required Node Structure if probe happens from kernel
=======================================================
The EEPROM device is described in one level of the device node.

======================================
First Level Node - CAM EEPROM device
======================================
- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,eeprom".

- cell-index
  Usage: required
  Value type: <u32>
  Definition: Should specify the hardware index id.

- reg
  Usage: required
  Value type: <u32>
  Definition: Register values.

- qcom,eeprom-name
  Usage: required
  Value type: <string>
  Definition: Name of the EEPROM HW.

- qcom,slave-addr
  Usage: required
  Value type: <u32>
  Definition: Slave address of the EEPROM HW.

- qcom,num-blocks
  Usage: required
  Value type: <u32>
  Definition: Total block number that eeprom contains.

- qcom,pageX
  Usage: required
  Value type: <u32>
  Definition: List of values specifying page size, start address,
		address type, data, data type, delay in ms.
		size 0 stand for non-paged.

- qcom,pollX
  Usage: required
  Value type: <u32>
  Definition: List of values specifying poll size, poll reg address,
		address type, data, data type, delay in ms.
		size 0 stand for not used.

- qcom,memX
  Usage: required
  Value type: <u32>
  Definition: List of values specifying memory size, start address,
		address type, data, data type, delay in ms.
		size 0 stand for not used.

- qcom,saddrX
  Usage: required
  Value type: <u32>
  Definition: property should specify the slave address for block (%d).

- regulator-names
  Usage: required
  Value type: <string>
  Definition: Name of the regulator resources for EEPROM HW.

- qcom,cmm-data-support
  Usage: required
  Value type: <u32>
  Definition: Camera MultiModule data capability flag..

- qcom,cmm-data-compressed
  Usage: required
  Value type: <u32>
  Definition: Camera MultiModule data compression flag.

- qcom,cmm-data-offset
  Usage: required
  Value type: <u32>
  Definition: Camera MultiModule data start offset.

- qcom,cmm-data-size
  Usage: required
  Value type: <u32>
  Definition: Camera MultiModule data size.

- qcom,cam-power-seq-type
  Usage: required
  Value type: <string>
  Definition: should specify the power on sequence types.

- qcom,cam-power-seq-val
  Usage: required
  Value type: <string>
  Definition: should specify the power on sequence values.

- qcom,cam-power-seq-cfg-val
  Usage: required
  Value type: <u32>
  Definition: should specify the power on sequence config values.

- qcom,cam-power-seq-delay
  Usage: required
  Value type: <u32>
  Definition: should specify the power on sequence delay time in ms.

- spiop-read
  Usage: required
  Value type: <u32>
  Definition: this array provides SPI read operation related data.

- spiop-readseq
  Usage: required
  Value type: <u32>
  Definition: this array provides SPI read sequence operation realted data.

- spiop-queryid
  Usage: required
  Value type: <u32>
  Definition: this array provides SPI query eeprom id operation related data.

- spiop-pprog:
  Usage: required
  Value type: <u32>
  Definition: this array provides SPI page program operation related data.

- spiop-wenable
  Usage: required
  Value type: <u32>
  Definition: this array provides SPI write enable operation related data.

- spiop-readst
  Usage: required
  Value type: <u32>
  Definition: this array provides SPI read destination operation related data.

- spiop-erase
  Usage: required
  Value type: <u32>
  Definition: this array provides SPI erase operation related data.

- eeprom-idx
  Usage: required
  Value type: <u32>
  Definition: this array provides eeprom id realted data.

- xxxx-supply
  Usage: required
  Value type: <phandle>
  Definition: Regulator reference corresponding to the names listed in
		"regulator-names".

- rgltr-cntrl-support
  Usage: required
  Value type: <bool>
  Definition: This property specifies if the regulator control is supported
		e.g. rgltr-min-voltage.

- rgltr-min-voltage
  Usage: required
  Value type: <u32>
  Definition: should contain minimum voltage level for regulators
		mentioned in regulator-names property.

- rgltr-max-voltage
  Usage: required
  Value type: <u32>
  Definition: should contain maximum voltage level for regulators
		mentioned in regulator-names property.

- rgltr-load-current
  Usage: required
  Value type: <u32>
  Definition: should contain the maximum current in microamps required for
		the regulators mentioned in regulator-names property.

- gpio-no-mux
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio mux type.

- gpios
  Usage: required
  Value type: <phandle>
  Definition: should specify the gpios to be used for the eeprom.

- gpio-reset
  Usage: required
  Value type: <u32>
  Definition: should specify the reset gpio index.

- gpio-standby
  Usage: required
  Value type: <u32>
  Definition: should specify the standby gpio index.

- gpio-req-tbl-num
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio table index.

- gpio-req-tbl-flags
  Usage: required
  Value type: <u32>
  Definition: should specify the gpio functions.

- gpio-req-tbl-label
  Usage: required
  Value type: <string>
  Definition: should specify the gpio labels.

- sensor-position
  Usage: required
  Value type: <u32>
  Definition: should contain the mount angle of the camera sensor.

- cci-device
  Usage: required
  Value type: <u32>
  Definition: should contain i2c device id to be used for this camera
	sensor

- cci-master
  Usage: required
  Value type: <u32>
  Definition: should contain i2c master id to be used for this camera
		sensor.

- sensor-mode
  Usage: required
  Value type: <u32>
  Definition: should contain sensor mode supported.

- clock-cntl-level
  Usage: required
  Value type: <string>
  Definition:  says what all different clock levels eeprom node has.

- clock-names
  Usage: required
  Value type: <string>
  Definition: List of clock names required for EEPROM HW.

- clocks
  Usage: required
  Value type: <phandle>
  Definition: List of clocks used for EEPROM HW.

- clock-rates
  Usage: required
  Value type: <u32>
  Definition: List of clocks rates.

Example:

	eeprom0: qcom,eeprom@0 {
		cell-index = <0>;
		reg = <0x0>;
		qcom,eeprom-name = "msm_eeprom";
		eeprom-id0 = <0xF8 0x15>;
		eeprom-id1 = <0xEF 0x15>;
		eeprom-id2 = <0xC2 0x36>;
		eeprom-id3 = <0xC8 0x15>;
		compatible = "qcom,eeprom";
		qcom,slave-addr = <0x60>;
		qcom,num-blocks = <2>;
		qcom,page0 = <1 0x100 2 0x01 1 1>;
		qcom,poll0 = <0 0x0 2 0 1 1>;
		qcom,mem0 = <0 0x0 2 0 1 0>;
		qcom,page1 = <1 0x0200 2 0x8 1 1>;
		qcom,pageen1 = <1 0x0202 2 0x01 1 10>;
		qcom,poll1 = <0 0x0 2 0 1 1>;
		qcom,mem1 = <32 0x3000 2 0 1 0>;
		qcom,saddr1 = <0x62>;
		qcom,cmm-data-support;
		qcom,cmm-data-compressed;
		qcom,cmm-data-offset = <0>;
		qcom,cmm-data-size = <0>;
		spiop-read = <0x03 3 0 0 0>;
		spiop-readseq = <0x03 3 0 0 0>;
		spiop-queryid = <0x90 3 0 0 0>;
		spiop-pprog = <0x02 3 0 3 100>;
		spiop-wenable = <0x06 0 0 0 0>;
		spiop-readst = <0x05 0 0 0 0>;
		spiop-erase = <0x20 3 0 10 100>;
		qcom,cam-power-seq-type = "sensor_vreg",
			"sensor_vreg", "sensor_clk",
			"sensor_gpio", "sensor_gpio";
		qcom,cam-power-seq-val = "cam_vdig",
			"cam_vio", "sensor_cam_mclk",
			"sensor_gpio_reset",
			"sensor_gpio_standby";
		qcom,cam-power-seq-cfg-val = <1 1 24000000 1 1>;
		qcom,cam-power-seq-delay = <1 1 5 5 10>;
		cam_vdig-supply = <&pm8998_l5>;
		cam_vio-supply = <&pm8998_lvs1>;
		regulator-names = "cam_vdig", "cam_vio";
		rgltr-cntrl-support;
		rgltr-min-voltage = <1200000 0>;
		rgltr-max-voltage = <1200000 0>;
		rgltr-load-current = <0 80000 105000 0>;
		qcom,gpio-no-mux = <0>;
		gpios = <&msmgpio 26 0>,
			<&msmgpio 37 0>,
			<&msmgpio 36 0>;
		gpio-reset = <1>;
		gpio-standby = <2>;
		gpio-req-tbl-num = <0 1 2>;
		gpio-req-tbl-flags = <1 0 0>;
		gpio-req-tbl-label = "CAMIF_MCLK",
			"CAM_RESET1",
			"CAM_STANDBY";
		sensor-position = <0>;
		sensor-mode = <0>;
		cci-device = <0>;
		cci-master = <0>;
		status = "ok";
		clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
		clock-cntl-level = "turbo";
		clock-names = "cam_clk";
		clock-rates = <24000000>;
	};