summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/input/touchscreen/mstar,msg2638.yaml
blob: af4f954de958d16bf93fa1bfe2a522d5504b2038 (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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/mstar,msg2638.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MStar msg2638 touchscreen controller Bindings

maintainers:
  - Vincent Knecht <vincent.knecht@mailoo.org>

allOf:
  - $ref: touchscreen.yaml#

properties:
  compatible:
    enum:
      - mstar,msg2138
      - mstar,msg2638

  reg:
    const: 0x26

  interrupts:
    maxItems: 1

  reset-gpios:
    maxItems: 1

  vdd-supply:
    description: Power supply regulator for the chip

  vddio-supply:
    description: Power supply regulator for the I2C bus

  touchscreen-size-x: true
  touchscreen-size-y: true

  linux,keycodes:
    minItems: 1
    maxItems: 4

additionalProperties: false

required:
  - compatible
  - reg
  - interrupts
  - reset-gpios
  - touchscreen-size-x
  - touchscreen-size-y

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      touchscreen@26 {
        compatible = "mstar,msg2638";
        reg = <0x26>;
        interrupt-parent = <&msmgpio>;
        interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
        reset-gpios = <&msmgpio 100 GPIO_ACTIVE_LOW>;
        pinctrl-names = "default";
        pinctrl-0 = <&ts_int_reset_default>;
        vdd-supply = <&pm8916_l17>;
        vddio-supply = <&pm8916_l5>;
        touchscreen-size-x = <2048>;
        touchscreen-size-y = <2048>;
      };
    };

...