162306a36Sopenharmony_ciLIS302 accelerometer devicetree bindings
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciThis device is matched via its bus drivers, and has a number of properties
462306a36Sopenharmony_cithat apply in on the generic device (independent from the bus).
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciRequired properties for the SPI bindings:
862306a36Sopenharmony_ci - compatible: 		should be set to "st,lis3lv02d-spi"
962306a36Sopenharmony_ci - reg:			the chipselect index
1062306a36Sopenharmony_ci - spi-max-frequency:	maximal bus speed, should be set to 1000000 unless
1162306a36Sopenharmony_ci			constrained by external circuitry
1262306a36Sopenharmony_ci - interrupts:		the interrupt generated by the device
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ciRequired properties for the I2C bindings:
1562306a36Sopenharmony_ci - compatible:		should be set to "st,lis3lv02d"
1662306a36Sopenharmony_ci - reg:			i2c slave address
1762306a36Sopenharmony_ci - Vdd-supply:		The input supply for Vdd
1862306a36Sopenharmony_ci - Vdd_IO-supply:	The input supply for Vdd_IO
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciOptional properties for all bus drivers:
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci - st,click-single-{x,y,z}:	if present, tells the device to issue an
2462306a36Sopenharmony_ci				interrupt on single click events on the
2562306a36Sopenharmony_ci				x/y/z axis.
2662306a36Sopenharmony_ci - st,click-double-{x,y,z}:	if present, tells the device to issue an
2762306a36Sopenharmony_ci				interrupt on double click events on the
2862306a36Sopenharmony_ci				x/y/z axis.
2962306a36Sopenharmony_ci - st,click-thresh-{x,y,z}:	set the x/y/z axis threshold
3062306a36Sopenharmony_ci - st,click-click-time-limit:	click time limit, from 0 to 127.5msec
3162306a36Sopenharmony_ci				with step of 0.5 msec
3262306a36Sopenharmony_ci - st,click-latency:		click latency, from 0 to 255 msec with
3362306a36Sopenharmony_ci				step of 1 msec.
3462306a36Sopenharmony_ci - st,click-window:		click window, from 0 to 255 msec with
3562306a36Sopenharmony_ci				step of 1 msec.
3662306a36Sopenharmony_ci - st,irq{1,2}-disable:		disable IRQ 1/2
3762306a36Sopenharmony_ci - st,irq{1,2}-ff-wu-1:		raise IRQ 1/2 on FF_WU_1 condition
3862306a36Sopenharmony_ci - st,irq{1,2}-ff-wu-2:		raise IRQ 1/2 on FF_WU_2 condition
3962306a36Sopenharmony_ci - st,irq{1,2}-data-ready:	raise IRQ 1/2 on data ready contition
4062306a36Sopenharmony_ci - st,irq{1,2}-click:		raise IRQ 1/2 on click condition
4162306a36Sopenharmony_ci - st,irq-open-drain:		consider IRQ lines open-drain
4262306a36Sopenharmony_ci - st,irq-active-low:		make IRQ lines active low
4362306a36Sopenharmony_ci - st,wu-duration-1:		duration register for Free-Fall/Wake-Up
4462306a36Sopenharmony_ci				interrupt 1
4562306a36Sopenharmony_ci - st,wu-duration-2:		duration register for Free-Fall/Wake-Up
4662306a36Sopenharmony_ci				interrupt 2
4762306a36Sopenharmony_ci - st,wakeup-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
4862306a36Sopenharmony_ci				upper/lower limit
4962306a36Sopenharmony_ci - st,wakeup-threshold:		set wakeup threshold
5062306a36Sopenharmony_ci - st,wakeup2-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
5162306a36Sopenharmony_ci				upper/lower limit for second wakeup
5262306a36Sopenharmony_ci				engine.
5362306a36Sopenharmony_ci - st,wakeup2-threshold:	set wakeup threshold for second wakeup
5462306a36Sopenharmony_ci				engine.
5562306a36Sopenharmony_ci - st,highpass-cutoff-hz=:	1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of
5662306a36Sopenharmony_ci				highpass cut-off frequency
5762306a36Sopenharmony_ci - st,hipass{1,2}-disable:	disable highpass 1/2.
5862306a36Sopenharmony_ci - st,default-rate=:		set the default rate
5962306a36Sopenharmony_ci - st,axis-{x,y,z}=:		set the axis to map to the three coordinates.
6062306a36Sopenharmony_ci				Negative values can be used for inverted axis.
6162306a36Sopenharmony_ci - st,{min,max}-limit-{x,y,z}	set the min/max limits for x/y/z axis
6262306a36Sopenharmony_ci				(used by self-test)
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciExample for a SPI device node:
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci	accelerometer@0 {
6862306a36Sopenharmony_ci		compatible = "st,lis302dl-spi";
6962306a36Sopenharmony_ci		reg = <0>;
7062306a36Sopenharmony_ci		spi-max-frequency = <1000000>;
7162306a36Sopenharmony_ci		interrupt-parent = <&gpio>;
7262306a36Sopenharmony_ci		interrupts = <104 0>;
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci		st,click-single-x;
7562306a36Sopenharmony_ci		st,click-single-y;
7662306a36Sopenharmony_ci		st,click-single-z;
7762306a36Sopenharmony_ci		st,click-thresh-x = <10>;
7862306a36Sopenharmony_ci		st,click-thresh-y = <10>;
7962306a36Sopenharmony_ci		st,click-thresh-z = <10>;
8062306a36Sopenharmony_ci		st,irq1-click;
8162306a36Sopenharmony_ci		st,irq2-click;
8262306a36Sopenharmony_ci		st,wakeup-x-lo;
8362306a36Sopenharmony_ci		st,wakeup-x-hi;
8462306a36Sopenharmony_ci		st,wakeup-y-lo;
8562306a36Sopenharmony_ci		st,wakeup-y-hi;
8662306a36Sopenharmony_ci		st,wakeup-z-lo;
8762306a36Sopenharmony_ci		st,wakeup-z-hi;
8862306a36Sopenharmony_ci	};
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ciExample for a I2C device node:
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ci	lis331dlh: accelerometer@18 {
9362306a36Sopenharmony_ci		compatible = "st,lis331dlh", "st,lis3lv02d";
9462306a36Sopenharmony_ci		reg = <0x18>;
9562306a36Sopenharmony_ci		Vdd-supply = <&lis3_reg>;
9662306a36Sopenharmony_ci		Vdd_IO-supply = <&lis3_reg>;
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci		st,click-single-x;
9962306a36Sopenharmony_ci		st,click-single-y;
10062306a36Sopenharmony_ci		st,click-single-z;
10162306a36Sopenharmony_ci		st,click-thresh-x = <10>;
10262306a36Sopenharmony_ci		st,click-thresh-y = <10>;
10362306a36Sopenharmony_ci		st,click-thresh-z = <10>;
10462306a36Sopenharmony_ci		st,irq1-click;
10562306a36Sopenharmony_ci		st,irq2-click;
10662306a36Sopenharmony_ci		st,wakeup-x-lo;
10762306a36Sopenharmony_ci		st,wakeup-x-hi;
10862306a36Sopenharmony_ci		st,wakeup-y-lo;
10962306a36Sopenharmony_ci		st,wakeup-y-hi;
11062306a36Sopenharmony_ci		st,wakeup-z-lo;
11162306a36Sopenharmony_ci		st,wakeup-z-hi;
11262306a36Sopenharmony_ci		st,min-limit-x = <120>;
11362306a36Sopenharmony_ci		st,min-limit-y = <120>;
11462306a36Sopenharmony_ci		st,min-limit-z = <140>;
11562306a36Sopenharmony_ci		st,max-limit-x = <550>;
11662306a36Sopenharmony_ci		st,max-limit-y = <550>;
11762306a36Sopenharmony_ci		st,max-limit-z = <750>;
11862306a36Sopenharmony_ci	};
11962306a36Sopenharmony_ci
120