xref: /freebsd/sys/contrib/device-tree/Bindings/input/touchscreen/ad7879.txt (revision 8b959dd6a3921c35395bef4a6d7ad2426a3bd88e)
1* Analog Devices AD7879(-1)/AD7889(-1) touchscreen interface (SPI/I2C)
2
3Required properties:
4- compatible			: for SPI slave, use "adi,ad7879"
5				  for I2C slave, use "adi,ad7879-1"
6- reg				: SPI chipselect/I2C slave address
7				  See spi-bus.txt for more SPI slave properties
8- interrupts			: touch controller interrupt
9- touchscreen-max-pressure	: maximum reported pressure
10- adi,resistance-plate-x	: total resistance of X-plate (for pressure
11				  calculation)
12Optional properties:
13- touchscreen-swapped-x-y	: X and Y axis are swapped (boolean)
14- adi,first-conversion-delay	: 0-12: In 128us steps (starting with 128us)
15				  13  : 2.560ms
16				  14  : 3.584ms
17				  15  : 4.096ms
18				  This property has to be a '/bits/ 8' value
19- adi,acquisition-time		: 0: 2us
20				  1: 4us
21				  2: 8us
22				  3: 16us
23				  This property has to be a '/bits/ 8' value
24- adi,median-filter-size	: 0: disabled
25				  1: 4 measurements
26				  2: 8 measurements
27				  3: 16 measurements
28				  This property has to be a '/bits/ 8' value
29- adi,averaging			: 0: 2 middle values (1 if median disabled)
30				  1: 4 middle values
31				  2: 8 middle values
32				  3: 16 values
33				  This property has to be a '/bits/ 8' value
34- adi,conversion-interval:	: 0    : convert one time only
35				  1-255: 515us + val * 35us (up to 9.440ms)
36				  This property has to be a '/bits/ 8' value
37- gpio-controller		: Switch AUX/VBAT/GPIO pin to GPIO mode
38
39Example:
40
41	touchscreen0@2c {
42		compatible = "adi,ad7879-1";
43		reg = <0x2c>;
44		interrupt-parent = <&gpio1>;
45		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
46		touchscreen-max-pressure = <4096>;
47		adi,resistance-plate-x = <120>;
48		adi,first-conversion-delay = /bits/ 8 <3>;
49		adi,acquisition-time = /bits/ 8 <1>;
50		adi,median-filter-size = /bits/ 8 <2>;
51		adi,averaging = /bits/ 8 <1>;
52		adi,conversion-interval = /bits/ 8 <255>;
53	};
54
55	touchscreen1@1 {
56		compatible = "adi,ad7879";
57		spi-max-frequency = <5000000>;
58		reg = <1>;
59		spi-cpol;
60		spi-cpha;
61		gpio-controller;
62		interrupt-parent = <&gpio1>;
63		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
64		touchscreen-max-pressure = <4096>;
65		adi,resistance-plate-x = <120>;
66		adi,first-conversion-delay = /bits/ 8 <3>;
67		adi,acquisition-time = /bits/ 8 <1>;
68		adi,median-filter-size = /bits/ 8 <2>;
69		adi,averaging = /bits/ 8 <1>;
70		adi,conversion-interval = /bits/ 8 <255>;
71	};
72