Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,63 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/adafruit,seesaw-gamepad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Adafruit Mini I2C Gamepad with seesaw
maintainers:
- Anshul Dalal <anshulusr@gmail.com>
description: |
Adafruit Mini I2C Gamepad
+-----------------------------+
| ___ |
| / \ (X) |
| | S | __ __ (Y) (A) |
| \___/ |ST| |SE| (B) |
| |
+-----------------------------+
S -> 10-bit precision bidirectional analog joystick
ST -> Start
SE -> Select
X, A, B, Y -> Digital action buttons
Datasheet: https://cdn-learn.adafruit.com/downloads/pdf/gamepad-qt.pdf
Product page: https://www.adafruit.com/product/5743
Arduino Driver: https://github.com/adafruit/Adafruit_Seesaw
properties:
compatible:
const: adafruit,seesaw-gamepad
reg:
maxItems: 1
interrupts:
maxItems: 1
description:
The gamepad's IRQ pin triggers a rising edge if interrupts are enabled.
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
joystick@50 {
compatible = "adafruit,seesaw-gamepad";
interrupts = <18 IRQ_TYPE_EDGE_RISING>;
reg = <0x50>;
};
};
@@ -0,0 +1,127 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019-2020 Artur Rojek
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/adc-joystick.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ADC attached joystick
maintainers:
- Artur Rojek <contact@artur-rojek.eu>
description: >
Bindings for joystick devices connected to ADC controllers supporting
the Industrial I/O subsystem.
allOf:
- $ref: input.yaml#
properties:
compatible:
const: adc-joystick
io-channels:
minItems: 1
maxItems: 1024
description: >
List of phandle and IIO specifier pairs.
Each pair defines one ADC channel to which a joystick axis is connected.
See
https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
for details.
poll-interval: true
'#address-cells':
const: 1
'#size-cells':
const: 0
required:
- compatible
- io-channels
- '#address-cells'
- '#size-cells'
additionalProperties: false
patternProperties:
"^axis@[0-9a-f]+$":
type: object
$ref: input.yaml#
description: >
Represents a joystick axis bound to the given ADC channel.
For each entry in the io-channels list, one axis subnode with a matching
reg property must be specified.
properties:
reg:
minimum: 0
maximum: 1023
description: Index of an io-channels list entry bound to this axis.
linux,code:
description: EV_ABS specific event code generated by the axis.
abs-range:
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
- description: minimum value
- description: maximum value
description: >
Minimum and maximum values produced by the axis.
For an ABS_X axis this will be the left-most and right-most
inclination of the joystick. If min > max, it is left to userspace to
treat the axis as inverted.
This property is interpreted as two signed 32 bit values.
abs-fuzz:
$ref: /schemas/types.yaml#/definitions/uint32
description: >
Amount of noise in the input value.
Omitting this property indicates the axis is precise.
abs-flat:
$ref: /schemas/types.yaml#/definitions/uint32
description: >
Axial "deadzone", or area around the center position, where the axis
is considered to be at rest.
Omitting this property indicates the axis always returns to exactly
the center position.
required:
- reg
- linux,code
- abs-range
additionalProperties: false
examples:
- |
#include <dt-bindings/iio/adc/ingenic,adc.h>
#include <dt-bindings/input/input.h>
joystick: adc-joystick {
compatible = "adc-joystick";
io-channels = <&adc INGENIC_ADC_TOUCH_XP>,
<&adc INGENIC_ADC_TOUCH_YP>;
#address-cells = <1>;
#size-cells = <0>;
axis@0 {
reg = <0>;
linux,code = <ABS_X>;
abs-range = <3300 0>;
abs-fuzz = <4>;
abs-flat = <200>;
};
axis@1 {
reg = <1>;
linux,code = <ABS_Y>;
abs-range = <0 3300>;
abs-fuzz = <4>;
abs-flat = <200>;
};
};
@@ -0,0 +1,103 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/adc-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ADC attached resistor ladder buttons
maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.com>
allOf:
- $ref: input.yaml#
properties:
compatible:
const: adc-keys
io-channels:
maxItems: 1
io-channel-names:
const: buttons
keyup-threshold-microvolt:
description:
Voltage above or equal to which all the keys are considered up.
poll-interval: true
autorepeat: true
patternProperties:
'^button-':
type: object
$ref: input.yaml#
additionalProperties: false
description:
Each button (key) is represented as a sub-node.
properties:
label: true
linux,code: true
press-threshold-microvolt:
description:
Voltage above or equal to which this key is considered pressed. No
two values of press-threshold-microvolt may be the same. All values
of press-threshold-microvolt must be less than
keyup-threshold-microvolt.
required:
- linux,code
- press-threshold-microvolt
required:
- compatible
- io-channels
- io-channel-names
- keyup-threshold-microvolt
additionalProperties: false
examples:
- |
#include <dt-bindings/input/input.h>
// +--------------------------------+------------------------+
// | 2.000.000 <= value | no key pressed |
// +--------------------------------+------------------------+
// | 1.500.000 <= value < 2.000.000 | KEY_VOLUMEUP pressed |
// +--------------------------------+------------------------+
// | 1.000.000 <= value < 1.500.000 | KEY_VOLUMEDOWN pressed |
// +--------------------------------+------------------------+
// | 500.000 <= value < 1.000.000 | KEY_ENTER pressed |
// +--------------------------------+------------------------+
// | value < 500.000 | no key pressed |
// +--------------------------------+------------------------+
adc-keys {
compatible = "adc-keys";
io-channels = <&lradc 0>;
io-channel-names = "buttons";
keyup-threshold-microvolt = <2000000>;
button-up {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
press-threshold-microvolt = <1500000>;
};
button-down {
label = "Volume Down";
linux,code = <KEY_VOLUMEDOWN>;
press-threshold-microvolt = <1000000>;
};
button-enter {
label = "Enter";
linux,code = <KEY_ENTER>;
press-threshold-microvolt = <500000>;
};
};
...
@@ -0,0 +1,139 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/adi,adp5588.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices ADP5588 Keypad Controller
maintainers:
- Nuno Sá <nuno.sa@analog.com>
description: |
Analog Devices Mobile I/O Expander and QWERTY Keypad Controller
https://www.analog.com/media/en/technical-documentation/data-sheets/ADP5588.pdf
allOf:
- $ref: matrix-keymap.yaml#
- $ref: input.yaml#
properties:
compatible:
enum:
- adi,adp5587
- adi,adp5588
reg:
maxItems: 1
vcc-supply:
description: Supply Voltage Input
reset-gpios:
description:
If specified, it will be asserted during driver probe. As the line is
active low, it should be marked GPIO_ACTIVE_LOW.
maxItems: 1
interrupts:
maxItems: 1
gpio-controller:
description:
This property applies if either keypad,num-rows lower than 8 or
keypad,num-columns lower than 10.
'#gpio-cells':
const: 2
interrupt-controller:
description:
This property applies if either keypad,num-rows lower than 8 or
keypad,num-columns lower than 10. This property is optional if
keypad,num-rows or keypad,num-columns are not specified as the
device is then configured to be used purely for gpio during which
interrupts may or may not be utilized.
'#interrupt-cells':
const: 2
adi,unlock-keys:
description:
Specifies a maximum of 2 keys that can be used to unlock the keypad.
If this property is set, the keyboard will be locked and only unlocked
after these keys are pressed. If only one key is set, a double click is
needed to unlock the keypad. The value of this property cannot be bigger
or equal than keypad,num-rows * keypad,num-columns.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 2
dependencies:
keypad,num-rows:
- linux,keymap
- keypad,num-columns
keypad,num-columns:
- linux,keymap
- keypad,num-rows
linux,keymap:
- keypad,num-rows
- keypad,num-columns
- interrupts
interrupt-controller:
- interrupts
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
keys@34 {
compatible = "adi,adp5588";
reg = <0x34>;
vcc-supply = <&vcc>;
interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpio>;
reset-gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
keypad,num-rows = <1>;
keypad,num-columns = <9>;
linux,keymap = <
MATRIX_KEY(0x00, 0x00, KEY_1)
MATRIX_KEY(0x00, 0x01, KEY_2)
MATRIX_KEY(0x00, 0x02, KEY_3)
MATRIX_KEY(0x00, 0x03, KEY_4)
MATRIX_KEY(0x00, 0x04, KEY_5)
MATRIX_KEY(0x00, 0x05, KEY_6)
MATRIX_KEY(0x00, 0x06, KEY_7)
MATRIX_KEY(0x00, 0x07, KEY_8)
MATRIX_KEY(0x00, 0x08, KEY_9)
>;
};
};
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
gpio@34 {
compatible = "adi,adp5588";
reg = <0x34>;
#gpio-cells = <2>;
gpio-controller;
};
};
...
@@ -0,0 +1,120 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/allwinner,sun4i-a10-lradc-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner A10 LRADC
maintainers:
- Chen-Yu Tsai <wens@csie.org>
- Maxime Ripard <mripard@kernel.org>
properties:
compatible:
oneOf:
- const: allwinner,sun4i-a10-lradc-keys
- const: allwinner,sun8i-a83t-r-lradc
- items:
- enum:
- allwinner,suniv-f1c100s-lradc
- allwinner,sun50i-a64-lradc
- const: allwinner,sun8i-a83t-r-lradc
- const: allwinner,sun50i-r329-lradc
- items:
- enum:
- allwinner,sun50i-h616-lradc
- allwinner,sun20i-d1-lradc
- const: allwinner,sun50i-r329-lradc
reg:
maxItems: 1
clocks:
maxItems: 1
resets:
maxItems: 1
interrupts:
maxItems: 1
vref-supply:
description:
Regulator for the LRADC reference voltage
wakeup-source: true
patternProperties:
"^button-[0-9]+$":
type: object
$ref: input.yaml#
properties:
label:
description: Descriptive name of the key
linux,code: true
channel:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
description: ADC Channel this key is attached to
voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Voltage in microvolts at LRADC input when this key is
pressed
required:
- label
- linux,code
- channel
- voltage
additionalProperties: false
required:
- compatible
- reg
- interrupts
- vref-supply
if:
properties:
compatible:
contains:
enum:
- allwinner,sun50i-r329-lradc
then:
required:
- clocks
- resets
additionalProperties: false
examples:
- |
lradc: lradc@1c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x100>;
interrupts = <31>;
vref-supply = <&reg_vcc3v0>;
button-191 {
label = "Volume Up";
linux,code = <115>;
channel = <0>;
voltage = <191274>;
};
button-392 {
label = "Volume Down";
linux,code = <114>;
channel = <0>;
voltage = <392644>;
};
};
...
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ariel-pwrbutton.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Dell Wyse 3020 a.k.a. "Ariel" Power Button
maintainers:
- Lubomir Rintel <lkundrak@v3.sk>
description: |
The ENE Embedded Controller on the Ariel board has an interface to the
SPI bus that is capable of sending keyboard and mouse data. A single
power button is attached to it. This binding describes this
configuration.
allOf:
- $ref: input.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
compatible:
items:
- const: dell,wyse-ariel-ec-input
- const: ene,kb3930-input
reg:
maxItems: 1
interrupts:
maxItems: 1
spi-max-frequency: true
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
power-button@0 {
compatible = "dell,wyse-ariel-ec-input", "ene,kb3930-input";
reg = <0>;
interrupt-parent = <&gpio>;
interrupts = <60 IRQ_TYPE_EDGE_RISING>;
spi-max-frequency = <33000000>;
};
};
@@ -0,0 +1,59 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/atmel,captouch.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Atmel capacitive touch device
maintainers:
- Dharma balasubiramani <dharma.b@microchip.com>
description:
Atmel capacitive touch device, typically an Atmel touch sensor connected to
AtmegaXX MCU running firmware based on Qtouch library.
allOf:
- $ref: input.yaml#
properties:
compatible:
const: atmel,captouch
reg:
maxItems: 1
interrupts:
maxItems: 1
linux,keycodes:
minItems: 1
maxItems: 8
required:
- compatible
- reg
- interrupts
- linux,keycodes
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/linux-event-codes.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touch@51 {
compatible = "atmel,captouch";
reg = <0x51>;
interrupt-parent = <&tlmm>;
interrupts = <67 IRQ_TYPE_EDGE_FALLING>;
linux,keycodes = <BTN_0>, <BTN_1>,
<BTN_2>, <BTN_3>,
<BTN_4>, <BTN_5>,
<BTN_6>, <BTN_7>;
autorepeat;
};
};
@@ -0,0 +1,120 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/atmel,maxtouch.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Atmel maXTouch touchscreen/touchpad
maintainers:
- Nick Dyer <nick@shmanahar.org>
- Linus Walleij <linusw@kernel.org>
description: |
Atmel maXTouch touchscreen or touchpads such as the mXT244
and similar devices.
allOf:
- $ref: input.yaml#
- $ref: touchscreen/touchscreen.yaml#
properties:
compatible:
const: atmel,maxtouch
reg:
maxItems: 1
interrupts:
maxItems: 1
vdda-supply:
description:
Optional regulator for the AVDD analog voltage.
vdd-supply:
description:
Optional regulator for the VDD digital voltage.
reset-gpios:
maxItems: 1
description:
Optional GPIO specifier for the touchscreen's reset pin
(active low). The line must be flagged with
GPIO_ACTIVE_LOW.
wake-gpios:
maxItems: 1
description:
Optional GPIO specifier for the touchscreen's wake pin
(active low). The line must be flagged with
GPIO_ACTIVE_LOW.
linux,gpio-keymap:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: |
When enabled, the SPT_GPIOPWN_T19 object sends messages
on GPIO bit changes. An array of up to 8 entries can be provided
indicating the Linux keycode mapped to each bit of the status byte,
starting at the LSB. Linux keycodes are defined in
<dt-bindings/input/input.h>.
Note: the numbering of the GPIOs and the bit they start at varies
between maXTouch devices. You must either refer to the documentation,
or experiment to determine which bit corresponds to which input. Use
KEY_RESERVED for unused padding values.
linux,keycodes:
minItems: 1
maxItems: 8
atmel,wakeup-method:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
The WAKE line is an active-low input that is used to wake up the touch
controller from deep-sleep mode before communication with the controller
could be started. This optional feature used to minimize current
consumption when the controller is in deep sleep mode. This feature is
relevant only to some controller families, like mXT1386 controller for
example.
The WAKE pin can be connected in one of the following ways:
1) left permanently low
2) connected to the I2C-compatible SCL pin
3) connected to a GPIO pin on the host
enum:
- 0 # ATMEL_MXT_WAKEUP_NONE
- 1 # ATMEL_MXT_WAKEUP_I2C_SCL
- 2 # ATMEL_MXT_WAKEUP_GPIO
default: 0
wakeup-source: true
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/atmel-maxtouch.h>
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@4a {
compatible = "atmel,maxtouch";
reg = <0x4a>;
interrupt-parent = <&gpio>;
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
vdda-supply = <&ab8500_ldo_aux2_reg>;
vdd-supply = <&ab8500_ldo_aux5_reg>;
atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>;
};
};
...
@@ -0,0 +1,53 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/awinic,aw86927.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Awinic AW86927 LRA Haptic IC
maintainers:
- Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
properties:
compatible:
oneOf:
- const: awinic,aw86927
- items:
- enum:
- awinic,aw86938
- const: awinic,aw86927
reg:
maxItems: 1
reset-gpios:
maxItems: 1
interrupts:
maxItems: 1
required:
- compatible
- reg
- reset-gpios
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
vibrator@5a {
compatible = "awinic,aw86927";
reg = <0x5a>;
interrupts-extended = <&tlmm 101 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&tlmm 100 GPIO_ACTIVE_LOW>;
};
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,107 @@
* Broadcom Keypad Controller device tree bindings
Broadcom 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 "brcm,bcm-keypad"
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: The interrupt number to the cpu.
Board Specific Properties:
- keypad,num-rows: Number of row lines connected to the keypad
controller.
- keypad,num-columns: Number of column lines connected to the
keypad controller.
- col-debounce-filter-period: The debounce period for the Column filter.
KEYPAD_DEBOUNCE_1_ms = 0
KEYPAD_DEBOUNCE_2_ms = 1
KEYPAD_DEBOUNCE_4_ms = 2
KEYPAD_DEBOUNCE_8_ms = 3
KEYPAD_DEBOUNCE_16_ms = 4
KEYPAD_DEBOUNCE_32_ms = 5
KEYPAD_DEBOUNCE_64_ms = 6
KEYPAD_DEBOUNCE_128_ms = 7
- status-debounce-filter-period: The debounce period for the Status filter.
KEYPAD_DEBOUNCE_1_ms = 0
KEYPAD_DEBOUNCE_2_ms = 1
KEYPAD_DEBOUNCE_4_ms = 2
KEYPAD_DEBOUNCE_8_ms = 3
KEYPAD_DEBOUNCE_16_ms = 4
KEYPAD_DEBOUNCE_32_ms = 5
KEYPAD_DEBOUNCE_64_ms = 6
KEYPAD_DEBOUNCE_128_ms = 7
- row-output-enabled: An optional property indicating whether the row or
column is being used as output. If specified the row is being used
as the output. Else defaults to column.
- pull-up-enabled: An optional property indicating the Keypad scan mode.
If specified implies the keypad scan pull-up has been enabled.
- autorepeat: Boolean, Enable auto repeat feature of Linux input
subsystem (optional).
- linux,keymap: The keymap for keys as described in the binding document
devicetree/bindings/input/matrix-keymap.txt.
Example:
#include "dt-bindings/input/input.h"
/ {
keypad: keypad@180ac000 {
/* Required SoC specific properties */
compatible = "brcm,bcm-keypad";
/* Required Board specific properties */
keypad,num-rows = <5>;
keypad,num-columns = <5>;
linux,keymap = <MATRIX_KEY(0x00, 0x02, KEY_F) /* key_forward */
MATRIX_KEY(0x00, 0x03, KEY_HOME) /* key_home */
MATRIX_KEY(0x00, 0x04, KEY_M) /* key_message */
MATRIX_KEY(0x01, 0x00, KEY_A) /* key_contacts */
MATRIX_KEY(0x01, 0x01, KEY_1) /* key_1 */
MATRIX_KEY(0x01, 0x02, KEY_2) /* key_2 */
MATRIX_KEY(0x01, 0x03, KEY_3) /* key_3 */
MATRIX_KEY(0x01, 0x04, KEY_S) /* key_speaker */
MATRIX_KEY(0x02, 0x00, KEY_P) /* key_phone */
MATRIX_KEY(0x02, 0x01, KEY_4) /* key_4 */
MATRIX_KEY(0x02, 0x02, KEY_5) /* key_5 */
MATRIX_KEY(0x02, 0x03, KEY_6) /* key_6 */
MATRIX_KEY(0x02, 0x04, KEY_VOLUMEUP) /* key_vol_up */
MATRIX_KEY(0x03, 0x00, KEY_C) /* key_call_log */
MATRIX_KEY(0x03, 0x01, KEY_7) /* key_7 */
MATRIX_KEY(0x03, 0x02, KEY_8) /* key_8 */
MATRIX_KEY(0x03, 0x03, KEY_9) /* key_9 */
MATRIX_KEY(0x03, 0x04, KEY_VOLUMEDOWN) /* key_vol_down */
MATRIX_KEY(0x04, 0x00, KEY_H) /* key_headset */
MATRIX_KEY(0x04, 0x01, KEY_KPASTERISK) /* key_* */
MATRIX_KEY(0x04, 0x02, KEY_0) /* key_0 */
MATRIX_KEY(0x04, 0x03, KEY_GRAVE) /* key_# */
MATRIX_KEY(0x04, 0x04, KEY_MUTE) /* key_mute */
>;
/* Optional board specific properties */
col-debounce-filter-period = <5>;
row-output-enabled;
pull-up-enabled;
};
};
@@ -0,0 +1,68 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/cirrus,cs40l50.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cirrus Logic CS40L50 Advanced Haptic Driver
maintainers:
- James Ogletree <jogletre@opensource.cirrus.com>
description:
CS40L50 is a haptic driver with waveform memory,
integrated DSP, and closed-loop algorithms.
properties:
compatible:
enum:
- cirrus,cs40l50
reg:
maxItems: 1
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
vdd-a-supply:
description: Power supply for internal analog circuits.
vdd-p-supply:
description: Power supply for always-on circuits.
vdd-io-supply:
description: Power supply for digital input/output.
vdd-b-supply:
description: Power supply for the boost converter.
required:
- compatible
- reg
- interrupts
- reset-gpios
- vdd-io-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
haptic-driver@34 {
compatible = "cirrus,cs40l50";
reg = <0x34>;
interrupt-parent = <&gpio>;
interrupts = <113 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio 112 GPIO_ACTIVE_LOW>;
vdd-io-supply = <&vreg>;
};
};
@@ -0,0 +1,86 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/cirrus,ep9307-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cirrus ep93xx keypad
maintainers:
- Alexander Sverdlin <alexander.sverdlin@gmail.com>
allOf:
- $ref: input.yaml#
- $ref: /schemas/input/matrix-keymap.yaml#
description:
The KPP is designed to interface with a keypad matrix with 2-point contact
or 3-point contact keys. The KPP is designed to simplify the software task
of scanning a keypad matrix. The KPP is capable of detecting, debouncing,
and decoding one or multiple keys pressed simultaneously on a keypad.
properties:
compatible:
oneOf:
- const: cirrus,ep9307-keypad
- items:
- enum:
- cirrus,ep9312-keypad
- cirrus,ep9315-keypad
- const: cirrus,ep9307-keypad
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
# Time for state change interrupt to trigger
debounce-delay-ms: true
cirrus,prescale:
description: row/column counter pre-scaler load value
$ref: /schemas/types.yaml#/definitions/uint16
maximum: 1023
required:
- compatible
- reg
- interrupts
- clocks
- linux,keymap
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/input/input.h>
#include <dt-bindings/clock/cirrus,ep9301-syscon.h>
keypad@800f0000 {
compatible = "cirrus,ep9307-keypad";
reg = <0x800f0000 0x0c>;
interrupt-parent = <&vic0>;
interrupts = <29>;
clocks = <&eclk EP93XX_CLK_KEYPAD>;
pinctrl-names = "default";
pinctrl-0 = <&keypad_default_pins>;
linux,keymap = <KEY_UP>,
<KEY_DOWN>,
<KEY_VOLUMEDOWN>,
<KEY_HOME>,
<KEY_RIGHT>,
<KEY_LEFT>,
<KEY_ENTER>,
<KEY_VOLUMEUP>,
<KEY_F6>,
<KEY_F8>,
<KEY_F9>,
<KEY_F10>,
<KEY_F1>,
<KEY_F2>,
<KEY_F3>,
<KEY_POWER>;
};
@@ -0,0 +1,27 @@
* Cirrus Logic CLPS711X matrix keypad device tree bindings
Required Properties:
- compatible: Shall contain "cirrus,ep7209-keypad".
- row-gpios: List of GPIOs used as row lines.
- poll-interval: Poll interval time in milliseconds.
- linux,keymap: The definition can be found at
bindings/input/matrix-keymap.txt.
Optional Properties:
- autorepeat: Enable autorepeat feature.
Example:
keypad {
compatible = "cirrus,ep7312-keypad", "cirrus,ep7209-keypad";
autorepeat;
poll-interval = <120>;
row-gpios = <&porta 0 0>,
<&porta 1 0>;
linux,keymap = <
MATRIX_KEY(0, 0, KEY_UP)
MATRIX_KEY(0, 1, KEY_DOWN)
MATRIX_KEY(1, 0, KEY_LEFT)
MATRIX_KEY(1, 1, KEY_RIGHT)
>;
};
@@ -0,0 +1,20 @@
Motorola CPCAP on key
This module is part of the CPCAP. For more details about the whole
chip see Documentation/devicetree/bindings/mfd/motorola-cpcap.txt.
This module provides a simple power button event via an Interrupt.
Required properties:
- compatible: should be one of the following
- "motorola,cpcap-pwrbutton"
- interrupts: irq specifier for CPCAP's ON IRQ
Example:
&cpcap {
cpcap_pwrbutton: pwrbutton {
compatible = "motorola,cpcap-pwrbutton";
interrupts = <23 IRQ_TYPE_NONE>;
};
};
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/cypress,cyapa.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cypress All Points Addressable (APA) I2C Touchpad / Trackpad
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
properties:
compatible:
const: cypress,cyapa
reg:
maxItems: 1
interrupts:
maxItems: 1
wakeup-source: true
vcc-supply:
description: 3.3V power
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
trackpad@67 {
reg = <0x67>;
compatible = "cypress,cyapa";
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpx1>;
wakeup-source;
};
};
@@ -0,0 +1,73 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/cypress,tm2-touchkey.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung TM2 touch key controller
maintainers:
- Stephan Gerhold <stephan@gerhold.net>
description: |
Touch key controllers similar to the TM2 can be found in a wide range of
Samsung devices. They are implemented using many different MCUs, but use
a similar I2C protocol.
allOf:
- $ref: input.yaml#
properties:
compatible:
enum:
- cypress,tm2-touchkey
- cypress,midas-touchkey
- cypress,aries-touchkey
- coreriver,tc360-touchkey
reg:
maxItems: 1
interrupts:
maxItems: 1
vdd-supply:
description: Optional regulator for LED voltage, 3.3V.
vcc-supply:
description: Optional regulator for MCU, 1.8V-3.3V (depending on MCU).
vddio-supply:
description: |
Optional regulator that provides digital I/O voltage,
e.g. for pulling up the interrupt line or the I2C pins.
linux,keycodes:
minItems: 1
maxItems: 4
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>;
touchkey@20 {
compatible = "cypress,tm2-touchkey";
reg = <0x20>;
interrupt-parent = <&gpa3>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
vcc-supply = <&ldo32_reg>;
vdd-supply = <&ldo33_reg>;
linux,keycodes = <KEY_MENU KEY_BACK>;
};
};
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/cypress-sf.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cypress StreetFighter touchkey controller
maintainers:
- Yassine Oudjana <y.oudjana@protonmail.com>
allOf:
- $ref: input.yaml#
properties:
compatible:
const: cypress,sf3155
reg:
maxItems: 1
interrupts:
maxItems: 1
avdd-supply:
description: Regulator for AVDD analog voltage
vdd-supply:
description: Regulator for VDD digital voltage
linux,keycodes:
minItems: 1
maxItems: 8
required:
- compatible
- reg
- interrupts
- avdd-supply
- vdd-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchkey@28 {
compatible = "cypress,sf3155";
reg = <0x28>;
interrupt-parent = <&msmgpio>;
interrupts = <77 IRQ_TYPE_EDGE_FALLING>;
avdd-supply = <&vreg_l6a_1p8>;
vdd-supply = <&vdd_3v2_tp>;
linux,keycodes = <KEY_BACK KEY_MENU>;
};
};
@@ -0,0 +1,248 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/dlg,da7280.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Dialog Semiconductor DA7280 Low Power High-Definition Haptic Driver
maintainers:
- Roy Im <roy.im.opensource@diasemi.com>
properties:
compatible:
const: dlg,da7280
reg:
maxItems: 1
description: I2C address of the device.
interrupts:
maxItems: 1
dlg,actuator-type:
enum:
- LRA # Linear Resonance Actuator type
- ERM-bar # Bar type Eccentric Rotating Mass
- ERM-coin # Coin type Eccentric Rotating Mass
dlg,const-op-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 1 # Direct register override (DRO) mode triggered by i2c (default)
- 2 # PWM data source mode controlled by PWM duty
description:
Haptic operation mode for FF_CONSTANT
dlg,periodic-op-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 1 # Register triggered waveform memory(RTWM) mode, the pattern
# assigned to the PS_SEQ_ID played as much times as PS_SEQ_LOOP
- 2 # Edge triggered waveform memory(ETWM) mode, external GPI(N)
# control are required to enable/disable and it needs to keep
# device enabled by sending magnitude (X > 0),
# the pattern is assigned to the GPI(N)_SEQUENCE_ID below
default: 1
description:
Haptic operation mode for FF_PERIODIC.
The default value is 1 for both of the operation modes.
For more details, please see the datasheet
dlg,nom-microvolt:
minimum: 0
maximum: 6000000
description:
Nominal actuator voltage rating
dlg,abs-max-microvolt:
minimum: 0
maximum: 6000000
description:
Absolute actuator maximum voltage rating
dlg,imax-microamp:
minimum: 0
maximum: 252000
default: 130000
description:
Actuator max current rating
dlg,impd-micro-ohms:
minimum: 0
maximum: 1500000000
description:
Impedance of the actuator
pwms:
maxItems: 1
dlg,ps-seq-id:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
description:
The PS_SEQ_ID(pattern ID in waveform memory inside chip)
to play back when RTWM-MODE is enabled
dlg,ps-seq-loop:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
description:
The PS_SEQ_LOOP, Number of times the pre-stored sequence pointed to by
PS_SEQ_ID or GPI(N)_SEQUENCE_ID is repeated
dlg,gpi0-seq-id:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
description:
the GPI0_SEQUENCE_ID, pattern to play when gpi0 is triggered
dlg,gpi1-seq-id:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
description:
the GPI1_SEQUENCE_ID, pattern to play when gpi1 is triggered
dlg,gpi2-seq-id:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
description:
the GPI2_SEQUENCE_ID, pattern to play when gpi2 is triggered
dlg,gpi0-mode:
enum:
- Single-pattern
- Multi-pattern
description:
Pattern mode for gpi0
dlg,gpi1-mode:
enum:
- Single-pattern
- Multi-pattern
description:
Pattern mode for gpi1
dlg,gpi2-mode:
enum:
- Single-pattern
- Multi-pattern
description:
Pattern mode for gpi2
dlg,gpi0-polarity:
enum:
- Rising-edge
- Falling-edge
- Both-edge
description:
gpi0 polarity, Haptic will work by this edge option in case of ETWM mode
dlg,gpi1-polarity:
enum:
- Rising-edge
- Falling-edge
- Both-edge
description:
gpi1 polarity, Haptic will work by this edge option in case of ETWM mode
dlg,gpi2-polarity:
enum:
- Rising-edge
- Falling-edge
- Both-edge
description:
gpi2 polarity, Haptic will work by this edge option in case of ETWM mode
dlg,resonant-freq-hz:
minimum: 50
maximum: 300
default: 205
dlg,bemf-sens-enable:
$ref: /schemas/types.yaml#/definitions/flag
description:
Enable for internal loop computations
dlg,freq-track-enable:
$ref: /schemas/types.yaml#/definitions/flag
description:
Enable for resonant frequency tracking
dlg,acc-enable:
$ref: /schemas/types.yaml#/definitions/flag
description:
Enable for active acceleration
dlg,rapid-stop-enable:
$ref: /schemas/types.yaml#/definitions/flag
description:
Enable for rapid stop
dlg,amp-pid-enable:
$ref: /schemas/types.yaml#/definitions/flag
description:
Enable for the amplitude PID
dlg,mem-array:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 100
description:
Customized waveform memory (patterns) data downloaded to the device during initialization.
Each entry value must be included between 0 and 255.
required:
- compatible
- reg
- interrupts
- dlg,actuator-type
- dlg,const-op-mode
- dlg,periodic-op-mode
- dlg,nom-microvolt
- dlg,abs-max-microvolt
- dlg,imax-microamp
- dlg,impd-micro-ohms
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
haptics@4a {
compatible = "dlg,da7280";
reg = <0x4a>;
interrupt-parent = <&gpio6>;
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
dlg,actuator-type = "LRA";
dlg,const-op-mode = <1>;
dlg,periodic-op-mode = <1>;
dlg,nom-microvolt = <2000000>;
dlg,abs-max-microvolt = <2000000>;
dlg,imax-microamp = <170000>;
dlg,resonant-freq-hz = <180>;
dlg,impd-micro-ohms = <10500000>;
dlg,freq-track-enable;
dlg,rapid-stop-enable;
dlg,mem-array = <0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00>;
};
};
@@ -0,0 +1,38 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/dlg,da9062-onkey.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Dialog DA9061/62/63 OnKey Module
maintainers:
- Biju Das <biju.das.jz@bp.renesas.com>
description: |
This module is part of the DA9061/DA9062/DA9063. For more details about entire
DA906{1,2,3} chips see Documentation/devicetree/bindings/mfd/dlg,da9063.yaml
This module provides the KEY_POWER event.
properties:
compatible:
oneOf:
- enum:
- dlg,da9062-onkey
- dlg,da9063-onkey
- items:
- const: dlg,da9061-onkey
- const: dlg,da9062-onkey
dlg,disable-key-power:
type: boolean
description:
Disable power-down using a long key-press. If this entry exists
the OnKey driver will remove support for the KEY_POWER key press
when triggered using a long press of the OnKey.
required:
- compatible
additionalProperties: false
@@ -0,0 +1,21 @@
* D-Link DIR-685 Touchkeys
This is a I2C one-off touchkey controller based on the Cypress Semiconductor
CY8C214 MCU with some firmware in its internal 8KB flash. The circuit
board inside the router is named E119921.
The touchkey device node should be placed inside an I2C bus node.
Required properties:
- compatible: must be "dlink,dir685-touchkeys"
- reg: the I2C address of the touchkeys
- interrupts: reference to the interrupt number
Example:
touchkeys@26 {
compatible = "dlink,dir685-touchkeys";
reg = <0x26>;
interrupt-parent = <&gpio0>;
interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
};
@@ -0,0 +1,23 @@
National Instruments Ettus Research USRP E3x0 button driver
This module is part of the NI Ettus Research USRP E3x0 SDR.
This module provides a simple power button event via two interrupts.
Required properties:
- compatible: should be one of the following
- "ettus,e3x0-button": For devices such as the NI Ettus Research USRP E3x0
- interrupts: should be one of the following
- <0 30 1>, <0 31 1>: For devices such as the NI Ettus Research USRP E3x0
- interrupt-names: should be one of the following
- "press", "release": For devices such as the NI Ettus Research USRP E3x0
Note: Interrupt numbers might vary depending on the FPGA configuration.
Example:
button {
compatible = "ettus,e3x0-button";
interrupt-parent = <&intc>;
interrupts = <0 30 1>, <0 31 1>;
interrupt-names = "press", "release";
}
@@ -0,0 +1,81 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/elan,ekth3000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Elantech I2C Touchpad
maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>
allOf:
- $ref: touchscreen/touchscreen.yaml#
properties:
compatible:
const: elan,ekth3000
reg:
maxItems: 1
interrupts:
maxItems: 1
wakeup-source:
type: boolean
description: touchpad can be used as a wakeup source
vcc-supply:
description: a phandle for the regulator supplying 3.3V power
elan,trackpoint:
type: boolean
description: touchpad can support a trackpoint
elan,clickpad:
type: boolean
description: touchpad is a clickpad (the entire surface is a button)
elan,middle-button:
type: boolean
description: touchpad has a physical middle button
elan,x_traces:
$ref: /schemas/types.yaml#/definitions/uint32
description: number of antennas on the x axis
elan,y_traces:
$ref: /schemas/types.yaml#/definitions/uint32
description: number of antennas on the y axis
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-x-mm: true
touchscreen-y-mm: true
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchpad@15 {
compatible = "elan,ekth3000";
reg = <0x15>;
interrupt-parent = <&gpio4>;
interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
wakeup-source;
};
};
@@ -0,0 +1,84 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/elan,ekth6915.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Elan I2C-HID touchscreen controllers
maintainers:
- Douglas Anderson <dianders@chromium.org>
description:
Supports the Elan eKTH6915 and other I2C-HID touchscreen controllers.
These touchscreen controller use the i2c-hid protocol with a reset GPIO.
allOf:
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
properties:
compatible:
oneOf:
- items:
- enum:
- elan,ekth5015m
- const: elan,ekth6915
- items:
- const: elan,ekth8d18
- const: elan,ekth6a12nay
- enum:
- elan,ekth6915
- elan,ekth6a12nay
reg: true
interrupts:
maxItems: 1
panel: true
reset-gpios:
description: Reset GPIO; not all touchscreens using eKTH6915 hook this up.
no-reset-on-power-off:
type: boolean
description:
Reset line is wired so that it can (and should) be left deasserted when
the power supply is off.
vcc33-supply:
description: The 3.3V supply to the touchscreen.
vccio-supply:
description:
The IO supply to the touchscreen. Need not be specified if this is the
same as the 3.3V supply.
required:
- compatible
- reg
- interrupts
- vcc33-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@10 {
compatible = "elan,ekth5015m", "elan,ekth6915";
reg = <0x10>;
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
vcc33-supply = <&pp3300_ts>;
};
};
@@ -0,0 +1,66 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/focaltech,ft8112.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: FocalTech FT8112 touchscreen controller
maintainers:
- Daniel Peng <Daniel_Peng@pegatron.corp-partner.google.com>
description:
Supports the FocalTech FT8112 touchscreen controller.
This touchscreen controller uses the i2c-hid protocol with a reset GPIO.
allOf:
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
properties:
compatible:
enum:
- focaltech,ft8112
reg:
maxItems: 1
interrupts:
maxItems: 1
panel: true
reset-gpios:
maxItems: 1
vcc33-supply: true
vccio-supply: true
required:
- compatible
- reg
- interrupts
- vcc33-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@38 {
compatible = "focaltech,ft8112";
reg = <0x38>;
interrupt-parent = <&pio>;
interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&pio 126 GPIO_ACTIVE_LOW>;
vcc33-supply = <&pp3300_tchscr_x>;
};
};
@@ -0,0 +1,90 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/fsl,mpr121-touchkey.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale MPR121 capacitive touch sensor controller
maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>
description: |
The MPR121 supports up to 12 completely independent electrodes/capacitance
sensing inputs in which 8 are multifunctional for LED driving and GPIO.
https://www.nxp.com/docs/en/data-sheet/MPR121.pdf
allOf:
- $ref: input.yaml#
anyOf:
- required: [ interrupts ]
- required: [ poll-interval ]
properties:
compatible:
const: fsl,mpr121-touchkey
reg:
maxItems: 1
interrupts:
maxItems: 1
vdd-supply: true
linux,keycodes:
minItems: 1
maxItems: 12
wakeup-source:
description: Use any event on keypad as wakeup event.
type: boolean
required:
- compatible
- reg
- vdd-supply
- linux,keycodes
unevaluatedProperties: false
examples:
- |
// Example with interrupts
#include "dt-bindings/input/input.h"
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchkey@5a {
compatible = "fsl,mpr121-touchkey";
reg = <0x5a>;
interrupt-parent = <&gpio1>;
interrupts = <28 2>;
autorepeat;
vdd-supply = <&ldo4_reg>;
linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
<KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,
<KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
};
};
- |
// Example with polling
#include "dt-bindings/input/input.h"
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchkey@5a {
compatible = "fsl,mpr121-touchkey";
reg = <0x5a>;
poll-interval = <20>;
autorepeat;
vdd-supply = <&ldo4_reg>;
linux,keycodes = <KEY_0>, <KEY_1>, <KEY_2>, <KEY_3>,
<KEY_4>, <KEY_5>, <KEY_6>, <KEY_7>,
<KEY_8>, <KEY_9>, <KEY_A>, <KEY_B>;
};
};
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/fsl,scu-key.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: i.MX SCU Client Device Node - SCU Key Based on SCU Message Protocol
maintainers:
- Dong Aisheng <aisheng.dong@nxp.com>
description: i.MX SCU Client Device Node
Client nodes are maintained as children of the relevant IMX-SCU device node.
allOf:
- $ref: input.yaml#
properties:
compatible:
items:
- const: fsl,imx8qxp-sc-key
- const: fsl,imx-sc-key
linux,keycodes:
maxItems: 1
wakeup-source: true
required:
- compatible
- linux,keycodes
additionalProperties: false
examples:
- |
#include <dt-bindings/input/input.h>
keys {
compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key";
linux,keycodes = <KEY_POWER>;
};
@@ -0,0 +1,89 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/goodix,gt7375p.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Goodix GT7375P touchscreen
maintainers:
- Douglas Anderson <dianders@chromium.org>
description:
Supports the Goodix GT7375P touchscreen.
This touchscreen uses the i2c-hid protocol but has some non-standard
power sequencing required.
allOf:
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
properties:
compatible:
oneOf:
- const: goodix,gt7375p
- items:
- const: goodix,gt7986u
- const: goodix,gt7375p
reg:
enum:
- 0x5d
- 0x14
interrupts:
maxItems: 1
panel: true
reset-gpios:
true
vdd-supply:
description: The 3.3V supply to the touchscreen.
mainboard-vddio-supply:
description:
The supply on the main board needed to power up IO signals going
to the touchscreen. This supply need not go to the touchscreen
itself as long as it allows the main board to make signals compatible
with what the touchscreen is expecting for its IO rails.
goodix,no-reset-during-suspend:
description:
Set this to true to enforce the driver to not assert the reset GPIO
during suspend.
Due to potential touchscreen hardware flaw, back-powering could happen in
suspend if the power supply is on and with active-low reset GPIO asserted.
This property is used to avoid the back-powering issue.
type: boolean
required:
- compatible
- reg
- interrupts
- reset-gpios
- vdd-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
ap_ts: touchscreen@5d {
compatible = "goodix,gt7375p";
reg = <0x5d>;
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
vdd-supply = <&pp3300_ts>;
};
};
@@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/goodix,gt7986u-spifw.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Goodix GT7986U SPI HID Touchscreen
maintainers:
- Charles Wang <charles.goodix@gmail.com>
description: |
Supports the Goodix GT7986U touchscreen.
This touch controller reports data packaged according to the HID protocol
over the SPI bus, but it is incompatible with Microsoft's HID-over-SPI protocol.
NOTE: these bindings are distinct from the bindings used with the
GT7986U when the chip is running I2C firmware. This is because there's
not a single device that talks over both I2C and SPI but rather
distinct touchscreens that happen to be built with the same ASIC but
that are distinct products running distinct firmware.
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
compatible:
enum:
- goodix,gt7986u-spifw
reg:
maxItems: 1
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
spi-max-frequency: true
required:
- compatible
- reg
- interrupts
- reset-gpios
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@0 {
compatible = "goodix,gt7986u-spifw";
reg = <0>;
interrupt-parent = <&gpio>;
interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
spi-max-frequency = <10000000>;
};
};
...
@@ -0,0 +1,140 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/google,cros-ec-keyb.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ChromeOS EC Keyboard
maintainers:
- Simon Glass <sjg@chromium.org>
- Benson Leung <bleung@chromium.org>
description: |
Google's ChromeOS EC Keyboard is a simple matrix keyboard
implemented on a separate EC (Embedded Controller) device. It provides
a message for reading key scans from the EC. These are then converted
into keycodes for processing by the kernel. This device also supports
switches/buttons like power and volume buttons.
properties:
compatible:
oneOf:
- description: ChromeOS EC with only buttons/switches
const: google,cros-ec-keyb-switches
- description: ChromeOS EC with keyboard and possibly buttons/switches
const: google,cros-ec-keyb
google,needs-ghost-filter:
description:
Enable a ghost filter for the matrix keyboard. This is recommended
if the EC does not have its own logic or hardware for this.
type: boolean
function-row-physmap:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 15
description: |
An ordered u32 array describing the rows/columns (in the scan matrix)
of top row keys from physical left (KEY_F1) to right. Each entry
encodes the row/column as:
(((row) & 0xFF) << 24) | (((column) & 0xFF) << 16)
where the lower 16 bits are reserved. This property is specified only
when the keyboard has a custom design for the top row keys.
dependencies:
function-row-physmap: [ 'linux,keymap' ]
google,needs-ghost-filter: [ 'linux,keymap' ]
required:
- compatible
if:
properties:
compatible:
contains:
const: google,cros-ec-keyb
then:
$ref: /schemas/input/matrix-keymap.yaml#
required:
- keypad,num-rows
- keypad,num-columns
- linux,keymap
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/input/input.h>
keyboard-controller {
compatible = "google,cros-ec-keyb";
keypad,num-rows = <8>;
keypad,num-columns = <13>;
google,needs-ghost-filter;
function-row-physmap = <
MATRIX_KEY(0x00, 0x02, 0) /* T1 */
MATRIX_KEY(0x03, 0x02, 0) /* T2 */
MATRIX_KEY(0x02, 0x02, 0) /* T3 */
MATRIX_KEY(0x01, 0x02, 0) /* T4 */
MATRIX_KEY(0x03, 0x04, 0) /* T5 */
MATRIX_KEY(0x02, 0x04, 0) /* T6 */
MATRIX_KEY(0x01, 0x04, 0) /* T7 */
MATRIX_KEY(0x02, 0x09, 0) /* T8 */
MATRIX_KEY(0x01, 0x09, 0) /* T9 */
MATRIX_KEY(0x00, 0x04, 0) /* T10 */
>;
/*
* Keymap entries take the form of 0xRRCCKKKK where
* RR=Row CC=Column KKKK=Key Code
* The values below are for a US keyboard layout and
* are taken from the Linux driver. Note that the
* 102ND key is not used for US keyboards.
*/
linux,keymap = <
/* CAPSLCK F1 B F10 */
0x0001003a 0x0002003b 0x00030030 0x00040044
/* N = R_ALT ESC */
0x00060031 0x0008000d 0x000a0064 0x01010001
/* F4 G F7 H */
0x0102003e 0x01030022 0x01040041 0x01060023
/* ' F9 BKSPACE L_CTRL */
0x01080028 0x01090043 0x010b000e 0x0200001d
/* TAB F3 T F6 */
0x0201000f 0x0202003d 0x02030014 0x02040040
/* ] Y 102ND [ */
0x0205001b 0x02060015 0x02070056 0x0208001a
/* F8 GRAVE F2 5 */
0x02090042 0x03010029 0x0302003c 0x03030006
/* F5 6 - \ */
0x0304003f 0x03060007 0x0308000c 0x030b002b
/* R_CTRL A D F */
0x04000061 0x0401001e 0x04020020 0x04030021
/* S K J ; */
0x0404001f 0x04050025 0x04060024 0x04080027
/* L ENTER Z C */
0x04090026 0x040b001c 0x0501002c 0x0502002e
/* V X , M */
0x0503002f 0x0504002d 0x05050033 0x05060032
/* L_SHIFT / . SPACE */
0x0507002a 0x05080035 0x05090034 0x050B0039
/* 1 3 4 2 */
0x06010002 0x06020004 0x06030005 0x06040003
/* 8 7 0 9 */
0x06050009 0x06060008 0x0608000b 0x0609000a
/* L_ALT DOWN RIGHT Q */
0x060a0038 0x060b006c 0x060c006a 0x07010010
/* E R W I */
0x07020012 0x07030013 0x07040011 0x07050017
/* U R_SHIFT P O */
0x07060016 0x07070036 0x07080019 0x07090018
/* UP LEFT */
0x070b0067 0x070c0069>;
};
- |
/* No matrix keyboard, just buttons/switches */
keyboard-controller {
compatible = "google,cros-ec-keyb-switches";
};
...
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/google,goldfish-events-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Android Goldfish Events Keypad
maintainers:
- Kuan-Wei Chiu <visitorckw@gmail.com>
allOf:
- $ref: input.yaml#
description:
Android goldfish events keypad device generated by android emulator.
properties:
compatible:
const: google,goldfish-events-keypad
reg:
maxItems: 1
interrupts:
maxItems: 1
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
keypad@9040000 {
compatible = "google,goldfish-events-keypad";
reg = <0x9040000 0x1000>;
interrupts = <5>;
};
@@ -0,0 +1,33 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/gpio-beeper.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO controlled beeper
maintainers:
- Fabio Estevam <festevam@denx.de>
properties:
compatible:
const: gpio-beeper
gpios:
maxItems: 1
description:
GPIO that drives the beeper.
required:
- compatible
- gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
beeper {
compatible = "gpio-beeper";
gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
};
@@ -0,0 +1,108 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/gpio-charlieplex-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO charlieplex keypad
maintainers:
- Hugo Villeneuve <hvilleneuve@dimonoff.com>
description: |
The charlieplex keypad supports N^2)-N different key combinations (where N is
the number of I/O lines). Key presses and releases are detected by configuring
only one line as output at a time, and reading other line states. This process
is repeated for each line. Diodes are required to ensure current flows in only
one direction between any pair of pins, as well as pull-up or pull-down
resistors on all I/O lines.
This mechanism doesn't allow to detect simultaneous key presses.
Wiring example for 3 lines keyboard with 6 switches and 3 diodes (pull-up/down
resistors not shown but needed on L0, L1 and L2):
L0 --+---------------------+----------------------+
| | |
L1 -------+-----------+---------------------+ |
| | | | | |
L2 -------------+----------------+-----+ | |
| | | | | | | | |
| | | | | | | | |
| S1 \ S2 \ | S3 \ S4 \ | S5 \ S6 \
| | | | | | | | |
| +--+--+ | +--+--+ | +--+--+
| | | | | |
| D1 v | D2 v | D3 v
| - (k) | - (k) | - (k)
| | | | | |
+-------+ +-------+ +-------+
L: GPIO line
S: switch
D: diode (k indicates cathode)
allOf:
- $ref: input.yaml#
- $ref: /schemas/input/matrix-keymap.yaml#
properties:
compatible:
const: gpio-charlieplex-keypad
autorepeat: true
debounce-delay-ms:
default: 5
line-gpios:
description:
List of GPIOs used as lines. The gpio specifier for this property
depends on the gpio controller to which these lines are connected.
linux,keymap: true
poll-interval: true
settling-time-us: true
wakeup-source: true
required:
- compatible
- line-gpios
- linux,keymap
- poll-interval
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
keyboard {
compatible = "gpio-charlieplex-keypad";
debounce-delay-ms = <20>;
poll-interval = <5>;
settling-time-us = <2>;
line-gpios = <&gpio2 25 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)
&gpio2 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)
&gpio2 27 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
/* MATRIX_KEY(output, input, key-code) */
linux,keymap = <
/*
* According to wiring diagram above, if L1 is configured as
* output and HIGH, and we detect a HIGH level on input L0,
* then it means S1 is pressed: MATRIX_KEY(L1, L0, KEY...)
*/
MATRIX_KEY(1, 0, KEY_F1) /* S1 */
MATRIX_KEY(2, 0, KEY_F2) /* S2 */
MATRIX_KEY(0, 1, KEY_F3) /* S3 */
MATRIX_KEY(2, 1, KEY_F4) /* S4 */
MATRIX_KEY(1, 2, KEY_F5) /* S5 */
MATRIX_KEY(0, 2, KEY_F6) /* S6 */
>;
};
@@ -0,0 +1,23 @@
* GPIO Decoder DT bindings
Required Properties:
- compatible: should be "gpio-decoder"
- gpios: a spec of gpios (at least two) to be decoded to a number with
first entry representing the MSB.
Optional Properties:
- decoder-max-value: Maximum possible value that can be reported by
the gpios.
- linux,axis: the input subsystem axis to map to (ABS_X/ABS_Y).
Defaults to 0 (ABS_X).
Example:
gpio-decoder0 {
compatible = "gpio-decoder";
gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>,
<&pca9536 2 GPIO_ACTIVE_HIGH>,
<&pca9536 1 GPIO_ACTIVE_HIGH>,
<&pca9536 0 GPIO_ACTIVE_HIGH>;
linux,axis = <0>; /* ABS_X */
decoder-max-value = <9>;
};
@@ -0,0 +1,181 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/gpio-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO attached keys
maintainers:
- Rob Herring <robh@kernel.org>
properties:
compatible:
enum:
- gpio-keys
- gpio-keys-polled
autorepeat: true
label:
description: Name of entire device
poll-interval: true
patternProperties:
"^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$":
$ref: input.yaml#
properties:
gpios:
maxItems: 1
interrupts:
oneOf:
- items:
- description: Optional key interrupt or wakeup interrupt
- items:
- description: Key interrupt
- description: Wakeup interrupt
interrupt-names:
description:
Optional interrupt names, can be used to specify a separate dedicated
wake-up interrupt in addition to the gpio irq
oneOf:
- items:
- enum: [ irq, wakeup ]
- items:
- const: irq
- const: wakeup
label:
description: Descriptive name of the key.
linux,code:
description: Key / Axis code to emit.
linux,input-type:
default: 1 # EV_KEY
linux,input-value:
description: |
If linux,input-type is EV_ABS or EV_REL then this
value is sent for events this button generates when pressed.
EV_ABS/EV_REL axis will generate an event with a value of 0
when all buttons with linux,input-type == type and
linux,code == axis are released. This value is interpreted
as a signed 32 bit value, e.g. to make a button generate a
value of -1 use:
linux,input-value = <0xffffffff>; /* -1 */
$ref: /schemas/types.yaml#/definitions/uint32
debounce-interval:
description:
Debouncing interval time in milliseconds. If not specified defaults to 5.
$ref: /schemas/types.yaml#/definitions/uint32
default: 5
wakeup-source:
description: Button can wake-up the system.
wakeup-event-action:
description: |
Specifies whether the key should wake the system when asserted, when
deasserted, or both. This property is only valid for keys that wake up the
system (e.g., when the "wakeup-source" property is also provided).
Supported values are defined in linux-event-codes.h:
EV_ACT_ANY - both asserted and deasserted
EV_ACT_ASSERTED - asserted
EV_ACT_DEASSERTED - deasserted
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]
linux,can-disable:
description:
Indicates that button is connected to dedicated (not shared) interrupt
which can be disabled to suppress events from the button.
type: boolean
required:
- linux,code
anyOf:
- required:
- interrupts
- required:
- interrupts-extended
- required:
- gpios
allOf:
- if:
properties:
interrupts:
minItems: 2
required:
- interrupts
then:
properties:
interrupt-names:
minItems: 2
required:
- interrupt-names
dependencies:
wakeup-event-action: [ wakeup-source ]
linux,input-value: [ gpios ]
unevaluatedProperties: false
allOf:
- $ref: input.yaml#
- if:
properties:
compatible:
const: gpio-keys-polled
then:
required:
- poll-interval
else:
properties:
poll-interval: false
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
gpio-keys {
compatible = "gpio-keys";
autorepeat;
key-up {
label = "GPIO Key UP";
linux,code = <103>;
gpios = <&gpio1 0 1>;
};
key-down {
label = "GPIO Key DOWN";
linux,code = <108>;
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
};
key-wakeup {
label = "GPIO Key WAKEUP";
linux,code = <143>;
interrupts-extended = <&intc 2 IRQ_TYPE_EDGE_FALLING>,
<&intc_wakeup 0 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "irq", "wakeup";
wakeup-source;
};
};
...
@@ -0,0 +1,102 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/gpio-matrix-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO matrix keypad
maintainers:
- Marek Vasut <marek.vasut@gmail.com>
description:
GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.
The matrix keypad supports multiple row and column lines, a key can be
placed at each intersection of a unique row and a unique column. The matrix
keypad can sense a key-press and key-release by means of GPIO lines and
report the event using GPIO interrupts to the cpu.
allOf:
- $ref: input.yaml#
- $ref: /schemas/input/matrix-keymap.yaml#
properties:
compatible:
const: gpio-matrix-keypad
row-gpios:
description:
List of GPIOs used as row lines. The gpio specifier for this property
depends on the gpio controller to which these row lines are connected.
col-gpios:
description:
List of GPIOs used as column lines. The gpio specifier for this property
depends on the gpio controller to which these column lines are connected.
linux,keymap: true
linux,no-autorepeat:
type: boolean
description: Do not enable autorepeat feature.
gpio-activelow:
type: boolean
description:
Force GPIO polarity to active low.
In the absence of this property GPIOs are treated as active high.
debounce-delay-ms: true
col-scan-delay-us:
description:
Delay, measured in microseconds, that is needed
before we can scan keypad after activating column gpio.
default: 0
all-cols-on-delay-us:
description:
Delay, measured in microseconds, that is needed
after activating all column gpios.
default: 0
drive-inactive-cols:
type: boolean
description:
Drive inactive columns during scan,
default is to turn inactive columns into inputs.
wakeup-source: true
required:
- compatible
- row-gpios
- col-gpios
- linux,keymap
additionalProperties: false
examples:
- |
matrix-keypad {
compatible = "gpio-matrix-keypad";
debounce-delay-ms = <5>;
col-scan-delay-us = <2>;
row-gpios = <&gpio2 25 0
&gpio2 26 0
&gpio2 27 0>;
col-gpios = <&gpio2 21 0
&gpio2 22 0>;
linux,keymap = <0x0000008B
0x0100009E
0x02000069
0x0001006A
0x0101001C
0x0201006C>;
wakeup-source;
};
@@ -0,0 +1,68 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/gpio-mouse.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO attached mouse
description: |
This simply uses standard GPIO handles to define a simple mouse connected
to 5-7 GPIO lines.
maintainers:
- Anshul Dalal <anshulusr@gmail.com>
properties:
compatible:
const: gpio-mouse
scan-interval-ms:
maxItems: 1
up-gpios:
maxItems: 1
down-gpios:
maxItems: 1
left-gpios:
maxItems: 1
right-gpios:
maxItems: 1
button-left-gpios:
maxItems: 1
button-middle-gpios:
maxItems: 1
button-right-gpios:
maxItems: 1
required:
- compatible
- scan-interval-ms
- up-gpios
- down-gpios
- left-gpios
- right-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
gpio-mouse {
compatible = "gpio-mouse";
scan-interval-ms = <50>;
up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
};
@@ -0,0 +1,39 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/gpio-vibrator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO vibrator
maintainers:
- Luca Weiss <luca@z3ntu.xyz>
description: |+
Registers a GPIO device as vibrator, where the on/off capability is controlled by a GPIO.
properties:
compatible:
const: gpio-vibrator
enable-gpios:
maxItems: 1
vcc-supply:
description: Regulator that provides power
required:
- compatible
- enable-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
vibrator {
compatible = "gpio-vibrator";
enable-gpios = <&msmgpio 86 GPIO_ACTIVE_HIGH>;
vcc-supply = <&pm8941_l18>;
};
@@ -0,0 +1,85 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/hid-over-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: HID over I2C Devices
maintainers:
- Benjamin Tissoires <benjamin.tissoires@redhat.com>
- Jiri Kosina <jkosina@suse.cz>
description: |+
HID over I2C provides support for various Human Interface Devices over the
I2C bus. These devices can be for example touchpads, keyboards, touch screens
or sensors.
The specification has been written by Microsoft and is currently available here:
https://msdn.microsoft.com/en-us/library/windows/hardware/hh852380.aspx
If this binding is used, the kernel module i2c-hid will handle the communication
with the device and the generic hid core layer will handle the protocol.
allOf:
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
properties:
compatible:
oneOf:
- items:
- enum:
- wacom,w9013
- const: hid-over-i2c
- description: Just "hid-over-i2c" alone is allowed, but not recommended.
const: hid-over-i2c
reg:
maxItems: 1
interrupts:
maxItems: 1
hid-descr-addr:
description: HID descriptor address
$ref: /schemas/types.yaml#/definitions/uint32
panel: true
post-power-on-delay-ms:
description: Time required by the device after enabling its regulators
or powering it on, before it is ready for communication.
touchscreen-inverted-x: true
touchscreen-inverted-y: true
vdd-supply:
description: 3.3V supply
vddl-supply:
description: 1.8V supply
wakeup-source: true
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
hid@2c {
compatible = "hid-over-i2c";
reg = <0x2c>;
hid-descr-addr = <0x0020>;
interrupts = <3 2>;
};
};
...
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ibm,op-panel.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: IBM Operation Panel
maintainers:
- Eddie James <eajames@linux.ibm.com>
allOf:
- $ref: input.yaml#
description: |
The IBM Operation Panel provides a simple interface to control the connected
server. It has a display and three buttons: two directional arrows and one
'Enter' button.
properties:
compatible:
const: ibm,op-panel
reg:
maxItems: 1
linux,keycodes:
minItems: 1
maxItems: 3
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/i2c/i2c.h>
#include <dt-bindings/input/input.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
ibm-op-panel@62 {
compatible = "ibm,op-panel";
reg = <(0x62 | I2C_OWN_SLAVE_ADDRESS)>;
linux,keycodes = <KEY_UP>, <KEY_DOWN>, <KEY_ENTER>;
};
};
@@ -0,0 +1,66 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ilitek,ili2901.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Ilitek ILI2901 touchscreen controller
maintainers:
- Jiri Kosina <jkosina@suse.com>
description:
Supports the Ilitek ILI2901 touchscreen controller.
This touchscreen controller uses the i2c-hid protocol with a reset GPIO.
allOf:
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
properties:
compatible:
enum:
- ilitek,ili2901
reg:
maxItems: 1
interrupts:
maxItems: 1
panel: true
reset-gpios:
maxItems: 1
vcc33-supply: true
vccio-supply: true
required:
- compatible
- reg
- interrupts
- vcc33-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@41 {
compatible = "ilitek,ili2901";
reg = <0x41>;
interrupt-parent = <&tlmm>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
vcc33-supply = <&pp3300_ts>;
};
};
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ilitek,ili9882t.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Ilitek ili9882t touchscreen controller
maintainers:
- Cong Yang <yangcong5@huaqin.corp-partner.google.com>
description:
Supports the Ilitek ili9882t touchscreen controller.
This touchscreen controller uses the i2c-hid protocol with a reset GPIO.
allOf:
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
properties:
compatible:
const: ilitek,ili9882t
reg:
const: 0x41
interrupts:
maxItems: 1
panel: true
reset-gpios:
maxItems: 1
description: Reset GPIO.
vccio-supply:
description: The 1.8V supply to the touchscreen.
required:
- compatible
- reg
- interrupts
- panel
- vccio-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen: touchscreen@41 {
compatible = "ilitek,ili9882t";
reg = <0x41>;
interrupt-parent = <&pio>;
interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
panel = <&panel>;
reset-gpios = <&pio 60 GPIO_ACTIVE_LOW>;
vccio-supply = <&mt6366_vio18_reg>;
};
};
@@ -0,0 +1,85 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/imx-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX Keypad Port(KPP)
maintainers:
- Liu Ying <gnuiyl@gmail.com>
allOf:
- $ref: /schemas/input/matrix-keymap.yaml#
description: |
The KPP is designed to interface with a keypad matrix with 2-point contact
or 3-point contact keys. The KPP is designed to simplify the software task
of scanning a keypad matrix. The KPP is capable of detecting, debouncing,
and decoding one or multiple keys pressed simultaneously on a keypad.
properties:
compatible:
oneOf:
- const: fsl,imx21-kpp
- items:
- enum:
- fsl,imx25-kpp
- fsl,imx27-kpp
- fsl,imx31-kpp
- fsl,imx35-kpp
- fsl,imx51-kpp
- fsl,imx53-kpp
- fsl,imx50-kpp
- fsl,imx6q-kpp
- fsl,imx6sx-kpp
- fsl,imx6sl-kpp
- fsl,imx6sll-kpp
- fsl,imx6ul-kpp
- fsl,imx7d-kpp
- const: fsl,imx21-kpp
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
required:
- compatible
- reg
- interrupts
- clocks
- linux,keymap
unevaluatedProperties: false
examples:
- |
keypad@73f94000 {
compatible = "fsl,imx51-kpp", "fsl,imx21-kpp";
reg = <0x73f94000 0x4000>;
interrupts = <60>;
clocks = <&clks 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_kpp_1>;
linux,keymap = <0x00000067 /* KEY_UP */
0x0001006c /* KEY_DOWN */
0x00020072 /* KEY_VOLUMEDOWN */
0x00030066 /* KEY_HOME */
0x0100006a /* KEY_RIGHT */
0x01010069 /* KEY_LEFT */
0x0102001c /* KEY_ENTER */
0x01030073 /* KEY_VOLUMEUP */
0x02000040 /* KEY_F6 */
0x02010042 /* KEY_F8 */
0x02020043 /* KEY_F9 */
0x02030044 /* KEY_F10 */
0x0300003b /* KEY_F1 */
0x0301003c /* KEY_F2 */
0x0302003d /* KEY_F3 */
0x03030074>; /* KEY_POWER */
};
@@ -0,0 +1,33 @@
Input: sysrq reset sequence
A simple binding to represent a set of keys as described in
include/uapi/linux/input.h. This is to communicate a sequence of keys to the
sysrq driver. Upon holding the keys for a specified amount of time (if
specified) the system is sync'ed and reset.
Key sequences are global to the system but all the keys in a set must be coming
from the same input device.
The /chosen node should contain a 'linux,sysrq-reset-seq' child node to define
a set of keys.
Required property:
keyset: array of Linux keycodes, one keycode per cell.
Optional property:
timeout-ms: duration keys must be pressed together in milliseconds before
generating a sysrq. If omitted the system is rebooted immediately when a valid
sequence has been recognized.
Example:
chosen {
linux,sysrq-reset-seq {
keyset = <0x03
0x04
0x0a>;
timeout-ms = <3000>;
};
};
Would represent KEY_2, KEY_3 and KEY_9.
@@ -0,0 +1,80 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/input.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Input Devices Common Properties
maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>
properties:
autorepeat:
description: Enable autorepeat when key is pressed and held down.
type: boolean
debounce-delay-ms:
description:
Debounce delay in milliseconds. This is the time during which the key
press or release signal must remain stable before it is considered valid.
minimum: 0
maximum: 999
default: 0
linux,keycodes:
description:
Specifies an array of numeric keycode values to be used for reporting
button presses.
$ref: /schemas/types.yaml#/definitions/uint32-array
items:
minimum: 0
maximum: 0x2ff
linux,code:
description:
Specifies a single numeric keycode value to be used for reporting
button/switch events. Specify KEY_RESERVED (0) to opt out of event
reporting.
$ref: /schemas/types.yaml#/definitions/uint32
maximum: 0x2ff
linux,input-type:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 1 # EV_KEY
- 2 # EV_REL
- 3 # EV_ABS
- 5 # EV_SW
description:
Specifies whether the event is to be interpreted as a key, relative,
absolute, or switch.
poll-interval:
description: Poll interval time in milliseconds.
$ref: /schemas/types.yaml#/definitions/uint32
power-off-time-sec:
description:
Duration in seconds which the key should be kept pressed for device to
power off automatically. Device with key pressed shutdown feature can
specify this property.
reset-time-sec:
description:
Duration in seconds which the key should be kept pressed for device to
reset automatically. Device with key pressed reset feature can specify
this property.
settling-time-us:
description:
Delay, in microseconds, when activating an output line/col/row before
we can reliably read other input lines that maybe affected by this
output. This can be the case for an output with a RC circuit that affects
ramp-up/down times.
default: 0
dependencies:
linux,input-type: [ "linux,code" ]
additionalProperties: true
@@ -0,0 +1,648 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/iqs269a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Azoteq IQS269A Capacitive Touch Controller
maintainers:
- Jeff LaBundy <jeff@labundy.com>
allOf:
- $ref: input.yaml#
description: |
The Azoteq IQS269A is an 8-channel capacitive touch controller that features
additional Hall-effect and inductive sensing capabilities.
Link to datasheet: https://www.azoteq.com/
properties:
compatible:
enum:
- azoteq,iqs269a
- azoteq,iqs269a-00
- azoteq,iqs269a-d0
reg:
maxItems: 1
interrupts:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
azoteq,hall-enable:
type: boolean
description:
Enables Hall-effect sensing on channels 6 and 7. In this case, keycodes
assigned to channel 6 are ignored and keycodes assigned to channel 7 are
interpreted as switch codes. Refer to the datasheet for requirements im-
posed on channels 6 and 7 by Hall-effect sensing.
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 (channel 0 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-update:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 7
default: 3
description: Specifies the ultra-low-power mode update rate.
azoteq,reseed-offset:
type: boolean
description:
Applies an 8-count offset to all long-term averages upon either ATI or
reseed events.
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.
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.
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.
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,rate-np-ms:
minimum: 0
maximum: 255
default: 16
description: Specifies the report rate (in ms) during normal-power mode.
azoteq,rate-lp-ms:
minimum: 0
maximum: 255
default: 160
description: Specifies the report rate (in ms) during low-power mode.
azoteq,rate-ulp-ms:
multipleOf: 16
minimum: 0
maximum: 4080
default: 160
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 during normal-
power mode before transitioning to low-power mode.
azoteq,timeout-lta-ms:
multipleOf: 512
minimum: 0
maximum: 130560
default: 32768
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.
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,ati-band-tighten:
type: boolean
description: Tightens the ATI band from 1/8 to 1/16 of the desired target.
azoteq,filt-disable:
type: boolean
description: Disables all raw count filtering.
azoteq,gpio3-select:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 7
default: 0
description:
Selects the channel for which the GPIO3 pin represents touch state.
azoteq,dual-direction:
type: boolean
description:
Specifies that 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,tx-freq:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
default: 0
description: |
Specifies the inductive sensing excitation frequency as follows (paren-
thesized 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)
azoteq,global-cap-increase:
type: boolean
description: Increases the global capacitance adder from 0.5 pF to 1.5 pF.
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,tracking-enable:
type: boolean
description:
Enables all associated channels to track their respective reference
channels.
azoteq,filt-str-slider:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
default: 1
description: Specifies the slider coordinate filter strength.
azoteq,touch-hold-ms:
multipleOf: 256
minimum: 256
maximum: 65280
default: 5120
description:
Specifies the length of time (in ms) for which the channel selected by
'azoteq,gpio3-select' must be held in a state of touch in order for an
approximately 60-ms pulse to be asserted on the GPIO4 pin.
linux,keycodes:
minItems: 1
maxItems: 8
description: |
Specifies the numeric keycodes associated with each available gesture in
the following order (enter 0 for unused gestures):
0: Slider 0 tap
1: Slider 0 hold
2: Slider 0 positive flick or swipe
3: Slider 0 negative flick or swipe
4: Slider 1 tap
5: Slider 1 hold
6: Slider 1 positive flick or swipe
7: Slider 1 negative flick or swipe
azoteq,gesture-swipe:
type: boolean
description:
Directs the device to interpret axial gestures as a swipe (finger remains
on slider) instead of a flick (finger leaves slider).
azoteq,timeout-tap-ms:
multipleOf: 16
minimum: 0
maximum: 4080
default: 400
description:
Specifies the length of time (in ms) within which a slider touch must be
released in order to be interpreted as a tap. Default and maximum values
as well as step size are reduced by a factor of 4 with device version 2.
azoteq,timeout-swipe-ms:
multipleOf: 16
minimum: 0
maximum: 4080
default: 2000
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. Default and max-
imum values as well as step size are reduced by a factor of 4 with device
version 2.
azoteq,thresh-swipe:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
default: 128
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"]
patternProperties:
"^channel@[0-7]$":
type: object
description:
Represents a single sensing channel. A channel is active if defined and
inactive otherwise.
properties:
reg:
minimum: 0
maximum: 7
description: Index of the channel.
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,blocking-enable:
type: boolean
description: Specifies that the channel is a blocking channel.
azoteq,slider0-select:
type: boolean
description: Specifies that the channel participates in slider 0.
azoteq,slider1-select:
type: boolean
description: Specifies that the channel participates in slider 1.
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. By default, only
the CRX pin corresponding to the channel's index is enabled (e.g. CRX0
for channel 0).
azoteq,tx-enable:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 8
items:
minimum: 0
maximum: 7
default: [0, 1, 2, 3, 4, 5, 6, 7]
description: Specifies the TX pin(s) associated with the channel.
azoteq,meas-cap-decrease:
type: boolean
description:
Decreases the internal measurement capacitance from 60 pF to 15 pF.
azoteq,rx-float-inactive:
type: boolean
description: Floats any inactive CRX pins instead of grounding them.
azoteq,local-cap-size:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]
default: 0
description: |
Specifies the capacitance to be added to the channel as follows:
0: None
1: Global adder (based on 'azoteq,global-cap-increase')
2: Global adder + 0.5 pF
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.
azoteq,proj-bias:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
default: 2
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-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 9, 14, 15]
default: 0
description: |
Specifies the channel's sensing mode as follows:
0: Self capacitance
1: Projected capacitance
9: Self or mutual inductance
14: Hall effect
15: Temperature
azoteq,sense-freq:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
default: 1
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)
azoteq,static-enable:
type: boolean
description: Enables the static front-end for the channel.
azoteq,ati-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3]
default: 3
description: |
Specifies the channel's ATI mode as follows:
0: Disabled
1: Semi-partial
2: Partial
3: Full
azoteq,ati-base:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [75, 100, 150, 200]
default: 100
description: Specifies the channel's ATI base.
azoteq,ati-target:
$ref: /schemas/types.yaml#/definitions/uint32
multipleOf: 32
minimum: 0
maximum: 2016
default: 512
description: Specifies the channel's ATI target.
azoteq,assoc-select:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 8
items:
minimum: 0
maximum: 7
description:
Specifies the associated channels for which the channel serves as a
reference channel. By default, no channels are selected.
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).
patternProperties:
"^event-prox(-alt)?$":
type: object
$ref: input.yaml#
description:
Represents a proximity event reported by the channel in response to
a decrease in counts. Node names suffixed with '-alt' instead corre-
spond 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).
properties:
azoteq,thresh:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
default: 10
description: Specifies the threshold for the event.
linux,code: true
additionalProperties: false
"^event-touch(-alt)?$":
type: object
$ref: input.yaml#
description: Represents a touch event reported by the channel.
properties:
azoteq,thresh:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
default: 8
description: Specifies the threshold for the event.
azoteq,hyst:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
default: 4
description: Specifies the hysteresis for the event.
linux,code: true
additionalProperties: false
"^event-deep(-alt)?$":
type: object
$ref: input.yaml#
description: Represents a deep-touch event reported by the channel.
properties:
azoteq,thresh:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
default: 26
description: Specifies the threshold for the event.
azoteq,hyst:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
default: 0
description: Specifies the hysteresis for the event.
linux,code: true
additionalProperties: false
required:
- reg
additionalProperties: false
if:
properties:
compatible:
contains:
enum:
- azoteq,iqs269a-d0
then:
patternProperties:
"^channel@[0-7]$":
properties:
azoteq,slider1-select: false
else:
properties:
azoteq,touch-hold-ms: 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,iqs269a";
reg = <0x44>;
interrupt-parent = <&gpio>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
azoteq,hall-enable;
azoteq,suspend-mode = <2>;
linux,keycodes = <KEY_PLAYPAUSE>,
<KEY_STOPCD>,
<KEY_NEXTSONG>,
<KEY_PREVIOUSSONG>;
azoteq,timeout-tap-ms = <400>;
azoteq,timeout-swipe-ms = <800>;
channel@0 {
reg = <0x0>;
event-prox {
linux,code = <KEY_POWER>;
};
};
channel@1 {
reg = <0x1>;
azoteq,slider0-select;
};
channel@2 {
reg = <0x2>;
azoteq,slider0-select;
};
channel@3 {
reg = <0x3>;
azoteq,slider0-select;
};
channel@4 {
reg = <0x4>;
azoteq,slider0-select;
};
channel@5 {
reg = <0x5>;
azoteq,slider0-select;
};
channel@6 {
reg = <0x6>;
azoteq,invert-enable;
azoteq,static-enable;
azoteq,reseed-disable;
azoteq,rx-enable = <0>;
azoteq,sense-freq = <0x0>;
azoteq,sense-mode = <0xE>;
azoteq,ati-mode = <0x0>;
azoteq,ati-base = <200>;
azoteq,ati-target = <320>;
};
channel@7 {
reg = <0x7>;
azoteq,invert-enable;
azoteq,static-enable;
azoteq,reseed-disable;
azoteq,rx-enable = <0>, <6>;
azoteq,sense-freq = <0x0>;
azoteq,sense-mode = <0xE>;
azoteq,ati-mode = <0x3>;
azoteq,ati-base = <200>;
azoteq,ati-target = <320>;
event-touch {
linux,code = <SW_LID>;
};
};
};
};
...
@@ -0,0 +1,878 @@
# 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-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,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.
patternProperties:
"^channel-[0-8]$":
type: object
description: Represents a single trackpad channel.
properties:
azoteq,thresh:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
default: 0
description: Specifies the threshold for the channel.
azoteq,ati-base:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 45
maximum: 300
default: 45
description: Specifies the channel's ATI base.
additionalProperties: false
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,ati-mode = <3>;
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>;
channel-0 {
azoteq,thresh = <35>;
azoteq,ati-base = <195>;
};
channel-1 {
azoteq,thresh = <40>;
azoteq,ati-base = <195>;
};
channel-2 {
azoteq,thresh = <40>;
azoteq,ati-base = <195>;
};
channel-3 {
azoteq,thresh = <38>;
azoteq,ati-base = <195>;
};
channel-4 {
azoteq,thresh = <33>;
azoteq,ati-base = <195>;
};
channel-5 {
azoteq,thresh = <38>;
azoteq,ati-base = <195>;
};
channel-6 {
azoteq,thresh = <35>;
azoteq,ati-base = <195>;
};
channel-7 {
azoteq,thresh = <35>;
azoteq,ati-base = <195>;
};
channel-8 {
azoteq,thresh = <35>;
azoteq,ati-base = <195>;
};
};
/*
* 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>;
};
};
};
};
...
@@ -0,0 +1,132 @@
# 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
...
@@ -0,0 +1 @@
This file has been moved to matrix-keymap.yaml
@@ -0,0 +1,48 @@
# 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 on Matrix-connected Keyboards
maintainers:
- Olof Johansson <olof@lixom.net>
description: |
A simple common binding for matrix-connected keyboards. 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>;
};
@@ -0,0 +1,38 @@
# 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
...
@@ -0,0 +1,87 @@
# 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@kernel.org>
allOf:
- $ref: input.yaml#
- $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
- mediatek,mt8183-keypad
- mediatek,mt8365-keypad
- mediatek,mt8516-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";
};
};
@@ -0,0 +1,100 @@
# 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/mediatek,mt6397.yaml
properties:
compatible:
oneOf:
- enum:
- mediatek,mt6323-keys
- mediatek,mt6328-keys
- mediatek,mt6331-keys
- mediatek,mt6357-keys
- mediatek,mt6358-keys
- mediatek,mt6359-keys
- mediatek,mt6397-keys
- items:
- enum:
- mediatek,mt6365-keys
- const: mediatek,mt6359-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
...
@@ -0,0 +1,226 @@
# 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: 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,cap1203
- microchip,cap1206
- microchip,cap1293
- microchip,cap1298
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: 3
maxItems: 8
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 number of entries must correspond to the number of channels.
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.
microchip,sensitivity-delta-sense:
$ref: /schemas/types.yaml#/definitions/uint32
default: 32
enum: [1, 2, 4, 8, 16, 32, 64, 128]
description:
Controls the sensitivity multiplier of a touch detection.
Higher value means more sensitive settings.
At the more sensitive settings, touches are detected for a smaller delta
capacitance corresponding to a "lighter" touch.
microchip,signal-guard:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3
maxItems: 8
items:
enum: [0, 1]
description: |
0 - off
1 - on
The signal guard isolates the signal from virtual grounds.
If enabled then the behavior of the channel is changed to signal guard.
The number of entries must correspond to the number of channels.
microchip,input-threshold:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3
maxItems: 8
items:
minimum: 0
maximum: 127
description:
Specifies the delta threshold that is used to determine if a touch has
been detected. A higher value means a larger difference in capacitance
is required for a touch to be registered, making the touch sensor less
sensitive.
The number of entries must correspond to the number of channels.
microchip,calib-sensitivity:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3
maxItems: 8
items:
enum: [1, 2, 4]
description: |
Specifies an array of numeric values that controls the gain
used by the calibration routine to enable sensor inputs
to be more sensitive for proximity detection.
Gain is based on touch pad capacitance range
1 - 5-50pF
2 - 0-25pF
4 - 0-12.5pF
The number of entries must correspond to the number of channels.
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
- microchip,cap1203
- microchip,cap1206
- microchip,cap1293
- microchip,cap1298
then:
patternProperties:
"^led@[0-7]$": false
- if:
properties:
compatible:
contains:
enum:
- microchip,cap1106
- microchip,cap1126
- microchip,cap1188
- microchip,cap1203
- microchip,cap1206
then:
properties:
microchip,signal-guard: false
microchip,calib-sensitivity: 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>;
microchip,sensitivity-delta-sense = <16>;
microchip,input-threshold = <21>, <18>, <46>, <46>, <46>, <21>;
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";
};
};
};
@@ -0,0 +1,78 @@
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>;
};
};
@@ -0,0 +1,55 @@
* 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>;
};
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/nxp,lpc3220-key.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP LPC32xx Key Scan Interface
maintainers:
- Frank Li <Frank.Li@nxp.com>
properties:
compatible:
const: nxp,lpc3220-key
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
nxp,debounce-delay-ms:
description: Debounce delay in ms
nxp,scan-delay-ms:
description: Repeated scan period in ms
required:
- compatible
- reg
- interrupts
- clocks
- nxp,debounce-delay-ms
- nxp,scan-delay-ms
- linux,keymap
allOf:
- $ref: matrix-keymap.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/lpc32xx-clock.h>
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>;
};
@@ -0,0 +1,28 @@
* 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;
};
@@ -0,0 +1,68 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/parade,tc3408.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Parade TC3408 touchscreen controller
maintainers:
- Langyan Ye <yelangyan@huaqin.corp-partner.google.com>
description: |
Parade TC3408 is a touchscreen controller supporting the I2C-HID protocol.
It requires a reset GPIO and two power supplies (3.3V and 1.8V).
allOf:
- $ref: /schemas/input/touchscreen/touchscreen.yaml#
properties:
compatible:
const: parade,tc3408
reg:
maxItems: 1
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
vcc33-supply:
description: The 3.3V supply to the touchscreen.
vccio-supply:
description: The 1.8V supply to the touchscreen.
required:
- compatible
- reg
- interrupts
- reset-gpios
- vcc33-supply
- vccio-supply
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen: touchscreen@24 {
compatible = "parade,tc3408";
reg = <0x24>;
interrupt-parent = <&pio>;
interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&pio 126 GPIO_ACTIVE_LOW>;
vcc33-supply = <&pp3300_tchscr_x>;
vccio-supply = <&pp1800_tchscr_report_disable>;
};
};
@@ -0,0 +1,66 @@
# 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
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>;
};
};
};
};
@@ -0,0 +1,16 @@
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
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/pwm-beeper.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: PWM beeper
maintainers:
- Sascha Hauer <s.hauer@pengutronix.de>
properties:
compatible:
const: pwm-beeper
pwms:
maxItems: 1
amp-supply:
description: an amplifier for the beeper
beeper-hz:
description: bell frequency in Hz
minimum: 10
maximum: 10000
required:
- compatible
- pwms
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
beeper {
compatible = "pwm-beeper";
pwms = <&pwm0>;
amp-supply = <&beeper_amp>;
beeper-hz = <1000>;
};
@@ -0,0 +1,59 @@
# 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
enable-gpios: true
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>;
};
@@ -0,0 +1,60 @@
* 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>;
};
@@ -0,0 +1,89 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/qcom,pm8921-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm PM8921 PMIC KeyPad
maintainers:
- Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
allOf:
- $ref: input.yaml#
- $ref: matrix-keymap.yaml#
properties:
compatible:
enum:
- qcom,pm8058-keypad
- qcom,pm8921-keypad
reg:
maxItems: 1
interrupts:
items:
- description: key sense
- description: key stuck
wakeup-source:
type: boolean
description: use any event on keypad as wakeup event
linux,keypad-wakeup:
type: boolean
deprecated: true
description: legacy version of the wakeup-source property
debounce:
description:
Time in microseconds that key must be pressed or
released for state change interrupt to trigger.
$ref: /schemas/types.yaml#/definitions/uint32
scan-delay:
$ref: /schemas/types.yaml#/definitions/uint32
description: time in microseconds to pause between successive scans of the
matrix array
row-hold:
$ref: /schemas/types.yaml#/definitions/uint32
description: time in nanoseconds to pause between scans of each row in the
matrix array.
required:
- compatible
- reg
- interrupts
- linux,keymap
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
pmic {
#address-cells = <1>;
#size-cells = <0>;
keypad@148 {
compatible = "qcom,pm8921-keypad";
reg = <0x148>;
interrupt-parent = <&pmicintc>;
interrupts = <74 IRQ_TYPE_EDGE_RISING>, <75 IRQ_TYPE_EDGE_RISING>;
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>;
};
};
...
@@ -0,0 +1,75 @@
# 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;
};
};
};
...
@@ -0,0 +1,72 @@
# 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>
properties:
compatible:
oneOf:
- enum:
- qcom,pm8941-pwrkey
- qcom,pm8941-resin
- qcom,pmk8350-pwrkey
- qcom,pmk8350-resin
- items:
- const: qcom,pmm8654au-pwrkey
- const: qcom,pmk8350-pwrkey
- items:
- const: qcom,pmm8654au-resin
- const: 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
wakeup-source:
description:
Button can wake-up the system. Only applicable for 'resin', 'pwrkey'
always wakes the system by default.
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.
allOf:
- $ref: input.yaml#
- if:
properties:
compatible:
contains:
enum:
- qcom,pm8941-pwrkey
- qcom,pmk8350-pwrkey
then:
properties:
wakeup-source: false
required:
- compatible
- interrupts
unevaluatedProperties: false
...
@@ -0,0 +1,47 @@
# 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:
oneOf:
- enum:
- qcom,pm8058-vib
- qcom,pm8916-vib
- qcom,pm8921-vib
- qcom,pmi632-vib
- items:
- enum:
- qcom,pm6150-vib
- qcom,pm7250b-vib
- qcom,pm7325b-vib
- qcom,pm7550ba-vib
- const: qcom,pmi632-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>;
};
};
@@ -0,0 +1,19 @@
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>;
};
@@ -0,0 +1,43 @@
# 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>;
};
@@ -0,0 +1,90 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/rotary-encoder.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Rotary encoder
maintainers:
- Frank Li <Frank.Li@nxp.com>
description:
See Documentation/input/devices/rotary-encoder.rst for more information.
properties:
compatible:
const: rotary-encoder
gpios:
minItems: 2
linux,axis:
default: 0
description:
the input subsystem axis to map to this rotary encoder.
Defaults to 0 (ABS_X / REL_X)
rotary-encoder,steps:
$ref: /schemas/types.yaml#/definitions/uint32
default: 24
description:
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:
$ref: /schemas/types.yaml#/definitions/flag
description:
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:
$ref: /schemas/types.yaml#/definitions/flag
description:
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:
$ref: /schemas/types.yaml#/definitions/uint32
default: 1
enum: [1, 2, 4]
description: |
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: true
rotary-encoder,encoding:
$ref: /schemas/types.yaml#/definitions/string
description: the method used to encode steps.
enum: [gray, binary]
rotary-encoder,half-period:
$ref: /schemas/types.yaml#/definitions/flag
deprecated: true
description:
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>".
required:
- compatible
- gpios
additionalProperties: false
examples:
- |
rotary {
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;
};
@@ -0,0 +1,121 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/samsung,s3c6410-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung SoC series Keypad Controller
description:
Samsung SoC 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.
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
properties:
compatible:
enum:
- samsung,s3c6410-keypad
- samsung,s5pv210-keypad
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: keypad
interrupts:
maxItems: 1
wakeup-source: true
linux,input-no-autorepeat:
type: boolean
description:
Do no enable autorepeat feature.
linux,input-wakeup:
type: boolean
deprecated: true
samsung,keypad-num-columns:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Number of column lines connected to the keypad controller.
samsung,keypad-num-rows:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Number of row lines connected to the keypad controller.
patternProperties:
'^key-[0-9a-z]+$':
type: object
$ref: input.yaml#
additionalProperties: false
description:
Each key connected to the keypad controller is represented as a child
node to the keypad controller device node.
properties:
keypad,column:
$ref: /schemas/types.yaml#/definitions/uint32
description: The column number to which the key is connected.
keypad,row:
$ref: /schemas/types.yaml#/definitions/uint32
description: The row number to which the key is connected.
linux,code: true
required:
- keypad,column
- keypad,row
- linux,code
required:
- compatible
- reg
- interrupts
- samsung,keypad-num-columns
- samsung,keypad-num-rows
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/exynos4.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
keypad@100a0000 {
compatible = "samsung,s5pv210-keypad";
reg = <0x100a0000 0x100>;
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clock CLK_KEYIF>;
clock-names = "keypad";
samsung,keypad-num-rows = <2>;
samsung,keypad-num-columns = <8>;
linux,input-no-autorepeat;
wakeup-source;
key-1 {
keypad,row = <0>;
keypad,column = <3>;
linux,code = <2>;
};
key-2 {
keypad,row = <0>;
keypad,column = <4>;
linux,code = <3>;
};
};
@@ -0,0 +1,20 @@
* 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>;
};
@@ -0,0 +1,31 @@
# 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
...
@@ -0,0 +1,60 @@
* 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) >;
};
@@ -0,0 +1,293 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/syna,rmi4.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Synaptics RMI4 compliant devices
maintainers:
- Jason A. Donenfeld <Jason@zx2c4.com>
- Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
- Vincent Huang <vincent.huang@tw.synaptics.com>
description: |
The Synaptics RMI4 (Register Mapped Interface 4) core is able to support RMI4
devices using different transports (I2C, SPI) and different functions (e.g.
Function 1, 2D sensors using Function 11 or 12).
properties:
compatible:
enum:
- syna,rmi4-i2c
- syna,rmi4-spi
reg:
maxItems: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
description: Active low signal
spi-cpha: true
spi-cpol: true
syna,reset-delay-ms:
description:
Delay to wait after resetting the device.
syna,startup-delay-ms:
description:
Delay to wait after powering on the device.
vdd-supply: true
vio-supply: true
rmi4-f01@1:
type: object
additionalProperties: false
description:
Function 1
properties:
reg:
maxItems: 1
syna,nosleep-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]
description:
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:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Defines the amplitude of the disturbance to the background
capacitance that will cause the device to wake from dozing.
syna,doze-holdoff-ms:
description:
The delay to wait after the last finger lift and the first doze
cycle.
syna,doze-interval-ms:
description:
The time period that the device sleeps between finger activity.
required:
- reg
rmi4-f1a@1a:
type: object
additionalProperties: false
$ref: input.yaml#
description:
RMI4 Function 1A is for capacitive keys.
properties:
reg:
maxItems: 1
linux,keycodes:
minItems: 1
maxItems: 4
required:
- reg
patternProperties:
"^rmi4-f1[12]@1[12]$":
type: object
unevaluatedProperties: false
$ref: /schemas/input/touchscreen/touchscreen.yaml#
description:
RMI4 Function 11 and Function 12 are for 2D touch position sensing.
properties:
reg:
maxItems: 1
syna,clip-x-low:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Minimum value for X.
syna,clip-y-low:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Minimum value for Y.
syna,clip-x-high:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Maximum value for X.
syna,clip-y-high:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Maximum value for Y.
syna,offset-x:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Add an offset to X.
syna,offset-y:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Add an offset to Y.
syna,delta-x-threshold:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Minimum distance on the X axis required to generate an interrupt in
reduced reporting mode.
syna,delta-y-threshold:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Minimum distance on the Y axis required to generate an interrupt in
reduced reporting mode.
syna,sensor-type:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 2]
description: |
Sensor type: 1 for touchscreen 2 for touchpad.
syna,disable-report-mask:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Mask for disabling posiiton reporting. Used to disable reporing
absolute position data.
syna,rezero-wait-ms:
description:
Time to wait after issuing a rezero command.
required:
- reg
"^rmi4-f[0-9a-f]+@[0-9a-f]+$":
type: object
additionalProperties: true
description:
Other functions, not documented yet.
properties:
reg:
maxItems: 1
required:
- reg
required:
- compatible
- reg
unevaluatedProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- if:
properties:
compatible:
contains:
const: syna,rmi4-i2c
then:
properties:
spi-rx-delay-us: false
spi-tx-delay-us: false
else:
properties:
syna,reset-delay-ms: false
syna,startup-delay-ms: false
examples:
- |
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@20 {
compatible = "syna,rmi4-i2c";
reg = <0x20>;
interrupt-parent = <&gpx1>;
interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
syna,startup-delay-ms = <100>;
vdd-supply = <&tsp_vdd>;
vio-supply = <&ldo32_reg>;
pinctrl-0 = <&touch_irq>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
rmi4-f01@1 {
reg = <0x1>;
syna,nosleep-mode = <1>;
};
rmi4-f12@12 {
reg = <0x12>;
syna,sensor-type = <1>;
};
rmi4-f1a@1a {
reg = <0x1a>;
linux,keycodes = <KEY_BACK KEY_HOME KEY_MENU>;
};
};
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@0 {
compatible = "syna,rmi4-spi";
reg = <0x0>;
interrupt-parent = <&gpx1>;
interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <4000000>;
spi-rx-delay-us = <30>;
spi-cpha;
spi-cpol;
#address-cells = <1>;
#size-cells = <0>;
rmi4-f01@1 {
reg = <0x1>;
syna,nosleep-mode = <1>;
};
rmi4-f11@11 {
reg = <0x11>;
touchscreen-inverted-y;
syna,sensor-type = <2>;
};
};
};
@@ -0,0 +1,109 @@
# 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>;
};
};
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ti,drv266x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments - drv266x Haptics driver
description: |
Product Page:
http://www.ti.com/product/drv2665
http://www.ti.com/product/drv2667
maintainers:
- Anshul Dalal <anshulusr@gmail.com>
properties:
compatible:
enum:
- ti,drv2665
- ti,drv2667
reg:
maxItems: 1
vbat-supply:
description: Required supply regulator
required:
- compatible
- reg
- vbat-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
haptics@59 {
compatible = "ti,drv2667";
reg = <0x59>;
vbat-supply = <&vbat>;
};
};
@@ -0,0 +1,74 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ti,nspire-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI-NSPIRE Keypad
maintainers:
- Andrew Davis <afd@ti.com>
allOf:
- $ref: input.yaml#
- $ref: matrix-keymap.yaml#
properties:
compatible:
enum:
- ti,nspire-keypad
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
scan-interval:
$ref: /schemas/types.yaml#/definitions/uint32
description: 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:
$ref: /schemas/types.yaml#/definitions/uint32
description: How long to wait between scanning each row in us.
active-low:
description: Specify that the keypad is active low.
required:
- compatible
- reg
- interrupts
- clocks
- scan-interval
- row-delay
- linux,keymap
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/input/input.h>
keypad@900e0000 {
compatible = "ti,nspire-keypad";
reg = <0x900e0000 0x1000>;
interrupts = <16>;
clocks = <&apb_pclk>;
scan-interval = <1000>;
row-delay = <200>;
linux,keymap = <
MATRIX_KEY(0, 0, KEY_ENTER)
MATRIX_KEY(0, 1, KEY_ENTER)
MATRIX_KEY(0, 4, KEY_SPACE)
MATRIX_KEY(0, 5, KEY_Z)
MATRIX_KEY(0, 6, KEY_Y)
MATRIX_KEY(0, 7, KEY_0)
>;
};
@@ -0,0 +1,35 @@
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>;
};
};
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ti,tca8418.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI TCA8418 I2C/SMBus keypad scanner
maintainers:
- Frank Li <Frank.Li@nxp.com>
properties:
compatible:
enum:
- ti,tca8418
reg:
maxItems: 1
interrupts:
maxItems: 1
required:
- compatible
- reg
- interrupts
allOf:
- $ref: matrix-keymap.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
keypad@34 {
compatible = "ti,tca8418";
reg = <0x34>;
interrupt-parent = <&gpio5>;
interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
keypad,num-rows = <4>;
keypad,num-columns = <4>;
linux,keymap = < MATRIX_KEY(0x00, 0x01, BTN_0)
MATRIX_KEY(0x00, 0x00, BTN_1)
MATRIX_KEY(0x01, 0x01, BTN_2)
MATRIX_KEY(0x01, 0x00, BTN_3)
MATRIX_KEY(0x02, 0x00, BTN_4)
MATRIX_KEY(0x00, 0x03, BTN_5)
MATRIX_KEY(0x00, 0x02, BTN_6)
MATRIX_KEY(0x01, 0x03, BTN_7)
MATRIX_KEY(0x01, 0x02, BTN_8)
MATRIX_KEY(0x02, 0x02, BTN_9)
>;
};
};
@@ -0,0 +1,59 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ti,twl4030-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TWL4030-family Keypad Controller
maintainers:
- Peter Ujfalusi <peter.ujfalusi@gmail.com>
description:
TWL4030'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.
allOf:
- $ref: matrix-keymap.yaml#
properties:
compatible:
const: ti,twl4030-keypad
interrupts:
maxItems: 1
required:
- compatible
- interrupts
- keypad,num-rows
- keypad,num-columns
- linux,keymap
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/input/input.h>
keypad {
compatible = "ti,twl4030-keypad";
interrupts = <1>;
keypad,num-rows = <8>;
keypad,num-columns = <8>;
linux,keymap = <
/* row 0 */
MATRIX_KEY(0, 0, KEY_1)
MATRIX_KEY(0, 1, KEY_2)
MATRIX_KEY(0, 2, KEY_3)
/* ...and so on for a full 8x8 matrix... */
/* row 7 */
MATRIX_KEY(7, 6, KEY_Y)
MATRIX_KEY(7, 7, KEY_Z)
>;
};
@@ -0,0 +1,150 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/adi,ad7879.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices AD7879(-1)/AD7889(-1) touchscreen interface (SPI/I2C)
maintainers:
- Frank Li <Frank.Li@nxp.com>
properties:
compatible:
description: |
for SPI slave, use "adi,ad7879"
for I2C slave, use "adi,ad7879-1"
enum:
- adi,ad7879
- adi,ad7879-1
reg:
maxItems: 1
interrupts:
maxItems: 1
touchscreen-max-pressure:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum reported pressure
adi,resistance-plate-x:
$ref: /schemas/types.yaml#/definitions/uint32
description: total resistance of X-plate (for pressure calculation)
touchscreen-swapped-x-y:
$ref: /schemas/types.yaml#/definitions/flag
description: X and Y axis are swapped (boolean)
adi,first-conversion-delay:
$ref: /schemas/types.yaml#/definitions/uint8
default: 0
minimum: 0
maximum: 15
description: |
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:
$ref: /schemas/types.yaml#/definitions/uint8
default: 0
enum: [0, 1, 2, 3]
description: |
0: 2us
1: 4us
2: 8us
3: 16us
This property has to be a '/bits/ 8' value
adi,median-filter-size:
$ref: /schemas/types.yaml#/definitions/uint8
default: 0
enum: [0, 1, 2, 3]
description: |
0: disabled
1: 4 measurements
2: 8 measurements
3: 16 measurements
This property has to be a '/bits/ 8' value
adi,averaging:
$ref: /schemas/types.yaml#/definitions/uint8
default: 0
enum: [0, 1, 2, 3]
description: |
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:
$ref: /schemas/types.yaml#/definitions/uint8
default: 0
description: |
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: true
"#gpio-cells":
const: 1
required:
- compatible
- reg
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
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>;
};
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
touchscreen1@1 {
compatible = "adi,ad7879";
reg = <1>;
spi-max-frequency = <5000000>;
gpio-controller;
#gpio-cells = <1>;
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>;
};
};
@@ -0,0 +1,70 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/apple,z2-multitouch.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Apple touchscreens attached using the Z2 protocol
maintainers:
- Sasha Finkelstein <k@chaosmail.tech>
description: A series of touschscreen controllers used in Apple products
allOf:
- $ref: touchscreen.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
compatible:
enum:
- apple,j293-touchbar
- apple,j493-touchbar
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
firmware-name:
maxItems: 1
apple,z2-cal-blob:
$ref: /schemas/types.yaml#/definitions/uint8-array
maxItems: 4096
description:
Calibration blob supplied by the bootloader
required:
- compatible
- interrupts
- reset-gpios
- firmware-name
- touchscreen-size-x
- touchscreen-size-y
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@0 {
compatible = "apple,j293-touchbar";
reg = <0>;
spi-max-frequency = <11500000>;
reset-gpios = <&pinctrl_ap 139 GPIO_ACTIVE_LOW>;
interrupts-extended = <&pinctrl_ap 194 IRQ_TYPE_EDGE_FALLING>;
firmware-name = "apple/dfrmtfw-j293.bin";
touchscreen-size-x = <23045>;
touchscreen-size-y = <640>;
};
};
...
@@ -0,0 +1,30 @@
* 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>;
};
/* ... */
};
@@ -0,0 +1,769 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/azoteq,iqs7211.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Azoteq IQS7210A/7211A/E Trackpad/Touchscreen Controller
maintainers:
- Jeff LaBundy <jeff@labundy.com>
description: |
The Azoteq IQS7210A, IQS7211A and IQS7211E trackpad and touchscreen control-
lers employ projected-capacitance sensing and can track two contacts.
Link to datasheets: https://www.azoteq.com/
properties:
compatible:
enum:
- azoteq,iqs7210a
- azoteq,iqs7211a
- azoteq,iqs7211e
reg:
maxItems: 1
irq-gpios:
maxItems: 1
description:
Specifies the GPIO connected to the device's active-low RDY output. The
pin doubles as the IQS7211E's active-low MCLR input, in which case this
GPIO must be configured as open-drain.
reset-gpios:
maxItems: 1
description:
Specifies the GPIO connected to the device's active-low MCLR input. The
device is temporarily held in hardware reset prior to initialization if
this property is present.
azoteq,forced-comms:
type: boolean
description:
Enables forced communication; to be used with host adapters that cannot
tolerate clock stretching.
azoteq,forced-comms-default:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
description:
Indicates if the device's OTP memory enables (1) or disables (0) forced
communication by default. Specifying this property can expedite startup
time if the default value is known.
If this property is not specified, communication is not initiated until
the device asserts its RDY pin shortly after exiting hardware reset. At
that point, forced communication is either enabled or disabled based on
the presence or absence of the 'azoteq,forced-comms' property.
azoteq,rate-active-ms:
minimum: 0
maximum: 65535
description: Specifies the report rate (in ms) during active mode.
azoteq,rate-touch-ms:
minimum: 0
maximum: 65535
description: Specifies the report rate (in ms) during idle-touch mode.
azoteq,rate-idle-ms:
minimum: 0
maximum: 65535
description: Specifies the report rate (in ms) during idle mode.
azoteq,rate-lp1-ms:
minimum: 0
maximum: 65535
description: Specifies the report rate (in ms) during low-power mode 1.
azoteq,rate-lp2-ms:
minimum: 0
maximum: 65535
description: Specifies the report rate (in ms) during low-power mode 2.
azoteq,timeout-active-ms:
multipleOf: 1000
minimum: 0
maximum: 65535000
description:
Specifies the length of time (in ms) to wait for an event before moving
from active mode to idle or idle-touch modes.
azoteq,timeout-touch-ms:
multipleOf: 1000
minimum: 0
maximum: 65535000
description:
Specifies the length of time (in ms) to wait for an event before moving
from idle-touch mode to idle mode.
azoteq,timeout-idle-ms:
multipleOf: 1000
minimum: 0
maximum: 65535000
description:
Specifies the length of time (in ms) to wait for an event before moving
from idle mode to low-power mode 1.
azoteq,timeout-lp1-ms:
multipleOf: 1000
minimum: 0
maximum: 65535000
description:
Specifies the length of time (in ms) to wait for an event before moving
from low-power mode 1 to low-power mode 2.
azoteq,timeout-lp2-ms:
multipleOf: 1000
minimum: 0
maximum: 60000
description:
Specifies the rate (in ms) at which the trackpad reference values
are updated during low-power modes 1 and 2.
azoteq,timeout-ati-ms:
multipleOf: 1000
minimum: 0
maximum: 60000
description:
Specifies the delay (in ms) before the automatic tuning implementation
(ATI) is retried in the event it fails to complete.
azoteq,timeout-comms-ms:
minimum: 0
maximum: 65535
description:
Specifies the delay (in ms) before a communication window is closed.
azoteq,timeout-press-ms:
multipleOf: 1000
minimum: 0
maximum: 60000
description:
Specifies the length of time (in ms) to wait before automatically
releasing a press event. Specify zero to allow the press state to
persist indefinitely.
azoteq,fosc-freq:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
description: |
Specifies the device's core clock frequency as follows:
0: 14 MHz
1: 18 MHz
azoteq,fosc-trim:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
description: Specifies the device's core clock frequency trim.
azoteq,num-contacts:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 2
default: 0
description: Specifies the number of contacts reported by the device.
azoteq,contact-split:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the contact (finger) split factor.
azoteq,trim-x:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the horizontal trim width.
azoteq,trim-y:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the vertical trim height.
trackpad:
type: object
description: Represents all channels associated with the trackpad.
properties:
azoteq,rx-enable:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 8
items:
minimum: 0
maximum: 7
description:
Specifies the order of the CRx pin(s) associated with the trackpad.
azoteq,tx-enable:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 12
items:
minimum: 0
maximum: 11
description:
Specifies the order of the CTx pin(s) associated with the trackpad.
azoteq,channel-select:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 36
items:
minimum: 0
maximum: 255
description: |
Specifies the channels mapped to each cycle in the following order:
Cycle 0, slot 0
Cycle 0, slot 1
Cycle 1, slot 0
Cycle 1, slot 1
...and so on. Specify 255 to disable a given slot.
azoteq,ati-frac-div-fine:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
description: Specifies the trackpad's ATI fine fractional divider.
azoteq,ati-frac-mult-coarse:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
description: Specifies the trackpad's ATI coarse fractional multiplier.
azoteq,ati-frac-div-coarse:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
description: Specifies the trackpad's ATI coarse fractional divider.
azoteq,ati-comp-div:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
description: Specifies the trackpad's ATI compensation divider.
azoteq,ati-target:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 65535
description: Specifies the trackpad's ATI target.
azoteq,touch-enter:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the trackpad's touch entrance factor.
azoteq,touch-exit:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the trackpad's touch exit factor.
azoteq,thresh:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the trackpad's stationary touch threshold.
azoteq,conv-period:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the trackpad's conversion period.
azoteq,conv-frac:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the trackpad's conversion frequency fraction.
patternProperties:
"^event-(tap(-double|-triple)?|hold|palm|swipe-(x|y)-(pos|neg)(-hold)?)$":
type: object
$ref: ../input.yaml#
description:
Represents a gesture event reported by the trackpad. In the case of
axial gestures, the duration or distance specified in one direction
applies to both directions along the same axis.
properties:
linux,code: true
azoteq,gesture-max-ms:
minimum: 0
maximum: 65535
description: Specifies the maximum duration of tap/swipe gestures.
azoteq,gesture-mid-ms:
minimum: 0
maximum: 65535
description:
Specifies the maximum duration between subsequent tap gestures
(IQS7211E only).
azoteq,gesture-min-ms:
minimum: 0
maximum: 65535
description: Specifies the minimum duration of hold gestures.
azoteq,gesture-dist:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 65535
description:
Specifies the minimum (swipe) or maximum (tap and hold) distance
a finger may travel to be considered a gesture.
azoteq,gesture-dist-rep:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 65535
description:
Specifies the minimum distance a finger must travel to elicit a
repeated swipe gesture (IQS7211E only).
azoteq,gesture-angle:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 75
description:
Specifies the maximum angle (in degrees) a finger may travel to
be considered a swipe gesture.
azoteq,thresh:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 42
description: Specifies the palm gesture threshold (IQS7211E only).
additionalProperties: false
dependencies:
azoteq,rx-enable: ["azoteq,tx-enable"]
azoteq,tx-enable: ["azoteq,rx-enable"]
azoteq,channel-select: ["azoteq,rx-enable"]
additionalProperties: false
alp:
type: object
$ref: ../input.yaml#
description: Represents the alternate low-power channel (ALP).
properties:
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 ALP in no particular
order.
azoteq,tx-enable:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 12
items:
minimum: 0
maximum: 11
description:
Specifies the CTx pin(s) associated with the ALP in no particular
order.
azoteq,ati-frac-div-fine:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
description: Specifies the ALP's ATI fine fractional divider.
azoteq,ati-frac-mult-coarse:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
description: Specifies the ALP's ATI coarse fractional multiplier.
azoteq,ati-frac-div-coarse:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
description: Specifies the ALP's ATI coarse fractional divider.
azoteq,ati-comp-div:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
description: Specifies the ALP's ATI compensation divider.
azoteq,ati-target:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 65535
description: Specifies the ALP's ATI target.
azoteq,ati-base:
$ref: /schemas/types.yaml#/definitions/uint32
multipleOf: 8
minimum: 0
maximum: 255
description: Specifies the ALP's ATI base.
azoteq,ati-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
description: |
Specifies the ALP's ATI mode as follows:
0: Partial
1: Full
azoteq,sense-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
description: |
Specifies the ALP's sensing mode as follows:
0: Self capacitive
1: Mutual capacitive
azoteq,debounce-enter:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the ALP's debounce entrance factor.
azoteq,debounce-exit:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the ALP's debounce exit factor.
azoteq,thresh:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 65535
description: Specifies the ALP's proximity or touch threshold.
azoteq,conv-period:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the ALP's conversion period.
azoteq,conv-frac:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the ALP's conversion frequency fraction.
linux,code: true
additionalProperties: false
button:
type: object
description: Represents the inductive or capacitive button.
properties:
azoteq,ati-frac-div-fine:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
description: Specifies the button's ATI fine fractional divider.
azoteq,ati-frac-mult-coarse:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
description: Specifies the button's ATI coarse fractional multiplier.
azoteq,ati-frac-div-coarse:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
description: Specifies the button's ATI coarse fractional divider.
azoteq,ati-comp-div:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
description: Specifies the button's ATI compensation divider.
azoteq,ati-target:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 65535
description: Specifies the button's ATI target.
azoteq,ati-base:
$ref: /schemas/types.yaml#/definitions/uint32
multipleOf: 8
minimum: 0
maximum: 255
description: Specifies the button's ATI base.
azoteq,ati-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1]
description: |
Specifies the button's ATI mode as follows:
0: Partial
1: Full
azoteq,sense-mode:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]
description: |
Specifies the button's sensing mode as follows:
0: Self capacitive
1: Mutual capacitive
2: Inductive
azoteq,touch-enter:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the button's touch entrance factor.
azoteq,touch-exit:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the button's touch exit factor.
azoteq,debounce-enter:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the button's debounce entrance factor.
azoteq,debounce-exit:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the button's debounce exit factor.
azoteq,thresh:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 65535
description: Specifies the button's proximity threshold.
azoteq,conv-period:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the button's conversion period.
azoteq,conv-frac:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
description: Specifies the button's conversion frequency fraction.
patternProperties:
"^event-(prox|touch)$":
type: object
$ref: ../input.yaml#
description:
Represents a proximity or touch event reported by the button.
properties:
linux,code: true
additionalProperties: false
additionalProperties: false
wakeup-source: true
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-inverted-x: true
touchscreen-inverted-y: true
touchscreen-swapped-x-y: true
dependencies:
touchscreen-size-x: ["azoteq,num-contacts"]
touchscreen-size-y: ["azoteq,num-contacts"]
touchscreen-inverted-x: ["azoteq,num-contacts"]
touchscreen-inverted-y: ["azoteq,num-contacts"]
touchscreen-swapped-x-y: ["azoteq,num-contacts"]
required:
- compatible
- reg
- irq-gpios
additionalProperties: false
allOf:
- $ref: touchscreen.yaml#
- if:
properties:
compatible:
contains:
const: azoteq,iqs7210a
then:
properties:
alp:
properties:
azoteq,rx-enable:
maxItems: 4
items:
minimum: 4
else:
properties:
azoteq,timeout-press-ms: false
alp:
properties:
azoteq,ati-mode: false
button: false
- if:
properties:
compatible:
contains:
const: azoteq,iqs7211e
then:
properties:
reset-gpios: false
trackpad:
properties:
azoteq,tx-enable:
maxItems: 13
items:
maximum: 12
alp:
properties:
azoteq,tx-enable:
maxItems: 13
items:
maximum: 12
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@56 {
compatible = "azoteq,iqs7210a";
reg = <0x56>;
irq-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
reset-gpios = <&gpio 17 (GPIO_ACTIVE_LOW |
GPIO_PUSH_PULL)>;
azoteq,num-contacts = <2>;
trackpad {
azoteq,rx-enable = <6>, <5>, <4>, <3>, <2>;
azoteq,tx-enable = <1>, <7>, <8>, <9>, <10>;
};
button {
azoteq,sense-mode = <2>;
azoteq,touch-enter = <40>;
azoteq,touch-exit = <36>;
event-touch {
linux,code = <KEY_HOME>;
};
};
alp {
azoteq,sense-mode = <1>;
linux,code = <KEY_POWER>;
};
};
};
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@56 {
compatible = "azoteq,iqs7211e";
reg = <0x56>;
irq-gpios = <&gpio 4 (GPIO_ACTIVE_LOW |
GPIO_OPEN_DRAIN)>;
trackpad {
event-tap {
linux,code = <KEY_PLAYPAUSE>;
};
event-tap-double {
linux,code = <KEY_SHUFFLE>;
};
event-tap-triple {
linux,code = <KEY_AGAIN>;
};
event-hold {
linux,code = <KEY_STOP>;
};
event-palm {
linux,code = <KEY_EXIT>;
};
event-swipe-x-pos {
linux,code = <KEY_REWIND>;
};
event-swipe-x-pos-hold {
linux,code = <KEY_PREVIOUS>;
};
event-swipe-x-neg {
linux,code = <KEY_FASTFORWARD>;
};
event-swipe-x-neg-hold {
linux,code = <KEY_NEXT>;
};
event-swipe-y-pos {
linux,code = <KEY_VOLUMEUP>;
};
event-swipe-y-pos-hold {
linux,code = <KEY_MUTE>;
};
event-swipe-y-neg {
linux,code = <KEY_VOLUMEDOWN>;
};
event-swipe-y-neg-hold {
linux,code = <KEY_MUTE>;
};
};
};
};
...
@@ -0,0 +1,87 @@
* 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;
};
@@ -0,0 +1,35 @@
* Rohm BU21029 Touch Screen Controller
Required properties:
- compatible : must be "rohm,bu21029"
- reg : i2c device address of the chip (0x40 or 0x41)
- interrupt-parent : the phandle for the gpio controller
- interrupts : (gpio) interrupt to which the chip is connected
- rohm,x-plate-ohms : x-plate resistance in Ohm
Optional properties:
- reset-gpios : gpio pin to reset the chip (active low)
- touchscreen-size-x : horizontal resolution of touchscreen (in pixels)
- touchscreen-size-y : vertical resolution of touchscreen (in pixels)
- touchscreen-max-pressure: maximum pressure value
- vdd-supply : power supply for the controller
Example:
&i2c1 {
/* ... */
bu21029: bu21029@40 {
compatible = "rohm,bu21029";
reg = <0x40>;
interrupt-parent = <&gpio1>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio6 16 GPIO_ACTIVE_LOW>;
rohm,x-plate-ohms = <600>;
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
touchscreen-max-pressure = <4095>;
};
/* ... */
};
@@ -0,0 +1,62 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/chipone,icn8318.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ChipOne ICN8318 Touchscreen Controller
maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>
allOf:
- $ref: touchscreen.yaml#
properties:
compatible:
const: chipone,icn8318
reg:
maxItems: 1
interrupts:
maxItems: 1
wake-gpios:
maxItems: 1
unevaluatedProperties: false
required:
- compatible
- reg
- interrupts
- wake-gpios
- touchscreen-size-x
- touchscreen-size-y
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@40 {
compatible = "chipone,icn8318";
reg = <0x40>;
interrupt-parent = <&pio>;
interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
pinctrl-names = "default";
pinctrl-0 = <&ts_wake_pin_p66>;
wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
};
};
...
@@ -0,0 +1,72 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/cypress,cy8ctma140.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cypress CY8CTMA140 series touchscreen controller
maintainers:
- Linus Walleij <linusw@kernel.org>
allOf:
- $ref: touchscreen.yaml#
properties:
compatible:
const: cypress,cy8ctma140
reg:
const: 0x20
clock-frequency:
description: I2C client clock frequency, defined for host
minimum: 100000
maximum: 400000
interrupts:
maxItems: 1
vcpin-supply:
description: Analog power supply regulator on VCPIN pin
vdd-supply:
description: Digital power supply regulator on VDD pin
touchscreen-inverted-x: true
touchscreen-inverted-y: true
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-swapped-x-y: true
touchscreen-max-pressure: true
additionalProperties: false
required:
- compatible
- reg
- interrupts
- touchscreen-size-x
- touchscreen-size-y
- touchscreen-max-pressure
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@20 {
compatible = "cypress,cy8ctma140";
reg = <0x20>;
touchscreen-size-x = <480>;
touchscreen-size-y = <800>;
touchscreen-max-pressure = <255>;
interrupt-parent = <&gpio6>;
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
vdd-supply = <&ab8500_ldo_aux2_reg>;
vcpin-supply = <&ab8500_ldo_aux2_reg>;
};
};
...
@@ -0,0 +1,148 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/cypress,cy8ctma340.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cypress CY8CTMA340 series touchscreen controller
description: The Cypress CY8CTMA340 series (also known as "CYTTSP" after
the marketing name Cypress TrueTouch Standard Product) touchscreens can
be connected to either I2C or SPI buses.
maintainers:
- Javier Martinez Canillas <javier@dowhile0.org>
- Linus Walleij <linusw@kernel.org>
allOf:
- $ref: touchscreen.yaml#
properties:
$nodename:
pattern: "^touchscreen(@.*)?$"
compatible:
oneOf:
- const: cypress,cy8ctma340
- const: cypress,cy8ctst341
- const: cypress,cyttsp-spi
description: Legacy compatible for SPI connected CY8CTMA340
deprecated: true
- const: cypress,cyttsp-i2c
description: Legacy compatible for I2C connected CY8CTMA340
deprecated: true
reg:
description: I2C address when used on the I2C bus, or the SPI chip
select index when used on the SPI bus
clock-frequency:
description: I2C client clock frequency, defined for host when using
the device on the I2C bus
minimum: 0
maximum: 400000
spi-max-frequency:
description: SPI clock frequency, defined for host, defined when using
the device on the SPI bus. The throughput is maximum 2 Mbps so the
typical value is 2000000, if higher rates are used the total throughput
needs to be restricted to 2 Mbps.
minimum: 0
maximum: 6000000
interrupts:
description: Interrupt to host
maxItems: 1
vcpin-supply:
description: Analog power supply regulator on VCPIN pin
vdd-supply:
description: Digital power supply regulator on VDD pin
reset-gpios:
description: Reset line for the touchscreen, should be tagged
as GPIO_ACTIVE_LOW
bootloader-key:
description: the 8-byte bootloader key that is required to switch
the chip from bootloader mode (default mode) to application mode
$ref: /schemas/types.yaml#/definitions/uint8-array
minItems: 8
maxItems: 8
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-fuzz-x: true
touchscreen-fuzz-y: true
active-distance:
description: the distance in pixels beyond which a touch must move
before movement is detected and reported by the device
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
active-interval-ms:
description: the minimum period in ms between consecutive
scanning/processing cycles when the chip is in active mode
minimum: 0
maximum: 255
lowpower-interval-ms:
description: the minimum period in ms between consecutive
scanning/processing cycles when the chip is in low-power mode
minimum: 0
maximum: 2550
touch-timeout-ms:
description: minimum time in ms spent in the active power state while no
touches are detected before entering low-power mode
minimum: 0
maximum: 2550
use-handshake:
description: enable register-based handshake (boolean). This should only
be used if the chip is configured to use 'blocking communication with
timeout' (in this case the device generates an interrupt at the end of
every scanning/processing cycle)
$ref: /schemas/types.yaml#/definitions/flag
additionalProperties: false
required:
- compatible
- reg
- interrupts
- bootloader-key
- touchscreen-size-x
- touchscreen-size-y
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
num-cs = <1>;
cs-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
touchscreen@0 {
compatible = "cypress,cy8ctma340";
reg = <0>;
interrupt-parent = <&gpio>;
interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
vdd-supply = <&ldo_aux1_reg>;
vcpin-supply = <&ldo_aux2_reg>;
bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>;
touchscreen-size-x = <480>;
touchscreen-size-y = <800>;
active-interval-ms = <0>;
touch-timeout-ms = <255>;
lowpower-interval-ms = <10>;
};
};
...
@@ -0,0 +1,111 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/cypress,tt21000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cypress TT21000 touchscreen controller
description: The Cypress TT21000 series (also known as "CYTTSP5" after
the marketing name Cypress TrueTouch Standard Product series 5).
maintainers:
- Alistair Francis <alistair@alistair23.me>
allOf:
- $ref: touchscreen.yaml#
properties:
compatible:
const: cypress,tt21000
reg:
maxItems: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
interrupts:
maxItems: 1
vdd-supply:
description: Regulator for voltage.
vddio-supply:
description: Optional Regulator for I/O voltage.
reset-gpios:
maxItems: 1
linux,keycodes:
description: EV_ABS specific event code generated by the axis.
wakeup-source: true
patternProperties:
"^button@[0-9]+$":
type: object
$ref: ../input.yaml#
properties:
reg:
maxItems: 1
linux,keycodes:
description: Keycode to emit
required:
- reg
- linux,keycodes
additionalProperties: false
required:
- compatible
- reg
- interrupts
- vdd-supply
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/linux-event-codes.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@24 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "cypress,tt21000";
reg = <0x24>;
pinctrl-names = "default";
pinctrl-0 = <&tp_reset_ds203>;
interrupt-parent = <&pio>;
interrupts = <1 5 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>;
vdd-supply = <&reg_touch>;
button@0 {
reg = <0>;
linux,keycodes = <KEY_HOMEPAGE>;
};
button@1 {
reg = <1>;
linux,keycodes = <KEY_MENU>;
};
button@2 {
reg = <2>;
linux,keycodes = <KEY_BACK>;
};
};
};
...
@@ -0,0 +1,138 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/edt-ft5x06.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: FocalTech EDT-FT5x06 Polytouch
description: |
There are 5 variants of the chip for various touch panel sizes
FT5206GE1 2.8" .. 3.8"
FT5306DE4 4.3" .. 7"
FT5406EE8 7" .. 8.9"
FT5506EEG 7" .. 8.9"
FT5726NEI 5.7” .. 11.6"
maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>
allOf:
- $ref: touchscreen.yaml#
- if:
properties:
compatible:
contains:
enum:
- evervision,ev-ft5726
then:
properties:
offset-x: true
offset-y: true
properties:
compatible:
oneOf:
- enum:
- edt,edt-ft5206
- edt,edt-ft5306
- edt,edt-ft5406
- edt,edt-ft5506
- evervision,ev-ft5726
- focaltech,ft3518
- focaltech,ft5426
- focaltech,ft5452
- focaltech,ft6236
- focaltech,ft8201
- focaltech,ft8716
- focaltech,ft8719
- items:
- const: focaltech,ft3519
- const: focaltech,ft3518
reg:
maxItems: 1
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
wake-gpios:
maxItems: 1
wakeup-source: true
vcc-supply: true
iovcc-supply: true
gain:
description: Allows setting the sensitivity in the range from 0 to 31.
Note that lower values indicate higher sensitivity.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
offset:
description: Allows setting the edge compensation in the range from 0 to 31.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 31
offset-x:
description: Same as offset, but applies only to the horizontal position.
Range from 0 to 80, only supported by evervision,ev-ft5726 devices.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 80
offset-y:
description: Same as offset, but applies only to the vertical position.
Range from 0 to 80, only supported by evervision,ev-ft5726 devices.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 80
report-rate-hz:
description: |
Allows setting the scan rate in Hertz.
M06 supports range from 30 to 140 Hz.
M12 supports range from 1 to 255 Hz.
minimum: 1
maximum: 255
threshold:
description: Allows setting the "click"-threshold in the range from 0 to 255.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 255
interrupt-controller: true
unevaluatedProperties: false
required:
- compatible
- reg
- interrupts
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;
interrupt-parent = <&gpio2>;
interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
wake-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>;
};
};
...
@@ -0,0 +1,94 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/eeti,exc3000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: EETI EXC3000 series touchscreen controller
maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>
properties:
compatible:
oneOf:
- const: eeti,exc3000
- const: eeti,exc80h60
- const: eeti,exc80h84
- const: eeti,egalax_ts # Do NOT use for new binding
- const: eeti,exc3000-i2c
deprecated: true
- items:
- enum:
- eeti,exc81w32
- const: eeti,exc80h84
reg:
enum: [0x4, 0xa, 0x2a]
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
wakeup-gpios:
maxItems: 1
vdd-supply:
description: Power supply regulator for the chip
attn-gpios:
deprecated: true
maxItems: 1
description: Phandle to a GPIO to check whether interrupt is still
latched. This is necessary for platforms that lack
support for level-triggered IRQs.
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
allOf:
- $ref: touchscreen.yaml#
- if:
properties:
compatible:
not:
contains:
enum:
- eeti,egalax_ts
- eeti,exc3000-i2c
then:
properties:
reg:
const: 0x2a
wakeup-gpios: false
attn-gpios: false
required:
- touchscreen-size-x
- touchscreen-size-y
examples:
- |
#include "dt-bindings/interrupt-controller/irq.h"
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@2a {
compatible = "eeti,exc3000";
reg = <0x2a>;
interrupt-parent = <&gpio1>;
interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
touchscreen-size-x = <4096>;
touchscreen-size-y = <4096>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
};
};
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/elan,ektf2127.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Elan eKTF2127 I2C touchscreen controller
maintainers:
- Siebren Vroegindeweij <siebren.vroegindeweij@hotmail.com>
allOf:
- $ref: touchscreen.yaml#
properties:
compatible:
enum:
- elan,ektf2127
- elan,ektf2132
- elan,ektf2232
reg:
maxItems: 1
interrupts:
maxItems: 1
power-gpios:
maxItems: 1
required:
- compatible
- reg
- interrupts
- power-gpios
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@15 {
compatible = "elan,ektf2127";
reg = <0x15>;
interrupt-parent = <&pio>;
interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>;
power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>;
touchscreen-inverted-x;
touchscreen-swapped-x-y;
};
};
...
@@ -0,0 +1,74 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/elan,elants_i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Elantech I2C Touchscreen
maintainers:
- David Heidelberg <david@ixit.cz>
allOf:
- $ref: touchscreen.yaml#
properties:
compatible:
oneOf:
- enum:
- elan,ektf3624
- elan,ekth3500
- items:
- const: elan,ekth3915
- const: elan,ekth3500
reg:
maxItems: 1
interrupts:
maxItems: 1
wakeup-source:
type: boolean
description: touchscreen can be used as a wakeup source.
reset-gpios:
maxItems: 1
description: reset gpio the chip is connected to.
vcc33-supply:
description: a phandle for the regulator supplying 3.3V power.
vccio-supply:
description: a phandle for the regulator supplying IO power.
touchscreen-inverted-x: true
touchscreen-inverted-y: true
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-swapped-x-y: true
additionalProperties: false
required:
- compatible
- reg
- interrupts
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@10 {
compatible = "elan,ekth3500";
reg = <0x10>;
interrupt-parent = <&gpio4>;
interrupts = <0x0 IRQ_TYPE_EDGE_FALLING>;
wakeup-source;
};
};
@@ -0,0 +1,69 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/fsl,imx25-tcq.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale mx25 TS conversion queue module
maintainers:
- Frank Li <Frank.Li@nxp.com>
description:
mx25 touchscreen conversion queue module which controls the ADC unit of the
mx25 for attached touchscreens.
properties:
compatible:
const: fsl,imx25-tcq
reg:
maxItems: 1
interrupts:
maxItems: 1
fsl,wires:
description: touch wires number.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [4, 5]
fsl,pen-debounce-ns:
description:
Pen debounce time in nanoseconds.
fsl,pen-threshold:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Pen-down threshold for the touchscreen. This is a value
between 1 and 4096. It is the ratio between the internal reference voltage
and the measured voltage after the plate was precharged. Resistance between
plates and therefore the voltage decreases with pressure so that a smaller
value is equivalent to a higher pressure.
fsl,settling-time-ns:
description:
Settling time in nanoseconds. The settling time is before
the actual touch detection to wait for an even charge distribution in the
plate.
allOf:
- $ref: touchscreen.yaml
required:
- compatible
- reg
- interrupts
- fsl,wires
unevaluatedProperties: false
examples:
- |
touchscreen@50030400 {
compatible = "fsl,imx25-tcq";
reg = <0x50030400 0x60>;
interrupt-parent = <&tscadc>;
interrupts = <0>;
fsl,wires = <4>;
};
@@ -0,0 +1,111 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/fsl,imx6ul-tsc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX6UL Touch Controller
maintainers:
- Haibo Chen <haibo.chen@nxp.com>
- Shawn Guo <shawnguo@kernel.org>
- Sascha Hauer <s.hauer@pengutronix.de>
properties:
compatible:
const: fsl,imx6ul-tsc
reg:
items:
- description: touch controller address
- description: ADC2 address
interrupts:
items:
- description: touch controller address
- description: ADC2 address
clocks:
maxItems: 2
clock-names:
items:
- const: tsc
- const: adc
xnur-gpios:
maxItems: 1
description:
The X- gpio this controller connect to. This xnur-gpio returns to
low once the finger leave the touch screen (The last touch event
the touch controller capture).
measure-delay-time:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The value of measure delay time. Before X-axis or Y-axis measurement,
the screen need some time before even potential distribution ready.
default: 0xffff
minimum: 0
maximum: 0xffffff
pre-charge-time:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The touch screen need some time to precharge.
default: 0xfff
minimum: 0
maximum: 0xffffffff
touchscreen-average-samples:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of data samples which are averaged for each read.
enum: [ 1, 4, 8, 16, 32 ]
debounce-delay-us:
description: |
Minimum duration in microseconds a signal must remain stable
to be considered valid.
Drivers must convert this value to IPG clock cycles and map
it to one of the four discrete thresholds exposed by the
TSC_DEBUG_MODE2 register:
0: 8191 IPG cycles
1: 4095 IPG cycles
2: 2047 IPG cycles
3: 1023 IPG cycles
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- xnur-gpios
allOf:
- $ref: touchscreen.yaml#
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/imx6ul-clock.h>
#include <dt-bindings/gpio/gpio.h>
touchscreen@2040000 {
compatible = "fsl,imx6ul-tsc";
reg = <0x02040000 0x4000>, <0x0219c000 0x4000>;
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_IPG>,
<&clks IMX6UL_CLK_ADC2>;
clock-names = "tsc", "adc";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_tsc>;
xnur-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
measure-delay-time = <0xfff>;
pre-charge-time = <0xffff>;
touchscreen-average-samples = <32>;
};
@@ -0,0 +1,96 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/goodix,gt9916.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Goodix Berlin series touchscreen controller
description: The Goodix Berlin series of touchscreen controllers
be connected to either I2C or SPI buses.
maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
allOf:
- $ref: touchscreen.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
compatible:
enum:
- goodix,gt9897
- goodix,gt9916
reg:
maxItems: 1
interrupts:
maxItems: 1
reset-gpios:
maxItems: 1
avdd-supply:
description: Analog power supply regulator on AVDD pin
vddio-supply:
description: power supply regulator on VDDIO pin
spi-max-frequency: true
touchscreen-inverted-x: true
touchscreen-inverted-y: true
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-swapped-x-y: true
additionalProperties: false
required:
- compatible
- reg
- interrupts
- avdd-supply
- touchscreen-size-x
- touchscreen-size-y
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@5d {
compatible = "goodix,gt9916";
reg = <0x5d>;
interrupt-parent = <&gpio>;
interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
avdd-supply = <&ts_avdd>;
touchscreen-size-x = <1024>;
touchscreen-size-y = <768>;
};
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
num-cs = <1>;
cs-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
touchscreen@0 {
compatible = "goodix,gt9916";
reg = <0>;
interrupt-parent = <&gpio>;
interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
avdd-supply = <&ts_avdd>;
spi-max-frequency = <1000000>;
touchscreen-size-x = <1024>;
touchscreen-size-y = <768>;
};
};
...
@@ -0,0 +1,83 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/goodix.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Goodix GT9xx series touchscreen controller
maintainers:
- Dmitry Torokhov <dmitry.torokhov@gmail.com>
allOf:
- $ref: touchscreen.yaml#
properties:
compatible:
enum:
- goodix,gt1151
- goodix,gt1158
- goodix,gt5663
- goodix,gt5688
- goodix,gt911
- goodix,gt9110
- goodix,gt912
- goodix,gt9147
- goodix,gt917s
- goodix,gt927
- goodix,gt9271
- goodix,gt928
- goodix,gt9286
- goodix,gt967
reg:
enum: [ 0x5d, 0x14 ]
interrupts:
maxItems: 1
irq-gpios:
description: GPIO pin used for IRQ input. Additionally, this line is
sampled by the device on reset deassertion to select the I2C client
address, thus it can be driven by the host during the reset sequence.
maxItems: 1
panel: true
reset-gpios:
maxItems: 1
AVDD28-supply:
description: Analog power supply regulator on AVDD28 pin
VDDIO-supply:
description: GPIO power supply regulator on VDDIO pin
touchscreen-inverted-x: true
touchscreen-inverted-y: true
touchscreen-size-x: true
touchscreen-size-y: true
touchscreen-swapped-x-y: true
additionalProperties: false
required:
- compatible
- reg
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@5d {
compatible = "goodix,gt928";
reg = <0x5d>;
interrupt-parent = <&gpio>;
interrupts = <0 0>;
irq-gpios = <&gpio1 0 0>;
reset-gpios = <&gpio1 1 0>;
};
};
...

Some files were not shown because too many files have changed in this diff Show More