Merge "ARM: dts: qcom: add flash/torch LEDs on PM8350C for Lahaina platforms"

This commit is contained in:
qctecmdr 2020-02-13 20:44:10 -08:00 • committed by Gerrit - the friendly Code Review server
commit 63228cd0cc
5 changed files with 280 additions and 0 deletions

View file

@ -77,3 +77,23 @@
status = "ok"
};
&pm8350b_haptics {
status = "ok"
};
&pm8350c_switch0 {
qcom,led-mask = <9>; /* Channels 1 & 4 */
};
&pm8350c_switch1 {
qcom,led-mask = <6>; /* Channels 2 & 3 */
};
&pm8350c_switch2 {
qcom,led-mask = <15>; /* All Channels */
};
&pm8350c_flash {
status = "ok"
};

View file

@ -78,3 +78,22 @@
status = "ok"
};
&pm8350b_haptics {
status = "ok"
};
&pm8350c_switch0 {
qcom,led-mask = <9>; /* Channels 1 & 4 */
};
&pm8350c_switch1 {
qcom,led-mask = <6>; /* Channels 2 & 3 */
};
&pm8350c_switch2 {
qcom,led-mask = <15>; /* All Channels */
};
&pm8350c_flash {
status = "ok"
};

View file

@ -27,3 +27,18 @@
};
};
&pm8350c_switch0 {
qcom,led-mask = <9>; /* Channels 1 & 4 */
};
&pm8350c_switch1 {
qcom,led-mask = <6>; /* Channels 2 & 3 */
};
&pm8350c_switch2 {
qcom,led-mask = <15>; /* All Channels */
};
&pm8350c_flash {
status = "ok"
};

View file

@ -1,5 +1,6 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/input/qcom,hv-haptics.h>
&spmi_bus {
#address-cells = <2>;
@ -28,6 +29,123 @@
interrupt-controller;
#interrupt-cells = <2>;
};
pm8350b_haptics: qcom,hv-haptics@f000 {
compatible = "qcom,hv-haptics";
reg = <0xf000>, <0xf100>;
interrupts = <0x3 0xf0 0x1 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "fifo-empty";
qcom,vmax-mv = <3600>;
qcom,brake-mode = <BRAKE_CLOSE_LOOP>;
qcom,brake-pattern = /bits/ 8 <0xff 0x3f 0x1f>;
qcom,lra-period-us = <6667>;
qcom,drv-sig-shape = <WF_SINE>;
qcom,brake-sig-shape = <WF_SINE>;
status = "disabled";
effect_0 {
/* CLICK */
qcom,effect-id = <0>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern-data = <0x01f S_PERIOD_T_LRA 0>,
<0x03f S_PERIOD_T_LRA 0>,
<0x05f S_PERIOD_T_LRA 0>,
<0x07f S_PERIOD_T_LRA 0>,
<0x17f S_PERIOD_T_LRA 0>,
<0x15f S_PERIOD_T_LRA 0>,
<0x13f S_PERIOD_T_LRA 0>,
<0x11f S_PERIOD_T_LRA 0>;
qcom,wf-pattern-period-us = <6667>;
qcom,wf-brake-pattern = /bits/ 8 <0x0 0x0 0x0>;
qcom,wf-pattern-preload;
qcom,wf-auto-res-disable;
};
effect_1 {
/* DOUBLE_CLICK */
qcom,effect-id = <1>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern-data = <0x01f S_PERIOD_T_LRA 0>,
<0x03f S_PERIOD_T_LRA 0>,
<0x05f S_PERIOD_T_LRA 0>,
<0x07f S_PERIOD_T_LRA 0>,
<0x17f S_PERIOD_T_LRA 0>,
<0x15f S_PERIOD_T_LRA 0>,
<0x13f S_PERIOD_T_LRA 0>,
<0x11f S_PERIOD_T_LRA 0>;
qcom,wf-pattern-period-us = <6667>;
qcom,wf-brake-pattern = /bits/ 8 <0x0 0x0 0x0>;
qcom,wf-auto-res-disable;
};
effect_2 {
/* TICK */
qcom,effect-id = <2>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern-data = <0x01f S_PERIOD_T_LRA 0>,
<0x03f S_PERIOD_T_LRA 0>,
<0x05f S_PERIOD_T_LRA 0>,
<0x07f S_PERIOD_T_LRA 0>,
<0x17f S_PERIOD_T_LRA 0>,
<0x15f S_PERIOD_T_LRA 0>,
<0x13f S_PERIOD_T_LRA 0>,
<0x11f S_PERIOD_T_LRA 0>;
qcom,wf-pattern-period-us = <6667>;
qcom,wf-brake-pattern = /bits/ 8 <0x0 0x0 0x0>;
qcom,wf-auto-res-disable;
};
effect_3 {
/* THUD */
qcom,effect-id = <3>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern-data = <0x01f S_PERIOD_T_LRA 0>,
<0x03f S_PERIOD_T_LRA 0>,
<0x05f S_PERIOD_T_LRA 0>,
<0x07f S_PERIOD_T_LRA 0>,
<0x17f S_PERIOD_T_LRA 0>,
<0x15f S_PERIOD_T_LRA 0>,
<0x13f S_PERIOD_T_LRA 0>,
<0x11f S_PERIOD_T_LRA 0>;
qcom,wf-pattern-period-us = <6667>;
qcom,wf-brake-pattern = /bits/ 8 <0x0 0x0 0x0>;
qcom,wf-auto-res-disable;
};
effect_4 {
/* POP */
qcom,effect-id = <4>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern-data = <0x01f S_PERIOD_T_LRA 0>,
<0x03f S_PERIOD_T_LRA 0>,
<0x05f S_PERIOD_T_LRA 0>,
<0x07f S_PERIOD_T_LRA 0>,
<0x17f S_PERIOD_T_LRA 0>,
<0x15f S_PERIOD_T_LRA 0>,
<0x13f S_PERIOD_T_LRA 0>,
<0x11f S_PERIOD_T_LRA 0>;
qcom,wf-pattern-period-us = <6667>;
qcom,wf-brake-pattern = /bits/ 8 <0x0 0x0 0x0>;
qcom,wf-auto-res-disable;
};
effect_5 {
/* HEAVY CLICK */
qcom,effect-id = <5>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern-data = <0x01f S_PERIOD_T_LRA 0>,
<0x03f S_PERIOD_T_LRA 0>,
<0x05f S_PERIOD_T_LRA 0>,
<0x07f S_PERIOD_T_LRA 0>,
<0x17f S_PERIOD_T_LRA 0>,
<0x15f S_PERIOD_T_LRA 0>,
<0x13f S_PERIOD_T_LRA 0>,
<0x11f S_PERIOD_T_LRA 0>;
qcom,wf-pattern-period-us = <6667>;
qcom,wf-brake-pattern = /bits/ 8 <0x0 0x0 0x0>;
qcom,wf-auto-res-disable;
};
};
};
};

