104f1842aSLinus Walleij# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
204f1842aSLinus Walleij%YAML 1.2
304f1842aSLinus Walleij---
404f1842aSLinus Walleij$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
504f1842aSLinus Walleij$schema: http://devicetree.org/meta-schemas/core.yaml#
604f1842aSLinus Walleij
704f1842aSLinus Walleijtitle: Atmel maXTouch touchscreen/touchpad
804f1842aSLinus Walleij
904f1842aSLinus Walleijmaintainers:
1004f1842aSLinus Walleij  - Nick Dyer <nick@shmanahar.org>
1104f1842aSLinus Walleij  - Linus Walleij <linus.walleij@linaro.org>
1204f1842aSLinus Walleij
1304f1842aSLinus Walleijdescription: |
1404f1842aSLinus Walleij  Atmel maXTouch touchscreen or touchpads such as the mXT244
1504f1842aSLinus Walleij  and similar devices.
1604f1842aSLinus Walleij
1704f1842aSLinus Walleijproperties:
1804f1842aSLinus Walleij  compatible:
1904f1842aSLinus Walleij    const: atmel,maxtouch
2004f1842aSLinus Walleij
2104f1842aSLinus Walleij  reg:
2204f1842aSLinus Walleij    maxItems: 1
2304f1842aSLinus Walleij
2404f1842aSLinus Walleij  interrupts:
2504f1842aSLinus Walleij    maxItems: 1
2604f1842aSLinus Walleij
2704f1842aSLinus Walleij  vdda-supply:
2804f1842aSLinus Walleij    description:
2904f1842aSLinus Walleij      Optional regulator for the AVDD analog voltage.
3004f1842aSLinus Walleij
3104f1842aSLinus Walleij  vdd-supply:
3204f1842aSLinus Walleij    description:
3304f1842aSLinus Walleij      Optional regulator for the VDD digital voltage.
3404f1842aSLinus Walleij
3504f1842aSLinus Walleij  reset-gpios:
3604f1842aSLinus Walleij    maxItems: 1
3704f1842aSLinus Walleij    description:
3804f1842aSLinus Walleij      Optional GPIO specifier for the touchscreen's reset pin
3904f1842aSLinus Walleij      (active low). The line must be flagged with
4004f1842aSLinus Walleij      GPIO_ACTIVE_LOW.
4104f1842aSLinus Walleij
42ae4c86a0SDmitry Osipenko  wake-gpios:
43ae4c86a0SDmitry Osipenko    maxItems: 1
44ae4c86a0SDmitry Osipenko    description:
45ae4c86a0SDmitry Osipenko      Optional GPIO specifier for the touchscreen's wake pin
46ae4c86a0SDmitry Osipenko      (active low). The line must be flagged with
47ae4c86a0SDmitry Osipenko      GPIO_ACTIVE_LOW.
48ae4c86a0SDmitry Osipenko
4904f1842aSLinus Walleij  linux,gpio-keymap:
5004f1842aSLinus Walleij    $ref: /schemas/types.yaml#/definitions/uint32-array
5104f1842aSLinus Walleij    description: |
5204f1842aSLinus Walleij      When enabled, the SPT_GPIOPWN_T19 object sends messages
5304f1842aSLinus Walleij      on GPIO bit changes. An array of up to 8 entries can be provided
5404f1842aSLinus Walleij      indicating the Linux keycode mapped to each bit of the status byte,
5504f1842aSLinus Walleij      starting at the LSB. Linux keycodes are defined in
5604f1842aSLinus Walleij      <dt-bindings/input/input.h>.
5704f1842aSLinus Walleij
5804f1842aSLinus Walleij      Note: the numbering of the GPIOs and the bit they start at varies
5904f1842aSLinus Walleij      between maXTouch devices. You must either refer to the documentation,
6004f1842aSLinus Walleij      or experiment to determine which bit corresponds to which input. Use
6104f1842aSLinus Walleij      KEY_RESERVED for unused padding values.
6204f1842aSLinus Walleij
63ae4c86a0SDmitry Osipenko  atmel,wakeup-method:
64ae4c86a0SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
65ae4c86a0SDmitry Osipenko    description: |
66ae4c86a0SDmitry Osipenko      The WAKE line is an active-low input that is used to wake up the touch
67ae4c86a0SDmitry Osipenko      controller from deep-sleep mode before communication with the controller
68ae4c86a0SDmitry Osipenko      could be started. This optional feature used to minimize current
69ae4c86a0SDmitry Osipenko      consumption when the controller is in deep sleep mode. This feature is
70ae4c86a0SDmitry Osipenko      relevant only to some controller families, like mXT1386 controller for
71ae4c86a0SDmitry Osipenko      example.
72ae4c86a0SDmitry Osipenko
73ae4c86a0SDmitry Osipenko      The WAKE pin can be connected in one of the following ways:
74ae4c86a0SDmitry Osipenko       1) left permanently low
75ae4c86a0SDmitry Osipenko       2) connected to the I2C-compatible SCL pin
76ae4c86a0SDmitry Osipenko       3) connected to a GPIO pin on the host
77ae4c86a0SDmitry Osipenko    enum:
78ae4c86a0SDmitry Osipenko      - 0 # ATMEL_MXT_WAKEUP_NONE
79ae4c86a0SDmitry Osipenko      - 1 # ATMEL_MXT_WAKEUP_I2C_SCL
80ae4c86a0SDmitry Osipenko      - 2 # ATMEL_MXT_WAKEUP_GPIO
81ae4c86a0SDmitry Osipenko    default: 0
82ae4c86a0SDmitry Osipenko
83*5b0e6fd8SKrzysztof Kozlowski  wakeup-source:
84*5b0e6fd8SKrzysztof Kozlowski    type: boolean
85*5b0e6fd8SKrzysztof Kozlowski
8604f1842aSLinus Walleijrequired:
8704f1842aSLinus Walleij  - compatible
8804f1842aSLinus Walleij  - reg
8904f1842aSLinus Walleij  - interrupts
9004f1842aSLinus Walleij
9104f1842aSLinus WalleijadditionalProperties: false
9204f1842aSLinus Walleij
9304f1842aSLinus Walleijexamples:
9404f1842aSLinus Walleij  - |
9504f1842aSLinus Walleij    #include <dt-bindings/interrupt-controller/irq.h>
96ae4c86a0SDmitry Osipenko    #include <dt-bindings/input/atmel-maxtouch.h>
9704f1842aSLinus Walleij    #include <dt-bindings/gpio/gpio.h>
9804f1842aSLinus Walleij    i2c {
9904f1842aSLinus Walleij      #address-cells = <1>;
10004f1842aSLinus Walleij      #size-cells = <0>;
10104f1842aSLinus Walleij      touchscreen@4a {
10204f1842aSLinus Walleij        compatible = "atmel,maxtouch";
10304f1842aSLinus Walleij        reg = <0x4a>;
10404f1842aSLinus Walleij        interrupt-parent = <&gpio>;
10504f1842aSLinus Walleij        interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
10604f1842aSLinus Walleij        reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
10704f1842aSLinus Walleij        vdda-supply = <&ab8500_ldo_aux2_reg>;
10804f1842aSLinus Walleij        vdd-supply = <&ab8500_ldo_aux5_reg>;
109ae4c86a0SDmitry Osipenko        atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>;
11004f1842aSLinus Walleij      };
11104f1842aSLinus Walleij    };
11204f1842aSLinus Walleij
11304f1842aSLinus Walleij...
114