code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/iqs626a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Azoteq IQS626A Capacitive Touch Controller

maintainers:
  - Jeff LaBundy <jeff@labundy.com>

description: |
  The Azoteq IQS626A is a 14-channel capacitive touch controller that features
  additional Hall-effect and inductive sensing capabilities.

  Link to datasheet: https://www.azoteq.com/

allOf:
  - $ref: touchscreen/touchscreen.yaml#

properties:
  compatible:
    const: azoteq,iqs626a

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

  azoteq,suspend-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3]
    default: 0
    description: |
      Specifies the power mode during suspend as follows:
      0: Automatic (same as normal runtime, i.e. suspend/resume disabled)
      1: Low power (all sensing at a reduced reporting rate)
      2: Ultra-low power (ULP channel proximity sensing)
      3: Halt (no sensing)

  azoteq,clk-div:
    type: boolean
    description: Divides the device's core clock by a factor of 4.

  azoteq,ulp-enable:
    type: boolean
    description:
      Permits the device to automatically enter ultra-low-power mode from low-
      power mode.

  azoteq,ulp-update:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3, 4, 5, 6, 7]
    default: 3
    description: |
      Specifies the rate at which the trackpad, generic and Hall channels are
      updated during ultra-low-power mode as follows:
      0: 8
      1: 13
      2: 28
      3: 54
      4: 89
      5: 135
      6: 190
      7: 256

  azoteq,ati-band-disable:
    type: boolean
    description: Disables the ATI band check.

  azoteq,ati-lp-only:
    type: boolean
    description: Limits automatic ATI to low-power mode.

  azoteq,gpio3-select:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3, 4, 5, 6, 7]
    default: 1
    description: |
      Selects the channel or group of channels for which the GPIO3 pin
      represents touch state as follows:
      0: None
      1: ULP channel
      2: Trackpad
      3: Trackpad
      4: Generic channel 0
      5: Generic channel 1
      6: Generic channel 2
      7: Hall channel

  azoteq,reseed-select:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2, 3]
    default: 0
    description: |
      Specifies the event(s) that prompt the device to reseed (i.e. reset the
      long-term average) of an associated channel as follows:
      0: None
      1: Proximity
      2: Proximity or touch
      3: Proximity, touch or deep touch

  azoteq,thresh-extend:
    type: boolean
    description: Multiplies all touch and deep-touch thresholds by 4.

  azoteq,tracking-enable:
    type: boolean
    description:
      Enables all associated channels to track their respective reference
      channels.

  azoteq,reseed-offset:
    type: boolean
    description:
      Applies an 8-count offset to all long-term averages upon either ATI or
      reseed events.

  azoteq,rate-np-ms:
    minimum: 0
    maximum: 255
    default: 150
    description: Specifies the report rate (in ms) during normal-power mode.

  azoteq,rate-lp-ms:
    minimum: 0
    maximum: 255
    default: 150
    description: Specifies the report rate (in ms) during low-power mode.

  azoteq,rate-ulp-ms:
    multipleOf: 16
    minimum: 0
    maximum: 4080
    default: 0
    description: Specifies the report rate (in ms) during ultra-low-power mode.

  azoteq,timeout-pwr-ms:
    multipleOf: 512
    minimum: 0
    maximum: 130560
    default: 2560
    description:
      Specifies the length of time (in ms) to wait for an event before moving
      from normal-power mode to low-power mode, or (if 'azoteq,ulp-enable' is
      present) from low-power mode to ultra-low-power mode.

  azoteq,timeout-lta-ms:
    multipleOf: 512
    minimum: 0
    maximum: 130560
    default: 40960
    description:
      Specifies the length of time (in ms) to wait before resetting the long-
      term average of all channels. Specify the maximum timeout to disable it
      altogether.

  touchscreen-inverted-x: true
  touchscreen-inverted-y: true
  touchscreen-swapped-x-y: true

patternProperties:
  "^ulp-0|generic-[0-2]|hall$":
    type: object
    description:
      Represents a single sensing channel. A channel is active if defined and
      inactive otherwise.

    properties:
      azoteq,ati-exclude:
        type: boolean
        description:
          Prevents the channel from participating in an ATI event that is
          manually triggered during initialization.

      azoteq,reseed-disable:
        type: boolean
        description:
          Prevents the channel from being reseeded if the long-term average
          timeout (defined in 'azoteq,timeout-lta') expires.

      azoteq,meas-cap-decrease:
        type: boolean
        description:
          Decreases the internal measurement capacitance from 60 pF to 15 pF.

      azoteq,rx-inactive:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2]
        default: 0
        description: |
          Specifies how inactive CRX pins are to be terminated as follows:
          0: VSS
          1: Floating
          2: VREG (generic channels only)

      azoteq,linearize:
        type: boolean
        description:
          Enables linearization of the channel's counts (generic and Hall
          channels) or inverts the polarity of the channel's proximity or
          touch states (ULP channel).

      azoteq,dual-direction:
        type: boolean
        description:
          Specifies that the channel's long-term average is to freeze in the
          presence of either increasing or decreasing counts, thereby permit-
          ting events to be reported in either direction.

      azoteq,filt-disable:
        type: boolean
        description: Disables raw count filtering for the channel.

      azoteq,ati-mode:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        description: |
          Specifies the channel's ATI mode as follows:
          0: Disabled
          1: Semi-partial
          2: Partial
          3: Full

          The default value is a function of the channel and the device's reset
          user interface (RUI); reference the datasheet for further information
          about the available RUI options.

      azoteq,ati-base:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [75, 100, 150, 200]
        description:
          Specifies the channel's ATI base. The default value is a function
          of the channel and the device's RUI.

      azoteq,ati-target:
        $ref: /schemas/types.yaml#/definitions/uint32
        multipleOf: 32
        minimum: 0
        maximum: 2016
        description:
          Specifies the channel's ATI target. The default value is a function
          of the channel and the device's RUI.

      azoteq,cct-increase:
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 16
        default: 0
        description:
          Specifies the degree to which the channel's charge cycle time is to
          be increased, with 0 representing no increase. The maximum value is
          limited to 4 in the case of the ULP channel, and the property is un-
          available entirely in the case of the Hall channel.

      azoteq,proj-bias:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description: |
          Specifies the bias current applied during projected-capacitance
          sensing as follows:
          0: 2.5 uA
          1: 5 uA
          2: 10 uA
          3: 20 uA

          This property is unavailable in the case of the Hall channel.

      azoteq,sense-freq:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        description: |
          Specifies the channel's sensing frequency as follows (parenthesized
          numbers represent the frequency if 'azoteq,clk-div' is present):
          0: 4 MHz (1 MHz)
          1: 2 MHz (500 kHz)
          2: 1 MHz (250 kHz)
          3: 500 kHz (125 kHz)

          This property is unavailable in the case of the Hall channel. The
          default value is a function of the channel and the device's RUI.

      azoteq,ati-band-tighten:
        type: boolean
        description:
          Tightens the ATI band from 1/8 to 1/16 of the desired target (ULP and
          generic channels only).

      azoteq,proj-enable:
        type: boolean
        description: Enables projected-capacitance sensing (ULP channel only).

      azoteq,filt-str-np-cnt:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description:
          Specifies the raw count filter strength during normal-power mode (ULP
          and generic channels only).

      azoteq,filt-str-lp-cnt:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description:
          Specifies the raw count filter strength during low-power mode (ULP and
          generic channels only).

      azoteq,filt-str-np-lta:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description:
          Specifies the long-term average filter strength during normal-power
          mode (ULP and generic channels only).

      azoteq,filt-str-lp-lta:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description:
          Specifies the long-term average filter strength during low-power mode
          (ULP and generic channels only).

      azoteq,rx-enable:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 1
        maxItems: 8
        items:
          minimum: 0
          maximum: 7
        description:
          Specifies the CRX pin(s) associated with the channel.

          This property is unavailable in the case of the Hall channel. The
          default value is a function of the channel and the device's RUI.

      azoteq,tx-enable:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 1
        maxItems: 8
        items:
          minimum: 0
          maximum: 7
        description:
          Specifies the TX pin(s) associated with the channel.

          This property is unavailable in the case of the Hall channel. The
          default value is a function of the channel and the device's RUI.

      azoteq,local-cap-size:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3, 4]
        default: 0
        description: |
          Specifies the capacitance to be added to the channel as follows:
          0: 0 pF
          1: 0.5 pF
          2: 1.0 pF
          3: 1.5 pF
          4: 2.0 pF

          This property is unavailable in the case of the ULP or Hall channels.

      azoteq,sense-mode:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 8, 9, 12, 14, 15]
        description: |
          Specifies the channel's sensing mode as follows:
          0:  Self capacitance
          1:  Projected capacitance
          8:  Self inductance
          9:  Mutual inductance
          12: External
          14: Hall effect
          15: Temperature

          This property is unavailable in the case of the ULP or Hall channels.
          The default value is a function of the channel and the device's RUI.

      azoteq,tx-freq:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description: |
          Specifies the inductive sensing excitation frequency as follows
          (parenthesized numbers represent the frequency if 'azoteq,clk-div'
          is present):
          0: 16 MHz (4 MHz)
          1: 8 MHz (2 MHz)
          2: 4 MHz (1 MHz)
          3: 2 MHz (500 kHz)

          This property is unavailable in the case of the ULP or Hall channels.

      azoteq,invert-enable:
        type: boolean
        description:
          Inverts the polarity of the states reported for proximity, touch and
          deep-touch events relative to their respective thresholds (generic
          channels only).

      azoteq,comp-disable:
        type: boolean
        description:
          Disables compensation for the channel (generic channels only).

      azoteq,static-enable:
        type: boolean
        description:
          Enables the static front-end for the channel (generic channels only).

      azoteq,assoc-select:
        $ref: /schemas/types.yaml#/definitions/string-array
        minItems: 1
        maxItems: 6
        items:
          enum:
            - ulp-0
            - trackpad-3x2
            - trackpad-3x3
            - generic-0
            - generic-1
            - generic-2
            - hall
        description:
          Specifies the associated channels for which the channel serves as a
          reference channel. By default, no channels are selected. This prop-
          erty is only available for the generic channels.

      azoteq,assoc-weight:
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 255
        default: 0
        description:
          Specifies the channel's impact weight if it acts as an associated
          channel (0 = 0% impact, 255 = 200% impact). This property is only
          available for the generic channels.

    patternProperties:
      "^event-(prox|touch|deep)(-alt)?$":
        type: object
        $ref: input.yaml#
        description:
          Represents a proximity, touch or deep-touch event reported by the
          channel in response to a decrease in counts. Node names suffixed with
          '-alt' instead correspond to an increase in counts.

          By default, the long-term average tracks an increase in counts such
          that only events corresponding to a decrease in counts are reported
          (refer to the datasheet for more information).

          Specify 'azoteq,dual-direction' to freeze the long-term average when
          the counts increase or decrease such that events of either direction
          can be reported. Alternatively, specify 'azoteq,invert-enable' to in-
          vert the polarity of the states reported by the channel.

          Complementary events (e.g. event-touch and event-touch-alt) can both
          be present and specify different key or switch codes, but not differ-
          ent thresholds or hysteresis (if applicable).

          Proximity events are unavailable in the case of the Hall channel, and
          deep-touch events are only available for the generic channels. Unless
          otherwise specified, default values are a function of the channel and
          the device's RUI.

        properties:
          azoteq,thresh:
            $ref: /schemas/types.yaml#/definitions/uint32
            minimum: 0
            maximum: 255
            description: Specifies the threshold for the event.

          azoteq,hyst:
            $ref: /schemas/types.yaml#/definitions/uint32
            minimum: 0
            maximum: 15
            description:
              Specifies the hysteresis for the event (touch and deep-touch
              events only).

          linux,code: true

          linux,input-type:
            enum: [1, 5]
            description:
              Specifies whether the event is to be interpreted as a key (1) or
              a switch (5). By default, Hall-channel events are interpreted as
              switches and all others are interpreted as keys.

        additionalProperties: false

    dependencies:
      azoteq,assoc-weight: ["azoteq,assoc-select"]

    additionalProperties: false

  "^trackpad-3x[2-3]$":
    type: object
    $ref: input.yaml#
    description:
      Represents all channels associated with the trackpad. The channels are
      collectively active if the trackpad is defined and inactive otherwise.

    properties:
      azoteq,ati-exclude:
        type: boolean
        description:
          Prevents the trackpad channels from participating in an ATI event
          that is manually triggered during initialization.

      azoteq,reseed-disable:
        type: boolean
        description:
          Prevents the trackpad channels from being reseeded if the long-term
          average timeout (defined in 'azoteq,timeout-lta') expires.

      azoteq,meas-cap-decrease:
        type: boolean
        description:
          Decreases the internal measurement capacitance from 60 pF to 15 pF.

      azoteq,rx-inactive:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1]
        default: 0
        description: |
          Specifies how inactive CRX pins are to be terminated as follows:
          0: VSS
          1: Floating

      azoteq,linearize:
        type: boolean
        description: Inverts the polarity of the trackpad's touch state.

      azoteq,dual-direction:
        type: boolean
        description:
          Specifies that the trackpad's long-term averages are to freeze in
          the presence of either increasing or decreasing counts, thereby
          permitting events to be reported in either direction.

      azoteq,filt-disable:
        type: boolean
        description: Disables raw count filtering for the trackpad channels.

      azoteq,ati-mode:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description: |
          Specifies the trackpad's ATI mode as follows:
          0: Disabled
          1: Semi-partial
          2: Partial
          3: Full

      azoteq,ati-base:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 6
        maxItems: 9
        items:
          minimum: 45
          maximum: 300
        default: [45, 45, 45, 45, 45, 45, 45, 45, 45]
        description: Specifies each individual trackpad channel's ATI base.

      azoteq,ati-target:
        $ref: /schemas/types.yaml#/definitions/uint32
        multipleOf: 32
        minimum: 0
        maximum: 2016
        default: 0
        description: Specifies the trackpad's ATI target.

      azoteq,cct-increase:
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 4
        default: 0
        description:
          Specifies the degree to which the trackpad's charge cycle time is to
          be increased, with 0 representing no increase.

      azoteq,proj-bias:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description: |
          Specifies the bias current applied during projected-capacitance
          sensing as follows:
          0: 2.5 uA
          1: 5 uA
          2: 10 uA
          3: 20 uA

      azoteq,sense-freq:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description: |
          Specifies the trackpad's sensing frequency as follows (parenthesized
          numbers represent the frequency if 'azoteq,clk-div' is present):
          0: 4 MHz (1 MHz)
          1: 2 MHz (500 kHz)
          2: 1 MHz (250 kHz)
          3: 500 kHz (125 kHz)

      azoteq,ati-band-tighten:
        type: boolean
        description:
          Tightens the ATI band from 1/8 to 1/16 of the desired target.

      azoteq,thresh:
        $ref: /schemas/types.yaml#/definitions/uint32-array
        minItems: 6
        maxItems: 9
        items:
          minimum: 0
          maximum: 255
        default: [0, 0, 0, 0, 0, 0, 0, 0, 0]
        description:
          Specifies each individual trackpad channel's touch threshold.

      azoteq,hyst:
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 15
        default: 0
        description: Specifies the trackpad's touch hysteresis.

      azoteq,lta-update:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3, 4, 5, 6, 7]
        default: 0
        description: |
          Specifies the update rate of the trackpad's long-term average during
          ultra-low-power mode as follows:
          0: 2
          1: 4
          2: 8
          3: 16
          4: 32
          5: 64
          6: 128
          7: 255

      azoteq,filt-str-trackpad:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description: Specifies the trackpad coordinate filter strength.

      azoteq,filt-str-np-cnt:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description:
          Specifies the raw count filter strength during normal-power mode.

      azoteq,filt-str-lp-cnt:
        $ref: /schemas/types.yaml#/definitions/uint32
        enum: [0, 1, 2, 3]
        default: 0
        description:
          Specifies the raw count filter strength during low-power mode.

      linux,keycodes:
        minItems: 1
        maxItems: 6
        description: |
          Specifies the numeric keycodes associated with each available gesture
          in the following order (enter 0 for unused gestures):
          0: Positive flick or swipe in X direction
          1: Negative flick or swipe in X direction
          2: Positive flick or swipe in Y direction
          3: Negative flick or swipe in Y direction
          4: Tap
          5: Hold

      azoteq,gesture-swipe:
        type: boolean
        description:
          Directs the device to interpret axial gestures as a swipe (finger
          remains on trackpad) instead of a flick (finger leaves trackpad).

      azoteq,timeout-tap-ms:
        multipleOf: 16
        minimum: 0
        maximum: 4080
        default: 0
        description:
          Specifies the length of time (in ms) within which a trackpad touch
          must be released in order to be interpreted as a tap.

      azoteq,timeout-swipe-ms:
        multipleOf: 16
        minimum: 0
        maximum: 4080
        default: 0
        description:
          Specifies the length of time (in ms) within which an axial gesture
          must be completed in order to be interpreted as a flick or swipe.

      azoteq,thresh-swipe:
        $ref: /schemas/types.yaml#/definitions/uint32
        minimum: 0
        maximum: 255
        default: 0
        description:
          Specifies the number of points across which an axial gesture must
          travel in order to be interpreted as a flick or swipe.

    dependencies:
      azoteq,gesture-swipe: ["linux,keycodes"]
      azoteq,timeout-tap-ms: ["linux,keycodes"]
      azoteq,timeout-swipe-ms: ["linux,keycodes"]
      azoteq,thresh-swipe: ["linux,keycodes"]

    additionalProperties: false

