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
43patternProperties:
44  "^button@[0-9]+$":
45    type: object
46    $ref: ../input.yaml#
47    properties:
48      reg:
49        maxItems: 1
50      linux,keycodes:
51        description: Keycode to emit
52
53    required:
54      - reg
55      - linux,keycodes
56
57    additionalProperties: false
58
59required:
60  - compatible
61  - reg
62  - interrupts
63  - vdd-supply
64
65unevaluatedProperties: false
66
67examples:
68  - |
69    #include <dt-bindings/interrupt-controller/irq.h>
70    #include <dt-bindings/gpio/gpio.h>
71    #include <dt-bindings/input/linux-event-codes.h>
72
73    i2c {
74        #address-cells = <1>;
75        #size-cells = <0>;
76
77        touchscreen@24 {
78            #address-cells = <1>;
79            #size-cells = <0>;
80
81            compatible = "cypress,tt21000";
82            reg = <0x24>;
83            pinctrl-names = "default";
84            pinctrl-0 = <&tp_reset_ds203>;
85            interrupt-parent = <&pio>;
86            interrupts = <1 5 IRQ_TYPE_LEVEL_LOW>;
87            reset-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>;
88            vdd-supply = <&reg_touch>;
89
90            button@0 {
91                reg = <0>;
92                linux,keycodes = <KEY_HOMEPAGE>;
93            };
94
95            button@1 {
96                reg = <1>;
97                linux,keycodes = <KEY_MENU>;
98            };
99
100            button@2 {
101                reg = <2>;
102                linux,keycodes = <KEY_BACK>;
103            };
104        };
105    };
106...
107