xref: /linux/Documentation/devicetree/bindings/input/touchscreen/imagis,ist3038c.yaml (revision db4a3f0fbedb0398f77b9047e8b8bb2b49f355bb)
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/imagis,ist3038c.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Imagis IST30XXC family touchscreen controller
8
9maintainers:
10  - Markuss Broks <markuss.broks@gmail.com>
11
12properties:
13  $nodename:
14    pattern: "^touchscreen@[0-9a-f]+$"
15
16  compatible:
17    enum:
18      - imagis,ist3032c
19      - imagis,ist3038
20      - imagis,ist3038b
21      - imagis,ist3038c
22      - imagis,ist3038h
23
24  reg:
25    maxItems: 1
26
27  interrupts:
28    maxItems: 1
29
30  vdd-supply:
31    description: Power supply regulator for the chip
32
33  vddio-supply:
34    description: Power supply regulator for the I2C bus
35
36  linux,keycodes:
37    description: Keycodes for the touch keys
38    minItems: 2
39    maxItems: 5
40
41  touchscreen-size-x: true
42  touchscreen-size-y: true
43  touchscreen-fuzz-x: true
44  touchscreen-fuzz-y: true
45  touchscreen-inverted-x: true
46  touchscreen-inverted-y: true
47  touchscreen-swapped-x-y: true
48
49additionalProperties: false
50
51allOf:
52  - $ref: touchscreen.yaml#
53  - if:
54      not:
55        properties:
56          compatible:
57            contains:
58              const: imagis,ist3032c
59    then:
60      properties:
61        linux,keycodes: false
62
63required:
64  - compatible
65  - reg
66  - interrupts
67  - touchscreen-size-x
68  - touchscreen-size-y
69
70examples:
71  - |
72    #include <dt-bindings/interrupt-controller/irq.h>
73    i2c {
74      #address-cells = <1>;
75      #size-cells = <0>;
76      touchscreen@50 {
77        compatible = "imagis,ist3038c";
78        reg = <0x50>;
79        interrupt-parent = <&gpio>;
80        interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
81        vdd-supply = <&ldo1_reg>;
82        vddio-supply = <&ldo2_reg>;
83        touchscreen-size-x = <720>;
84        touchscreen-size-y = <1280>;
85        touchscreen-fuzz-x = <10>;
86        touchscreen-fuzz-y = <10>;
87        touchscreen-inverted-x;
88        touchscreen-inverted-y;
89      };
90    };
91  - |
92    #include <dt-bindings/input/linux-event-codes.h>
93    #include <dt-bindings/interrupt-controller/irq.h>
94    i2c {
95      #address-cells = <1>;
96      #size-cells = <0>;
97      touchscreen@50 {
98        compatible = "imagis,ist3032c";
99        reg = <0x50>;
100        interrupt-parent = <&gpio>;
101        interrupts = <72 IRQ_TYPE_EDGE_FALLING>;
102        vdd-supply = <&ldo2>;
103        touchscreen-size-x = <480>;
104        touchscreen-size-y = <800>;
105        linux,keycodes = <KEY_APPSELECT>, <KEY_BACK>;
106      };
107    };
108
109...
110