required:
  - compatible
  - reg
  - interrupts
  - "#address-cells"
  - "#size-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
            #address-cells = <1>;
            #size-cells = <0>;

            touch@44 {
                    #address-cells = <1>;
                    #size-cells = <0>;

                    compatible = "azoteq,iqs626a";
                    reg = <0x44>;
                    interrupt-parent = <&gpio>;
                    interrupts = <17 IRQ_TYPE_LEVEL_LOW>;

                    azoteq,rate-np-ms = <16>;
                    azoteq,rate-lp-ms = <160>;

                    azoteq,timeout-pwr-ms = <2560>;
                    azoteq,timeout-lta-ms = <32768>;

                    ulp-0 {
                            azoteq,meas-cap-decrease;

                            azoteq,ati-base = <75>;
                            azoteq,ati-target = <1024>;

                            azoteq,rx-enable = <2>, <3>, <4>,
                                               <5>, <6>, <7>;

                            event-prox {
                                    linux,code = <KEY_POWER>;
                            };
                    };

                    trackpad-3x3 {
                            azoteq,filt-str-np-cnt = <1>;
                            azoteq,filt-str-lp-cnt = <1>;

                            azoteq,hyst = <4>;
                            azoteq,thresh = <35>, <40>, <40>,
                                            <38>, <33>, <38>,
                                            <35>, <35>, <35>;

                            azoteq,ati-mode = <3>;
                            azoteq,ati-base = <195>, <195>, <195>,
                                              <195>, <195>, <195>,
                                              <195>, <195>, <195>;
                            azoteq,ati-target = <512>;

                            azoteq,proj-bias = <1>;
                            azoteq,sense-freq = <2>;

                            linux,keycodes = <KEY_VOLUMEUP>,
                                             <KEY_VOLUMEDOWN>,
                                             <KEY_NEXTSONG>,
                                             <KEY_PREVIOUSSONG>,
                                             <KEY_PLAYPAUSE>,
                                             <KEY_STOPCD>;

                            azoteq,gesture-swipe;
                            azoteq,timeout-swipe-ms = <800>;
                            azoteq,timeout-tap-ms = <400>;
                            azoteq,thresh-swipe = <40>;
                    };

                    /*
                     * Preserve the default register settings for
                     * the temperature-tracking channel leveraged
                     * by reset user interface (RUI) 1.
                     *
                     * Scalar properties (e.g. ATI mode) are left
                     * untouched by simply omitting them; boolean
                     * properties must be specified explicitly as
                     * needed.
                     */
                    generic-2 {
                            azoteq,reseed-disable;
                            azoteq,meas-cap-decrease;
                            azoteq,dual-direction;
                            azoteq,comp-disable;
                            azoteq,static-enable;
                    };

                    hall {
                            azoteq,reseed-disable;
                            azoteq,meas-cap-decrease;

                            event-touch {
                                    linux,code = <SW_LID>;
                            };
                    };
            };
    };

...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/iqs62x-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Azoteq IQS620A/621/622/624/625 Keys and Switches

maintainers:
  - Jeff LaBundy <jeff@labundy.com>

allOf:
  - $ref: input.yaml#

description: |
  The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors
  feature a variety of self-capacitive, mutual-inductive and Hall-effect sens-
  ing capabilities that can facilitate a variety of contactless key and switch
  applications.

  These functions are collectively represented by a "keys" child node from the
  parent MFD driver. See Documentation/devicetree/bindings/mfd/iqs62x.yaml for
  further details and examples. Sensor hardware configuration (self-capacitive
  vs. mutual-inductive, etc.) is selected based on the device's firmware.

