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