1354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2354d7675SEmmanuel Vadot%YAML 1.2 3354d7675SEmmanuel Vadot--- 4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/input/touchscreen/ti,tsc2005.yaml# 5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6354d7675SEmmanuel Vadot 7*8bab661aSEmmanuel Vadottitle: Texas Instruments TSC2004 and TSC2005 touchscreen controller 8354d7675SEmmanuel Vadot 9354d7675SEmmanuel Vadotmaintainers: 10354d7675SEmmanuel Vadot - Marek Vasut <marex@denx.de> 11354d7675SEmmanuel Vadot - Michael Welling <mwelling@ieee.org> 12354d7675SEmmanuel Vadot 13354d7675SEmmanuel Vadotproperties: 14354d7675SEmmanuel Vadot $nodename: 15354d7675SEmmanuel Vadot pattern: "^touchscreen(@.*)?$" 16354d7675SEmmanuel Vadot 17354d7675SEmmanuel Vadot compatible: 18354d7675SEmmanuel Vadot enum: 19354d7675SEmmanuel Vadot - ti,tsc2004 20354d7675SEmmanuel Vadot - ti,tsc2005 21354d7675SEmmanuel Vadot 22354d7675SEmmanuel Vadot reg: 23354d7675SEmmanuel Vadot maxItems: 1 24354d7675SEmmanuel Vadot description: | 25354d7675SEmmanuel Vadot I2C address when used on the I2C bus, or the SPI chip select index 26354d7675SEmmanuel Vadot when used on the SPI bus 27354d7675SEmmanuel Vadot 28354d7675SEmmanuel Vadot interrupts: 29354d7675SEmmanuel Vadot maxItems: 1 30354d7675SEmmanuel Vadot 31354d7675SEmmanuel Vadot reset-gpios: 32354d7675SEmmanuel Vadot maxItems: 1 33354d7675SEmmanuel Vadot description: GPIO specifier for the controller reset line 34354d7675SEmmanuel Vadot 35354d7675SEmmanuel Vadot spi-max-frequency: 36354d7675SEmmanuel Vadot description: TSC2005 SPI bus clock frequency. 37354d7675SEmmanuel Vadot maximum: 25000000 38354d7675SEmmanuel Vadot 39354d7675SEmmanuel Vadot ti,x-plate-ohms: 40354d7675SEmmanuel Vadot description: resistance of the touchscreen's X plates in ohm (defaults to 280) 41354d7675SEmmanuel Vadot 42354d7675SEmmanuel Vadot ti,esd-recovery-timeout-ms: 43354d7675SEmmanuel Vadot description: | 44354d7675SEmmanuel Vadot if the touchscreen does not respond after the configured time 45354d7675SEmmanuel Vadot (in milli seconds), the driver will reset it. This is disabled 46354d7675SEmmanuel Vadot by default. 47354d7675SEmmanuel Vadot 48354d7675SEmmanuel Vadot vio-supply: 49354d7675SEmmanuel Vadot description: Regulator specifier 50354d7675SEmmanuel Vadot 51354d7675SEmmanuel Vadot touchscreen-fuzz-pressure: true 52354d7675SEmmanuel Vadot touchscreen-fuzz-x: true 53354d7675SEmmanuel Vadot touchscreen-fuzz-y: true 54354d7675SEmmanuel Vadot touchscreen-max-pressure: true 55354d7675SEmmanuel Vadot touchscreen-size-x: true 56354d7675SEmmanuel Vadot touchscreen-size-y: true 57354d7675SEmmanuel Vadot 58354d7675SEmmanuel VadotallOf: 59354d7675SEmmanuel Vadot - $ref: touchscreen.yaml# 60354d7675SEmmanuel Vadot - if: 61354d7675SEmmanuel Vadot properties: 62354d7675SEmmanuel Vadot compatible: 63354d7675SEmmanuel Vadot contains: 64354d7675SEmmanuel Vadot const: ti,tsc2004 65354d7675SEmmanuel Vadot then: 66354d7675SEmmanuel Vadot properties: 67354d7675SEmmanuel Vadot spi-max-frequency: false 68354d7675SEmmanuel Vadot 69354d7675SEmmanuel VadotadditionalProperties: false 70354d7675SEmmanuel Vadot 71354d7675SEmmanuel Vadotrequired: 72354d7675SEmmanuel Vadot - compatible 73354d7675SEmmanuel Vadot - reg 74354d7675SEmmanuel Vadot - interrupts 75354d7675SEmmanuel Vadot 76354d7675SEmmanuel Vadotexamples: 77354d7675SEmmanuel Vadot - | 78354d7675SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 79354d7675SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 80354d7675SEmmanuel Vadot i2c { 81354d7675SEmmanuel Vadot #address-cells = <1>; 82354d7675SEmmanuel Vadot #size-cells = <0>; 83354d7675SEmmanuel Vadot touchscreen@48 { 84354d7675SEmmanuel Vadot compatible = "ti,tsc2004"; 85354d7675SEmmanuel Vadot reg = <0x48>; 86354d7675SEmmanuel Vadot vio-supply = <&vio>; 87354d7675SEmmanuel Vadot 88354d7675SEmmanuel Vadot reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; 89354d7675SEmmanuel Vadot interrupts-extended = <&gpio1 27 IRQ_TYPE_EDGE_RISING>; 90354d7675SEmmanuel Vadot 91354d7675SEmmanuel Vadot touchscreen-fuzz-x = <4>; 92354d7675SEmmanuel Vadot touchscreen-fuzz-y = <7>; 93354d7675SEmmanuel Vadot touchscreen-fuzz-pressure = <2>; 94354d7675SEmmanuel Vadot touchscreen-size-x = <4096>; 95354d7675SEmmanuel Vadot touchscreen-size-y = <4096>; 96354d7675SEmmanuel Vadot touchscreen-max-pressure = <2048>; 97354d7675SEmmanuel Vadot 98354d7675SEmmanuel Vadot ti,x-plate-ohms = <280>; 99354d7675SEmmanuel Vadot ti,esd-recovery-timeout-ms = <8000>; 100354d7675SEmmanuel Vadot }; 101354d7675SEmmanuel Vadot }; 102354d7675SEmmanuel Vadot - | 103354d7675SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 104354d7675SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 105354d7675SEmmanuel Vadot spi { 106354d7675SEmmanuel Vadot #address-cells = <1>; 107354d7675SEmmanuel Vadot #size-cells = <0>; 108354d7675SEmmanuel Vadot touchscreen@0 { 109354d7675SEmmanuel Vadot compatible = "ti,tsc2005"; 110354d7675SEmmanuel Vadot spi-max-frequency = <6000000>; 111354d7675SEmmanuel Vadot reg = <0>; 112354d7675SEmmanuel Vadot 113354d7675SEmmanuel Vadot vio-supply = <&vio>; 114354d7675SEmmanuel Vadot 115354d7675SEmmanuel Vadot reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104 */ 116354d7675SEmmanuel Vadot interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>; /* 100 */ 117354d7675SEmmanuel Vadot 118354d7675SEmmanuel Vadot touchscreen-fuzz-x = <4>; 119354d7675SEmmanuel Vadot touchscreen-fuzz-y = <7>; 120354d7675SEmmanuel Vadot touchscreen-fuzz-pressure = <2>; 121354d7675SEmmanuel Vadot touchscreen-size-x = <4096>; 122354d7675SEmmanuel Vadot touchscreen-size-y = <4096>; 123354d7675SEmmanuel Vadot touchscreen-max-pressure = <2048>; 124354d7675SEmmanuel Vadot 125354d7675SEmmanuel Vadot ti,x-plate-ohms = <280>; 126354d7675SEmmanuel Vadot ti,esd-recovery-timeout-ms = <8000>; 127354d7675SEmmanuel Vadot }; 128354d7675SEmmanuel Vadot }; 129