0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Atmel maXTouch touchscreen/touchpad
0008
0009 maintainers:
0010 - Nick Dyer <nick@shmanahar.org>
0011 - Linus Walleij <linus.walleij@linaro.org>
0012
0013 description: |
0014 Atmel maXTouch touchscreen or touchpads such as the mXT244
0015 and similar devices.
0016
0017 properties:
0018 compatible:
0019 const: atmel,maxtouch
0020
0021 reg:
0022 maxItems: 1
0023
0024 interrupts:
0025 maxItems: 1
0026
0027 vdda-supply:
0028 description:
0029 Optional regulator for the AVDD analog voltage.
0030
0031 vdd-supply:
0032 description:
0033 Optional regulator for the VDD digital voltage.
0034
0035 reset-gpios:
0036 maxItems: 1
0037 description:
0038 Optional GPIO specifier for the touchscreen's reset pin
0039 (active low). The line must be flagged with
0040 GPIO_ACTIVE_LOW.
0041
0042 wake-gpios:
0043 maxItems: 1
0044 description:
0045 Optional GPIO specifier for the touchscreen's wake pin
0046 (active low). The line must be flagged with
0047 GPIO_ACTIVE_LOW.
0048
0049 linux,gpio-keymap:
0050 $ref: /schemas/types.yaml#/definitions/uint32-array
0051 description: |
0052 When enabled, the SPT_GPIOPWN_T19 object sends messages
0053 on GPIO bit changes. An array of up to 8 entries can be provided
0054 indicating the Linux keycode mapped to each bit of the status byte,
0055 starting at the LSB. Linux keycodes are defined in
0056 <dt-bindings/input/input.h>.
0057
0058 Note: the numbering of the GPIOs and the bit they start at varies
0059 between maXTouch devices. You must either refer to the documentation,
0060 or experiment to determine which bit corresponds to which input. Use
0061 KEY_RESERVED for unused padding values.
0062
0063 atmel,wakeup-method:
0064 $ref: /schemas/types.yaml#/definitions/uint32
0065 description: |
0066 The WAKE line is an active-low input that is used to wake up the touch
0067 controller from deep-sleep mode before communication with the controller
0068 could be started. This optional feature used to minimize current
0069 consumption when the controller is in deep sleep mode. This feature is
0070 relevant only to some controller families, like mXT1386 controller for
0071 example.
0072
0073 The WAKE pin can be connected in one of the following ways:
0074 1) left permanently low
0075 2) connected to the I2C-compatible SCL pin
0076 3) connected to a GPIO pin on the host
0077 enum:
0078 - 0 # ATMEL_MXT_WAKEUP_NONE
0079 - 1 # ATMEL_MXT_WAKEUP_I2C_SCL
0080 - 2 # ATMEL_MXT_WAKEUP_GPIO
0081 default: 0
0082
0083 wakeup-source:
0084 type: boolean
0085
0086 required:
0087 - compatible
0088 - reg
0089 - interrupts
0090
0091 additionalProperties: false
0092
0093 examples:
0094 - |
0095 #include <dt-bindings/interrupt-controller/irq.h>
0096 #include <dt-bindings/input/atmel-maxtouch.h>
0097 #include <dt-bindings/gpio/gpio.h>
0098 i2c {
0099 #address-cells = <1>;
0100 #size-cells = <0>;
0101 touchscreen@4a {
0102 compatible = "atmel,maxtouch";
0103 reg = <0x4a>;
0104 interrupt-parent = <&gpio>;
0105 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
0106 reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
0107 vdda-supply = <&ab8500_ldo_aux2_reg>;
0108 vdd-supply = <&ab8500_ldo_aux5_reg>;
0109 atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>;
0110 };
0111 };
0112
0113 ...