properties:
  compatible:
    enum:
      - azoteq,iqs620a-keys
      - azoteq,iqs621-keys
      - azoteq,iqs622-keys
      - azoteq,iqs624-keys
      - azoteq,iqs625-keys

  linux,keycodes:
    minItems: 1
    maxItems: 16
    description: |
      Specifies the numeric keycodes associated with each available touch or
      proximity event according to the following table. An 'x' indicates the
      event is supported for a given device. Specify 0 for unused events.

      -------------------------------------------------------------------------
      | #  | Event              | IQS620A | IQS621 | IQS622 | IQS624 | IQS625 |
      -------------------------------------------------------------------------
      | 0  | CH0 Touch          |    x    |    x   |    x   |    x   |    x   |
      |    | Antenna 1 Touch*   |    x    |        |        |        |        |
      -------------------------------------------------------------------------
      | 1  | CH0 Proximity      |    x    |    x   |    x   |    x   |    x   |
      |    | Antenna 1 Prox.*   |    x    |        |        |        |        |
      -------------------------------------------------------------------------
      | 2  | CH1 Touch          |    x    |    x   |    x   |    x   |    x   |
      |    | Ant. 1 Deep Touch* |    x    |        |        |        |        |
      -------------------------------------------------------------------------
      | 3  | CH1 Proximity      |    x    |    x   |    x   |    x   |    x   |
      -------------------------------------------------------------------------
      | 4  | CH2 Touch          |    x    |        |        |        |        |
      -------------------------------------------------------------------------
      | 5  | CH2 Proximity      |    x    |        |        |        |        |
      |    | Antenna 2 Prox.*   |    x    |        |        |        |        |
      -------------------------------------------------------------------------
      | 6  | Metal (+) Touch**  |    x    |    x   |        |        |        |
      |    | Ant. 2 Deep Touch* |    x    |        |        |        |        |
      -------------------------------------------------------------------------
      | 7  | Metal (+) Prox.**  |    x    |    x   |        |        |        |
      |    | Antenna 2 Touch*   |    x    |        |        |        |        |
      -------------------------------------------------------------------------
      | 8  | Metal (-) Touch**  |    x    |    x   |        |        |        |
      -------------------------------------------------------------------------
      | 9  | Metal (-) Prox.**  |    x    |    x   |        |        |        |
      -------------------------------------------------------------------------
      | 10 | SAR Active***      |    x    |        |    x   |        |        |
      -------------------------------------------------------------------------
      | 11 | SAR Quick Rel.***  |    x    |        |    x   |        |        |
      -------------------------------------------------------------------------
      | 12 | SAR Movement***    |    x    |        |    x   |        |        |
      -------------------------------------------------------------------------
      | 13 | SAR Filter Halt*** |    x    |        |    x   |        |        |
      -------------------------------------------------------------------------
      | 14 | Wheel Up           |         |        |        |    x   |        |
      -------------------------------------------------------------------------
      | 15 | Wheel Down         |         |        |        |    x   |        |
      -------------------------------------------------------------------------
      *   Two-channel SAR. Replaces CH0-2 plus metal touch and proximity events
          if enabled via firmware.
      **  "+" and "-" refer to the polarity of a channel's delta (LTA - counts),
          where "LTA" is defined as the channel's long-term average.
      *** One-channel SAR. Replaces CH0-2 touch and proximity events if enabled
          via firmware.

patternProperties:
  "^hall-switch-(north|south)$":
    type: object
    $ref: input.yaml#
    description:
      Represents north/south-field Hall-effect sensor touch or proximity
      events. Note that north/south-field orientation is reversed on the
      IQS620AXzCSR device due to its flip-chip package.

    properties:
      linux,code: true

      azoteq,use-prox:
        $ref: /schemas/types.yaml#/definitions/flag
        description:
          If present, specifies that Hall-effect sensor reporting should
          use the device's wide-range proximity threshold instead of its
          close-range touch threshold (default).

    required:
      - linux,code

    additionalProperties: false

if:
  properties:
    compatible:
      contains:
        enum:
          - azoteq,iqs624-keys
          - azoteq,iqs625-keys
then:
  patternProperties:
    "^hall-switch-(north|south)$": false

required:
  - compatible
  - linux,keycodes

additionalProperties: false

...

repo_name: angery/linux


code:
NXP LPC32xx Key Scan Interface

This binding is based on the matrix-keymap binding with the following
changes:

Required Properties:
- compatible: Should be "nxp,lpc3220-key"
- reg: Physical base address of the controller and length of memory mapped
  region.
- interrupts: The interrupt number to the cpu.
- clocks: phandle to clock controller plus clock-specifier pair
- nxp,debounce-delay-ms: Debounce delay in ms
- nxp,scan-delay-ms: Repeated scan period in ms
- linux,keymap: the key-code to be reported when the key is pressed
  and released, see also
  Documentation/devicetree/bindings/input/matrix-keymap.txt

Note: keypad,num-rows and keypad,num-columns are required, and must be equal
since LPC32xx only supports square matrices

Example:

	key@40050000 {
		compatible = "nxp,lpc3220-key";
		reg = <0x40050000 0x1000>;
		clocks = <&clk LPC32XX_CLK_KEY>;
		interrupt-parent = <&sic1>;
		interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
		keypad,num-rows = <1>;
		keypad,num-columns = <1>;
		nxp,debounce-delay-ms = <3>;
		nxp,scan-delay-ms = <34>;
		linux,keymap = <0x00000002>;
	};


code: This file has been moved to matrix-keymap.yaml


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/matrix-keymap.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Common key matrices binding for matrix-connected key boards

maintainers:
  - Olof Johansson <olof@lixom.net>

description: |
  A simple common binding for matrix-connected key boards. Currently targeted at
  defining the keys in the scope of linux key codes since that is a stable and
  standardized interface at this time.

  Some users of this binding might choose to specify secondary keymaps for
  cases where there is a modifier key such as a Fn key. Proposed names
  for said properties are "linux,fn-keymap" or with another descriptive
  word for the modifier other from "Fn".

properties:
  linux,keymap:
    $ref: '/schemas/types.yaml#/definitions/uint32-array'
    description: |
      An array of packed 1-cell entries containing the equivalent of row,
      column and linux key-code. The 32-bit big endian cell is packed as:
          row << 24 | column << 16 | key-code

  keypad,num-rows:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Number of row lines connected to the keypad controller.

  keypad,num-columns:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Number of column lines connected to the keypad controller.

additionalProperties: true

examples:
  - |
    keypad {
        /* ... */
        linux,keymap = < 0x00030012
                         0x0102003a >;
        keypad,num-rows = <2>;
        keypad,num-columns = <8>;
    };


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/max77650-onkey.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Onkey driver for MAX77650 PMIC from Maxim Integrated.

maintainers:
  - Bartosz Golaszewski <bgolaszewski@baylibre.com>

description: |
  This module is part of the MAX77650 MFD device. For more details
  see Documentation/devicetree/bindings/mfd/max77650.yaml.

  The onkey controller is represented as a sub-node of the PMIC node on
  the device tree.

allOf:
  - $ref: input.yaml#

properties:
  compatible:
    const: maxim,max77650-onkey

  linux,code:
    default: 116  # KEY_POWER

  maxim,onkey-slide:
    $ref: /schemas/types.yaml#/definitions/flag
    description:
      The system's button is a slide switch, not the default push button.

required:
  - compatible
additionalProperties: false

...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/mediatek,mt6779-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Mediatek's Keypad Controller

maintainers:
  - Mattijs Korpershoek <mkorpershoek@baylibre.com>

allOf:
  - $ref: "/schemas/input/matrix-keymap.yaml#"

description: |
  Mediatek's Keypad controller is used to interface a SoC with a matrix-type
  keypad device. The keypad controller supports multiple row and column lines.
  A key can be placed at each intersection of a unique row and a unique column.
  The keypad controller can sense a key-press and key-release and report the
  event using a interrupt to the cpu.

