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
|
* Qualcomm Technologies, Inc. MSM FLASH
The MSM camera Flash driver provides the definitions for
enabling and disabling LED Torch/Flash by requesting it to
PMIC/I2C/GPIO based hardware. It provides the functions for
the Client to control the Flash hardware.
=======================================================
Required Node Structure
=======================================================
The Flash device is described in one level of the device node.
======================================
First Level Node - CAM FLASH device
======================================
- compatible
Usage: required
Value type: <string>
Definition: Should be "qcom,camera-flash".
- cell-index
Usage: required
Value type: <u32>
Definition: Should specify the hardware index id.
- reg
Usage: required
Value type: <u32>
Definition: Register values.
- flash-source
Usage: required
Value type: <phandle>
Definition: Should contain array of phandles to Flash source nodes.
- torch-source
Usage: required
Value type: <phandle>
Definition: Should contain array of phandles to torch source nodes.
- switch-source
Usage: Optional
Value type: <phandle>
Definition: Should contain phandle to switch source nodes.
- slave-id
Usage: optional
Value type: <u32>
Definition: should contain i2c slave address, device id address
and expected id read value.
- cci-master
Usage: optional
Value type: <u32>
Definition: should contain i2c master id to be used for this camera
flash.
- max-current
Usage: optional
Value type: <u32>
Definition: Max current in mA supported by flash
- max-duration
Usage: optional
Value type: <u32>
Definition: Max duration in ms flash can glow.
- wled-flash-support
Usage: optional
Value type: <boolean>
Definition: To identity wled flash hardware support.
- gpios
Usage: optional
Value type: <u32>
Definition: should specify the gpios to be used for the flash.
- gpio-req-tbl-num
Usage: optional
Value type: <u32>
Definition: should specify the gpio table index.
- gpio-req-tbl-flags
Usage: optional
Value type: <u32>
Definition: should specify the gpio functions.
- gpio-req-tbl-label
Usage: optional
Value type: <u32>
Definition: should specify the gpio labels.
- gpio-flash-reset
Usage: optional
Value type: <u32>
Definition: should contain index to gpio used by flash's "flash reset" pin.
- gpio-flash-en
Usage: optional
Value type: <u32>
Definition: should contain index to gpio used by flash's "flash enable" pin.
- gpio-flash-now
Usage: optional
Value type: <u32>
Definition: should contain index to gpio used by flash's "flash now" pin.
Example:
led_flash_rear: qcom,camera-flash@0 {
reg = <0x00 0x00>;
cell-index = <0>;
compatible = "qcom,camera-flash";
flash-source = <&pmi8998_flash0 &pmi8998_flash1>;
torch-source = <&pmi8998_torch0 &pmi8998_torch1>;
switch-source = <&pmi8998_switch0>;
wled-flash-support;
qcom,slave-id = <0x00 0x00 0x0011>;
qcom,cci-master = <0>;
gpios = <&msmgpio 23 0>,
<&msmgpio 24 0>;
<&msmgpio 25 0>;
qcom,gpio-flash-reset = <0>;
qcom,gpio-flash-en = <0>;
qcom,gpio-flash-now = <1>;
qcom,gpio-req-tbl-num = <0 1>;
qcom,gpio-req-tbl-flags = <0 0>;
qcom,gpio-req-tbl-label = "FLASH_EN",
"FLASH_NOW";
qcom,max-current = <1500>;
qcom,max-duration = <1200>;
};
|