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