xref: /linux/Documentation/devicetree/bindings/input/touchscreen/sitronix,st1232.yaml (revision 0074281bb6316108e0cff094bd4db78ab3eee236)
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/sitronix,st1232.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Sitronix st1232 or st1633 touchscreen controller
8
9maintainers:
10  - Bastian Hecht <hechtb@gmail.com>
11
12allOf:
13  - $ref: touchscreen.yaml#
14
15properties:
16  compatible:
17    enum:
18      - sitronix,st1232
19      - sitronix,st1633
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27  gpios:
28    description: A phandle to the reset GPIO
29    maxItems: 1
30
31required:
32  - compatible
33  - reg
34  - interrupts
35
36unevaluatedProperties: false
37
38examples:
39  - |
40    #include <dt-bindings/input/linux-event-codes.h>
41    i2c {
42            #address-cells = <1>;
43            #size-cells = <0>;
44
45            touchscreen@55 {
46                    compatible = "sitronix,st1232";
47                    reg = <0x55>;
48                    interrupts = <2 0>;
49                    gpios = <&gpio1 166 0>;
50
51                    touch-overlay {
52                            segment-0 {
53                                    label = "Touchscreen";
54                                    x-origin = <0>;
55                                    x-size = <240>;
56                                    y-origin = <40>;
57                                    y-size = <280>;
58                            };
59
60                            segment-1a {
61                                    label = "Camera light";
62                                    linux,code = <KEY_LIGHTS_TOGGLE>;
63                                    x-origin = <40>;
64                                    x-size = <40>;
65                                    y-origin = <0>;
66                                    y-size = <40>;
67                            };
68
69                            segment-2a {
70                                    label = "Power";
71                                    linux,code = <KEY_POWER>;
72                                    x-origin = <160>;
73                                    x-size = <40>;
74                                    y-origin = <0>;
75                                    y-size = <40>;
76                            };
77                    };
78            };
79    };
80