brintos

brintos / linux-shallow public Read only

0
0
Text · 3.2 KiB · 7187c39 Raw
129 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/input/touchscreen/ti,tsc2005.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Texas Instruments TSC2004 and TSC2005 touchscreen controller8 9maintainers:10  - Marek Vasut <marex@denx.de>11  - Michael Welling <mwelling@ieee.org>12 13properties:14  $nodename:15    pattern: "^touchscreen(@.*)?$"16 17  compatible:18    enum:19      - ti,tsc200420      - ti,tsc200521 22  reg:23    maxItems: 124    description: |25      I2C address when used on the I2C bus, or the SPI chip select index26      when used on the SPI bus27 28  interrupts:29    maxItems: 130 31  reset-gpios:32    maxItems: 133    description: GPIO specifier for the controller reset line34 35  spi-max-frequency:36    description: TSC2005 SPI bus clock frequency.37    maximum: 2500000038 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 time45        (in milli seconds), the driver will reset it. This is disabled46        by default.47 48  vio-supply:49    description: Regulator specifier50 51  touchscreen-fuzz-pressure: true52  touchscreen-fuzz-x: true53  touchscreen-fuzz-y: true54  touchscreen-max-pressure: true55  touchscreen-size-x: true56  touchscreen-size-y: true57 58allOf:59  - $ref: touchscreen.yaml#60  - if:61      properties:62        compatible:63          contains:64            const: ti,tsc200465    then:66      properties:67        spi-max-frequency: false68 69additionalProperties: false70 71required:72  - compatible73  - reg74  - interrupts75 76examples: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    };129