Path: blob/master/Documentation/devicetree/bindings/input/dlg,da7280.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/input/dlg,da7280.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Dialog Semiconductor DA7280 Low Power High-Definition Haptic Driver78maintainers:9- Roy Im <roy.im.opensource@diasemi.com>1011properties:12compatible:13const: dlg,da72801415reg:16maxItems: 117description: I2C address of the device.1819interrupts:20maxItems: 12122dlg,actuator-type:23enum:24- LRA # Linear Resonance Actuator type25- ERM-bar # Bar type Eccentric Rotating Mass26- ERM-coin # Coin type Eccentric Rotating Mass2728dlg,const-op-mode:29$ref: /schemas/types.yaml#/definitions/uint3230enum:31- 1 # Direct register override (DRO) mode triggered by i2c (default)32- 2 # PWM data source mode controlled by PWM duty33description:34Haptic operation mode for FF_CONSTANT3536dlg,periodic-op-mode:37$ref: /schemas/types.yaml#/definitions/uint3238enum:39- 1 # Register triggered waveform memory(RTWM) mode, the pattern40# assigned to the PS_SEQ_ID played as much times as PS_SEQ_LOOP41- 2 # Edge triggered waveform memory(ETWM) mode, external GPI(N)42# control are required to enable/disable and it needs to keep43# device enabled by sending magnitude (X > 0),44# the pattern is assigned to the GPI(N)_SEQUENCE_ID below45default: 146description:47Haptic operation mode for FF_PERIODIC.48The default value is 1 for both of the operation modes.49For more details, please see the datasheet5051dlg,nom-microvolt:52minimum: 053maximum: 600000054description:55Nominal actuator voltage rating5657dlg,abs-max-microvolt:58minimum: 059maximum: 600000060description:61Absolute actuator maximum voltage rating6263dlg,imax-microamp:64minimum: 065maximum: 25200066default: 13000067description:68Actuator max current rating6970dlg,impd-micro-ohms:71minimum: 072maximum: 150000000073description:74Impedance of the actuator7576pwms:77maxItems: 17879dlg,ps-seq-id:80$ref: /schemas/types.yaml#/definitions/uint3281minimum: 082maximum: 1583description:84The PS_SEQ_ID(pattern ID in waveform memory inside chip)85to play back when RTWM-MODE is enabled8687dlg,ps-seq-loop:88$ref: /schemas/types.yaml#/definitions/uint3289minimum: 090maximum: 1591description:92The PS_SEQ_LOOP, Number of times the pre-stored sequence pointed to by93PS_SEQ_ID or GPI(N)_SEQUENCE_ID is repeated9495dlg,gpi0-seq-id:96$ref: /schemas/types.yaml#/definitions/uint3297minimum: 098maximum: 1599description:100the GPI0_SEQUENCE_ID, pattern to play when gpi0 is triggered101102dlg,gpi1-seq-id:103$ref: /schemas/types.yaml#/definitions/uint32104minimum: 0105maximum: 15106description:107the GPI1_SEQUENCE_ID, pattern to play when gpi1 is triggered108109dlg,gpi2-seq-id:110$ref: /schemas/types.yaml#/definitions/uint32111minimum: 0112maximum: 15113description:114the GPI2_SEQUENCE_ID, pattern to play when gpi2 is triggered115116dlg,gpi0-mode:117enum:118- Single-pattern119- Multi-pattern120description:121Pattern mode for gpi0122123dlg,gpi1-mode:124enum:125- Single-pattern126- Multi-pattern127description:128Pattern mode for gpi1129130dlg,gpi2-mode:131enum:132- Single-pattern133- Multi-pattern134description:135Pattern mode for gpi2136137dlg,gpi0-polarity:138enum:139- Rising-edge140- Falling-edge141- Both-edge142description:143gpi0 polarity, Haptic will work by this edge option in case of ETWM mode144145dlg,gpi1-polarity:146enum:147- Rising-edge148- Falling-edge149- Both-edge150description:151gpi1 polarity, Haptic will work by this edge option in case of ETWM mode152153dlg,gpi2-polarity:154enum:155- Rising-edge156- Falling-edge157- Both-edge158description:159gpi2 polarity, Haptic will work by this edge option in case of ETWM mode160161dlg,resonant-freq-hz:162minimum: 50163maximum: 300164default: 205165166dlg,bemf-sens-enable:167$ref: /schemas/types.yaml#/definitions/flag168description:169Enable for internal loop computations170171dlg,freq-track-enable:172$ref: /schemas/types.yaml#/definitions/flag173description:174Enable for resonant frequency tracking175176dlg,acc-enable:177$ref: /schemas/types.yaml#/definitions/flag178description:179Enable for active acceleration180181dlg,rapid-stop-enable:182$ref: /schemas/types.yaml#/definitions/flag183description:184Enable for rapid stop185186dlg,amp-pid-enable:187$ref: /schemas/types.yaml#/definitions/flag188description:189Enable for the amplitude PID190191dlg,mem-array:192$ref: /schemas/types.yaml#/definitions/uint32-array193minItems: 100194description:195Customized waveform memory (patterns) data downloaded to the device during initialization.196Each entry value must be included between 0 and 255.197198required:199- compatible200- reg201- interrupts202- dlg,actuator-type203- dlg,const-op-mode204- dlg,periodic-op-mode205- dlg,nom-microvolt206- dlg,abs-max-microvolt207- dlg,imax-microamp208- dlg,impd-micro-ohms209210additionalProperties: false211212examples:213- |214#include <dt-bindings/gpio/gpio.h>215#include <dt-bindings/interrupt-controller/irq.h>216217i2c {218#address-cells = <1>;219#size-cells = <0>;220221haptics@4a {222compatible = "dlg,da7280";223reg = <0x4a>;224interrupt-parent = <&gpio6>;225interrupts = <11 IRQ_TYPE_LEVEL_LOW>;226dlg,actuator-type = "LRA";227dlg,const-op-mode = <1>;228dlg,periodic-op-mode = <1>;229dlg,nom-microvolt = <2000000>;230dlg,abs-max-microvolt = <2000000>;231dlg,imax-microamp = <170000>;232dlg,resonant-freq-hz = <180>;233dlg,impd-micro-ohms = <10500000>;234dlg,freq-track-enable;235dlg,rapid-stop-enable;236dlg,mem-array = <0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x002370x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x002380x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x002390x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x002400x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x002410x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x002420x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x002430x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x002440x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x002450x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00>;246};247};248249250