git-subtree-dir: qcom/camera git-subtree-mainline:8263fe365e
git-subtree-split:a1378b76f0
133 lines
3.3 KiB
Plaintext
133 lines
3.3 KiB
Plaintext
* 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-flash0 {
|
|
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>;
|
|
};
|