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 <[email protected]>
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    maxItems: 5
39
40  touchscreen-size-x: true
41  touchscreen-size-y: true
42  touchscreen-fuzz-x: true
43  touchscreen-fuzz-y: true
44  touchscreen-inverted-x: true
45  touchscreen-inverted-y: true
46  touchscreen-swapped-x-y: true
47
48additionalProperties: false
49
50allOf:
51  - $ref: touchscreen.yaml#
52  - if:
53      not:
54        properties:
55          compatible:
56            contains:
57              const: imagis,ist3032c
58    then:
59      properties:
60        linux,keycodes: false
61
62required:
63  - compatible
64  - reg
65  - interrupts
66  - touchscreen-size-x
67  - touchscreen-size-y
68
69examples:
70  - |
71    #include <dt-bindings/interrupt-controller/irq.h>
72    i2c {
73      #address-cells = <1>;
74      #size-cells = <0>;
75      touchscreen@50 {
76        compatible = "imagis,ist3038c";
77        reg = <0x50>;
78        interrupt-parent = <&gpio>;
79        interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
80        vdd-supply = <&ldo1_reg>;
81        vddio-supply = <&ldo2_reg>;
82        touchscreen-size-x = <720>;
83        touchscreen-size-y = <1280>;
84        touchscreen-fuzz-x = <10>;
85        touchscreen-fuzz-y = <10>;
86        touchscreen-inverted-x;
87        touchscreen-inverted-y;
88      };
89    };
90
91...
92