1*7c06272fSJoe Hung# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*7c06272fSJoe Hung%YAML 1.2
3*7c06272fSJoe Hung---
4*7c06272fSJoe Hung$id: http://devicetree.org/schemas/input/touchscreen/ilitek_ts_i2c.yaml#
5*7c06272fSJoe Hung$schema: http://devicetree.org/meta-schemas/core.yaml#
6*7c06272fSJoe Hung
7*7c06272fSJoe Hungtitle: Ilitek I2C Touchscreen Controller
8*7c06272fSJoe Hung
9*7c06272fSJoe Hungmaintainers:
10*7c06272fSJoe Hung  - Dmitry Torokhov <dmitry.torokhov@gmail.com>
11*7c06272fSJoe Hung
12*7c06272fSJoe HungallOf:
13*7c06272fSJoe Hung  - $ref: touchscreen.yaml#
14*7c06272fSJoe Hung
15*7c06272fSJoe Hungproperties:
16*7c06272fSJoe Hung  compatible:
17*7c06272fSJoe Hung    enum:
18*7c06272fSJoe Hung      - ilitek,ili2130
19*7c06272fSJoe Hung      - ilitek,ili2131
20*7c06272fSJoe Hung      - ilitek,ili2132
21*7c06272fSJoe Hung      - ilitek,ili2316
22*7c06272fSJoe Hung      - ilitek,ili2322
23*7c06272fSJoe Hung      - ilitek,ili2323
24*7c06272fSJoe Hung      - ilitek,ili2326
25*7c06272fSJoe Hung      - ilitek,ili2520
26*7c06272fSJoe Hung      - ilitek,ili2521
27*7c06272fSJoe Hung
28*7c06272fSJoe Hung  reg:
29*7c06272fSJoe Hung    const: 0x41
30*7c06272fSJoe Hung
31*7c06272fSJoe Hung  interrupts:
32*7c06272fSJoe Hung    maxItems: 1
33*7c06272fSJoe Hung
34*7c06272fSJoe Hung  reset-gpios:
35*7c06272fSJoe Hung    maxItems: 1
36*7c06272fSJoe Hung
37*7c06272fSJoe Hung  wakeup-source:
38*7c06272fSJoe Hung    type: boolean
39*7c06272fSJoe Hung    description: touchscreen can be used as a wakeup source.
40*7c06272fSJoe Hung
41*7c06272fSJoe Hung  touchscreen-size-x: true
42*7c06272fSJoe Hung  touchscreen-size-y: true
43*7c06272fSJoe Hung  touchscreen-inverted-x: true
44*7c06272fSJoe Hung  touchscreen-inverted-y: true
45*7c06272fSJoe Hung  touchscreen-swapped-x-y: true
46*7c06272fSJoe Hung
47*7c06272fSJoe HungadditionalProperties: false
48*7c06272fSJoe Hung
49*7c06272fSJoe Hungrequired:
50*7c06272fSJoe Hung  - compatible
51*7c06272fSJoe Hung  - reg
52*7c06272fSJoe Hung  - interrupts
53*7c06272fSJoe Hung  - reset-gpios
54*7c06272fSJoe Hung
55*7c06272fSJoe Hungexamples:
56*7c06272fSJoe Hung  - |
57*7c06272fSJoe Hung    #include <dt-bindings/interrupt-controller/irq.h>
58*7c06272fSJoe Hung    #include <dt-bindings/gpio/gpio.h>
59*7c06272fSJoe Hung    i2c {
60*7c06272fSJoe Hung        #address-cells = <1>;
61*7c06272fSJoe Hung        #size-cells = <0>;
62*7c06272fSJoe Hung
63*7c06272fSJoe Hung        touchscreen@41 {
64*7c06272fSJoe Hung            compatible = "ilitek,ili2520";
65*7c06272fSJoe Hung            reg = <0x41>;
66*7c06272fSJoe Hung
67*7c06272fSJoe Hung            interrupt-parent = <&gpio1>;
68*7c06272fSJoe Hung            interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
69*7c06272fSJoe Hung            reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
70*7c06272fSJoe Hung            touchscreen-inverted-y;
71*7c06272fSJoe Hung            wakeup-source;
72*7c06272fSJoe Hung        };
73*7c06272fSJoe Hung    };
74