1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*8bab661aSEmmanuel Vadot%YAML 1.2 3*8bab661aSEmmanuel Vadot--- 4*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/input/ti,drv260x.yaml# 5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*8bab661aSEmmanuel Vadot 7*8bab661aSEmmanuel Vadottitle: Texas Instruments - drv260x Haptics driver family 8*8bab661aSEmmanuel Vadot 9*8bab661aSEmmanuel Vadotmaintainers: 10*8bab661aSEmmanuel Vadot - Andrew Davis <afd@ti.com> 11*8bab661aSEmmanuel Vadot 12*8bab661aSEmmanuel Vadotproperties: 13*8bab661aSEmmanuel Vadot compatible: 14*8bab661aSEmmanuel Vadot enum: 15*8bab661aSEmmanuel Vadot - ti,drv2604 16*8bab661aSEmmanuel Vadot - ti,drv2605 17*8bab661aSEmmanuel Vadot - ti,drv2605l 18*8bab661aSEmmanuel Vadot 19*8bab661aSEmmanuel Vadot reg: 20*8bab661aSEmmanuel Vadot maxItems: 1 21*8bab661aSEmmanuel Vadot 22*8bab661aSEmmanuel Vadot vbat-supply: 23*8bab661aSEmmanuel Vadot description: Power supply to the haptic motor 24*8bab661aSEmmanuel Vadot 25*8bab661aSEmmanuel Vadot # TODO: Deprecate 'mode' in favor of differently named property 26*8bab661aSEmmanuel Vadot mode: 27*8bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 28*8bab661aSEmmanuel Vadot description: | 29*8bab661aSEmmanuel Vadot Power up mode of the chip 30*8bab661aSEmmanuel Vadot (defined in include/dt-bindings/input/ti-drv260x.h) 31*8bab661aSEmmanuel Vadot 32*8bab661aSEmmanuel Vadot DRV260X_LRA_MODE 33*8bab661aSEmmanuel Vadot Linear Resonance Actuator mode (Piezoelectric) 34*8bab661aSEmmanuel Vadot 35*8bab661aSEmmanuel Vadot DRV260X_LRA_NO_CAL_MODE 36*8bab661aSEmmanuel Vadot This is a LRA Mode but there is no calibration sequence during init. 37*8bab661aSEmmanuel Vadot And the device is configured for real time playback mode (RTP mode). 38*8bab661aSEmmanuel Vadot 39*8bab661aSEmmanuel Vadot DRV260X_ERM_MODE 40*8bab661aSEmmanuel Vadot Eccentric Rotating Mass mode (Rotary vibrator) 41*8bab661aSEmmanuel Vadot enum: [ 0, 1, 2 ] 42*8bab661aSEmmanuel Vadot 43*8bab661aSEmmanuel Vadot library-sel: 44*8bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 45*8bab661aSEmmanuel Vadot description: | 46*8bab661aSEmmanuel Vadot These are ROM based waveforms pre-programmed into the IC. 47*8bab661aSEmmanuel Vadot This should be set to set the library to use at power up. 48*8bab661aSEmmanuel Vadot (defined in include/dt-bindings/input/ti-drv260x.h) 49*8bab661aSEmmanuel Vadot 50*8bab661aSEmmanuel Vadot DRV260X_LIB_EMPTY - Do not use a pre-programmed library 51*8bab661aSEmmanuel Vadot DRV260X_ERM_LIB_A - Pre-programmed Library 52*8bab661aSEmmanuel Vadot DRV260X_ERM_LIB_B - Pre-programmed Library 53*8bab661aSEmmanuel Vadot DRV260X_ERM_LIB_C - Pre-programmed Library 54*8bab661aSEmmanuel Vadot DRV260X_ERM_LIB_D - Pre-programmed Library 55*8bab661aSEmmanuel Vadot DRV260X_ERM_LIB_E - Pre-programmed Library 56*8bab661aSEmmanuel Vadot DRV260X_ERM_LIB_F - Pre-programmed Library 57*8bab661aSEmmanuel Vadot DRV260X_LIB_LRA - Pre-programmed LRA Library 58*8bab661aSEmmanuel Vadot enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ] 59*8bab661aSEmmanuel Vadot 60*8bab661aSEmmanuel Vadot enable-gpio: 61*8bab661aSEmmanuel Vadot maxItems: 1 62*8bab661aSEmmanuel Vadot deprecated: true 63*8bab661aSEmmanuel Vadot 64*8bab661aSEmmanuel Vadot enable-gpios: 65*8bab661aSEmmanuel Vadot maxItems: 1 66*8bab661aSEmmanuel Vadot 67*8bab661aSEmmanuel Vadot vib-rated-mv: 68*8bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 69*8bab661aSEmmanuel Vadot description: | 70*8bab661aSEmmanuel Vadot The rated voltage of the actuator in millivolts. 71*8bab661aSEmmanuel Vadot If this is not set then the value will be defaulted to 3200 mV. 72*8bab661aSEmmanuel Vadot default: 3200 73*8bab661aSEmmanuel Vadot 74*8bab661aSEmmanuel Vadot vib-overdrive-mv: 75*8bab661aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 76*8bab661aSEmmanuel Vadot description: | 77*8bab661aSEmmanuel Vadot The overdrive voltage of the actuator in millivolts. 78*8bab661aSEmmanuel Vadot If this is not set then the value will be defaulted to 3200 mV. 79*8bab661aSEmmanuel Vadot default: 3200 80*8bab661aSEmmanuel Vadot 81*8bab661aSEmmanuel Vadotrequired: 82*8bab661aSEmmanuel Vadot - compatible 83*8bab661aSEmmanuel Vadot - reg 84*8bab661aSEmmanuel Vadot - enable-gpios 85*8bab661aSEmmanuel Vadot - mode 86*8bab661aSEmmanuel Vadot - library-sel 87*8bab661aSEmmanuel Vadot 88*8bab661aSEmmanuel VadotadditionalProperties: false 89*8bab661aSEmmanuel Vadot 90*8bab661aSEmmanuel Vadotexamples: 91*8bab661aSEmmanuel Vadot - | 92*8bab661aSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 93*8bab661aSEmmanuel Vadot #include <dt-bindings/input/ti-drv260x.h> 94*8bab661aSEmmanuel Vadot 95*8bab661aSEmmanuel Vadot i2c { 96*8bab661aSEmmanuel Vadot #address-cells = <1>; 97*8bab661aSEmmanuel Vadot #size-cells = <0>; 98*8bab661aSEmmanuel Vadot 99*8bab661aSEmmanuel Vadot haptics@5a { 100*8bab661aSEmmanuel Vadot compatible = "ti,drv2605l"; 101*8bab661aSEmmanuel Vadot reg = <0x5a>; 102*8bab661aSEmmanuel Vadot vbat-supply = <&vbat>; 103*8bab661aSEmmanuel Vadot enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; 104*8bab661aSEmmanuel Vadot mode = <DRV260X_LRA_MODE>; 105*8bab661aSEmmanuel Vadot library-sel = <DRV260X_LIB_LRA>; 106*8bab661aSEmmanuel Vadot vib-rated-mv = <3200>; 107*8bab661aSEmmanuel Vadot vib-overdrive-mv = <3200>; 108*8bab661aSEmmanuel Vadot }; 109*8bab661aSEmmanuel Vadot }; 110