Cypress CY8CTMA340 series touchscreen controller
Schema identifier ($id): "http://devicetree.org/schemas/input/touchscreen/cypress,cy8ctma340.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
The Cypress CY8CTMA340 series (also known as "CYTTSP" after the marketing name Cypress TrueTouch Standard Product) touchscreens can be connected to either I2C or SPI buses.
Maintainers (maintainers): "Javier Martinez Canillas <javier@dowhile0.org>", "Linus Walleij <linusw@kernel.org>"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):touchscreen.yaml#
Properties and child nodes (properties) #
$nodename — not listed as required here #
String pattern (pattern): "^touchscreen(@.*)?$"
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Exact value (
const):"cypress,cy8ctma340"
Rule 2
Exact value (
const):"cypress,cy8ctst341"
Rule 3
Exact value (
const):"cypress,cyttsp-spi"Legacy compatible for SPI connected CY8CTMA340
Deprecated (
deprecated):true
Rule 4
Exact value (
const):"cypress,cyttsp-i2c"Legacy compatible for I2C connected CY8CTMA340
Deprecated (
deprecated):true
reg — required here #
I2C address when used on the I2C bus, or the SPI chip select index when used on the SPI bus
clock-frequency — not listed as required here #
I2C client clock frequency, defined for host when using the device on the I2C bus
Minimum value (minimum): 0
Maximum value (maximum): 400000
spi-max-frequency — not listed as required here #
SPI clock frequency, defined for host, defined when using the device on the SPI bus. The throughput is maximum 2 Mbps so the typical value is 2000000, if higher rates are used the total throughput needs to be restricted to 2 Mbps.
Minimum value (minimum): 0
Maximum value (maximum): 6000000
interrupts — required here #
Interrupt to host
Maximum number of items (maxItems): 1
vcpin-supply — not listed as required here #
Analog power supply regulator on VCPIN pin
vdd-supply — not listed as required here #
Digital power supply regulator on VDD pin
reset-gpios — not listed as required here #
Reset line for the touchscreen, should be tagged as GPIO_ACTIVE_LOW
bootloader-key — required here #
the 8-byte bootloader key that is required to switch the chip from bootloader mode (default mode) to application mode
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8-array
Minimum number of items (minItems): 8
Maximum number of items (maxItems): 8
touchscreen-size-x — required here #
true — No constraints added by this property rule.
touchscreen-size-y — required here #
true — No constraints added by this property rule.
touchscreen-fuzz-x — not listed as required here #
true — No constraints added by this property rule.
touchscreen-fuzz-y — not listed as required here #
true — No constraints added by this property rule.
active-distance — not listed as required here #
the distance in pixels beyond which a touch must move before movement is detected and reported by the device
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 0
Maximum value (maximum): 15
active-interval-ms — not listed as required here #
the minimum period in ms between consecutive scanning/processing cycles when the chip is in active mode
Minimum value (minimum): 0
Maximum value (maximum): 255
lowpower-interval-ms — not listed as required here #
the minimum period in ms between consecutive scanning/processing cycles when the chip is in low-power mode
Minimum value (minimum): 0
Maximum value (maximum): 2550
touch-timeout-ms — not listed as required here #
minimum time in ms spent in the active power state while no touches are detected before entering low-power mode
Minimum value (minimum): 0
Maximum value (maximum): 2550
use-handshake — not listed as required here #
enable register-based handshake (boolean). This should only be used if the chip is configured to use 'blocking communication with timeout' (in this case the device generates an interrupt at the end of every scanning/processing cycle)
Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Required in this object (required): "compatible", "reg", "interrupts", "bootloader-key", "touchscreen-size-x", "touchscreen-size-y"
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
num-cs = <1>;
cs-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
touchscreen@0 {
compatible = "cypress,cy8ctma340";
reg = <0>;
interrupt-parent = <&gpio>;
interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
vdd-supply = <&ldo_aux1_reg>;
vcpin-supply = <&ldo_aux2_reg>;
bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>;
touchscreen-size-x = <480>;
touchscreen-size-y = <800>;
active-interval-ms = <0>;
touch-timeout-ms = <255>;
lowpower-interval-ms = <10>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)