xref: /freebsd/sys/contrib/device-tree/Bindings/input/touchscreen/hynitron,cstxxx.yaml (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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/hynitron,cstxxx.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Hynitron cstxxx series touchscreen controller
8
9description: |
10  Bindings for Hynitron cstxxx series multi-touch touchscreen
11  controllers.
12
13maintainers:
14  - Chris Morgan <macromorgan@hotmail.com>
15
16allOf:
17  - $ref: touchscreen.yaml#
18
19properties:
20  compatible:
21    enum:
22      - hynitron,cst340
23
24  reg:
25    maxItems: 1
26
27  interrupts:
28    maxItems: 1
29
30  reset-gpios:
31    maxItems: 1
32
33  touchscreen-size-x: true
34  touchscreen-size-y: true
35  touchscreen-inverted-x: true
36  touchscreen-inverted-y: true
37  touchscreen-swapped-x-y: true
38
39additionalProperties: false
40
41required:
42  - compatible
43  - reg
44  - interrupts
45  - reset-gpios
46
47examples:
48  - |
49    #include <dt-bindings/gpio/gpio.h>
50    #include <dt-bindings/interrupt-controller/arm-gic.h>
51    i2c {
52      #address-cells = <1>;
53      #size-cells = <0>;
54      touchscreen@1a {
55        compatible = "hynitron,cst340";
56        reg = <0x1a>;
57        interrupt-parent = <&gpio4>;
58        interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
59        reset-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;
60        touchscreen-size-x = <640>;
61        touchscreen-size-y = <480>;
62      };
63    };
64
65...
66