summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/input/touchscreen/goodix,gt9916.yaml
blob: d90f045ac06c89b6053e56b3d50829056698c3fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/goodix,gt9916.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Goodix Berlin series touchscreen controller

description: The Goodix Berlin series of touchscreen controllers
  be connected to either I2C or SPI buses.

maintainers:
  - Neil Armstrong <neil.armstrong@linaro.org>

allOf:
  - $ref: touchscreen.yaml#
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
  compatible:
    enum:
      - goodix,gt9916

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  reset-gpios:
    maxItems: 1

  avdd-supply:
    description: Analog power supply regulator on AVDD pin

  vddio-supply:
    description: power supply regulator on VDDIO pin

  spi-max-frequency: true
  touchscreen-inverted-x: true
  touchscreen-inverted-y: true
  touchscreen-size-x: true
  touchscreen-size-y: true
  touchscreen-swapped-x-y: true

additionalProperties: false

required:
  - compatible
  - reg
  - interrupts
  - avdd-supply
  - touchscreen-size-x
  - touchscreen-size-y

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/gpio/gpio.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      touchscreen@5d {
        compatible = "goodix,gt9916";
        reg = <0x5d>;
        interrupt-parent = <&gpio>;
        interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
        reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
        avdd-supply = <&ts_avdd>;
        touchscreen-size-x = <1024>;
        touchscreen-size-y = <768>;
      };
    };
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/gpio/gpio.h>
    spi {
      #address-cells = <1>;
      #size-cells = <0>;
      num-cs = <1>;
      cs-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
      touchscreen@0 {
        compatible = "goodix,gt9916";
        reg = <0>;
        interrupt-parent = <&gpio>;
        interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
        reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
        avdd-supply = <&ts_avdd>;
        spi-max-frequency = <1000000>;
        touchscreen-size-x = <1024>;
        touchscreen-size-y = <768>;
      };
    };

...