properties:
  compatible:
    oneOf:
      - const: mediatek,mt6779-keypad
      - items:
          - enum:
              - mediatek,mt6873-keypad
          - const: mediatek,mt6779-keypad

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: kpd

  wakeup-source:
    description: use any event on keypad as wakeup event
    type: boolean

  debounce-delay-ms:
    maximum: 256
    default: 16

  mediatek,keys-per-group:
    description: each (row, column) group has multiple keys
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 1
    maximum: 2

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    soc {
        #address-cells = <2>;
        #size-cells = <2>;

        keyboard@10010000 {
          compatible = "mediatek,mt6779-keypad";
          reg = <0 0x10010000 0 0x1000>;
          interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_FALLING>;
          clocks = <&clk26m>;
          clock-names = "kpd";
        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/mediatek,pmic-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MediaTek PMIC Keys

maintainers:
  - Chen Zhong <chen.zhong@mediatek.com>

allOf:
  - $ref: input.yaml#

description: |
  There are two key functions provided by MT6397, MT6323 and other MediaTek
  PMICs: pwrkey and homekey.
  The key functions are defined as the subnode of the function node provided
  by the PMIC that is defined as a Multi-Function Device (MFD).

  For MediaTek MT6323/MT6397 PMIC bindings see
  Documentation/devicetree/bindings/mfd/mt6397.txt

properties:
  compatible:
    enum:
      - mediatek,mt6323-keys
      - mediatek,mt6331-keys
      - mediatek,mt6358-keys
      - mediatek,mt6397-keys

  power-off-time-sec: true

  mediatek,long-press-mode:
    description: |
      Key long-press force shutdown setting
      0 - disabled
      1 - pwrkey
      2 - pwrkey+homekey
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 0
    maximum: 2

patternProperties:
  "^((power|home)|(key-[a-z0-9-]+|[a-z0-9-]+-key))$":
    $ref: input.yaml#

    properties:
      interrupts:
        minItems: 1
        items:
          - description: Key press interrupt
          - description: Key release interrupt

      interrupt-names: true

      linux-keycodes:
        maxItems: 1

      wakeup-source: true

    required:
      - linux,keycodes

    if:
      properties:
        interrupt-names:
          contains:
            const: powerkey
    then:
      properties:
        interrupt-names:
          minItems: 1
          items:
            - const: powerkey
            - const: powerkey_r
    else:
      properties:
        interrupt-names:
          minItems: 1
          items:
            - const: homekey
            - const: homekey_r

    unevaluatedProperties: false

required:
  - compatible

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    pmic {
        compatible = "mediatek,mt6397";

        keys {
          compatible = "mediatek,mt6397-keys";
          mediatek,long-press-mode = <1>;
          power-off-time-sec = <0>;

          key-power {
            linux,keycodes = <KEY_POWER>;
            wakeup-source;
          };

          key-home {
            linux,keycodes = <KEY_VOLUMEDOWN>;
          };
        };
    };


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/input/microchip,cap11xx.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Device tree bindings for Microchip CAP11xx based capacitive touch sensors

description: |
  The Microchip CAP1xxx Family of RightTouchTM multiple-channel capacitive
  touch controllers and LED drivers. The device communication via I2C only.

maintainers:
  - Rob Herring <robh@kernel.org>

properties:
  compatible:
    enum:
      - microchip,cap1106
      - microchip,cap1126
      - microchip,cap1188
      - microchip,cap1206

  reg:
    maxItems: 1

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

  interrupts:
    maxItems: 1
    description: |
      Property describing the interrupt line the
      device's ALERT#/CM_IRQ# pin is connected to.
      The device only has one interrupt source.

  autorepeat:
    description: |
      Enables the Linux input system's autorepeat feature on the input device.

  linux,keycodes:
    minItems: 6
    maxItems: 6
    description: |
      Specifies an array of numeric keycode values to
      be used for the channels. If this property is
      omitted, KEY_A, KEY_B, etc are used as defaults.
      The array must have exactly six entries.

  microchip,sensor-gain:
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 1
    enum: [1, 2, 4, 8]
    description: |
      Defines the gain of the sensor circuitry. This
      effectively controls the sensitivity, as a
      smaller delta capacitance is required to
      generate the same delta count values.

  microchip,irq-active-high:
    type: boolean
    description: |
      By default the interrupt pin is active low
      open drain. This property allows using the active
      high push-pull output.

patternProperties:
  "^led@[0-7]$":
    type: object
    description: CAP11xx LEDs
    $ref: /schemas/leds/common.yaml#

    properties:
      reg:
        enum: [0, 1, 2, 3, 4, 5, 6, 7]

      label: true

      linux,default-trigger: true

      default-state: true

    required:
      - reg

    additionalProperties: false

allOf:
  - $ref: input.yaml
  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,cap1106
    then:
      patternProperties:
        "^led@[0-7]$": false

required:
  - compatible
  - interrupts

additionalProperties: false

examples:
  - |
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      touch@28 {
        compatible = "microchip,cap1188";
        interrupt-parent = <&gpio1>;
        interrupts = <0 0>;
        reg = <0x28>;
        autorepeat;
        microchip,sensor-gain = <2>;

        linux,keycodes = <103>,	/* KEY_UP */
                         <106>,	/* KEY_RIGHT */
                         <108>,	/* KEY_DOWN */
                         <105>,	/* KEY_LEFT */
                         <109>,	/* KEY_PAGEDOWN */
                         <104>;	/* KEY_PAGEUP */

        #address-cells = <1>;
        #size-cells = <0>;

        led@0 {
                label = "cap11xx:green:usr0";
                reg = <0>;
        };

        led@1 {
                label = "cap11xx:green:usr1";
                reg = <1>;
        };

        led@2 {
                label = "cap11xx:green:alive";
                reg = <2>;
                linux,default-trigger = "heartbeat";
        };
      };
    };


code:
Microchip AT42QT1050 Five-channel Touch Sensor IC

The AT42QT1050 (QT1050) is a QTouchADC sensor device. The device can sense from
one to five keys, dependent on mode. The QT1050 includes all signal processing
functions necessary to provide stable sensing under a wide variety of changing
conditions, and the outputs are fully debounced.

The touchkey device node should be placed inside an I2C bus node.

Required properties:
- compatible: Must be "microchip,qt1050"
- reg: The I2C address of the device
- interrupts: The sink for the touchpad's IRQ output,
  see ../interrupt-controller/interrupts.txt

Optional properties:
- wakeup-source: touch keys can be used as a wakeup source

Each button (key) is represented as a sub-node:

Each not specified key or key with linux,code set to KEY_RESERVED gets disabled
in HW.

Subnode properties:
- linux,code: Keycode to emit.
- reg: The key number. Valid values: 0, 1, 2, 3, 4.

Optional subnode-properties:

If a optional property is missing or has a invalid value the default value is
taken.

- microchip,pre-charge-time-ns:
  Each touchpad need some time to precharge. The value depends on the mechanical
  layout.
  Valid value range: 0 - 637500; values must be a multiple of 2500;
  default is 0.
- microchip,average-samples:
  Number of data samples which are averaged for each read.
  Valid values: 1, 4, 16, 64, 256, 1024, 4096, 16384; default is 1.
- microchip,average-scaling:
  The scaling factor which is used to scale the average-samples.
  Valid values: 1, 2, 4, 8, 16, 32, 64, 128; default is 1.
- microchip,threshold:
  Number of counts to register a touch detection.
  Valid value range: 0 - 255; default is 20.

Example:
QT1050 with 3 non continuous keys, key2 and key4 are disabled.

touchkeys@41 {
	compatible = "microchip,qt1050";
	reg = <0x41>;
	interrupt-parent = <&gpio0>;
	interrupts = <17 IRQ_TYPE_EDGE_FALLING>;

	up@0 {
		reg = <0>;
		linux,code = <KEY_UP>;
		microchip,average-samples = <64>;
		microchip,average-scaling = <16>;
		microchip,pre-charge-time-ns = <10000>;
	};

	right@1 {
		reg = <1>;
		linux,code = <KEY_RIGHT>;
		microchip,average-samples = <64>;
		microchip,average-scaling = <8>;
	};

	down@3 {
		reg = <3>;
		linux,code = <KEY_DOWN>;
		microchip,average-samples = <256>;
		microchip,average-scaling = <16>;
	};
};


code:
* Tegra keyboard controller
The key controller has maximum 24 pins to make matrix keypad. Any pin
can be configured as row or column. The maximum column pin can be 8
and maximum row pins can be 16 for Tegra20/Tegra30.

Required properties:
- compatible: "nvidia,tegra20-kbc"
- reg: Register base address of KBC.
- interrupts: Interrupt number for the KBC.
- nvidia,kbc-row-pins: The KBC pins which are configured as row. This is an
  array of pin numbers which is used as rows.
- nvidia,kbc-col-pins: The KBC pins which are configured as column. This is an
  array of pin numbers which is used as column.
- linux,keymap: The keymap for keys as described in the binding document
  devicetree/bindings/input/matrix-keymap.txt.
- clocks: Must contain one entry, for the module clock.
  See ../clocks/clock-bindings.txt for details.
- resets: Must contain an entry for each entry in reset-names.
  See ../reset/reset.txt for details.
- reset-names: Must include the following entries:
  - kbc

Optional properties, in addition to those specified by the shared
matrix-keyboard bindings:

- linux,fn-keymap: a second keymap, same specification as the
  matrix-keyboard-controller spec but to be used when the KEY_FN modifier
  key is pressed.
- nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing
- nvidia,repeat-delay-ms: delay in milliseconds before repeat starts
- nvidia,ghost-filter: enable ghost filtering for this device
- wakeup-source: configure keyboard as a wakeup source for suspend/resume
		 (Legacy property supported: "nvidia,wakeup-source")

Example:

keyboard: keyboard {
	compatible = "nvidia,tegra20-kbc";
	reg = <0x7000e200 0x100>;
	interrupts = <0 85 0x04>;
	clocks = <&tegra_car 36>;
	resets = <&tegra_car 36>;
	reset-names = "kbc";
	nvidia,ghost-filter;
	nvidia,debounce-delay-ms = <640>;
	nvidia,kbc-row-pins = <0 1 2>;    /* pin 0, 1, 2 as rows */
	nvidia,kbc-col-pins = <11 12 13>; /* pin 11, 12, 13 as columns */
	linux,keymap = <0x00000074
			0x00010067
			0x00020066
			0x01010068
			0x02000069
			0x02010070
			0x02020071>;
};


code:
* TI's Keypad Controller device tree bindings

TI's Keypad controller is used to interface a SoC with a matrix-type
keypad device. The keypad controller supports multiple row and column lines.
A key can be placed at each intersection of a unique row and a unique column.
The keypad controller can sense a key-press and key-release and report the
event using a interrupt to the cpu.

This binding is based on the matrix-keymap binding with the following
changes:

keypad,num-rows and keypad,num-columns are required.

Required SoC Specific Properties:
- compatible: should be one of the following
   - "ti,omap4-keypad": For controllers compatible with omap4 keypad
      controller.

Optional Properties specific to linux:
- linux,keypad-no-autorepeat: do no enable autorepeat feature.

Example:
	keypad@4ae1c000{
		compatible = "ti,omap4-keypad";
		keypad,num-rows = <2>;
		keypad,num-columns = <8>;
		linux,keypad-no-autorepeat;
	};


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/pine64,pinephone-keyboard.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Pine64 PinePhone keyboard device tree bindings

maintainers:
  - Samuel Holland <samuel@sholland.org>

description:
  A keyboard accessory is available for the Pine64 PinePhone and PinePhone Pro.
  It connects via I2C, providing a raw scan matrix, a flashing interface, and a
  subordinate I2C bus for communication with a battery charger IC.

properties:
  compatible:
    const: pine64,pinephone-keyboard

  reg:
    const: 0x15

  interrupts:
    maxItems: 1

  vbat-supply:
    description: Supply for the keyboard MCU

  wakeup-source: true

  i2c:
    $ref: /schemas/i2c/i2c-controller.yaml#

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      keyboard@15 {
        compatible = "pine64,pinephone-keyboard";
        reg = <0x15>;
        interrupt-parent = <&r_pio>;
        interrupts = <0 12 IRQ_TYPE_EDGE_FALLING>; /* PL12 */

        i2c {
          #address-cells = <1>;
          #size-cells = <0>;

          charger@75 {
            reg = <0x75>;
          };
        };
      };
    };


code:
Aeroflex Gaisler APBPS2 PS/2 Core, supporting Keyboard or Mouse.

The APBPS2 PS/2 core is available in the GRLIB VHDL IP core library.

Note: In the ordinary environment for the APBPS2 core, a LEON SPARC system,
these properties are built from information in the AMBA plug&play and from
bootloader settings.

Required properties:

- name : Should be "GAISLER_APBPS2" or "01_060"
- reg : Address and length of the register set for the device
- interrupts : Interrupt numbers for this device

For further information look in the documentation for the GLIB IP core library:
http://www.gaisler.com/products/grlib/grip.pdf


code:
* PWM beeper device tree bindings

Registers a PWM device as beeper.

Required properties:
- compatible: should be "pwm-beeper"
- pwms: phandle to the physical PWM device

Optional properties:
- amp-supply: phandle to a regulator that acts as an amplifier for the beeper
- beeper-hz:  bell frequency in Hz

Example:

beeper_amp: amplifier {
	compatible = "fixed-regulator";
	gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
};

beeper {
	compatible = "pwm-beeper";
	pwms = <&pwm0>;
	amp-supply = <&beeper_amp>;
};


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/input/pwm-vibrator.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: PWM vibrator

maintainers:
  - Sebastian Reichel <sre@kernel.org>

description: >
  Registers a PWM device as vibrator. It is expected, that the vibrator's
  strength increases based on the duty cycle of the enable PWM channel
  (100% duty cycle meaning strongest vibration, 0% meaning no vibration).

  The binding supports an optional direction PWM channel, that can be
  driven at fixed duty cycle. If available this is can be used to increase
  the vibration effect of some devices.

properties:
  compatible:
    const: pwm-vibrator

  pwm-names:
    items:
      - const: enable
      - const: direction
    minItems: 1

  pwms:
    minItems: 1
    maxItems: 2

  vcc-supply: true

  direction-duty-cycle-ns:
    description: >
      Duty cycle of the direction PWM channel in nanoseconds,
      defaults to 50% of the channel's period.

required:
  - compatible
  - pwm-names
  - pwms

additionalProperties: false

examples:
  - |
    vibrator {
        compatible = "pwm-vibrator";
        pwms = <&pwm9 0 1000000000 0>,
               <&pwm8 0 1000000000 0>;
        pwm-names = "enable", "direction";
        direction-duty-cycle-ns = <1000000000>;
    };


code:
* Marvell PXA Keypad controller

Required Properties
- compatible : should be "marvell,pxa27x-keypad"
- reg : Address and length of the register set for the device
- interrupts : The interrupt for the keypad controller
- marvell,debounce-interval : How long time the key will be
  recognized when it is pressed. It is a u32 value, and bit[31:16]
  is debounce interval for direct key and bit[15:0] is debounce
  interval for matrix key. The value is in binary number of 2ms

Optional Properties For Matrix Keyes
Please refer to matrix-keymap.txt

Optional Properties for Direct Keyes
- marvell,direct-key-count : How many direct keyes are used.
- marvell,direct-key-mask : The mask indicates which keyes
  are used. If bit[X] of the mask is set, the direct key X
  is used.
- marvell,direct-key-low-active : Direct key status register
  tells the level of pins that connects to the direct keyes.
  When this property is set, it means that when the pin level
  is low, the key is pressed(active).
- marvell,direct-key-map : It is a u16 array. Each item indicates
  the linux key-code for the direct key.

Optional Properties For Rotary
- marvell,rotary0 : It is a u32 value. Bit[31:16] is the
  linux key-code for rotary up. Bit[15:0] is the linux key-code
  for rotary down. It is for rotary 0.
