ti,drv260x.yaml 2.9 KB

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