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