Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: input: Add Cypress TT21000 touchscreen controller

Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings
documentation. It can use I2C or SPI bus.
This touchscreen can handle some defined zone that are designed and
sent as button. To be able to customize the keycode sent, the
"linux,code" property in a "button" sub-node can be used.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20221026114908.191472-3-alistair@alistair23.me
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Alistair Francis and committed by
Dmitry Torokhov
cdb51323 66603243

+106
+106
Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/input/touchscreen/cypress,tt21000.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Cypress TT21000 touchscreen controller 8 + 9 + description: The Cypress TT21000 series (also known as "CYTTSP5" after 10 + the marketing name Cypress TrueTouch Standard Product series 5). 11 + 12 + maintainers: 13 + - Alistair Francis <alistair@alistair23.me> 14 + 15 + allOf: 16 + - $ref: touchscreen.yaml# 17 + 18 + properties: 19 + compatible: 20 + const: cypress,tt21000 21 + 22 + reg: 23 + maxItems: 1 24 + 25 + '#address-cells': 26 + const: 1 27 + 28 + '#size-cells': 29 + const: 0 30 + 31 + interrupts: 32 + maxItems: 1 33 + 34 + vdd-supply: 35 + description: Regulator for voltage. 36 + 37 + reset-gpios: 38 + maxItems: 1 39 + 40 + linux,keycodes: 41 + description: EV_ABS specific event code generated by the axis. 42 + 43 + patternProperties: 44 + "^button@[0-9]+$": 45 + type: object 46 + $ref: ../input.yaml# 47 + properties: 48 + reg: 49 + maxItems: 1 50 + linux,keycodes: 51 + description: Keycode to emit 52 + 53 + required: 54 + - reg 55 + - linux,keycodes 56 + 57 + additionalProperties: false 58 + 59 + required: 60 + - compatible 61 + - reg 62 + - interrupts 63 + - vdd-supply 64 + 65 + unevaluatedProperties: false 66 + 67 + examples: 68 + - | 69 + #include <dt-bindings/interrupt-controller/irq.h> 70 + #include <dt-bindings/gpio/gpio.h> 71 + #include <dt-bindings/input/linux-event-codes.h> 72 + 73 + i2c { 74 + #address-cells = <1>; 75 + #size-cells = <0>; 76 + 77 + touchscreen@24 { 78 + #address-cells = <1>; 79 + #size-cells = <0>; 80 + 81 + compatible = "cypress,tt21000"; 82 + reg = <0x24>; 83 + pinctrl-names = "default"; 84 + pinctrl-0 = <&tp_reset_ds203>; 85 + interrupt-parent = <&pio>; 86 + interrupts = <1 5 IRQ_TYPE_LEVEL_LOW>; 87 + reset-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; 88 + vdd-supply = <&reg_touch>; 89 + 90 + button@0 { 91 + reg = <0>; 92 + linux,keycodes = <KEY_HOMEPAGE>; 93 + }; 94 + 95 + button@1 { 96 + reg = <1>; 97 + linux,keycodes = <KEY_MENU>; 98 + }; 99 + 100 + button@2 { 101 + reg = <2>; 102 + linux,keycodes = <KEY_BACK>; 103 + }; 104 + }; 105 + }; 106 + ...