Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 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/ti,tsc2005.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Texas Instruments TSC2004 and TSC2005 touchscreen controller |
| 8 | |
| 9 | maintainers: |
| 10 | - Marek Vasut <marex@denx.de> |
| 11 | - Michael Welling <mwelling@ieee.org> |
| 12 | |
| 13 | properties: |
| 14 | $nodename: |
| 15 | pattern: "^touchscreen(@.*)?$" |
| 16 | |
| 17 | compatible: |
| 18 | enum: |
| 19 | - ti,tsc2004 |
| 20 | - ti,tsc2005 |
| 21 | |
| 22 | reg: |
| 23 | maxItems: 1 |
| 24 | description: | |
| 25 | I2C address when used on the I2C bus, or the SPI chip select index |
| 26 | when used on the SPI bus |
| 27 | |
| 28 | interrupts: |
| 29 | maxItems: 1 |
| 30 | |
| 31 | reset-gpios: |
| 32 | maxItems: 1 |
| 33 | description: GPIO specifier for the controller reset line |
| 34 | |
| 35 | spi-max-frequency: |
| 36 | description: TSC2005 SPI bus clock frequency. |
| 37 | maximum: 25000000 |
| 38 | |
| 39 | ti,x-plate-ohms: |
| 40 | description: resistance of the touchscreen's X plates in ohm (defaults to 280) |
| 41 | |
| 42 | ti,esd-recovery-timeout-ms: |
| 43 | description: | |
| 44 | if the touchscreen does not respond after the configured time |
| 45 | (in milli seconds), the driver will reset it. This is disabled |
| 46 | by default. |
| 47 | |
| 48 | vio-supply: |
| 49 | description: Regulator specifier |
| 50 | |
| 51 | touchscreen-fuzz-pressure: true |
| 52 | touchscreen-fuzz-x: true |
| 53 | touchscreen-fuzz-y: true |
| 54 | touchscreen-max-pressure: true |
| 55 | touchscreen-size-x: true |
| 56 | touchscreen-size-y: true |
| 57 | |
| 58 | allOf: |
| 59 | - $ref: touchscreen.yaml# |
| 60 | - if: |
| 61 | properties: |
| 62 | compatible: |
| 63 | contains: |
| 64 | const: ti,tsc2004 |
| 65 | then: |
| 66 | properties: |
| 67 | spi-max-frequency: false |
| 68 | |
| 69 | additionalProperties: false |
| 70 | |
| 71 | required: |
| 72 | - compatible |
| 73 | - reg |
| 74 | - interrupts |
| 75 | |
| 76 | examples: |
| 77 | - | |
| 78 | #include <dt-bindings/interrupt-controller/irq.h> |
| 79 | #include <dt-bindings/gpio/gpio.h> |
| 80 | i2c { |
| 81 | #address-cells = <1>; |
| 82 | #size-cells = <0>; |
| 83 | touchscreen@48 { |
| 84 | compatible = "ti,tsc2004"; |
| 85 | reg = <0x48>; |
| 86 | vio-supply = <&vio>; |
| 87 | |
| 88 | reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; |
| 89 | interrupts-extended = <&gpio1 27 IRQ_TYPE_EDGE_RISING>; |
| 90 | |
| 91 | touchscreen-fuzz-x = <4>; |
| 92 | touchscreen-fuzz-y = <7>; |
| 93 | touchscreen-fuzz-pressure = <2>; |
| 94 | touchscreen-size-x = <4096>; |
| 95 | touchscreen-size-y = <4096>; |
| 96 | touchscreen-max-pressure = <2048>; |
| 97 | |
| 98 | ti,x-plate-ohms = <280>; |
| 99 | ti,esd-recovery-timeout-ms = <8000>; |
| 100 | }; |
| 101 | }; |
| 102 | - | |
| 103 | #include <dt-bindings/interrupt-controller/irq.h> |
| 104 | #include <dt-bindings/gpio/gpio.h> |
| 105 | spi { |
| 106 | #address-cells = <1>; |
| 107 | #size-cells = <0>; |
| 108 | touchscreen@0 { |
| 109 | compatible = "ti,tsc2005"; |
| 110 | spi-max-frequency = <6000000>; |
| 111 | reg = <0>; |
| 112 | |
| 113 | vio-supply = <&vio>; |
| 114 | |
| 115 | reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104 */ |
| 116 | interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>; /* 100 */ |
| 117 | |
| 118 | touchscreen-fuzz-x = <4>; |
| 119 | touchscreen-fuzz-y = <7>; |
| 120 | touchscreen-fuzz-pressure = <2>; |
| 121 | touchscreen-size-x = <4096>; |
| 122 | touchscreen-size-y = <4096>; |
| 123 | touchscreen-max-pressure = <2048>; |
| 124 | |
| 125 | ti,x-plate-ohms = <280>; |
| 126 | ti,esd-recovery-timeout-ms = <8000>; |
| 127 | }; |
| 128 | }; |