mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
ARM: dts: qcom: add haptics on PM8350B for Lahaina CDP/MTP
Add PM8350B haptics device with some predefined effects to support vibrator on Lahaina CDP and MTP. Since Lahaina QRD uses a different LRA, haptics configuration (Vmax, LRA period) should be made separately. Change-Id: I57b8db73114c696b72f49a44908c1311b8ebcafd
This commit is contained in:
parent
1351fca9db
commit
8409de07b6
3 changed files with 125 additions and 0 deletions
|
|
@ -76,3 +76,7 @@
|
|||
|
||||
status = "ok"
|
||||
};
|
||||
|
||||
&pm8350b_haptics {
|
||||
status = "ok"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -77,3 +77,6 @@
|
|||
status = "ok"
|
||||
};
|
||||
|
||||
&pm8350b_haptics {
|
||||
status = "ok"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue