110 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/input/ti,drv260x.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Texas Instruments - drv260x Haptics driver family8 9maintainers:10 - Andrew Davis <afd@ti.com>11 12properties:13 compatible:14 enum:15 - ti,drv260416 - ti,drv260517 - ti,drv2605l18 19 reg:20 maxItems: 121 22 vbat-supply:23 description: Power supply to the haptic motor24 25 # TODO: Deprecate 'mode' in favor of differently named property26 mode:27 $ref: /schemas/types.yaml#/definitions/uint3228 description: |29 Power up mode of the chip30 (defined in include/dt-bindings/input/ti-drv260x.h)31 32 DRV260X_LRA_MODE33 Linear Resonance Actuator mode (Piezoelectric)34 35 DRV260X_LRA_NO_CAL_MODE36 This is a LRA Mode but there is no calibration sequence during init.37 And the device is configured for real time playback mode (RTP mode).38 39 DRV260X_ERM_MODE40 Eccentric Rotating Mass mode (Rotary vibrator)41 enum: [ 0, 1, 2 ]42 43 library-sel:44 $ref: /schemas/types.yaml#/definitions/uint3245 description: |46 These are ROM based waveforms pre-programmed into the IC.47 This should be set to set the library to use at power up.48 (defined in include/dt-bindings/input/ti-drv260x.h)49 50 DRV260X_LIB_EMPTY - Do not use a pre-programmed library51 DRV260X_ERM_LIB_A - Pre-programmed Library52 DRV260X_ERM_LIB_B - Pre-programmed Library53 DRV260X_ERM_LIB_C - Pre-programmed Library54 DRV260X_ERM_LIB_D - Pre-programmed Library55 DRV260X_ERM_LIB_E - Pre-programmed Library56 DRV260X_ERM_LIB_F - Pre-programmed Library57 DRV260X_LIB_LRA - Pre-programmed LRA Library58 enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]59 60 enable-gpio:61 maxItems: 162 deprecated: true63 64 enable-gpios:65 maxItems: 166 67 vib-rated-mv:68 $ref: /schemas/types.yaml#/definitions/uint3269 description: |70 The rated voltage of the actuator in millivolts.71 If this is not set then the value will be defaulted to 3200 mV.72 default: 320073 74 vib-overdrive-mv:75 $ref: /schemas/types.yaml#/definitions/uint3276 description: |77 The overdrive voltage of the actuator in millivolts.78 If this is not set then the value will be defaulted to 3200 mV.79 default: 320080 81required:82 - compatible83 - reg84 - enable-gpios85 - mode86 - library-sel87 88additionalProperties: false89 90examples:91 - |92 #include <dt-bindings/gpio/gpio.h>93 #include <dt-bindings/input/ti-drv260x.h>94 95 i2c {96 #address-cells = <1>;97 #size-cells = <0>;98 99 haptics@5a {100 compatible = "ti,drv2605l";101 reg = <0x5a>;102 vbat-supply = <&vbat>;103 enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;104 mode = <DRV260X_LRA_MODE>;105 library-sel = <DRV260X_LIB_LRA>;106 vib-rated-mv = <3200>;107 vib-overdrive-mv = <3200>;108 };109 };110