- marvell,rotary1 : Same as marvell,rotary0. It is for rotary 1.
- marvell,rotary-rel-key : When rotary is used for relative axes
  in the device, the value indicates the key-code for relative
  axes measurement in the device. It is a u32 value. Bit[31:16]
  is for rotary 1, and Bit[15:0] is for rotary 0.

Examples:
	keypad: keypad@d4012000 {
		keypad,num-rows = <3>;
		keypad,num-columns = <5>;
		linux,keymap = <0x0000000e	/* KEY_BACKSPACE */
				0x0001006b	/* KEY_END */
				0x00020061	/* KEY_RIGHTCTRL */
				0x0003000b	/* KEY_0 */
				0x00040002	/* KEY_1 */
				0x0100008b	/* KEY_MENU */
				0x01010066	/* KEY_HOME */
				0x010200e7	/* KEY_SEND */
				0x01030009	/* KEY_8 */
				0x0104000a	/* KEY_9 */
				0x02000160	/* KEY_OK */
				0x02010003	/* KEY_2 */
				0x02020004	/* KEY_3 */
				0x02030005	/* KEY_4 */
				0x02040006>;	/* KEY_5 */
		marvell,rotary0 = <0x006c0067>;	/* KEY_UP & KEY_DOWN */
		marvell,direct-key-count = <1>;
		marvell,direct-key-map = <0x001c>;
		marvell,debounce-interval = <0x001e001e>;
	};


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/qcom,pm8921-pwrkey.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm PM8921 PMIC Power Key

maintainers:
  - Bjorn Andersson <andersson@kernel.org>

allOf:
  - $ref: input.yaml#

properties:
  compatible:
    oneOf:
      - enum:
          - qcom,pm8921-pwrkey
          - qcom,pm8058-pwrkey
      - items:
          - enum:
              - qcom,pm8018-pwrkey
          - const: qcom,pm8921-pwrkey

  reg:
    maxItems: 1

  interrupts:
    items:
      - description: key release
      - description: key press

  debounce:
    description:
      Time in microseconds that key must be pressed or
      released for state change interrupt to trigger.
    $ref: /schemas/types.yaml#/definitions/uint32

  pull-up:
    description:
      Presence of this property indicates that the KPDPWR_N
      pin should be configured for pull up.
    $ref: /schemas/types.yaml#/definitions/flag

required:
  - compatible
  - reg
  - interrupts

unevaluatedProperties: false

examples:
  - |
   #include <dt-bindings/interrupt-controller/irq.h>
   ssbi {
     #address-cells = <1>;
     #size-cells = <0>;

     pmic@0 {
       reg = <0x0>;
       #address-cells = <1>;
       #size-cells = <0>;

       pwrkey@1c {
         compatible = "qcom,pm8921-pwrkey";
         reg = <0x1c>;
         interrupt-parent = <&pmicint>;
         interrupts = <50 IRQ_TYPE_EDGE_RISING>, <51 IRQ_TYPE_EDGE_RISING>;
         debounce = <15625>;
         pull-up;
       };
     };
   };
...


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/qcom,pm8941-pwrkey.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm PM8941 PMIC Power Key

maintainers:
  - Courtney Cavin <courtney.cavin@sonymobile.com>
  - Vinod Koul <vkoul@kernel.org>

allOf:
  - $ref: input.yaml#

properties:
  compatible:
    enum:
      - qcom,pm8941-pwrkey
      - qcom,pm8941-resin
      - qcom,pmk8350-pwrkey
      - qcom,pmk8350-resin

  interrupts:
    maxItems: 1

  debounce:
    description: |
          Time in microseconds that key must be pressed or
          released for state change interrupt to trigger.
    $ref: /schemas/types.yaml#/definitions/uint32

  bias-pull-up:
    description: |
           Presence of this property indicates that the KPDPWR_N
           pin should be configured for pull up.
    $ref: /schemas/types.yaml#/definitions/flag

  linux,code:
    description: |
           The input key-code associated with the power key.
           Use the linux event codes defined in
           include/dt-bindings/input/linux-event-codes.h
           When property is omitted KEY_POWER is assumed.

required:
  - compatible
  - interrupts

unevaluatedProperties: false
...


code:
Qualcomm PM8xxx PMIC Keypad

PROPERTIES

- compatible:
	Usage: required
	Value type: <string>
	Definition: must be one of:
		    "qcom,pm8058-keypad"
		    "qcom,pm8921-keypad"

- reg:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: address of keypad control register

- interrupts:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: the first interrupt specifies the key sense interrupt
		    and the second interrupt specifies the key stuck interrupt.
		    The format of the specifier is defined by the binding
		    document describing the node's interrupt parent.

- linux,keymap:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: the linux keymap. More information can be found in
		    input/matrix-keymap.txt.

- linux,keypad-no-autorepeat:
	Usage: optional
	Value type: <bool>
	Definition: don't enable autorepeat feature.

- wakeup-source:
	Usage: optional
	Value type: <bool>
	Definition: use any event on keypad as wakeup event.
		    (Legacy property supported: "linux,keypad-wakeup")

- keypad,num-rows:
	Usage: required
	Value type: <u32>
	Definition: number of rows in the keymap. More information can be found
		    in input/matrix-keymap.txt.

- keypad,num-columns:
	Usage: required
	Value type: <u32>
	Definition: number of columns in the keymap. More information can be
		    found in input/matrix-keymap.txt.

- debounce:
	Usage: optional
	Value type: <u32>
	Definition: time in microseconds that key must be pressed or release
		    for key sense interrupt to trigger.

- scan-delay:
	Usage: optional
	Value type: <u32>
	Definition: time in microseconds to pause between successive scans
		    of the matrix array.

- row-hold:
	Usage: optional
	Value type: <u32>
	Definition: time in nanoseconds to pause between scans of each row in
		    the matrix array.

EXAMPLE

	keypad@148 {
		compatible = "qcom,pm8921-keypad";
		reg = <0x148>;
		interrupt-parent = <&pmicintc>;
		interrupts = <74 1>, <75 1>;
		linux,keymap = <
			MATRIX_KEY(0, 0, KEY_VOLUMEUP)
			MATRIX_KEY(0, 1, KEY_VOLUMEDOWN)
			MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS)
			MATRIX_KEY(0, 3, KEY_CAMERA)
			>;
		keypad,num-rows = <1>;
		keypad,num-columns = <5>;
		debounce = <15>;
		scan-delay = <32>;
		row-hold = <91500>;
	};


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/qcom,pm8xxx-vib.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm PM8xxx PMIC Vibrator

maintainers:
  - Bjorn Andersson <andersson@kernel.org>

properties:
  compatible:
    enum:
      - qcom,pm8058-vib
      - qcom,pm8916-vib
      - qcom,pm8921-vib

  reg:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    pmic {
        #address-cells = <1>;
        #size-cells = <0>;

        vibrator@4a {
            compatible = "qcom,pm8058-vib";
            reg = <0x4a>;
        };
    };


code:
Raydium I2C touchscreen

Required properties:
- compatible: must be "raydium,rm32380"
- reg: The I2C address of the device
- interrupts: interrupt to which the chip is connected
    See ../interrupt-controller/interrupts.txt
Optional properties:
- avdd-supply: analog power supply needed to power device
- vccio-supply: IO Power source
- reset-gpios: reset gpio the chip is connected to.

Example:
	touchscreen@39 {
		compatible = "raydium,rm32380";
		reg = <0x39>;
		interrupt-parent = <&gpio>;
		interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
	};


code:
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: "http://devicetree.org/schemas/input/regulator-haptic.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Regulator Haptic

maintainers:
  - Jaewon Kim <jaewon02.kim@samsung.com>

properties:
  compatible:
    const: regulator-haptic

  haptic-supply:
    description: >
      Power supply to the haptic motor

  max-microvolt:
    description: >
      The maximum voltage value supplied to the haptic motor

  min-microvolt:
    description: >
      The minimum voltage value supplied to the haptic motor

required:
  - compatible
  - haptic-supply
  - max-microvolt
  - min-microvolt

additionalProperties: false

examples:
  - |
    haptics {
        compatible = "regulator-haptic";
        haptic-supply = <&motor_regulator>;
        max-microvolt = <2700000>;
        min-microvolt = <1100000>;
    };


code:
Synaptics RMI4 2D Sensor Device Binding

The Synaptics RMI4 core is able to support RMI4 devices using different
transports and different functions. This file describes the device tree
bindings for devices which contain 2D sensors using Function 11 or
Function 12. Complete documentation for transports and other functions
can be found in:
Documentation/devicetree/bindings/input/rmi4.

RMI4 Function 11 and Function 12 are for 2D touch position sensing.
Additional documentation for F11 can be found at:
http://www.synaptics.com/sites/default/files/511-000136-01-Rev-E-RMI4-Interfacing-Guide.pdf

Optional Touch Properties:
Description in Documentation/devicetree/bindings/input/touchscreen
- touchscreen-inverted-x
- touchscreen-inverted-y
- touchscreen-swapped-x-y
- touchscreen-x-mm
- touchscreen-y-mm

Optional Properties:
- syna,clip-x-low: Sets a minimum value for X.
- syna,clip-y-low: Sets a minimum value for Y.
- syna,clip-x-high: Sets a maximum value for X.
- syna,clip-y-high: Sets a maximum value for Y.
- syna,offset-x: Add an offset to X.
- syna,offset-y: Add an offset to Y.
- syna,delta-x-threshold: Set the minimum distance on the X axis required
				to generate an interrupt in reduced reporting
				mode.
- syna,delta-y-threshold: Set the minimum distance on the Y axis required
				to generate an interrupt in reduced reporting
				mode.
- syna,sensor-type: Set the sensor type. 1 for touchscreen 2 for touchpad.
- syna,disable-report-mask: Mask for disabling posiiton reporting. Used to
				disable reporing absolute position data.
- syna,rezero-wait-ms: Time in miliseconds to wait after issuing a rezero
				command.

Example of a RMI4 I2C device with F11:
Example:
	&i2c1 {
		rmi4-i2c-dev@2c {
			compatible = "syna,rmi4-i2c";

			...

			rmi4-f11@11 {
				reg = <0x11>;
				touchscreen-inverted-y;
				syna,sensor-type = <2>;
			};
		};
	};


code:
Synaptics RMI4 F01 Device Binding

The Synaptics RMI4 core is able to support RMI4 devices using different
transports and different functions. This file describes the device tree
bindings for devices which contain Function 1. Complete documentation
for transports and other functions can be found in:
Documentation/devicetree/bindings/input/rmi4.

Additional documentation for F01 can be found at:
http://www.synaptics.com/sites/default/files/511-000136-01-Rev-E-RMI4-Interfacing-Guide.pdf

Optional Properties:
- syna,nosleep-mode: If set the device will run at full power without sleeping.
			nosleep has 3 modes, 0 will not change the default
			setting, 1 will disable nosleep (allow sleeping),
			and 2 will enable nosleep (disabling sleep).
- syna,wakeup-threshold: Defines the amplitude of the disturbance to the
				background capacitance that will cause the
				device to wake from dozing.
- syna,doze-holdoff-ms: The delay to wait after the last finger lift and the
				first doze cycle.
- syna,doze-interval-ms: The time period that the device sleeps between finger
				activity.

