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