162306a36Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 262306a36Sopenharmony_ci%YAML 1.2 362306a36Sopenharmony_ci--- 462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/input/touchscreen/cypress,cy8ctma340.yaml# 562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 662306a36Sopenharmony_ci 762306a36Sopenharmony_cititle: Cypress CY8CTMA340 series touchscreen controller 862306a36Sopenharmony_ci 962306a36Sopenharmony_cidescription: The Cypress CY8CTMA340 series (also known as "CYTTSP" after 1062306a36Sopenharmony_ci the marketing name Cypress TrueTouch Standard Product) touchscreens can 1162306a36Sopenharmony_ci be connected to either I2C or SPI buses. 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_cimaintainers: 1462306a36Sopenharmony_ci - Javier Martinez Canillas <javier@dowhile0.org> 1562306a36Sopenharmony_ci - Linus Walleij <linus.walleij@linaro.org> 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciallOf: 1862306a36Sopenharmony_ci - $ref: touchscreen.yaml# 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciproperties: 2162306a36Sopenharmony_ci $nodename: 2262306a36Sopenharmony_ci pattern: "^touchscreen(@.*)?$" 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci compatible: 2562306a36Sopenharmony_ci oneOf: 2662306a36Sopenharmony_ci - const: cypress,cy8ctma340 2762306a36Sopenharmony_ci - const: cypress,cy8ctst341 2862306a36Sopenharmony_ci - const: cypress,cyttsp-spi 2962306a36Sopenharmony_ci description: Legacy compatible for SPI connected CY8CTMA340 3062306a36Sopenharmony_ci deprecated: true 3162306a36Sopenharmony_ci - const: cypress,cyttsp-i2c 3262306a36Sopenharmony_ci description: Legacy compatible for I2C connected CY8CTMA340 3362306a36Sopenharmony_ci deprecated: true 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci reg: 3662306a36Sopenharmony_ci description: I2C address when used on the I2C bus, or the SPI chip 3762306a36Sopenharmony_ci select index when used on the SPI bus 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci clock-frequency: 4062306a36Sopenharmony_ci description: I2C client clock frequency, defined for host when using 4162306a36Sopenharmony_ci the device on the I2C bus 4262306a36Sopenharmony_ci minimum: 0 4362306a36Sopenharmony_ci maximum: 400000 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci spi-max-frequency: 4662306a36Sopenharmony_ci description: SPI clock frequency, defined for host, defined when using 4762306a36Sopenharmony_ci the device on the SPI bus. The throughput is maximum 2 Mbps so the 4862306a36Sopenharmony_ci typical value is 2000000, if higher rates are used the total throughput 4962306a36Sopenharmony_ci needs to be restricted to 2 Mbps. 5062306a36Sopenharmony_ci minimum: 0 5162306a36Sopenharmony_ci maximum: 6000000 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci interrupts: 5462306a36Sopenharmony_ci description: Interrupt to host 5562306a36Sopenharmony_ci maxItems: 1 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci vcpin-supply: 5862306a36Sopenharmony_ci description: Analog power supply regulator on VCPIN pin 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci vdd-supply: 6162306a36Sopenharmony_ci description: Digital power supply regulator on VDD pin 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci reset-gpios: 6462306a36Sopenharmony_ci description: Reset line for the touchscreen, should be tagged 6562306a36Sopenharmony_ci as GPIO_ACTIVE_LOW 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci bootloader-key: 6862306a36Sopenharmony_ci description: the 8-byte bootloader key that is required to switch 6962306a36Sopenharmony_ci the chip from bootloader mode (default mode) to application mode 7062306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint8-array 7162306a36Sopenharmony_ci minItems: 8 7262306a36Sopenharmony_ci maxItems: 8 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci touchscreen-size-x: true 7562306a36Sopenharmony_ci touchscreen-size-y: true 7662306a36Sopenharmony_ci touchscreen-fuzz-x: true 7762306a36Sopenharmony_ci touchscreen-fuzz-y: true 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci active-distance: 8062306a36Sopenharmony_ci description: the distance in pixels beyond which a touch must move 8162306a36Sopenharmony_ci before movement is detected and reported by the device 8262306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 8362306a36Sopenharmony_ci minimum: 0 8462306a36Sopenharmony_ci maximum: 15 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci active-interval-ms: 8762306a36Sopenharmony_ci description: the minimum period in ms between consecutive 8862306a36Sopenharmony_ci scanning/processing cycles when the chip is in active mode 8962306a36Sopenharmony_ci minimum: 0 9062306a36Sopenharmony_ci maximum: 255 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci lowpower-interval-ms: 9362306a36Sopenharmony_ci description: the minimum period in ms between consecutive 9462306a36Sopenharmony_ci scanning/processing cycles when the chip is in low-power mode 9562306a36Sopenharmony_ci minimum: 0 9662306a36Sopenharmony_ci maximum: 2550 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_ci touch-timeout-ms: 9962306a36Sopenharmony_ci description: minimum time in ms spent in the active power state while no 10062306a36Sopenharmony_ci touches are detected before entering low-power mode 10162306a36Sopenharmony_ci minimum: 0 10262306a36Sopenharmony_ci maximum: 2550 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci use-handshake: 10562306a36Sopenharmony_ci description: enable register-based handshake (boolean). This should only 10662306a36Sopenharmony_ci be used if the chip is configured to use 'blocking communication with 10762306a36Sopenharmony_ci timeout' (in this case the device generates an interrupt at the end of 10862306a36Sopenharmony_ci every scanning/processing cycle) 10962306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/flag 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ciadditionalProperties: false 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_cirequired: 11462306a36Sopenharmony_ci - compatible 11562306a36Sopenharmony_ci - reg 11662306a36Sopenharmony_ci - interrupts 11762306a36Sopenharmony_ci - bootloader-key 11862306a36Sopenharmony_ci - touchscreen-size-x 11962306a36Sopenharmony_ci - touchscreen-size-y 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ciexamples: 12262306a36Sopenharmony_ci - | 12362306a36Sopenharmony_ci #include <dt-bindings/interrupt-controller/irq.h> 12462306a36Sopenharmony_ci #include <dt-bindings/gpio/gpio.h> 12562306a36Sopenharmony_ci spi { 12662306a36Sopenharmony_ci #address-cells = <1>; 12762306a36Sopenharmony_ci #size-cells = <0>; 12862306a36Sopenharmony_ci num-cs = <1>; 12962306a36Sopenharmony_ci cs-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci touchscreen@0 { 13262306a36Sopenharmony_ci compatible = "cypress,cy8ctma340"; 13362306a36Sopenharmony_ci reg = <0>; 13462306a36Sopenharmony_ci interrupt-parent = <&gpio>; 13562306a36Sopenharmony_ci interrupts = <20 IRQ_TYPE_EDGE_FALLING>; 13662306a36Sopenharmony_ci reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>; 13762306a36Sopenharmony_ci vdd-supply = <&ldo_aux1_reg>; 13862306a36Sopenharmony_ci vcpin-supply = <&ldo_aux2_reg>; 13962306a36Sopenharmony_ci bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>; 14062306a36Sopenharmony_ci touchscreen-size-x = <480>; 14162306a36Sopenharmony_ci touchscreen-size-y = <800>; 14262306a36Sopenharmony_ci active-interval-ms = <0>; 14362306a36Sopenharmony_ci touch-timeout-ms = <255>; 14462306a36Sopenharmony_ci lowpower-interval-ms = <10>; 14562306a36Sopenharmony_ci }; 14662306a36Sopenharmony_ci }; 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ci... 149