Example of a RMI4 I2C device with F01:
	Example:
	&i2c1 {
		rmi4-i2c-dev@2c {
			compatible = "syna,rmi4-i2c";

			...

			rmi4-f01@1 {
				reg = <0x1>;
				syna,nosleep-mode = <1>;
			};
		};
	};


code:
Synaptics RMI4 I2C Device Binding

The Synaptics RMI4 core is able to support RMI4 devices using different
transports and different functions. This file describes the device tree
bindings for devices using the I2C transport driver. Complete documentation
for other transports and functions can be found in
Documentation/devicetree/bindings/input/rmi4.

Required Properties:
- compatible: syna,rmi4-i2c
- reg: I2C address
- #address-cells: Set to 1 to indicate that the function child nodes
		    consist of only on uint32 value.
- #size-cells: Set to 0 to indicate that the function child nodes do not
		have a size property.

Optional Properties:
- interrupts: interrupt which the rmi device is connected to.
See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

- syna,reset-delay-ms: The number of milliseconds to wait after resetting the
			device.

- syna,startup-delay-ms: The number of milliseconds to wait after powering on
			 the device.

- vdd-supply: VDD power supply.
See ../regulator/regulator.txt

- vio-supply: VIO power supply
See ../regulator/regulator.txt

Function Parameters:
Parameters specific to RMI functions are contained in child nodes of the rmi device
 node. Documentation for the parameters of each function can be found in:
Documentation/devicetree/bindings/input/rmi4/rmi_f*.txt.

Example:
	&i2c1 {
		rmi4-i2c-dev@2c {
			compatible = "syna,rmi4-i2c";
			reg = <0x2c>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupt-parent = <&gpio>;
			interrupts = <4 2>;

			rmi4-f01@1 {
				reg = <0x1>;
				syna,nosleep-mode = <1>;
			};

			rmi4-f11@11 {
				reg = <0x11>;
				touchscreen-inverted-y;
				syna,sensor-type = <2>;
			};
		};
	};


code:
Synaptics RMI4 SPI Device Binding

The Synaptics RMI4 core is able to support RMI4 devices using different
transports and different functions. This file describes the device tree
bindings for devices using the SPI transport driver. Complete documentation
for other transports and functions can be found in
Documentation/devicetree/bindings/input/rmi4.

Required Properties:
- compatible: syna,rmi4-spi
- reg: Chip select address for the device
- #address-cells: Set to 1 to indicate that the function child nodes
		    consist of only on uint32 value.
- #size-cells: Set to 0 to indicate that the function child nodes do not
		have a size property.

Optional Properties:
- interrupts: interrupt which the rmi device is connected to.
See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

- spi-rx-delay-us: microsecond delay after a read transfer.
- spi-tx-delay-us: microsecond delay after a write transfer.

Function Parameters:
Parameters specific to RMI functions are contained in child nodes of the rmi device
 node. Documentation for the parameters of each function can be found in:
Documentation/devicetree/bindings/input/rmi4/rmi_f*.txt.

Example:
	spi@7000d800 {
		rmi4-spi-dev@0 {
			compatible = "syna,rmi4-spi";
			reg = <0x0>;
			#address-cells = <1>;
			#size-cells = <0>;
			spi-max-frequency = <4000000>;
			spi-cpha;
			spi-cpol;
			interrupt-parent = <&gpio>;
			interrupts = <TEGRA_GPIO(K, 2) 0x2>;
			spi-rx-delay-us = <30>;

			rmi4-f01@1 {
				reg = <0x1>;
				syna,nosleep-mode = <1>;
			};

			rmi4-f11@11 {
				reg = <0x11>;
				touchscreen-inverted-y;
				syna,sensor-type = <2>;
			};
		};
	};


code:
Rotary encoder DT bindings

Required properties:
- gpios: a spec for at least two GPIOs to be used, most significant first

Optional properties:
- linux,axis: the input subsystem axis to map to this rotary encoder.
  Defaults to 0 (ABS_X / REL_X)
- rotary-encoder,steps: Number of steps in a full turnaround of the
  encoder. Only relevant for absolute axis. Defaults to 24 which is a
  typical value for such devices.
- rotary-encoder,relative-axis: register a relative axis rather than an
  absolute one. Relative axis will only generate +1/-1 events on the input
  device, hence no steps need to be passed.
- rotary-encoder,rollover: Automatic rollover when the rotary value becomes
  greater than the specified steps or smaller than 0. For absolute axis only.
- rotary-encoder,steps-per-period: Number of steps (stable states) per period.
  The values have the following meaning:
  1: Full-period mode (default)
  2: Half-period mode
  4: Quarter-period mode
- wakeup-source: Boolean, rotary encoder can wake up the system.
- rotary-encoder,encoding: String, the method used to encode steps.
  Supported are "gray" (the default and more common) and "binary".

Deprecated properties:
- rotary-encoder,half-period: Makes the driver work on half-period mode.
  This property is deprecated. Instead, a 'steps-per-period ' value should
  be used, such as "rotary-encoder,steps-per-period = <2>".

See Documentation/input/devices/rotary-encoder.rst for more information.

Example:

		rotary@0 {
			compatible = "rotary-encoder";
			gpios = <&gpio 19 1>, <&gpio 20 0>; /* GPIO19 is inverted */
			linux,axis = <0>; /* REL_X */
			rotary-encoder,encoding = "gray";
			rotary-encoder,relative-axis;
		};

		rotary@1 {
			compatible = "rotary-encoder";
			gpios = <&gpio 21 0>, <&gpio 22 0>;
			linux,axis = <1>; /* ABS_Y */
			rotary-encoder,steps = <24>;
			rotary-encoder,encoding = "binary";
			rotary-encoder,rollover;
		};


code:
* Samsung's Keypad Controller device tree bindings

Samsung's Keypad controller is used to interface a SoC with a matrix-type
keypad device. The keypad controller supports multiple row and column lines.
A key can be placed at each intersection of a unique row and a unique column.
The keypad controller can sense a key-press and key-release and report the
event using a interrupt to the cpu.

Required SoC Specific Properties:
- compatible: should be one of the following
  - "samsung,s3c6410-keypad": For controllers compatible with s3c6410 keypad
    controller.
  - "samsung,s5pv210-keypad": For controllers compatible with s5pv210 keypad
    controller.

- reg: physical base address of the controller and length of memory mapped
  region.

- interrupts: The interrupt number to the cpu.

Required Board Specific Properties:
- samsung,keypad-num-rows: Number of row lines connected to the keypad
  controller.

- samsung,keypad-num-columns: Number of column lines connected to the
  keypad controller.

- Keys represented as child nodes: Each key connected to the keypad
  controller is represented as a child node to the keypad controller
  device node and should include the following properties.
  - keypad,row: the row number to which the key is connected.
  - keypad,column: the column number to which the key is connected.
  - linux,code: the key-code to be reported when the key is pressed
    and released.

- pinctrl-0: Should specify pin control groups used for this controller.
- pinctrl-names: Should contain only one value - "default".

Optional Properties:
- wakeup-source: use any event on keypad as wakeup event.
		 (Legacy property supported: "linux,input-wakeup")

Optional Properties specific to linux:
- linux,keypad-no-autorepeat: do no enable autorepeat feature.

Example:
	keypad@100a0000 {
		compatible = "samsung,s5pv210-keypad";
		reg = <0x100A0000 0x100>;
		interrupts = <173>;
		samsung,keypad-num-rows = <2>;
		samsung,keypad-num-columns = <8>;
		linux,input-no-autorepeat;
		wakeup-source;

		pinctrl-names = "default";
		pinctrl-0 = <&keypad_rows &keypad_columns>;

		key_1 {
			keypad,row = <0>;
			keypad,column = <3>;
			linux,code = <2>;
		};

		key_2 {
			keypad,row = <0>;
			keypad,column = <4>;
			linux,code = <3>;
		};

		key_3 {
			keypad,row = <0>;
			keypad,column = <5>;
			linux,code = <4>;
		};
	};


code:
* SPEAr keyboard controller

Required properties:
- compatible: "st,spear300-kbd"

Optional properties, in addition to those specified by the shared
matrix-keyboard bindings:
- autorepeat: bool: enables key autorepeat
- st,mode: keyboard mode: 0 - 9x9, 1 - 6x6, 2 - 2x2

Example:

kbd@fc400000 {
	compatible = "st,spear300-kbd";
	reg = <0xfc400000 0x100>;
	linux,keymap = < 0x00030012
			 0x0102003a >;
	autorepeat;
	st,mode = <0>;
};


code:
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2020 Unisoc Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/sprd,sc27xx-vibrator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Spreadtrum SC27xx PMIC Vibrator

maintainers:
  - Orson Zhai <orsonzhai@gmail.com>
  - Baolin Wang <baolin.wang7@gmail.com>
  - Chunyan Zhang <zhang.lyra@gmail.com>

properties:
  compatible:
    enum:
      - sprd,sc2721-vibrator
      - sprd,sc2730-vibrator
      - sprd,sc2731-vibrator

  reg:
    maxItems: 1

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    sc2731_pmic: pmic@0 {
      compatible = "sprd,sc2731";
      reg = <0 0>;
      spi-max-frequency = <26000000>;
      interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
      interrupt-controller;
      #interrupt-cells = <2>;
      #address-cells = <1>;
      #size-cells = <0>;

      vibrator@eb4 {
        compatible = "sprd,sc2731-vibrator";
        reg = <0xeb4>;
      };
    };


code:
* ST Keyscan controller Device Tree bindings

The ST keyscan controller Device Tree binding is based on the
matrix-keymap.

Required properties:
- compatible: "st,sti-keyscan"

- reg: Register base address and size of st-keyscan controller.

- interrupts: Interrupt number for the st-keyscan controller.

- clocks: Must contain one entry, for the module clock.
  See ../clocks/clock-bindings.txt for details.

- pinctrl: Should specify pin control groups used for this controller.
  See ../pinctrl/pinctrl-bindings.txt for details.

- linux,keymap: The keymap for keys as described in the binding document
  devicetree/bindings/input/matrix-keymap.txt.

- keypad,num-rows: Number of row lines connected to the keypad controller.

- keypad,num-columns: Number of column lines connected to the keypad
  controller.

Optional property:
- st,debounce_us: Debouncing interval time in microseconds

Example:

keyscan: keyscan@fe4b0000 {
	compatible = "st,sti-keyscan";
	reg = <0xfe4b0000 0x2000>;
	interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
	clocks	= <&CLK_SYSIN>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_keyscan>;

	keypad,num-rows = <4>;
	keypad,num-columns = <4>;
	st,debounce_us = <5000>;

	linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13)
			 MATRIX_KEY(0x00, 0x01, KEY_F9)
			 MATRIX_KEY(0x00, 0x02, KEY_F5)
			 MATRIX_KEY(0x00, 0x03, KEY_F1)
			 MATRIX_KEY(0x01, 0x00, KEY_F14)
			 MATRIX_KEY(0x01, 0x01, KEY_F10)
			 MATRIX_KEY(0x01, 0x02, KEY_F6)
			 MATRIX_KEY(0x01, 0x03, KEY_F2)
			 MATRIX_KEY(0x02, 0x00, KEY_F15)
			 MATRIX_KEY(0x02, 0x01, KEY_F11)
			 MATRIX_KEY(0x02, 0x02, KEY_F7)
			 MATRIX_KEY(0x02, 0x03, KEY_F3)
			 MATRIX_KEY(0x03, 0x00, KEY_F16)
			 MATRIX_KEY(0x03, 0x01, KEY_F12)
			 MATRIX_KEY(0x03, 0x02, KEY_F8)
			 MATRIX_KEY(0x03, 0x03, KEY_F4) >;
	};


