lis302.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. LIS302 accelerometer devicetree bindings
  2. This device is matched via its bus drivers, and has a number of properties
  3. that apply in on the generic device (independent from the bus).
  4. Required properties for the SPI bindings:
  5. - compatible: should be set to "st,lis3lv02d_spi"
  6. - reg: the chipselect index
  7. - spi-max-frequency: maximal bus speed, should be set to 1000000 unless
  8. constrained by external circuitry
  9. - interrupts: the interrupt generated by the device
  10. Required properties for the I2C bindings:
  11. - compatible: should be set to "st,lis3lv02d"
  12. - reg: i2c slave address
  13. - Vdd-supply: The input supply for Vdd
  14. - Vdd_IO-supply: The input supply for Vdd_IO
  15. Optional properties for all bus drivers:
  16. - st,click-single-{x,y,z}: if present, tells the device to issue an
  17. interrupt on single click events on the
  18. x/y/z axis.
  19. - st,click-double-{x,y,z}: if present, tells the device to issue an
  20. interrupt on double click events on the
  21. x/y/z axis.
  22. - st,click-thresh-{x,y,z}: set the x/y/z axis threshold
  23. - st,click-click-time-limit: click time limit, from 0 to 127.5msec
  24. with step of 0.5 msec
  25. - st,click-latency: click latency, from 0 to 255 msec with
  26. step of 1 msec.
  27. - st,click-window: click window, from 0 to 255 msec with
  28. step of 1 msec.
  29. - st,irq{1,2}-disable: disable IRQ 1/2
  30. - st,irq{1,2}-ff-wu-1: raise IRQ 1/2 on FF_WU_1 condition
  31. - st,irq{1,2}-ff-wu-2: raise IRQ 1/2 on FF_WU_2 condition
  32. - st,irq{1,2}-data-ready: raise IRQ 1/2 on data ready contition
  33. - st,irq{1,2}-click: raise IRQ 1/2 on click condition
  34. - st,irq-open-drain: consider IRQ lines open-drain
  35. - st,irq-active-low: make IRQ lines active low
  36. - st,wu-duration-1: duration register for Free-Fall/Wake-Up
  37. interrupt 1
  38. - st,wu-duration-2: duration register for Free-Fall/Wake-Up
  39. interrupt 2
  40. - st,wakeup-{x,y,z}-{lo,hi}: set wakeup condition on x/y/z axis for
  41. upper/lower limit
  42. - st,wakeup-threshold: set wakeup threshold
  43. - st,wakeup2-{x,y,z}-{lo,hi}: set wakeup condition on x/y/z axis for
  44. upper/lower limit for second wakeup
  45. engine.
  46. - st,wakeup2-threshold: set wakeup threshold for second wakeup
  47. engine.
  48. - st,highpass-cutoff-hz=: 1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of
  49. highpass cut-off frequency
  50. - st,hipass{1,2}-disable: disable highpass 1/2.
  51. - st,default-rate=: set the default rate
  52. - st,axis-{x,y,z}=: set the axis to map to the three coordinates.
  53. Negative values can be used for inverted axis.
  54. - st,{min,max}-limit-{x,y,z} set the min/max limits for x/y/z axis
  55. (used by self-test)
  56. Example for a SPI device node:
  57. lis302@0 {
  58. compatible = "st,lis302dl-spi";
  59. reg = <0>;
  60. spi-max-frequency = <1000000>;
  61. interrupt-parent = <&gpio>;
  62. interrupts = <104 0>;
  63. st,click-single-x;
  64. st,click-single-y;
  65. st,click-single-z;
  66. st,click-thresh-x = <10>;
  67. st,click-thresh-y = <10>;
  68. st,click-thresh-z = <10>;
  69. st,irq1-click;
  70. st,irq2-click;
  71. st,wakeup-x-lo;
  72. st,wakeup-x-hi;
  73. st,wakeup-y-lo;
  74. st,wakeup-y-hi;
  75. st,wakeup-z-lo;
  76. st,wakeup-z-hi;
  77. };
  78. Example for a I2C device node:
  79. lis331dlh: lis331dlh@18 {
  80. compatible = "st,lis331dlh", "st,lis3lv02d";
  81. reg = <0x18>;
  82. Vdd-supply = <&lis3_reg>;
  83. Vdd_IO-supply = <&lis3_reg>;
  84. st,click-single-x;
  85. st,click-single-y;
  86. st,click-single-z;
  87. st,click-thresh-x = <10>;
  88. st,click-thresh-y = <10>;
  89. st,click-thresh-z = <10>;
  90. st,irq1-click;
  91. st,irq2-click;
  92. st,wakeup-x-lo;
  93. st,wakeup-x-hi;
  94. st,wakeup-y-lo;
  95. st,wakeup-y-hi;
  96. st,wakeup-z-lo;
  97. st,wakeup-z-hi;
  98. st,min-limit-x = <120>;
  99. st,min-limit-y = <120>;
  100. st,min-limit-z = <140>;
  101. st,max-limit-x = <550>;
  102. st,max-limit-y = <550>;
  103. st,max-limit-z = <750>;
  104. };