Back to home page

OSCL-LXR

 
 

    


0001 LIS302 accelerometer devicetree bindings
0002 
0003 This device is matched via its bus drivers, and has a number of properties
0004 that apply in on the generic device (independent from the bus).
0005 
0006 
0007 Required properties for the SPI bindings:
0008  - compatible:          should be set to "st,lis3lv02d-spi"
0009  - reg:                 the chipselect index
0010  - spi-max-frequency:   maximal bus speed, should be set to 1000000 unless
0011                         constrained by external circuitry
0012  - interrupts:          the interrupt generated by the device
0013 
0014 Required properties for the I2C bindings:
0015  - compatible:          should be set to "st,lis3lv02d"
0016  - reg:                 i2c slave address
0017  - Vdd-supply:          The input supply for Vdd
0018  - Vdd_IO-supply:       The input supply for Vdd_IO
0019 
0020 
0021 Optional properties for all bus drivers:
0022 
0023  - st,click-single-{x,y,z}:     if present, tells the device to issue an
0024                                 interrupt on single click events on the
0025                                 x/y/z axis.
0026  - st,click-double-{x,y,z}:     if present, tells the device to issue an
0027                                 interrupt on double click events on the
0028                                 x/y/z axis.
0029  - st,click-thresh-{x,y,z}:     set the x/y/z axis threshold
0030  - st,click-click-time-limit:   click time limit, from 0 to 127.5msec
0031                                 with step of 0.5 msec
0032  - st,click-latency:            click latency, from 0 to 255 msec with
0033                                 step of 1 msec.
0034  - st,click-window:             click window, from 0 to 255 msec with
0035                                 step of 1 msec.
0036  - st,irq{1,2}-disable:         disable IRQ 1/2
0037  - st,irq{1,2}-ff-wu-1:         raise IRQ 1/2 on FF_WU_1 condition
0038  - st,irq{1,2}-ff-wu-2:         raise IRQ 1/2 on FF_WU_2 condition
0039  - st,irq{1,2}-data-ready:      raise IRQ 1/2 on data ready contition
0040  - st,irq{1,2}-click:           raise IRQ 1/2 on click condition
0041  - st,irq-open-drain:           consider IRQ lines open-drain
0042  - st,irq-active-low:           make IRQ lines active low
0043  - st,wu-duration-1:            duration register for Free-Fall/Wake-Up
0044                                 interrupt 1
0045  - st,wu-duration-2:            duration register for Free-Fall/Wake-Up
0046                                 interrupt 2
0047  - st,wakeup-{x,y,z}-{lo,hi}:   set wakeup condition on x/y/z axis for
0048                                 upper/lower limit
0049  - st,wakeup-threshold:         set wakeup threshold
0050  - st,wakeup2-{x,y,z}-{lo,hi}:  set wakeup condition on x/y/z axis for
0051                                 upper/lower limit for second wakeup
0052                                 engine.
0053  - st,wakeup2-threshold:        set wakeup threshold for second wakeup
0054                                 engine.
0055  - st,highpass-cutoff-hz=:      1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of
0056                                 highpass cut-off frequency
0057  - st,hipass{1,2}-disable:      disable highpass 1/2.
0058  - st,default-rate=:            set the default rate
0059  - st,axis-{x,y,z}=:            set the axis to map to the three coordinates.
0060                                 Negative values can be used for inverted axis.
0061  - st,{min,max}-limit-{x,y,z}   set the min/max limits for x/y/z axis
0062                                 (used by self-test)
0063 
0064 
0065 Example for a SPI device node:
0066 
0067         accelerometer@0 {
0068                 compatible = "st,lis302dl-spi";
0069                 reg = <0>;
0070                 spi-max-frequency = <1000000>;
0071                 interrupt-parent = <&gpio>;
0072                 interrupts = <104 0>;
0073 
0074                 st,click-single-x;
0075                 st,click-single-y;
0076                 st,click-single-z;
0077                 st,click-thresh-x = <10>;
0078                 st,click-thresh-y = <10>;
0079                 st,click-thresh-z = <10>;
0080                 st,irq1-click;
0081                 st,irq2-click;
0082                 st,wakeup-x-lo;
0083                 st,wakeup-x-hi;
0084                 st,wakeup-y-lo;
0085                 st,wakeup-y-hi;
0086                 st,wakeup-z-lo;
0087                 st,wakeup-z-hi;
0088         };
0089 
0090 Example for a I2C device node:
0091 
0092         lis331dlh: accelerometer@18 {
0093                 compatible = "st,lis331dlh", "st,lis3lv02d";
0094                 reg = <0x18>;
0095                 Vdd-supply = <&lis3_reg>;
0096                 Vdd_IO-supply = <&lis3_reg>;
0097 
0098                 st,click-single-x;
0099                 st,click-single-y;
0100                 st,click-single-z;
0101                 st,click-thresh-x = <10>;
0102                 st,click-thresh-y = <10>;
0103                 st,click-thresh-z = <10>;
0104                 st,irq1-click;
0105                 st,irq2-click;
0106                 st,wakeup-x-lo;
0107                 st,wakeup-x-hi;
0108                 st,wakeup-y-lo;
0109                 st,wakeup-y-hi;
0110                 st,wakeup-z-lo;
0111                 st,wakeup-z-hi;
0112                 st,min-limit-x = <120>;
0113                 st,min-limit-y = <120>;
0114                 st,min-limit-z = <140>;
0115                 st,max-limit-x = <550>;
0116                 st,max-limit-y = <550>;
0117                 st,max-limit-z = <750>;
0118         };
0119