brintos

brintos / linux-shallow public Read only

0
0
Text · 4.3 KiB · 4dfbb93 Raw
149 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/cypress,cy8ctma340.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Cypress CY8CTMA340 series touchscreen controller8 9description: The Cypress CY8CTMA340 series (also known as "CYTTSP" after10  the marketing name Cypress TrueTouch Standard Product) touchscreens can11  be connected to either I2C or SPI buses.12 13maintainers:14  - Javier Martinez Canillas <javier@dowhile0.org>15  - Linus Walleij <linus.walleij@linaro.org>16 17allOf:18  - $ref: touchscreen.yaml#19 20properties:21  $nodename:22    pattern: "^touchscreen(@.*)?$"23 24  compatible:25    oneOf:26      - const: cypress,cy8ctma34027      - const: cypress,cy8ctst34128      - const: cypress,cyttsp-spi29        description: Legacy compatible for SPI connected CY8CTMA34030        deprecated: true31      - const: cypress,cyttsp-i2c32        description: Legacy compatible for I2C connected CY8CTMA34033        deprecated: true34 35  reg:36    description: I2C address when used on the I2C bus, or the SPI chip37      select index when used on the SPI bus38 39  clock-frequency:40    description: I2C client clock frequency, defined for host when using41      the device on the I2C bus42    minimum: 043    maximum: 40000044 45  spi-max-frequency:46    description: SPI clock frequency, defined for host, defined when using47      the device on the SPI bus. The throughput is maximum 2 Mbps so the48      typical value is 2000000, if higher rates are used the total throughput49      needs to be restricted to 2 Mbps.50    minimum: 051    maximum: 600000052 53  interrupts:54    description: Interrupt to host55    maxItems: 156 57  vcpin-supply:58    description: Analog power supply regulator on VCPIN pin59 60  vdd-supply:61    description: Digital power supply regulator on VDD pin62 63  reset-gpios:64    description: Reset line for the touchscreen, should be tagged65      as GPIO_ACTIVE_LOW66 67  bootloader-key:68    description: the 8-byte bootloader key that is required to switch69      the chip from bootloader mode (default mode) to application mode70    $ref: /schemas/types.yaml#/definitions/uint8-array71    minItems: 872    maxItems: 873 74  touchscreen-size-x: true75  touchscreen-size-y: true76  touchscreen-fuzz-x: true77  touchscreen-fuzz-y: true78 79  active-distance:80    description: the distance in pixels beyond which a touch must move81      before movement is detected and reported by the device82    $ref: /schemas/types.yaml#/definitions/uint3283    minimum: 084    maximum: 1585 86  active-interval-ms:87    description: the minimum period in ms between consecutive88      scanning/processing cycles when the chip is in active mode89    minimum: 090    maximum: 25591 92  lowpower-interval-ms:93    description: the minimum period in ms between consecutive94      scanning/processing cycles when the chip is in low-power mode95    minimum: 096    maximum: 255097 98  touch-timeout-ms:99    description: minimum time in ms spent in the active power state while no100      touches are detected before entering low-power mode101    minimum: 0102    maximum: 2550103 104  use-handshake:105    description: enable register-based handshake (boolean). This should only106      be used if the chip is configured to use 'blocking communication with107      timeout' (in this case the device generates an interrupt at the end of108      every scanning/processing cycle)109    $ref: /schemas/types.yaml#/definitions/flag110 111additionalProperties: false112 113required:114  - compatible115  - reg116  - interrupts117  - bootloader-key118  - touchscreen-size-x119  - touchscreen-size-y120 121examples:122  - |123    #include <dt-bindings/interrupt-controller/irq.h>124    #include <dt-bindings/gpio/gpio.h>125    spi {126      #address-cells = <1>;127      #size-cells = <0>;128      num-cs = <1>;129      cs-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;130 131      touchscreen@0 {132        compatible = "cypress,cy8ctma340";133        reg = <0>;134        interrupt-parent = <&gpio>;135        interrupts = <20 IRQ_TYPE_EDGE_FALLING>;136        reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;137        vdd-supply = <&ldo_aux1_reg>;138        vcpin-supply = <&ldo_aux2_reg>;139        bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>;140        touchscreen-size-x = <480>;141        touchscreen-size-y = <800>;142        active-interval-ms = <0>;143        touch-timeout-ms = <255>;144        lowpower-interval-ms = <10>;145      };146    };147 148...149