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