Merge tag 'drm-next-2020-12-24' of git://anongit.freedesktop.org/drm/drm
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / input / microchip,qt1050.txt
1 Microchip AT42QT1050 Five-channel Touch Sensor IC
2
3 The AT42QT1050 (QT1050) is a QTouchADC sensor device. The device can sense from
4 one to five keys, dependent on mode. The QT1050 includes all signal processing
5 functions necessary to provide stable sensing under a wide variety of changing
6 conditions, and the outputs are fully debounced.
7
8 The touchkey device node should be placed inside an I2C bus node.
9
10 Required properties:
11 - compatible: Must be "microchip,qt1050"
12 - reg: The I2C address of the device
13 - interrupts: The sink for the touchpad's IRQ output,
14   see ../interrupt-controller/interrupts.txt
15
16 Optional properties:
17 - wakeup-source: touch keys can be used as a wakeup source
18
19 Each button (key) is represented as a sub-node:
20
21 Each not specified key or key with linux,code set to KEY_RESERVED gets disabled
22 in HW.
23
24 Subnode properties:
25 - linux,code: Keycode to emit.
26 - reg: The key number. Valid values: 0, 1, 2, 3, 4.
27
28 Optional subnode-properties:
29
30 If a optional property is missing or has a invalid value the default value is
31 taken.
32
33 - microchip,pre-charge-time-ns:
34   Each touchpad need some time to precharge. The value depends on the mechanical
35   layout.
36   Valid value range: 0 - 637500; values must be a multiple of 2500;
37   default is 0.
38 - microchip,average-samples:
39   Number of data samples which are averaged for each read.
40   Valid values: 1, 4, 16, 64, 256, 1024, 4096, 16384; default is 1.
41 - microchip,average-scaling:
42   The scaling factor which is used to scale the average-samples.
43   Valid values: 1, 2, 4, 8, 16, 32, 64, 128; default is 1.
44 - microchip,threshold:
45   Number of counts to register a touch detection.
46   Valid value range: 0 - 255; default is 20.
47
48 Example:
49 QT1050 with 3 non continuous keys, key2 and key4 are disabled.
50
51 touchkeys@41 {
52         compatible = "microchip,qt1050";
53         reg = <0x41>;
54         interrupt-parent = <&gpio0>;
55         interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
56
57         up@0 {
58                 reg = <0>;
59                 linux,code = <KEY_UP>;
60                 microchip,average-samples = <64>;
61                 microchip,average-scaling = <16>;
62                 microchip,pre-charge-time-ns = <10000>;
63         };
64
65         right@1 {
66                 reg = <1>;
67                 linux,code = <KEY_RIGHT>;
68                 microchip,average-samples = <64>;
69                 microchip,average-scaling = <8>;
70         };
71
72         down@3 {
73                 reg = <3>;
74                 linux,code = <KEY_DOWN>;
75                 microchip,average-samples = <256>;
76                 microchip,average-scaling = <16>;
77         };
78 };