View file

@ -70,6 +70,114 @@
linux,default-trigger = "timer";
};
};
pm8350c_flash: qcom,flash_led@ee00 {
compatible = "qcom,pm8350c-flash-led";
reg = <0xee00>;
interrupts = <0x2 0xee 0x0 IRQ_TYPE_EDGE_RISING>,
<0x2 0xee 0x3 IRQ_TYPE_EDGE_RISING>,
<0x2 0xee 0x4 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "led-fault-irq",
"all-ramp-down-done-irq",
"all-ramp-up-done-irq";
qcom,thermal-derate-current = <200 500>;
qcom,hw-strobe-gpios = <&pm8350c_gpios 1 0>;
status = "disabled";
pm8350c_flash0: qcom,flash_0 {
label = "flash";
qcom,led-name = "led:flash_0";
qcom,max-current-ma = <1500>;
qcom,default-led-trigger = "flash0_trigger";
qcom,id = <0>;
qcom,duration-ms = <1280>;
qcom,ires-ua = <12500>;
};
pm8350c_flash1: qcom,flash_1 {
label = "flash";
qcom,led-name = "led:flash_1";
qcom,max-current-ma = <1500>;
qcom,default-led-trigger = "flash1_trigger";
qcom,id = <1>;
qcom,duration-ms = <1280>;
qcom,ires-ua = <12500>;
};
pm8350c_flash2: qcom,flash_2 {
label = "flash";
qcom,led-name = "led:flash_2";
qcom,max-current-ma = <1500>;
qcom,default-led-trigger = "flash2_trigger";
qcom,id = <2>;
qcom,duration-ms = <1280>;
qcom,ires-ua = <12500>;
};
pm8350c_flash3: qcom,flash_3 {
label = "flash";
qcom,led-name = "led:flash_3";
qcom,max-current-ma = <1500>;
qcom,default-led-trigger = "flash3_trigger";
qcom,id = <3>;
qcom,duration-ms = <1280>;
qcom,ires-ua = <12500>;
};
pm8350c_torch0: qcom,torch_0 {
label = "torch";
qcom,led-name = "led:torch_0";
qcom,max-current-ma = <500>;
qcom,default-led-trigger = "torch0_trigger";
qcom,id = <0>;
qcom,ires-ua = <12500>;
};
pm8350c_torch1: qcom,torch_1 {
label = "torch";
qcom,led-name = "led:torch_1";
qcom,max-current-ma = <500>;
qcom,default-led-trigger = "torch1_trigger";
qcom,id = <1>;
qcom,ires-ua = <12500>;
};
pm8350c_torch2: qcom,torch_2 {
label = "torch";
qcom,led-name = "led:torch_2";
qcom,max-current-ma = <500>;
qcom,default-led-trigger = "torch2_trigger";
qcom,id = <2>;
qcom,ires-ua = <12500>;
};
pm8350c_torch3: qcom,torch_3 {
label = "torch";
qcom,led-name = "led:torch_3";
qcom,max-current-ma = <500>;
qcom,default-led-trigger = "torch3_trigger";
qcom,id = <3>;
qcom,ires-ua = <12500>;
};
pm8350c_switch0: qcom,led_switch_0 {
label = "switch";
qcom,led-name = "led:switch_0";
qcom,default-led-trigger = "switch0_trigger";
};
pm8350c_switch1: qcom,led_switch_1 {
label = "switch";
qcom,led-name = "led:switch_1";
qcom,default-led-trigger = "switch1_trigger";
};
pm8350c_switch2: qcom,led_switch_2 {
label = "switch";
qcom,led-name = "led:switch_2";
qcom,default-led-trigger = "switch2_trigger";
};
};
};
};