xref: /freebsd/sys/contrib/device-tree/Bindings/input/dlg,da7280.yaml (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
1*ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*ae5de77eSEmmanuel Vadot%YAML 1.2
3*ae5de77eSEmmanuel Vadot---
4*ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/input/dlg,da7280.yaml#
5*ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*ae5de77eSEmmanuel Vadot
7*ae5de77eSEmmanuel Vadottitle: Dialog Semiconductor DA7280 Low Power High-Definition Haptic Driver
8*ae5de77eSEmmanuel Vadot
9*ae5de77eSEmmanuel Vadotmaintainers:
10*ae5de77eSEmmanuel Vadot  - Roy Im <roy.im.opensource@diasemi.com>
11*ae5de77eSEmmanuel Vadot
12*ae5de77eSEmmanuel Vadotproperties:
13*ae5de77eSEmmanuel Vadot  compatible:
14*ae5de77eSEmmanuel Vadot    const: dlg,da7280
15*ae5de77eSEmmanuel Vadot
16*ae5de77eSEmmanuel Vadot  reg:
17*ae5de77eSEmmanuel Vadot    maxItems: 1
18*ae5de77eSEmmanuel Vadot    description: I2C address of the device.
19*ae5de77eSEmmanuel Vadot
20*ae5de77eSEmmanuel Vadot  interrupts:
21*ae5de77eSEmmanuel Vadot    maxItems: 1
22*ae5de77eSEmmanuel Vadot
23*ae5de77eSEmmanuel Vadot  dlg,actuator-type:
24*ae5de77eSEmmanuel Vadot    enum:
25*ae5de77eSEmmanuel Vadot      - LRA # Linear Resonance Actuator type
26*ae5de77eSEmmanuel Vadot      - ERM-bar # Bar type Eccentric Rotating Mass
27*ae5de77eSEmmanuel Vadot      - ERM-coin # Coin type Eccentric Rotating Mass
28*ae5de77eSEmmanuel Vadot
29*ae5de77eSEmmanuel Vadot  dlg,const-op-mode:
30*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
31*ae5de77eSEmmanuel Vadot    enum:
32*ae5de77eSEmmanuel Vadot      - 1 # Direct register override (DRO) mode triggered by i2c (default)
33*ae5de77eSEmmanuel Vadot      - 2 # PWM data source mode controlled by PWM duty
34*ae5de77eSEmmanuel Vadot    description:
35*ae5de77eSEmmanuel Vadot      Haptic operation mode for FF_CONSTANT
36*ae5de77eSEmmanuel Vadot
37*ae5de77eSEmmanuel Vadot  dlg,periodic-op-mode:
38*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
39*ae5de77eSEmmanuel Vadot    enum:
40*ae5de77eSEmmanuel Vadot      - 1 # Register triggered waveform memory(RTWM) mode, the pattern
41*ae5de77eSEmmanuel Vadot          # assigned to the PS_SEQ_ID played as much times as PS_SEQ_LOOP
42*ae5de77eSEmmanuel Vadot      - 2 # Edge triggered waveform memory(ETWM) mode, external GPI(N)
43*ae5de77eSEmmanuel Vadot          # control are required to enable/disable and it needs to keep
44*ae5de77eSEmmanuel Vadot          # device enabled by sending magnitude (X > 0),
45*ae5de77eSEmmanuel Vadot          # the pattern is assigned to the GPI(N)_SEQUENCE_ID below
46*ae5de77eSEmmanuel Vadot    default: 1
47*ae5de77eSEmmanuel Vadot    description:
48*ae5de77eSEmmanuel Vadot      Haptic operation mode for FF_PERIODIC.
49*ae5de77eSEmmanuel Vadot      The default value is 1 for both of the operation modes.
50*ae5de77eSEmmanuel Vadot      For more details, please see the datasheet
51*ae5de77eSEmmanuel Vadot
52*ae5de77eSEmmanuel Vadot  dlg,nom-microvolt:
53*ae5de77eSEmmanuel Vadot    minimum: 0
54*ae5de77eSEmmanuel Vadot    maximum: 6000000
55*ae5de77eSEmmanuel Vadot    description:
56*ae5de77eSEmmanuel Vadot      Nominal actuator voltage rating
57*ae5de77eSEmmanuel Vadot
58*ae5de77eSEmmanuel Vadot  dlg,abs-max-microvolt:
59*ae5de77eSEmmanuel Vadot    minimum: 0
60*ae5de77eSEmmanuel Vadot    maximum: 6000000
61*ae5de77eSEmmanuel Vadot    description:
62*ae5de77eSEmmanuel Vadot      Absolute actuator maximum voltage rating
63*ae5de77eSEmmanuel Vadot
64*ae5de77eSEmmanuel Vadot  dlg,imax-microamp:
65*ae5de77eSEmmanuel Vadot    minimum: 0
66*ae5de77eSEmmanuel Vadot    maximum: 252000
67*ae5de77eSEmmanuel Vadot    default: 130000
68*ae5de77eSEmmanuel Vadot    description:
69*ae5de77eSEmmanuel Vadot      Actuator max current rating
70*ae5de77eSEmmanuel Vadot
71*ae5de77eSEmmanuel Vadot  dlg,impd-micro-ohms:
72*ae5de77eSEmmanuel Vadot    minimum: 0
73*ae5de77eSEmmanuel Vadot    maximum: 1500000000
74*ae5de77eSEmmanuel Vadot    description:
75*ae5de77eSEmmanuel Vadot      Impedance of the actuator
76*ae5de77eSEmmanuel Vadot
77*ae5de77eSEmmanuel Vadot  pwms:
78*ae5de77eSEmmanuel Vadot    maxItems: 1
79*ae5de77eSEmmanuel Vadot
80*ae5de77eSEmmanuel Vadot  dlg,ps-seq-id:
81*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
82*ae5de77eSEmmanuel Vadot    minimum: 0
83*ae5de77eSEmmanuel Vadot    maximum: 15
84*ae5de77eSEmmanuel Vadot    description:
85*ae5de77eSEmmanuel Vadot      The PS_SEQ_ID(pattern ID in waveform memory inside chip)
86*ae5de77eSEmmanuel Vadot      to play back when RTWM-MODE is enabled
87*ae5de77eSEmmanuel Vadot
88*ae5de77eSEmmanuel Vadot  dlg,ps-seq-loop:
89*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
90*ae5de77eSEmmanuel Vadot    minimum: 0
91*ae5de77eSEmmanuel Vadot    maximum: 15
92*ae5de77eSEmmanuel Vadot    description:
93*ae5de77eSEmmanuel Vadot      The PS_SEQ_LOOP, Number of times the pre-stored sequence pointed to by
94*ae5de77eSEmmanuel Vadot      PS_SEQ_ID or GPI(N)_SEQUENCE_ID is repeated
95*ae5de77eSEmmanuel Vadot
96*ae5de77eSEmmanuel Vadot  dlg,gpi0-seq-id:
97*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
98*ae5de77eSEmmanuel Vadot    minimum: 0
99*ae5de77eSEmmanuel Vadot    maximum: 15
100*ae5de77eSEmmanuel Vadot    description:
101*ae5de77eSEmmanuel Vadot      the GPI0_SEQUENCE_ID, pattern to play when gpi0 is triggered
102*ae5de77eSEmmanuel Vadot
103*ae5de77eSEmmanuel Vadot  dlg,gpi1-seq-id:
104*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
105*ae5de77eSEmmanuel Vadot    minimum: 0
106*ae5de77eSEmmanuel Vadot    maximum: 15
107*ae5de77eSEmmanuel Vadot    description:
108*ae5de77eSEmmanuel Vadot      the GPI1_SEQUENCE_ID, pattern to play when gpi1 is triggered
109*ae5de77eSEmmanuel Vadot
110*ae5de77eSEmmanuel Vadot  dlg,gpi2-seq-id:
111*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
112*ae5de77eSEmmanuel Vadot    minimum: 0
113*ae5de77eSEmmanuel Vadot    maximum: 15
114*ae5de77eSEmmanuel Vadot    description:
115*ae5de77eSEmmanuel Vadot      the GPI2_SEQUENCE_ID, pattern to play when gpi2 is triggered
116*ae5de77eSEmmanuel Vadot
117*ae5de77eSEmmanuel Vadot  dlg,gpi0-mode:
118*ae5de77eSEmmanuel Vadot    enum:
119*ae5de77eSEmmanuel Vadot      - Single-pattern
120*ae5de77eSEmmanuel Vadot      - Multi-pattern
121*ae5de77eSEmmanuel Vadot    description:
122*ae5de77eSEmmanuel Vadot      Pattern mode for gpi0
123*ae5de77eSEmmanuel Vadot
124*ae5de77eSEmmanuel Vadot  dlg,gpi1-mode:
125*ae5de77eSEmmanuel Vadot    enum:
126*ae5de77eSEmmanuel Vadot      - Single-pattern
127*ae5de77eSEmmanuel Vadot      - Multi-pattern
128*ae5de77eSEmmanuel Vadot    description:
129*ae5de77eSEmmanuel Vadot      Pattern mode for gpi1
130*ae5de77eSEmmanuel Vadot
131*ae5de77eSEmmanuel Vadot  dlg,gpi2-mode:
132*ae5de77eSEmmanuel Vadot    enum:
133*ae5de77eSEmmanuel Vadot      - Single-pattern
134*ae5de77eSEmmanuel Vadot      - Multi-pattern
135*ae5de77eSEmmanuel Vadot    description:
136*ae5de77eSEmmanuel Vadot      Pattern mode for gpi2
137*ae5de77eSEmmanuel Vadot
138*ae5de77eSEmmanuel Vadot  dlg,gpi0-polarity:
139*ae5de77eSEmmanuel Vadot    enum:
140*ae5de77eSEmmanuel Vadot      - Rising-edge
141*ae5de77eSEmmanuel Vadot      - Falling-edge
142*ae5de77eSEmmanuel Vadot      - Both-edge
143*ae5de77eSEmmanuel Vadot    description:
144*ae5de77eSEmmanuel Vadot      gpi0 polarity, Haptic will work by this edge option in case of ETWM mode
145*ae5de77eSEmmanuel Vadot
146*ae5de77eSEmmanuel Vadot  dlg,gpi1-polarity:
147*ae5de77eSEmmanuel Vadot    enum:
148*ae5de77eSEmmanuel Vadot      - Rising-edge
149*ae5de77eSEmmanuel Vadot      - Falling-edge
150*ae5de77eSEmmanuel Vadot      - Both-edge
151*ae5de77eSEmmanuel Vadot    description:
152*ae5de77eSEmmanuel Vadot      gpi1 polarity, Haptic will work by this edge option in case of ETWM mode
153*ae5de77eSEmmanuel Vadot
154*ae5de77eSEmmanuel Vadot  dlg,gpi2-polarity:
155*ae5de77eSEmmanuel Vadot    enum:
156*ae5de77eSEmmanuel Vadot      - Rising-edge
157*ae5de77eSEmmanuel Vadot      - Falling-edge
158*ae5de77eSEmmanuel Vadot      - Both-edge
159*ae5de77eSEmmanuel Vadot    description:
160*ae5de77eSEmmanuel Vadot      gpi2 polarity, Haptic will work by this edge option in case of ETWM mode
161*ae5de77eSEmmanuel Vadot
162*ae5de77eSEmmanuel Vadot  dlg,resonant-freq-hz:
163*ae5de77eSEmmanuel Vadot    minimum: 50
164*ae5de77eSEmmanuel Vadot    maximum: 300
165*ae5de77eSEmmanuel Vadot    default: 205
166*ae5de77eSEmmanuel Vadot
167*ae5de77eSEmmanuel Vadot  dlg,bemf-sens-enable:
168*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
169*ae5de77eSEmmanuel Vadot    description:
170*ae5de77eSEmmanuel Vadot      Enable for internal loop computations
171*ae5de77eSEmmanuel Vadot
172*ae5de77eSEmmanuel Vadot  dlg,freq-track-enable:
173*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
174*ae5de77eSEmmanuel Vadot    description:
175*ae5de77eSEmmanuel Vadot      Enable for resonant frequency tracking
176*ae5de77eSEmmanuel Vadot
177*ae5de77eSEmmanuel Vadot  dlg,acc-enable:
178*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
179*ae5de77eSEmmanuel Vadot    description:
180*ae5de77eSEmmanuel Vadot      Enable for active acceleration
181*ae5de77eSEmmanuel Vadot
182*ae5de77eSEmmanuel Vadot  dlg,rapid-stop-enable:
183*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
184*ae5de77eSEmmanuel Vadot    description:
185*ae5de77eSEmmanuel Vadot      Enable for rapid stop
186*ae5de77eSEmmanuel Vadot
187*ae5de77eSEmmanuel Vadot  dlg,amp-pid-enable:
188*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
189*ae5de77eSEmmanuel Vadot    description:
190*ae5de77eSEmmanuel Vadot      Enable for the amplitude PID
191*ae5de77eSEmmanuel Vadot
192*ae5de77eSEmmanuel Vadot  dlg,mem-array:
193*ae5de77eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
194*ae5de77eSEmmanuel Vadot    minItems: 100
195*ae5de77eSEmmanuel Vadot    description:
196*ae5de77eSEmmanuel Vadot      Customized waveform memory (patterns) data downloaded to the device during initialization.
197*ae5de77eSEmmanuel Vadot      Each entry value must be included between 0 and 255.
198*ae5de77eSEmmanuel Vadot
199*ae5de77eSEmmanuel Vadotrequired:
200*ae5de77eSEmmanuel Vadot  - compatible
201*ae5de77eSEmmanuel Vadot  - reg
202*ae5de77eSEmmanuel Vadot  - interrupts
203*ae5de77eSEmmanuel Vadot  - dlg,actuator-type
204*ae5de77eSEmmanuel Vadot  - dlg,const-op-mode
205*ae5de77eSEmmanuel Vadot  - dlg,periodic-op-mode
206*ae5de77eSEmmanuel Vadot  - dlg,nom-microvolt
207*ae5de77eSEmmanuel Vadot  - dlg,abs-max-microvolt
208*ae5de77eSEmmanuel Vadot  - dlg,imax-microamp
209*ae5de77eSEmmanuel Vadot  - dlg,impd-micro-ohms
210*ae5de77eSEmmanuel Vadot
211*ae5de77eSEmmanuel VadotadditionalProperties: false
212*ae5de77eSEmmanuel Vadot
213*ae5de77eSEmmanuel Vadotexamples:
214*ae5de77eSEmmanuel Vadot  - |
215*ae5de77eSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
216*ae5de77eSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
217*ae5de77eSEmmanuel Vadot
218*ae5de77eSEmmanuel Vadot    i2c {
219*ae5de77eSEmmanuel Vadot        #address-cells = <1>;
220*ae5de77eSEmmanuel Vadot        #size-cells = <0>;
221*ae5de77eSEmmanuel Vadot
222*ae5de77eSEmmanuel Vadot        haptics@4a {
223*ae5de77eSEmmanuel Vadot            compatible = "dlg,da7280";
224*ae5de77eSEmmanuel Vadot            reg = <0x4a>;
225*ae5de77eSEmmanuel Vadot            interrupt-parent = <&gpio6>;
226*ae5de77eSEmmanuel Vadot            interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
227*ae5de77eSEmmanuel Vadot            dlg,actuator-type = "LRA";
228*ae5de77eSEmmanuel Vadot            dlg,const-op-mode = <1>;
229*ae5de77eSEmmanuel Vadot            dlg,periodic-op-mode = <1>;
230*ae5de77eSEmmanuel Vadot            dlg,nom-microvolt = <2000000>;
231*ae5de77eSEmmanuel Vadot            dlg,abs-max-microvolt = <2000000>;
232*ae5de77eSEmmanuel Vadot            dlg,imax-microamp = <170000>;
233*ae5de77eSEmmanuel Vadot            dlg,resonant-freq-hz = <180>;
234*ae5de77eSEmmanuel Vadot            dlg,impd-micro-ohms = <10500000>;
235*ae5de77eSEmmanuel Vadot            dlg,freq-track-enable;
236*ae5de77eSEmmanuel Vadot            dlg,rapid-stop-enable;
237*ae5de77eSEmmanuel Vadot            dlg,mem-array = <0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
238*ae5de77eSEmmanuel Vadot                             0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
239*ae5de77eSEmmanuel Vadot                             0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
240*ae5de77eSEmmanuel Vadot                             0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
241*ae5de77eSEmmanuel Vadot                             0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
242*ae5de77eSEmmanuel Vadot                             0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
243*ae5de77eSEmmanuel Vadot                             0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
244*ae5de77eSEmmanuel Vadot                             0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
245*ae5de77eSEmmanuel Vadot                             0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
246*ae5de77eSEmmanuel Vadot                             0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00>;
247*ae5de77eSEmmanuel Vadot        };
248*ae5de77eSEmmanuel Vadot    };
249