summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/input/atmel,maxtouch.yaml
blob: 3ec579d635704cf19c23975a8cf8e48a93717b05 (plain) (blame)
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel maXTouch touchscreen/touchpad

maintainers:
  - Nick Dyer <nick@shmanahar.org>
  - Linus Walleij <linus.walleij@linaro.org>

description: |
  Atmel maXTouch touchscreen or touchpads such as the mXT244
  and similar devices.

properties:
  compatible:
    const: atmel,maxtouch

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  vdda-supply:
    description:
      Optional regulator for the AVDD analog voltage.

  vdd-supply:
    description:
      Optional regulator for the VDD digital voltage.

  reset-gpios:
    maxItems: 1
    description:
      Optional GPIO specifier for the touchscreen's reset pin
      (active low). The line must be flagged with
      GPIO_ACTIVE_LOW.

  wake-gpios:
    maxItems: 1
    description:
      Optional GPIO specifier for the touchscreen's wake pin
      (active low). The line must be flagged with
      GPIO_ACTIVE_LOW.

  linux,gpio-keymap:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: |
      When enabled, the SPT_GPIOPWN_T19 object sends messages
      on GPIO bit changes. An array of up to 8 entries can be provided
      indicating the Linux keycode mapped to each bit of the status byte,
      starting at the LSB. Linux keycodes are defined in
      <dt-bindings/input/input.h>.

      Note: the numbering of the GPIOs and the bit they start at varies
      between maXTouch devices. You must either refer to the documentation,
      or experiment to determine which bit corresponds to which input. Use
      KEY_RESERVED for unused padding values.

  atmel,wakeup-method:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      The WAKE line is an active-low input that is used to wake up the touch
      controller from deep-sleep mode before communication with the controller
      could be started. This optional feature used to minimize current
      consumption when the controller is in deep sleep mode. This feature is
      relevant only to some controller families, like mXT1386 controller for
      example.

      The WAKE pin can be connected in one of the following ways:
       1) left permanently low
       2) connected to the I2C-compatible SCL pin
       3) connected to a GPIO pin on the host
    enum:
      - 0 # ATMEL_MXT_WAKEUP_NONE
      - 1 # ATMEL_MXT_WAKEUP_I2C_SCL
      - 2 # ATMEL_MXT_WAKEUP_GPIO
    default: 0

  wakeup-source:
    type: boolean

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/input/atmel-maxtouch.h>
    #include <dt-bindings/gpio/gpio.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      touchscreen@4a {
        compatible = "atmel,maxtouch";
        reg = <0x4a>;
        interrupt-parent = <&gpio>;
        interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
        reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
        vdda-supply = <&ab8500_ldo_aux2_reg>;
        vdd-supply = <&ab8500_ldo_aux5_reg>;
        atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>;
      };
    };

...