18c2ecf20Sopenharmony_ciLIS302 accelerometer devicetree bindings
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis device is matched via its bus drivers, and has a number of properties
48c2ecf20Sopenharmony_cithat apply in on the generic device (independent from the bus).
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciRequired properties for the SPI bindings:
88c2ecf20Sopenharmony_ci - compatible: 		should be set to "st,lis3lv02d-spi"
98c2ecf20Sopenharmony_ci - reg:			the chipselect index
108c2ecf20Sopenharmony_ci - spi-max-frequency:	maximal bus speed, should be set to 1000000 unless
118c2ecf20Sopenharmony_ci			constrained by external circuitry
128c2ecf20Sopenharmony_ci - interrupts:		the interrupt generated by the device
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciRequired properties for the I2C bindings:
158c2ecf20Sopenharmony_ci - compatible:		should be set to "st,lis3lv02d"
168c2ecf20Sopenharmony_ci - reg:			i2c slave address
178c2ecf20Sopenharmony_ci - Vdd-supply:		The input supply for Vdd
188c2ecf20Sopenharmony_ci - Vdd_IO-supply:	The input supply for Vdd_IO
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciOptional properties for all bus drivers:
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci - st,click-single-{x,y,z}:	if present, tells the device to issue an
248c2ecf20Sopenharmony_ci				interrupt on single click events on the
258c2ecf20Sopenharmony_ci				x/y/z axis.
268c2ecf20Sopenharmony_ci - st,click-double-{x,y,z}:	if present, tells the device to issue an
278c2ecf20Sopenharmony_ci				interrupt on double click events on the
288c2ecf20Sopenharmony_ci				x/y/z axis.
298c2ecf20Sopenharmony_ci - st,click-thresh-{x,y,z}:	set the x/y/z axis threshold
308c2ecf20Sopenharmony_ci - st,click-click-time-limit:	click time limit, from 0 to 127.5msec
318c2ecf20Sopenharmony_ci				with step of 0.5 msec
328c2ecf20Sopenharmony_ci - st,click-latency:		click latency, from 0 to 255 msec with
338c2ecf20Sopenharmony_ci				step of 1 msec.
348c2ecf20Sopenharmony_ci - st,click-window:		click window, from 0 to 255 msec with
358c2ecf20Sopenharmony_ci				step of 1 msec.
368c2ecf20Sopenharmony_ci - st,irq{1,2}-disable:		disable IRQ 1/2
378c2ecf20Sopenharmony_ci - st,irq{1,2}-ff-wu-1:		raise IRQ 1/2 on FF_WU_1 condition
388c2ecf20Sopenharmony_ci - st,irq{1,2}-ff-wu-2:		raise IRQ 1/2 on FF_WU_2 condition
398c2ecf20Sopenharmony_ci - st,irq{1,2}-data-ready:	raise IRQ 1/2 on data ready contition
408c2ecf20Sopenharmony_ci - st,irq{1,2}-click:		raise IRQ 1/2 on click condition
418c2ecf20Sopenharmony_ci - st,irq-open-drain:		consider IRQ lines open-drain
428c2ecf20Sopenharmony_ci - st,irq-active-low:		make IRQ lines active low
438c2ecf20Sopenharmony_ci - st,wu-duration-1:		duration register for Free-Fall/Wake-Up
448c2ecf20Sopenharmony_ci				interrupt 1
458c2ecf20Sopenharmony_ci - st,wu-duration-2:		duration register for Free-Fall/Wake-Up
468c2ecf20Sopenharmony_ci				interrupt 2
478c2ecf20Sopenharmony_ci - st,wakeup-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
488c2ecf20Sopenharmony_ci				upper/lower limit
498c2ecf20Sopenharmony_ci - st,wakeup-threshold:		set wakeup threshold
508c2ecf20Sopenharmony_ci - st,wakeup2-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
518c2ecf20Sopenharmony_ci				upper/lower limit for second wakeup
528c2ecf20Sopenharmony_ci				engine.
538c2ecf20Sopenharmony_ci - st,wakeup2-threshold:	set wakeup threshold for second wakeup
548c2ecf20Sopenharmony_ci				engine.
558c2ecf20Sopenharmony_ci - st,highpass-cutoff-hz=:	1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of
568c2ecf20Sopenharmony_ci				highpass cut-off frequency
578c2ecf20Sopenharmony_ci - st,hipass{1,2}-disable:	disable highpass 1/2.
588c2ecf20Sopenharmony_ci - st,default-rate=:		set the default rate
598c2ecf20Sopenharmony_ci - st,axis-{x,y,z}=:		set the axis to map to the three coordinates.
608c2ecf20Sopenharmony_ci				Negative values can be used for inverted axis.
618c2ecf20Sopenharmony_ci - st,{min,max}-limit-{x,y,z}	set the min/max limits for x/y/z axis
628c2ecf20Sopenharmony_ci				(used by self-test)
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciExample for a SPI device node:
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci	accelerometer@0 {
688c2ecf20Sopenharmony_ci		compatible = "st,lis302dl-spi";
698c2ecf20Sopenharmony_ci		reg = <0>;
708c2ecf20Sopenharmony_ci		spi-max-frequency = <1000000>;
718c2ecf20Sopenharmony_ci		interrupt-parent = <&gpio>;
728c2ecf20Sopenharmony_ci		interrupts = <104 0>;
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci		st,click-single-x;
758c2ecf20Sopenharmony_ci		st,click-single-y;
768c2ecf20Sopenharmony_ci		st,click-single-z;
778c2ecf20Sopenharmony_ci		st,click-thresh-x = <10>;
788c2ecf20Sopenharmony_ci		st,click-thresh-y = <10>;
798c2ecf20Sopenharmony_ci		st,click-thresh-z = <10>;
808c2ecf20Sopenharmony_ci		st,irq1-click;
818c2ecf20Sopenharmony_ci		st,irq2-click;
828c2ecf20Sopenharmony_ci		st,wakeup-x-lo;
838c2ecf20Sopenharmony_ci		st,wakeup-x-hi;
848c2ecf20Sopenharmony_ci		st,wakeup-y-lo;
858c2ecf20Sopenharmony_ci		st,wakeup-y-hi;
868c2ecf20Sopenharmony_ci		st,wakeup-z-lo;
878c2ecf20Sopenharmony_ci		st,wakeup-z-hi;
888c2ecf20Sopenharmony_ci	};
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ciExample for a I2C device node:
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci	lis331dlh: accelerometer@18 {
938c2ecf20Sopenharmony_ci		compatible = "st,lis331dlh", "st,lis3lv02d";
948c2ecf20Sopenharmony_ci		reg = <0x18>;
958c2ecf20Sopenharmony_ci		Vdd-supply = <&lis3_reg>;
968c2ecf20Sopenharmony_ci		Vdd_IO-supply = <&lis3_reg>;
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci		st,click-single-x;
998c2ecf20Sopenharmony_ci		st,click-single-y;
1008c2ecf20Sopenharmony_ci		st,click-single-z;
1018c2ecf20Sopenharmony_ci		st,click-thresh-x = <10>;
1028c2ecf20Sopenharmony_ci		st,click-thresh-y = <10>;
1038c2ecf20Sopenharmony_ci		st,click-thresh-z = <10>;
1048c2ecf20Sopenharmony_ci		st,irq1-click;
1058c2ecf20Sopenharmony_ci		st,irq2-click;
1068c2ecf20Sopenharmony_ci		st,wakeup-x-lo;
1078c2ecf20Sopenharmony_ci		st,wakeup-x-hi;
1088c2ecf20Sopenharmony_ci		st,wakeup-y-lo;
1098c2ecf20Sopenharmony_ci		st,wakeup-y-hi;
1108c2ecf20Sopenharmony_ci		st,wakeup-z-lo;
1118c2ecf20Sopenharmony_ci		st,wakeup-z-hi;
1128c2ecf20Sopenharmony_ci		st,min-limit-x = <120>;
1138c2ecf20Sopenharmony_ci		st,min-limit-y = <120>;
1148c2ecf20Sopenharmony_ci		st,min-limit-z = <140>;
1158c2ecf20Sopenharmony_ci		st,max-limit-x = <550>;
1168c2ecf20Sopenharmony_ci		st,max-limit-y = <550>;
1178c2ecf20Sopenharmony_ci		st,max-limit-z = <750>;
1188c2ecf20Sopenharmony_ci	};
1198c2ecf20Sopenharmony_ci
120