Back to home page

OSCL-LXR

 
 

    


0001 Dialog Semiconductor DA7280 Haptics bindings
0002 
0003 Required properties:
0004 - compatible: Should be "dlg,da7280".
0005 - reg: Specifies the I2C slave address.
0006 
0007 - interrupt-parent : Specifies the phandle of the interrupt controller to
0008   which the IRQs from DA7280 are delivered to.
0009 
0010 - dlg,actuator-type: Set Actuator type. it should be one of:
0011   "LRA" - Linear Resonance Actuator type.
0012   "ERM-bar" - Bar type Eccentric Rotating Mass.
0013   "ERM-coin" - Coin type Eccentric Rotating Mass.
0014 
0015 - dlg,const-op-mode: Haptic operation mode for FF_CONSTANT.
0016   Possible values:
0017         1 - Direct register override(DRO) mode triggered by i2c(default),
0018         2 - PWM data source mode controlled by PWM duty,
0019 - dlg,periodic-op-mode: Haptic operation mode for FF_PERIODIC.
0020   Possible values:
0021         1 - Register triggered waveform memory(RTWM) mode, the pattern
0022             assigned to the PS_SEQ_ID played as much times as PS_SEQ_LOOP,
0023         2 - Edge triggered waveform memory(ETWM) mode, external GPI(N)
0024             control are required to enable/disable and it needs to keep
0025             device enabled by sending magnitude (X > 0),
0026             the pattern is assigned to the GPI(N)_SEQUENCE_ID below.
0027         The default value is 1 for both of the operation modes.
0028         For more details, please see the datasheet.
0029 
0030 - dlg,nom-microvolt: Nominal actuator voltage rating.
0031   Valid values: 0 - 6000000.
0032 - dlg,abs-max-microvolt: Absolute actuator maximum voltage rating.
0033   Valid values: 0 - 6000000.
0034 - dlg,imax-microamp: Actuator max current rating.
0035   Valid values: 0 - 252000.
0036   Default: 130000.
0037 - dlg,impd-micro-ohms: the impedance of the actuator in micro ohms.
0038   Valid values: 0 - 1500000000.
0039 
0040 Optional properties:
0041 - pwms : phandle to the physical PWM(Pulse Width Modulation) device.
0042   PWM properties should be named "pwms". And number of cell is different
0043   for each pwm device.
0044   (See Documentation/devicetree/bindings/pwm/pwm.txt
0045    for further information relating to pwm properties)
0046 
0047 - dlg,ps-seq-id: the PS_SEQ_ID(pattern ID in waveform memory inside chip)
0048   to play back when RTWM-MODE is enabled.
0049   Valid range: 0 - 15.
0050 - dlg,ps-seq-loop: the PS_SEQ_LOOP, Number of times the pre-stored sequence
0051   pointed to by PS_SEQ_ID or GPI(N)_SEQUENCE_ID is repeated.
0052   Valid range: 0 - 15.
0053 - dlg,gpiN-seq-id: the GPI(N)_SEQUENCE_ID, pattern to play
0054   when gpi0 is triggered, 'N' must be 0 - 2.
0055   Valid range: 0 - 15.
0056 - dlg,gpiN-mode: the pattern mode which can select either
0057   "Single-pattern" or "Multi-pattern", 'N' must be 0 - 2.
0058 - dlg,gpiN-polarity: gpiN polarity which can be chosen among
0059   "Rising-edge", "Falling-edge" and "Both-edge",
0060   'N' must be 0 - 2
0061   Haptic will work by this edge option in case of ETWM mode.
0062 
0063 - dlg,resonant-freq-hz: use in case of LRA.
0064   the frequency range: 50 - 300.
0065   Default: 205.
0066 
0067 - dlg,bemf-sens-enable: Enable for internal loop computations.
0068 - dlg,freq-track-enable: Enable for resonant frequency tracking.
0069 - dlg,acc-enable: Enable for active acceleration.
0070 - dlg,rapid-stop-enable: Enable for rapid stop.
0071 - dlg,amp-pid-enable: Enable for the amplitude PID.
0072 - dlg,mem-array: Customized waveform memory(patterns) data downloaded to
0073   the device during initialization. This is an array of 100 values(u8).
0074 
0075 For further information, see device datasheet.
0076 
0077 ======
0078 
0079 Example:
0080 
0081         haptics: da7280-haptics@4a {
0082                 compatible = "dlg,da7280";
0083                 reg = <0x4a>;
0084                 interrupt-parent = <&gpio6>;
0085                 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
0086                 dlg,actuator-type = "LRA";
0087                 dlg,dlg,const-op-mode = <1>;
0088                 dlg,dlg,periodic-op-mode = <1>;
0089                 dlg,nom-microvolt = <2000000>;
0090                 dlg,abs-max-microvolt = <2000000>;
0091                 dlg,imax-microamp = <170000>;
0092                 dlg,resonant-freq-hz = <180>;
0093                 dlg,impd-micro-ohms = <10500000>;
0094                 dlg,freq-track-enable;
0095                 dlg,rapid-stop-enable;
0096                 dlg,mem-array = <
0097                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0098                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0099                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0100                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0101                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0102                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0103                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0104                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0105                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0106                   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0107                 >;
0108         };