xref: /linux/Documentation/devicetree/bindings/input/touchscreen/hynitron,cst816x.yaml (revision 4f38da1f027ea2c9f01bb71daa7a299c191b6940)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/input/touchscreen/hynitron,cst816x.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Hynitron CST816x Series Capacitive Touch controller
8
9maintainers:
10  - Oleh Kuzhylnyi <kuzhylol@gmail.com>
11
12description: |
13  Bindings for CST816x high performance self-capacitance touch chip series
14  with single point gesture and real two-point operation.
15
16properties:
17  compatible:
18    enum:
19      - hynitron,cst816s
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27  reset-gpios:
28    maxItems: 1
29
30  linux,keycodes:
31    minItems: 1
32    items:
33      - description: Slide up gesture
34      - description: Slide down gesture
35      - description: Slide left gesture
36      - description: Slide right gesture
37      - description: Long press gesture
38
39required:
40  - compatible
41  - reg
42  - interrupts
43
44additionalProperties: false
45
46examples:
47  - |
48    #include <dt-bindings/gpio/gpio.h>
49    #include <dt-bindings/input/linux-event-codes.h>
50    #include <dt-bindings/interrupt-controller/irq.h>
51    i2c {
52        #address-cells = <1>;
53        #size-cells = <0>;
54        touchscreen@15 {
55            compatible = "hynitron,cst816s";
56            reg = <0x15>;
57            interrupt-parent = <&gpio0>;
58            interrupts = <4 IRQ_TYPE_EDGE_RISING>;
59            reset-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
60            linux,keycodes = <KEY_UP>, <KEY_DOWN>, <KEY_LEFT>, <KEY_RIGHT>,
61                             <BTN_TOOL_TRIPLETAP>;
62        };
63    };
64
65...
66