code:
* STMPE Keypad

Required properties:
 - compatible               : "st,stmpe-keypad"
 - linux,keymap             : See ./matrix-keymap.txt

Optional properties:
 - debounce-interval        : Debouncing interval time in milliseconds
 - st,scan-count            : Scanning cycles elapsed before key data is updated
 - st,no-autorepeat         : If specified device will not autorepeat
 - keypad,num-rows          : See ./matrix-keymap.txt
 - keypad,num-columns       : See ./matrix-keymap.txt

Example:

	stmpe_keypad {
		compatible = "st,stmpe-keypad";

		debounce-interval = <64>;
		st,scan-count = <8>;
		st,no-autorepeat;

		linux,keymap = <0x205006b
				0x4010074
				0x3050072
				0x1030004
				0x502006a
				0x500000a
				0x5008b
				0x706001c
				0x405000b
				0x6070003
				0x3040067
				0x303006c
				0x60400e7
				0x602009e
				0x4020073
				0x5050002
				0x4030069
				0x3020008>;
	};


code:
This binding is based on the matrix-keymap binding with the following
changes:

keypad,num-rows and keypad,num-columns are required.

Required properties:
- compatible: "ti,tca8418"
- reg: the I2C address
- interrupts: IRQ line number, should trigger on falling edge
- linux,keymap: Keys definitions, see keypad-matrix.


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ti,drv260x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments - drv260x Haptics driver family

maintainers:
  - Andrew Davis <afd@ti.com>

properties:
  compatible:
    enum:
      - ti,drv2604
      - ti,drv2605
      - ti,drv2605l

  reg:
    maxItems: 1

  vbat-supply:
    description: Power supply to the haptic motor

  # TODO: Deprecate 'mode' in favor of differently named property
  mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Power up mode of the chip
      (defined in include/dt-bindings/input/ti-drv260x.h)

      DRV260X_LRA_MODE
        Linear Resonance Actuator mode (Piezoelectric)

      DRV260X_LRA_NO_CAL_MODE
        This is a LRA Mode but there is no calibration sequence during init.
        And the device is configured for real time playback mode (RTP mode).

      DRV260X_ERM_MODE
        Eccentric Rotating Mass mode (Rotary vibrator)
    enum: [ 0, 1, 2 ]

  library-sel:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      These are ROM based waveforms pre-programmed into the IC.
      This should be set to set the library to use at power up.
      (defined in include/dt-bindings/input/ti-drv260x.h)

      DRV260X_LIB_EMPTY - Do not use a pre-programmed library
      DRV260X_ERM_LIB_A - Pre-programmed Library
      DRV260X_ERM_LIB_B - Pre-programmed Library
      DRV260X_ERM_LIB_C - Pre-programmed Library
      DRV260X_ERM_LIB_D - Pre-programmed Library
      DRV260X_ERM_LIB_E - Pre-programmed Library
      DRV260X_ERM_LIB_F - Pre-programmed Library
      DRV260X_LIB_LRA - Pre-programmed LRA Library
    enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]

  enable-gpio:
    maxItems: 1
    deprecated: true

  enable-gpios:
    maxItems: 1

  vib-rated-mv:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      The rated voltage of the actuator in millivolts.
      If this is not set then the value will be defaulted to 3200 mV.
    default: 3200

  vib-overdrive-mv:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      The overdrive voltage of the actuator in millivolts.
      If this is not set then the value will be defaulted to 3200 mV.
    default: 3200

required:
  - compatible
  - reg
  - enable-gpios
  - mode
  - library-sel

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/input/ti-drv260x.h>

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        haptics@5a {
            compatible = "ti,drv2605l";
            reg = <0x5a>;
            vbat-supply = <&vbat>;
            enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
            mode = <DRV260X_LRA_MODE>;
            library-sel = <DRV260X_LIB_LRA>;
            vib-rated-mv = <3200>;
            vib-overdrive-mv = <3200>;
        };
    };


code:
* Texas Instruments - drv2665 Haptics driver

Required properties:
	- compatible - "ti,drv2665" - DRV2665
	- reg -  I2C slave address
	- vbat-supply - Required supply regulator

Example:

haptics: haptics@59 {
	compatible = "ti,drv2665";
	reg = <0x59>;
	vbat-supply = <&vbat>;
};

For more product information please see the link below:
http://www.ti.com/product/drv2665


code:
* Texas Instruments - drv2667 Haptics driver

Required properties:
	- compatible - "ti,drv2667" - DRV2667
	- reg -  I2C slave address
	- vbat-supply - Required supply regulator

Example:

haptics: haptics@59 {
	compatible = "ti,drv2667";
	reg = <0x59>;
	vbat-supply = <&vbat>;
};

For more product information please see the link below:
http://www.ti.com/product/drv2667


code:
TI-NSPIRE Keypad

Required properties:
- compatible: Compatible property value should be "ti,nspire-keypad".

- reg: Physical base address of the peripheral and length of memory mapped
  region.

- interrupts: The interrupt number for the peripheral.

- scan-interval: How often to scan in us. Based on a APB speed of 33MHz, the
	maximum and minimum delay time is ~2000us and ~500us respectively

- row-delay: How long to wait before scanning each row.

- clocks: The clock this peripheral is attached to.

- linux,keymap: The keymap to use
	(see Documentation/devicetree/bindings/input/matrix-keymap.txt)

Optional properties:
- active-low: Specify that the keypad is active low (i.e. logical low signifies
	a key press).

Example:

input {
	compatible = "ti,nspire-keypad";
	reg = <0x900E0000 0x1000>;
	interrupts = <16>;

	scan-interval = <1000>;
	row-delay = <200>;

	clocks = <&apb_pclk>;

	linux,keymap = <
	0x0000001c	0x0001001c	0x00040039
	0x0005002c	0x00060015	0x0007000b
	0x0008000f	0x0100002d	0x01010011
	0x0102002f	0x01030004	0x01040016
	0x01050014	0x0106001f	0x01070002
	0x010a006a	0x02000013	0x02010010
	0x02020019	0x02030007	0x02040018
	0x02050031	0x02060032	0x02070005
	0x02080028	0x0209006c	0x03000026
	0x03010025	0x03020024	0x0303000a
	0x03040017	0x03050023	0x03060022
	0x03070008	0x03080035	0x03090069
	0x04000021	0x04010012	0x04020020
	0x0404002e	0x04050030	0x0406001e
	0x0407000d	0x04080037	0x04090067
	0x05010038	0x0502000c	0x0503001b
	0x05040034	0x0505001a	0x05060006
	0x05080027	0x0509000e	0x050a006f
	0x0600002b	0x0602004e	0x06030068
	0x06040003	0x0605006d	0x06060009
	0x06070001	0x0609000f	0x0708002a
	0x0709001d	0x070a0033	>;
};


code:
Texas Instruments Palmas family power button module

This module is part of the Palmas family of PMICs. For more details
about the whole chip see:
Documentation/devicetree/bindings/mfd/palmas.txt.

This module provides a simple power button event via an Interrupt.

Required properties:
- compatible: should be one of the following
   - "ti,palmas-pwrbutton": For Palmas compatible power on button
- interrupts: Interrupt number of power button submodule on device.

Optional Properties:

- ti,palmas-long-press-seconds: Duration in seconds which the power
  button should be kept pressed for Palmas to power off automatically.
  NOTE: This depends on OTP support and POWERHOLD signal configuration
  on platform. Valid values are 6, 8, 10 and 12.
- ti,palmas-pwron-debounce-milli-seconds: Duration in milliseconds
  which the power button should be kept pressed for Palmas to register
  a press for debouncing purposes. NOTE: This depends on specific
  Palmas variation capability. Valid values are 15, 100, 500 and 1000.

Example:

&palmas {
	palmas_pwr_button: pwrbutton {
		compatible = "ti,palmas-pwrbutton";
		interrupt-parent = <&tps659038>;
		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
		ti,palmas-long-press-seconds = <12>;
		ti,palmas-pwron-debounce-milli-seconds = <15>;
	};
};


code:
* Analog Devices AD7879(-1)/AD7889(-1) touchscreen interface (SPI/I2C)

Required properties:
- compatible			: for SPI slave, use "adi,ad7879"
				  for I2C slave, use "adi,ad7879-1"
- reg				: SPI chipselect/I2C slave address
				  See spi-bus.txt for more SPI slave properties
- interrupts			: touch controller interrupt
- touchscreen-max-pressure	: maximum reported pressure
- adi,resistance-plate-x	: total resistance of X-plate (for pressure
				  calculation)
Optional properties:
- touchscreen-swapped-x-y	: X and Y axis are swapped (boolean)
- adi,first-conversion-delay	: 0-12: In 128us steps (starting with 128us)
				  13  : 2.560ms
				  14  : 3.584ms
				  15  : 4.096ms
				  This property has to be a '/bits/ 8' value
- adi,acquisition-time		: 0: 2us
				  1: 4us
				  2: 8us
				  3: 16us
				  This property has to be a '/bits/ 8' value
- adi,median-filter-size	: 0: disabled
				  1: 4 measurements
				  2: 8 measurements
				  3: 16 measurements
				  This property has to be a '/bits/ 8' value
- adi,averaging			: 0: 2 middle values (1 if median disabled)
				  1: 4 middle values
				  2: 8 middle values
				  3: 16 values
				  This property has to be a '/bits/ 8' value
- adi,conversion-interval:	: 0    : convert one time only
				  1-255: 515us + val * 35us (up to 9.440ms)
				  This property has to be a '/bits/ 8' value
- gpio-controller		: Switch AUX/VBAT/GPIO pin to GPIO mode

Example:

	touchscreen0@2c {
		compatible = "adi,ad7879-1";
		reg = <0x2c>;
		interrupt-parent = <&gpio1>;
		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
		touchscreen-max-pressure = <4096>;
		adi,resistance-plate-x = <120>;
		adi,first-conversion-delay = /bits/ 8 <3>;
		adi,acquisition-time = /bits/ 8 <1>;
		adi,median-filter-size = /bits/ 8 <2>;
		adi,averaging = /bits/ 8 <1>;
		adi,conversion-interval = /bits/ 8 <255>;
	};

	touchscreen1@1 {
		compatible = "adi,ad7879";
		spi-max-frequency = <5000000>;
		reg = <1>;
		spi-cpol;
		spi-cpha;
		gpio-controller;
		interrupt-parent = <&gpio1>;
		interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
		touchscreen-max-pressure = <4096>;
		adi,resistance-plate-x = <120>;
		adi,first-conversion-delay = /bits/ 8 <3>;
		adi,acquisition-time = /bits/ 8 <1>;
		adi,median-filter-size = /bits/ 8 <2>;
		adi,averaging = /bits/ 8 <1>;
		adi,conversion-interval = /bits/ 8 <255>;
	};


code:
Device tree bindings for TI's ADS7843, ADS7845, ADS7846, ADS7873, TSC2046
SPI driven touch screen controllers.

The node for this driver must be a child node of a SPI controller, hence
all mandatory properties described in

	Documentation/devicetree/bindings/spi/spi-bus.txt

