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