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/cypress,tt21000.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Cypress TT21000 touchscreen controller
8
9description: The Cypress TT21000 series (also known as "CYTTSP5" after
10  the marketing name Cypress TrueTouch Standard Product series 5).
11
12maintainers:
13  - Alistair Francis <alistair@alistair23.me>
14
15allOf:
16  - $ref: touchscreen.yaml#
17
18properties:
19  compatible:
20    const: cypress,tt21000
21
22  reg:
23    maxItems: 1
24
25  '#address-cells':
26    const: 1
27
28  '#size-cells':
29    const: 0
30
31  interrupts:
32    maxItems: 1
33
34  vdd-supply:
35    description: Regulator for voltage.
36
37  reset-gpios:
38    maxItems: 1
39
40  linux,keycodes:
41    description: EV_ABS specific event code generated by the axis.
42
43  wakeup-source: true
44
45patternProperties:
46  "^button@[0-9]+$":
47    type: object
48    $ref: ../input.yaml#
49    properties:
50      reg:
51        maxItems: 1
52      linux,keycodes:
53        description: Keycode to emit
54
55    required:
56      - reg
57      - linux,keycodes
58
59    additionalProperties: false
60
61required:
62  - compatible
63  - reg
64  - interrupts
65  - vdd-supply
66
67unevaluatedProperties: false
68
69examples:
70  - |
71    #include <dt-bindings/interrupt-controller/irq.h>
72    #include <dt-bindings/gpio/gpio.h>
73    #include <dt-bindings/input/linux-event-codes.h>
74
75    i2c {
76        #address-cells = <1>;
77        #size-cells = <0>;
78
79        touchscreen@24 {
80            #address-cells = <1>;
81            #size-cells = <0>;
82
83            compatible = "cypress,tt21000";
84            reg = <0x24>;
85            pinctrl-names = "default";
86            pinctrl-0 = <&tp_reset_ds203>;
87            interrupt-parent = <&pio>;
88            interrupts = <1 5 IRQ_TYPE_LEVEL_LOW>;
89            reset-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>;
90            vdd-supply = <&reg_touch>;
91
92            button@0 {
93                reg = <0>;
94                linux,keycodes = <KEY_HOMEPAGE>;
95            };
96
97            button@1 {
98                reg = <1>;
99                linux,keycodes = <KEY_MENU>;
100            };
101
102            button@2 {
103                reg = <2>;
104                linux,keycodes = <KEY_BACK>;
105            };
106        };
107    };
108...
109