1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Atmel maXTouch touchscreen/touchpad
8
9maintainers:
10  - Nick Dyer <nick@shmanahar.org>
11  - Linus Walleij <linus.walleij@linaro.org>
12
13description: |
14  Atmel maXTouch touchscreen or touchpads such as the mXT244
15  and similar devices.
16
17properties:
18  compatible:
19    const: atmel,maxtouch
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    maxItems: 1
26
27  vdda-supply:
28    description:
29      Optional regulator for the AVDD analog voltage.
30
31  vdd-supply:
32    description:
33      Optional regulator for the VDD digital voltage.
34
35  reset-gpios:
36    maxItems: 1
37    description:
38      Optional GPIO specifier for the touchscreen's reset pin
39      (active low). The line must be flagged with
40      GPIO_ACTIVE_LOW.
41
42  wake-gpios:
43    maxItems: 1
44    description:
45      Optional GPIO specifier for the touchscreen's wake pin
46      (active low). The line must be flagged with
47      GPIO_ACTIVE_LOW.
48
49  linux,gpio-keymap:
50    $ref: /schemas/types.yaml#/definitions/uint32-array
51    description: |
52      When enabled, the SPT_GPIOPWN_T19 object sends messages
53      on GPIO bit changes. An array of up to 8 entries can be provided
54      indicating the Linux keycode mapped to each bit of the status byte,
55      starting at the LSB. Linux keycodes are defined in
56      <dt-bindings/input/input.h>.
57
58      Note: the numbering of the GPIOs and the bit they start at varies
59      between maXTouch devices. You must either refer to the documentation,
60      or experiment to determine which bit corresponds to which input. Use
61      KEY_RESERVED for unused padding values.
62
63  atmel,wakeup-method:
64    $ref: /schemas/types.yaml#/definitions/uint32
65    description: |
66      The WAKE line is an active-low input that is used to wake up the touch
67      controller from deep-sleep mode before communication with the controller
68      could be started. This optional feature used to minimize current
69      consumption when the controller is in deep sleep mode. This feature is
70      relevant only to some controller families, like mXT1386 controller for
71      example.
72
73      The WAKE pin can be connected in one of the following ways:
74       1) left permanently low
75       2) connected to the I2C-compatible SCL pin
76       3) connected to a GPIO pin on the host
77    enum:
78      - 0 # ATMEL_MXT_WAKEUP_NONE
79      - 1 # ATMEL_MXT_WAKEUP_I2C_SCL
80      - 2 # ATMEL_MXT_WAKEUP_GPIO
81    default: 0
82
83  wakeup-source:
84    type: boolean
85
86required:
87  - compatible
88  - reg
89  - interrupts
90
91additionalProperties: false
92
93examples:
94  - |
95    #include <dt-bindings/interrupt-controller/irq.h>
96    #include <dt-bindings/input/atmel-maxtouch.h>
97    #include <dt-bindings/gpio/gpio.h>
98    i2c {
99      #address-cells = <1>;
100      #size-cells = <0>;
101      touchscreen@4a {
102        compatible = "atmel,maxtouch";
103        reg = <0x4a>;
104        interrupt-parent = <&gpio>;
105        interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
106        reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
107        vdda-supply = <&ab8500_ldo_aux2_reg>;
108        vdd-supply = <&ab8500_ldo_aux5_reg>;
109        atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>;
110      };
111    };
112
113...
114