1# Copyright (c) 2023 Antmicro <www.antmicro.com>
2# SPDX-License-Identifier: Apache-2.0
3
4description: STMPE811 I2C touchscreen controller
5
6compatible: "st,stmpe811"
7
8include: [i2c-device.yaml, touchscreen-common.yaml]
9
10properties:
11  int-gpios:
12    type: phandle-array
13    description: |
14      Interrupt GPIO. Used by the controller to signal touch data is
15      available. Active low.
16
17  raw-x-min:
18    type: int
19    description: |
20      Signed raw X axis start for scaling the reported coordinates.
21      No effect if screen size is not set.
22
23  raw-y-min:
24    type: int
25    description: |
26      Signed raw Y axis start for scaling the reported coordinates.
27      No effect if screen size is not set.
28
29  raw-x-max:
30    type: int
31    description: |
32      Raw X axis end for scaling the reported coordinates.
33      No effect if screen size is not set.
34
35  raw-y-max:
36    type: int
37    description: |
38      Raw Y axis end for scaling the reported coordinates.
39      No effect if screen size is not set.
40
41  panel-driver-settling-time-us:
42    type: int
43    enum:
44      - 10
45      - 100
46      - 500
47      - 1000
48      - 5000
49      - 10000
50      - 50000
51      - 100000
52    required: true
53    description: |
54      Panel driver settling time (microseconds). For large panels (> 6"), a capacitor of 10 nF
55      is recommended at the touchscreen terminals for noise filtering.
56      As a general rule, 1-5 nF capacitors require around 500 us settling time, and 5-10 nF need
57      around 1 ms. When a larger capacitor is used, this value should be changed, as it can
58      lead to inaccuracy of the measurement.
59
60  touch-detect-delay-us:
61    type: int
62    enum:
63      - 10
64      - 50
65      - 100
66      - 500
67      - 1000
68      - 5000
69      - 10000
70      - 50000
71    required: true
72    description: |
73      Touch detect delay (microseconds) is the delay from the activation of the pull-up resistor
74      in the X+ line to the time the device performs touch detection.
75      If no capacitor, or a smaller capacitor is used, this value can be lowered to
76      minimize detection latency, but it could lower the position stability.
77
78  touch-average-control:
79    type: int
80    enum:
81      - 1
82      - 2
83      - 4
84      - 8
85    required: true
86    description: |
87      Average control (number of samples).
88      This parameter can be set to any of the possible values.
89      Higher values result in more filtering of noise, but also introduce
90      more latency in the touch detection process.
91
92      Use cases that require low touch detection latency
93      may benefit from using a lower value for this parameter,
94      at the cost of less noise filtering.
95
96  tracking-index:
97    type: int
98    enum:
99      - 0
100      - 4
101      - 8
102      - 16
103      - 32
104      - 64
105      - 92
106      - 127
107    required: true
108    description: |
109      Tracking index determines the minimal distance between
110      the current touch position and the previous touch position.
111      If the distance is shorter than the tracking index, it is discarded.
112      Lowering the tracking index increases the frequency of touch events,
113      but also increases the load on the system.
114