xref: /freebsd/sys/contrib/device-tree/Bindings/input/touchscreen/ilitek_ts_i2c.yaml (revision c1d255d3ffdbe447de3ab875bf4e7d7accc5bfc5)
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/ilitek_ts_i2c.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Ilitek I2C Touchscreen Controller
8
9maintainers:
10  - Dmitry Torokhov <dmitry.torokhov@gmail.com>
11
12allOf:
13  - $ref: touchscreen.yaml#
14
15properties:
16  compatible:
17    enum:
18      - ilitek,ili2130
19      - ilitek,ili2131
20      - ilitek,ili2132
21      - ilitek,ili2316
22      - ilitek,ili2322
23      - ilitek,ili2323
24      - ilitek,ili2326
25      - ilitek,ili2520
26      - ilitek,ili2521
27
28  reg:
29    const: 0x41
30
31  interrupts:
32    maxItems: 1
33
34  reset-gpios:
35    maxItems: 1
36
37  wakeup-source:
38    type: boolean
39    description: touchscreen can be used as a wakeup source.
40
41  touchscreen-size-x: true
42  touchscreen-size-y: true
43  touchscreen-inverted-x: true
44  touchscreen-inverted-y: true
45  touchscreen-swapped-x-y: true
46
47additionalProperties: false
48
49required:
50  - compatible
51  - reg
52  - interrupts
53  - reset-gpios
54
55examples:
56  - |
57    #include <dt-bindings/interrupt-controller/irq.h>
58    #include <dt-bindings/gpio/gpio.h>
59    i2c {
60        #address-cells = <1>;
61        #size-cells = <0>;
62
63        touchscreen@41 {
64            compatible = "ilitek,ili2520";
65            reg = <0x41>;
66
67            interrupt-parent = <&gpio1>;
68            interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
69            reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
70            touchscreen-inverted-y;
71            wakeup-source;
72        };
73    };
74