xref: /openbmc/linux/Documentation/devicetree/bindings/input/dlg,da7280.txt (revision cdd38c5f1ce4398ec58fec95904b75824daab7b5)
1*4f3c429eSRoy ImDialog Semiconductor DA7280 Haptics bindings
2*4f3c429eSRoy Im
3*4f3c429eSRoy ImRequired properties:
4*4f3c429eSRoy Im- compatible: Should be "dlg,da7280".
5*4f3c429eSRoy Im- reg: Specifies the I2C slave address.
6*4f3c429eSRoy Im
7*4f3c429eSRoy Im- interrupt-parent : Specifies the phandle of the interrupt controller to
8*4f3c429eSRoy Im  which the IRQs from DA7280 are delivered to.
9*4f3c429eSRoy Im
10*4f3c429eSRoy Im- dlg,actuator-type: Set Actuator type. it should be one of:
11*4f3c429eSRoy Im  "LRA" - Linear Resonance Actuator type.
12*4f3c429eSRoy Im  "ERM-bar" - Bar type Eccentric Rotating Mass.
13*4f3c429eSRoy Im  "ERM-coin" - Coin type Eccentric Rotating Mass.
14*4f3c429eSRoy Im
15*4f3c429eSRoy Im- dlg,const-op-mode: Haptic operation mode for FF_CONSTANT.
16*4f3c429eSRoy Im  Possible values:
17*4f3c429eSRoy Im	1 - Direct register override(DRO) mode triggered by i2c(default),
18*4f3c429eSRoy Im	2 - PWM data source mode controlled by PWM duty,
19*4f3c429eSRoy Im- dlg,periodic-op-mode: Haptic operation mode for FF_PERIODIC.
20*4f3c429eSRoy Im  Possible values:
21*4f3c429eSRoy Im	1 - Register triggered waveform memory(RTWM) mode, the pattern
22*4f3c429eSRoy Im	    assigned to the PS_SEQ_ID played as much times as PS_SEQ_LOOP,
23*4f3c429eSRoy Im	2 - Edge triggered waveform memory(ETWM) mode, external GPI(N)
24*4f3c429eSRoy Im	    control are required to enable/disable and it needs to keep
25*4f3c429eSRoy Im	    device enabled by sending magnitude (X > 0),
26*4f3c429eSRoy Im	    the pattern is assigned to the GPI(N)_SEQUENCE_ID below.
27*4f3c429eSRoy Im	The default value is 1 for both of the operation modes.
28*4f3c429eSRoy Im	For more details, please see the datasheet.
29*4f3c429eSRoy Im
30*4f3c429eSRoy Im- dlg,nom-microvolt: Nominal actuator voltage rating.
31*4f3c429eSRoy Im  Valid values: 0 - 6000000.
32*4f3c429eSRoy Im- dlg,abs-max-microvolt: Absolute actuator maximum voltage rating.
33*4f3c429eSRoy Im  Valid values: 0 - 6000000.
34*4f3c429eSRoy Im- dlg,imax-microamp: Actuator max current rating.
35*4f3c429eSRoy Im  Valid values: 0 - 252000.
36*4f3c429eSRoy Im  Default: 130000.
37*4f3c429eSRoy Im- dlg,impd-micro-ohms: the impedance of the actuator in micro ohms.
38*4f3c429eSRoy Im  Valid values: 0 - 1500000000.
39*4f3c429eSRoy Im
40*4f3c429eSRoy ImOptional properties:
41*4f3c429eSRoy Im- pwms : phandle to the physical PWM(Pulse Width Modulation) device.
42*4f3c429eSRoy Im  PWM properties should be named "pwms". And number of cell is different
43*4f3c429eSRoy Im  for each pwm device.
44*4f3c429eSRoy Im  (See Documentation/devicetree/bindings/pwm/pwm.txt
45*4f3c429eSRoy Im   for further information relating to pwm properties)
46*4f3c429eSRoy Im
47*4f3c429eSRoy Im- dlg,ps-seq-id: the PS_SEQ_ID(pattern ID in waveform memory inside chip)
48*4f3c429eSRoy Im  to play back when RTWM-MODE is enabled.
49*4f3c429eSRoy Im  Valid range: 0 - 15.
50*4f3c429eSRoy Im- dlg,ps-seq-loop: the PS_SEQ_LOOP, Number of times the pre-stored sequence
51*4f3c429eSRoy Im  pointed to by PS_SEQ_ID or GPI(N)_SEQUENCE_ID is repeated.
52*4f3c429eSRoy Im  Valid range: 0 - 15.
53*4f3c429eSRoy Im- dlg,gpiN-seq-id: the GPI(N)_SEQUENCE_ID, pattern to play
54*4f3c429eSRoy Im  when gpi0 is triggered, 'N' must be 0 - 2.
55*4f3c429eSRoy Im  Valid range: 0 - 15.
56*4f3c429eSRoy Im- dlg,gpiN-mode: the pattern mode which can select either
57*4f3c429eSRoy Im  "Single-pattern" or "Multi-pattern", 'N' must be 0 - 2.
58*4f3c429eSRoy Im- dlg,gpiN-polarity: gpiN polarity which can be chosen among
59*4f3c429eSRoy Im  "Rising-edge", "Falling-edge" and "Both-edge",
60*4f3c429eSRoy Im  'N' must be 0 - 2
61*4f3c429eSRoy Im  Haptic will work by this edge option in case of ETWM mode.
62*4f3c429eSRoy Im
63*4f3c429eSRoy Im- dlg,resonant-freq-hz: use in case of LRA.
64*4f3c429eSRoy Im  the frequency range: 50 - 300.
65*4f3c429eSRoy Im  Default: 205.
66*4f3c429eSRoy Im
67*4f3c429eSRoy Im- dlg,bemf-sens-enable: Enable for internal loop computations.
68*4f3c429eSRoy Im- dlg,freq-track-enable: Enable for resonant frequency tracking.
69*4f3c429eSRoy Im- dlg,acc-enable: Enable for active acceleration.
70*4f3c429eSRoy Im- dlg,rapid-stop-enable: Enable for rapid stop.
71*4f3c429eSRoy Im- dlg,amp-pid-enable: Enable for the amplitude PID.
72*4f3c429eSRoy Im- dlg,mem-array: Customized waveform memory(patterns) data downloaded to
73*4f3c429eSRoy Im  the device during initialization. This is an array of 100 values(u8).
74*4f3c429eSRoy Im
75*4f3c429eSRoy ImFor further information, see device datasheet.
76*4f3c429eSRoy Im
77*4f3c429eSRoy Im======
78*4f3c429eSRoy Im
79*4f3c429eSRoy ImExample:
80*4f3c429eSRoy Im
81*4f3c429eSRoy Im	haptics: da7280-haptics@4a {
82*4f3c429eSRoy Im		compatible = "dlg,da7280";
83*4f3c429eSRoy Im		reg = <0x4a>;
84*4f3c429eSRoy Im		interrupt-parent = <&gpio6>;
85*4f3c429eSRoy Im		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
86*4f3c429eSRoy Im		dlg,actuator-type = "LRA";
87*4f3c429eSRoy Im		dlg,dlg,const-op-mode = <1>;
88*4f3c429eSRoy Im		dlg,dlg,periodic-op-mode = <1>;
89*4f3c429eSRoy Im		dlg,nom-microvolt = <2000000>;
90*4f3c429eSRoy Im		dlg,abs-max-microvolt = <2000000>;
91*4f3c429eSRoy Im		dlg,imax-microamp = <170000>;
92*4f3c429eSRoy Im		dlg,resonant-freq-hz = <180>;
93*4f3c429eSRoy Im		dlg,impd-micro-ohms = <10500000>;
94*4f3c429eSRoy Im		dlg,freq-track-enable;
95*4f3c429eSRoy Im		dlg,rapid-stop-enable;
96*4f3c429eSRoy Im		dlg,mem-array = <
97*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
98*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
99*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
100*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
101*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
102*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
103*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
104*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
105*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
106*4f3c429eSRoy Im		  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
107*4f3c429eSRoy Im		>;
108*4f3c429eSRoy Im	};
109