181 lines
7.6 KiB
Plaintext
181 lines
7.6 KiB
Plaintext
|
Qualcomm Technologies PNP Flash LED
|
||
|
|
||
|
QPNP (Qualcomm Technologies Plug N Play) Flash LED (Light
|
||
|
Emitting Diode) driver is used to provide illumination to
|
||
|
camera sensor when background light is dim to capture good
|
||
|
picture. It can also be used for flashlight/torch application.
|
||
|
It is part of PMIC on Qualcomm Technologies reference platforms.
|
||
|
The PMIC is connected to the host processor via SPMI bus.
|
||
|
|
||
|
Required properties:
|
||
|
- compatible : should be "qcom,qpnp-flash-led"
|
||
|
- reg : base address and size for flash LED modules
|
||
|
|
||
|
Optional properties:
|
||
|
- qcom,headroom : headroom to use. Values should be 250, 300,
|
||
|
400 and 500 in mV.
|
||
|
- qcom,startup-dly : delay before flashing after flash executed.
|
||
|
Values should 10, 32, 64, and 128 in us.
|
||
|
- qcom,clamp-curr : current to clamp at when voltage droop happens.
|
||
|
Values are in integer from 0 to 1000 inclusive,
|
||
|
indicating 0 to 1000 mA.
|
||
|
- qcom,self-check-enabled : boolean type. self fault check enablement
|
||
|
- qcom,thermal-derate-enabled : boolean type. derate enablement when module
|
||
|
temperature reaches threshold
|
||
|
- qcom,thermal-derate-threshold : thermal threshold for derate. Values
|
||
|
should be 95, 105, 115, 125 in C.
|
||
|
- qcom,thermal-derate-rate : derate rate when module temperature
|
||
|
reaches threshold. Values should be
|
||
|
"1_PERCENT", "1P25_PERCENT", "2_PERCENT",
|
||
|
"2P5_PERCENT", "5_PERCENT" in string.
|
||
|
- qcom,current-ramp-enabled : boolean type. stepped current ramp enablement
|
||
|
- qcom,ramp-up-step : current ramp up rate. Values should be
|
||
|
"0P2US", "0P4US", "0P8US", "1P6US", "3P3US",
|
||
|
"6P7US", "13P5US", "27US".
|
||
|
- qcom,ramp-dn-step : current ramp down rate. Values should be
|
||
|
"0P2US", "0P4US", "0P8US", "1P6US", "3P3US",
|
||
|
"6P7US", "13P5US", "27US".
|
||
|
- qcom,vph-pwr-droop-enabled : boolean type. VPH power droop enablement. Enablement
|
||
|
allows current clamp when phone power drops below
|
||
|
pre-determined threshold
|
||
|
- qcom,vph-pwr-droop-threshold : VPH power threshold for module to clamp current.
|
||
|
Values are 2500 - 3200 in mV with 100 mV steps.
|
||
|
- qcom,vph-pwr-droop-debounce-time : debounce time for module to confirm a voltage
|
||
|
droop is happening. Values are 0, 10, 32, 64
|
||
|
in us.
|
||
|
- qcom,pmic-charger-support : Boolean type. This tells if flash utilizes charger boost
|
||
|
support
|
||
|
- qcom,headroom-sense-ch0-enabled: Boolean type. This configures headroom sensing enablement
|
||
|
for LED channel 0
|
||
|
- qcom,headroom-sense-ch1-enabled: Boolean type. This configures headroom sensing enablement
|
||
|
for LED channel 1
|
||
|
- qcom,power-detect-enabled : Boolean type. This enables driver to get maximum flash LED
|
||
|
current at current battery level to avoid intensity clamp
|
||
|
when battery voltage is low
|
||
|
- qcom,otst2-moduled-enabled : Boolean type. This enables driver to enable MASK to support
|
||
|
OTST2 connection.
|
||
|
- qcom,follow-otst2-rb-disabled : Boolean type. This allows driver to reset/deset module.
|
||
|
By default, driver resets module. This entry allows driver to
|
||
|
bypass reset module sequence.
|
||
|
- qcom,die-current-derate-enabled: Boolean type. This enables driver to get maximum flash LED
|
||
|
current, based on PMIC die temperature threshold to
|
||
|
avoid significant current derate from hardware. This property
|
||
|
is not needed if PMIC is older than PMI8994v2.0.
|
||
|
- qcom,die-temp-vadc : VADC channel source for flash LED. This property is not
|
||
|
needed if PMIC is older than PMI8994v2.0.
|
||
|
- qcom,die-temp-threshold : Integer type array for PMIC die temperature threshold.
|
||
|
Array should have at least one value. Values should be in
|
||
|
celcius. This property is not needed if PMIC is older than
|
||
|
PMI8994v2.0.
|
||
|
- qcom,die-temp-derate-current : Integer type arrray for PMIC die temperature derate
|
||
|
current. Array should have at least one value. Values
|
||
|
should be in mA. This property is not needed if PMIC is older
|
||
|
than PMI8994v2.0.
|
||
|
|
||
|
Required properties inside child node. Chile node contains settings for each individual LED.
|
||
|
Each LED hardware needs a node for itself and a switch node to control brightness.
|
||
|
For the purpose of turning on/off LED and better regulator control, "led:switch" node
|
||
|
is introduced. "led:switch" acquires several existing properties from other nodes for
|
||
|
operational simplification. For backward compatibility purpose, switch node can be optional:
|
||
|
- label : type of led that will be used, either "flash" or "torch".
|
||
|
- qcom,led-name : name of the LED. Accepted values are "led:flash_0",
|
||
|
"led:flash_1", "led:torch_0", "led:torch_1"
|
||
|
- qcom,default-led-trigger : trigger for the camera flash and torch. Accepted values are
|
||
|
"flash0_trigger", "flash1_trigger", "torch0_trigger", torch1_trigger"
|
||
|
- qcom,id : enumerated ID for each physical LED. Accepted values are "0",
|
||
|
"1", etc..
|
||
|
- qcom,max-current : maximum current allowed on this LED. Valid values should be
|
||
|
integer from 0 to 1000 inclusive, indicating 0 to 1000 mA.
|
||
|
- qcom,pmic-revid : PMIC revision id source. This property is needed for PMI8996
|
||
|
revision check.
|
||
|
|
||
|
Optional properties inside child node:
|
||
|
- qcom,current : default current intensity for LED. Accepted values should be
|
||
|
integer from 0 t 1000 inclusive, indicating 0 to 1000 mA.
|
||
|
- qcom,duration : Duration for flash LED. When duration time expires, hardware will turn off
|
||
|
flash LED. Values should be from 10 ms to 1280 ms with 10 ms incremental
|
||
|
step. Not applicable to torch. It is required for LED:SWITCH node to handle
|
||
|
LED used as flash.
|
||
|
- reg<n> : reg<n> (<n> represents number. eg 0,1,2,..) property is to add support for
|
||
|
multiple power sources. It includes two properties regulator-name and max-voltage.
|
||
|
Required property inside regulator node:
|
||
|
- regulator-name : This denotes this node is a regulator node and which
|
||
|
regulator to use.
|
||
|
Optional property inside regulator node:
|
||
|
- max-voltage : This specifies max voltage of regulator. Some switch
|
||
|
or boost regulator does not need this property.
|
||
|
|
||
|
Example:
|
||
|
qcom,leds@d300 {
|
||
|
compatible = "qcom,qpnp-flash-led";
|
||
|
status = "okay";
|
||
|
reg = <0xd300 0x100>;
|
||
|
label = "flash";
|
||
|
qcom,headroom = <500>;
|
||
|
qcom,startup-dly = <128>;
|
||
|
qcom,clamp-curr = <200>;
|
||
|
qcom,pmic-charger-support;
|
||
|
qcom,self-check-enabled;
|
||
|
qcom,thermal-derate-enabled;
|
||
|
qcom,thermal-derate-threshold = <80>;
|
||
|
qcom,thermal-derate-rate = "4_PERCENT";
|
||
|
qcom,current-ramp-enabled;
|
||
|
qcom,ramp_up_step = "27US";
|
||
|
qcom,ramp_dn_step = "27US";
|
||
|
qcom,vph-pwr-droop-enabled;
|
||
|
qcom,vph-pwr-droop-threshold = <3200>;
|
||
|
qcom,vph-pwr-droop-debounce-time = <10>;
|
||
|
qcom,headroom-sense-ch0-enabled;
|
||
|
qcom,headroom-sense-ch1-enabled;
|
||
|
qcom,die-current-derate-enabled;
|
||
|
qcom,die-temp-vadc = <&pmi8994_vadc>;
|
||
|
qcom,die-temp-threshold = <85 80 75 70 65>;
|
||
|
qcom,die-temp-derate-current = <400 800 1200 1600 2000>;
|
||
|
qcom,pmic-revid = <&pmi8994_revid>;
|
||
|
|
||
|
pm8226_flash0: qcom,flash_0 {
|
||
|
label = "flash";
|
||
|
qcom,led-name = "led:flash_0";
|
||
|
qcom,default-led-trigger =
|
||
|
"flash0_trigger";
|
||
|
qcom,max-current = <1000>;
|
||
|
qcom,id = <0>;
|
||
|
qcom,duration = <1280>;
|
||
|
qcom,current = <625>;
|
||
|
};
|
||
|
|
||
|
pm8226_torch: qcom,torch_0 {
|
||
|
label = "torch";
|
||
|
qcom,led-name = "led:torch_0";
|
||
|
qcom,default-led-trigger =
|
||
|
"torch0_trigger";
|
||
|
boost-supply = <&pm8226_chg_boost>;
|
||
|
qcom,max-current = <200>;
|
||
|
qcom,id = <0>;
|
||
|
qcom,current = <120>;
|
||
|
qcom,max-current = <200>;
|
||
|
reg0 {
|
||
|
regulator-name =
|
||
|
"pm8226_chg_boost";
|
||
|
max-voltage = <3600000>;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
pm8226_switch: qcom,switch {
|
||
|
lable = "switch";
|
||
|
qcom,led-name = "led:switch";
|
||
|
qcom,default-led-trigger =
|
||
|
"switch_trigger";
|
||
|
qcom,id = <2>;
|
||
|
qcom,current = <625>;
|
||
|
qcom,duration = <1280>;
|
||
|
qcom,max-current = <1000>;
|
||
|
reg0 {
|
||
|
regulator-name =
|
||
|
"pm8226_chg_boost";
|
||
|
max-voltage = <3600000>;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|