must be specified.

Additional required properties:

	compatible		Must be one of the following, depending on the
				model:
					"ti,tsc2046"
					"ti,ads7843"
					"ti,ads7845"
					"ti,ads7846"
					"ti,ads7873"

	interrupts		An interrupt node describing the IRQ line the chip's
				!PENIRQ pin is connected to.
	vcc-supply		A regulator node for the supply voltage.

Optional properties:

	ti,vref-delay-usecs		vref supply delay in usecs, 0 for
					external vref (u16).
	ti,vref-mv			The VREF voltage, in millivolts (u16).
					Set to 0 to use internal references
					(ADS7846).
	ti,keep-vref-on			set to keep vref on for differential
					measurements as well
	ti,settle-delay-usec		Settling time of the analog signals;
					a function of Vcc and the capacitance
					on the X/Y drivers.  If set to non-zero,
					two samples are taken with settle_delay
					us apart, and the second one is used.
					~150 uSec with 0.01uF caps (u16).
	ti,penirq-recheck-delay-usecs	If set to non-zero, after samples are
					taken this delay is applied and penirq
					is rechecked, to help avoid false
					events.  This value is affected by the
					material used to build the touch layer
					(u16).
	ti,x-plate-ohms			Resistance of the X-plate,
					in Ohms (u16).
	ti,y-plate-ohms			Resistance of the Y-plate,
					in Ohms (u16).
	ti,x-min			Minimum value on the X axis (u16).
	ti,y-min			Minimum value on the Y axis (u16).
	ti,debounce-tol			Tolerance used for filtering (u16).
	ti,debounce-rep			Additional consecutive good readings
					required after the first two (u16).
	ti,pendown-gpio-debounce	Platform specific debounce time for the
					pendown-gpio (u32).
	pendown-gpio			GPIO handle describing the pin the !PENIRQ
					line is connected to.
	wakeup-source			use any event on touchscreen as wakeup event.
					(Legacy property support: "linux,wakeup")
	touchscreen-size-x		General touchscreen binding, see [1].
	touchscreen-size-y		General touchscreen binding, see [1].
	touchscreen-max-pressure	General touchscreen binding, see [1].
	touchscreen-min-pressure	General touchscreen binding, see [1].
	touchscreen-average-samples	General touchscreen binding, see [1].
	touchscreen-inverted-x		General touchscreen binding, see [1].
	touchscreen-inverted-y		General touchscreen binding, see [1].
	touchscreen-swapped-x-y		General touchscreen binding, see [1].

[1] All general touchscreen properties are described in
    Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt.

Deprecated properties:

	ti,swap-xy			swap x and y axis
	ti,x-max			Maximum value on the X axis (u16).
	ti,y-max			Maximum value on the Y axis (u16).
	ti,pressure-min			Minimum reported pressure value
					(threshold) - u16.
	ti,pressure-max			Maximum reported pressure value (u16).
	ti,debounce-max			Max number of additional readings per
					sample (u16).

Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::

	spi_controller {
		tsc2046@0 {
			reg = <0>;	/* CS0 */
			compatible = "ti,tsc2046";
			interrupt-parent = <&gpio1>;
			interrupts = <8 0>;	/* BOOT6 / GPIO 8 */
			spi-max-frequency = <1000000>;
			pendown-gpio = <&gpio1 8 0>;
			vcc-supply = <&reg_vcc3>;

			ti,x-min = /bits/ 16 <0>;
			ti,x-max = /bits/ 16 <8000>;
			ti,y-min = /bits/ 16 <0>;
			ti,y-max = /bits/ 16 <4800>;
			ti,x-plate-ohms = /bits/ 16 <40>;
			ti,pressure-max = /bits/ 16 <255>;

			wakeup-source;
		};
	};


code:
* Microchip AR1020 and AR1021 touchscreen interface (I2C)

Required properties:
- compatible		: "microchip,ar1021-i2c"
- reg			: I2C slave address
- interrupts		: touch controller interrupt

Example:

	touchscreen@4d {
		compatible = "microchip,ar1021-i2c";
		reg = <0x4d>;
		interrupt-parent = <&gpio3>;
		interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
	};


code:
* AUO in-cell touchscreen controller using Pixcir sensors

Required properties:
- compatible: must be "auo,auo_pixcir_ts"
- reg: I2C address of the chip
- interrupts: interrupt to which the chip is connected
- gpios: gpios the chip is connected to
  first one is the interrupt gpio and second one the reset gpio
- x-size: horizontal resolution of touchscreen
- y-size: vertical resolution of touchscreen

Example:

	i2c@00000000 {
		/* ... */

		auo_pixcir_ts@5c {
			compatible = "auo,auo_pixcir_ts";
			reg = <0x5c>;
			interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;

			gpios = <&gpf 2 0 GPIO_LEVEL_HIGH>, /* INT */
				<&gpf 5 1 GPIO_LEVEL_LOW>; /* RST */

			x-size = <800>;
			y-size = <600>;
		};

		/* ... */
	};


code:
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/azoteq,iqs5xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Azoteq IQS550/572/525 Trackpad/Touchscreen Controller

maintainers:
  - Jeff LaBundy <jeff@labundy.com>

description: |
  The Azoteq IQS550, IQS572 and IQS525 trackpad and touchscreen controllers
  employ projected-capacitance sensing and can track up to five independent
  contacts.

  Link to datasheet: https://www.azoteq.com/

allOf:
  - $ref: touchscreen.yaml#

properties:
  compatible:
    enum:
      - azoteq,iqs550
      - azoteq,iqs572
      - azoteq,iqs525

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  reset-gpios:
    maxItems: 1

  wakeup-source: true

  touchscreen-size-x: true
  touchscreen-size-y: true
  touchscreen-inverted-x: true
  touchscreen-inverted-y: true
  touchscreen-swapped-x-y: true

required:
  - compatible
  - reg
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
            #address-cells = <1>;
            #size-cells = <0>;

            touchscreen@74 {
                    compatible = "azoteq,iqs550";
                    reg = <0x74>;
                    interrupt-parent = <&gpio>;
                    interrupts = <27 IRQ_TYPE_LEVEL_HIGH>;
                    reset-gpios = <&gpio 22 (GPIO_ACTIVE_LOW |
                                             GPIO_PUSH_PULL)>;

                    touchscreen-size-x = <800>;
                    touchscreen-size-y = <480>;
            };
    };

...


code:
* Broadcom's IPROC Touchscreen Controller

Required properties:
- compatible: must be "brcm,iproc-touchscreen"
- ts_syscon: handler of syscon node defining physical base
  address of the controller and length of memory mapped region.
  If this property is selected please make sure MFD_SYSCON config
  is enabled in the defconfig file.
- clocks:  The clock provided by the SOC to driver the tsc
- clock-names:  name for the clock
- interrupts: The touchscreen controller's interrupt
- address-cells: Specify the number of u32 entries needed in child nodes.
  Should set to 1.
- size-cells: Specify number of u32 entries needed to specify child nodes size
  in reg property. Should set to 1.

Optional properties:
- scanning_period: Time between scans. Each step is 1024 us.  Valid 1-256.
- debounce_timeout: Each step is 512 us.  Valid 0-255
- settling_timeout: The settling duration (in ms) is the amount of time
                    the tsc waits to allow the voltage to settle after
                    turning on the drivers in detection mode.
                    Valid values: 0-11
                    0 =  0.008 ms
                    1 =  0.01 ms
                    2 =  0.02 ms
                    3 =  0.04 ms
                    4 =  0.08 ms
                    5 =  0.16 ms
                    6 =  0.32 ms
                    7 =  0.64 ms
                    8 =  1.28 ms
                    9 =  2.56 ms
                   10 =  5.12 ms
                   11 = 10.24 ms
- touch_timeout: The continuous number of scan periods in which touch is
                not detected before the controller returns to idle state.
                Valid values 0-255.
- average_data: Number of data samples which are averaged before a final
                data point is placed into the FIFO
                Valid values 0-7
                0 =   1 sample
                1 =   2 samples
                2 =   4 samples
                3 =   8 samples
                4 =  16 samples
                5 =  32 samples
                6 =  64 samples
                7 = 128 samples
- fifo_threshold: Interrupt is generated whenever the number of fifo
                entries exceeds this value
                Valid values 0-31
- touchscreen-size-x: horizontal resolution of touchscreen (in pixels)
- touchscreen-size-y: vertical resolution of touchscreen (in pixels)
- touchscreen-fuzz-x: horizontal noise value of the absolute input
                      device (in pixels)
- touchscreen-fuzz-y: vertical noise value of the absolute input
                      device (in pixels)
- touchscreen-inverted-x: X axis is inverted (boolean)
- touchscreen-inverted-y: Y axis is inverted (boolean)

Example: An example of touchscreen node

	ts_adc_syscon: ts_adc_syscon@180a6000 {
		compatible = "brcm,iproc-ts-adc-syscon","syscon";
		reg = <0x180a6000 0xc30>;
	};

	touchscreen: touchscreen@180a6000 {
		compatible = "brcm,iproc-touchscreen";
		#address-cells = <1>;
		#size-cells = <1>;
		ts_syscon = <&ts_adc_syscon>;
		clocks = <&adc_clk>;
		clock-names = "tsc_clk";
		interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;

		scanning_period = <5>;
		debounce_timeout = <40>;
		settling_timeout = <7>;
		touch_timeout = <10>;
		average_data = <5>;
		fifo_threshold = <1>;
		/* Touchscreen is rotated 180 degrees. */
		touchscreen-inverted-x;
		touchscreen-inverted-y;
	};


code:
* Rohm BU21013 Touch Screen

Required properties:
 - compatible              : "rohm,bu21013_tp"
 - reg                     : I2C device address
 - reset-gpios             : GPIO pin enabling (selecting) chip (CS)
 - interrupt-parent        : the phandle for the gpio controller
 - interrupts              : (gpio) interrupt to which the chip is connected

Optional properties:
 - touch-gpios             : GPIO pin registering a touch event
 - <supply_name>-supply    : Phandle to a regulator supply
 - touchscreen-size-x      : General touchscreen binding, see [1].
 - touchscreen-size-y      : General touchscreen binding, see [1].
 - touchscreen-inverted-x  : General touchscreen binding, see [1].
 - touchscreen-inverted-y  : General touchscreen binding, see [1].
 - touchscreen-swapped-x-y : General touchscreen binding, see [1].

[1] All general touchscreen properties are described in
    Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt.

Deprecated properties:
 - rohm,touch-max-x        : Maximum outward permitted limit in the X axis
 - rohm,touch-max-y        : Maximum outward permitted limit in the Y axis
 - rohm,flip-x             : Flip touch coordinates on the X axis
 - rohm,flip-y             : Flip touch coordinates on the Y axis

Example:

	i2c@80110000 {
		bu21013_tp@5c {
			compatible = "rohm,bu21013_tp";
			reg = <0x5c>;
			interrupt-parent = <&gpio2>;
			interrupts <&20 IRQ_TYPE_LEVEL_LOW>;
			touch-gpio = <&gpio2 20 GPIO_ACTIVE_LOW>;
			avdd-supply = <&ab8500_ldo_aux1_reg>;

			touchscreen-size-x = <384>;
			touchscreen-size-y = <704>;
			touchscreen-inverted-y;
		};
	};