15956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 25956d97fSEmmanuel Vadot%YAML 1.2 35956d97fSEmmanuel Vadot--- 45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/input/touchscreen/cypress,cy8ctma340.yaml# 55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65956d97fSEmmanuel Vadot 7*8bab661aSEmmanuel Vadottitle: Cypress CY8CTMA340 series touchscreen controller 85956d97fSEmmanuel Vadot 95956d97fSEmmanuel Vadotdescription: The Cypress CY8CTMA340 series (also known as "CYTTSP" after 105956d97fSEmmanuel Vadot the marketing name Cypress TrueTouch Standard Product) touchscreens can 115956d97fSEmmanuel Vadot be connected to either I2C or SPI buses. 125956d97fSEmmanuel Vadot 135956d97fSEmmanuel Vadotmaintainers: 145956d97fSEmmanuel Vadot - Javier Martinez Canillas <javier@dowhile0.org> 155956d97fSEmmanuel Vadot - Linus Walleij <linus.walleij@linaro.org> 165956d97fSEmmanuel Vadot 175956d97fSEmmanuel VadotallOf: 185956d97fSEmmanuel Vadot - $ref: touchscreen.yaml# 195956d97fSEmmanuel Vadot 205956d97fSEmmanuel Vadotproperties: 215956d97fSEmmanuel Vadot $nodename: 225956d97fSEmmanuel Vadot pattern: "^touchscreen(@.*)?$" 235956d97fSEmmanuel Vadot 245956d97fSEmmanuel Vadot compatible: 255956d97fSEmmanuel Vadot oneOf: 265956d97fSEmmanuel Vadot - const: cypress,cy8ctma340 275956d97fSEmmanuel Vadot - const: cypress,cy8ctst341 285956d97fSEmmanuel Vadot - const: cypress,cyttsp-spi 295956d97fSEmmanuel Vadot description: Legacy compatible for SPI connected CY8CTMA340 305956d97fSEmmanuel Vadot deprecated: true 315956d97fSEmmanuel Vadot - const: cypress,cyttsp-i2c 325956d97fSEmmanuel Vadot description: Legacy compatible for I2C connected CY8CTMA340 335956d97fSEmmanuel Vadot deprecated: true 345956d97fSEmmanuel Vadot 355956d97fSEmmanuel Vadot reg: 365956d97fSEmmanuel Vadot description: I2C address when used on the I2C bus, or the SPI chip 375956d97fSEmmanuel Vadot select index when used on the SPI bus 385956d97fSEmmanuel Vadot 395956d97fSEmmanuel Vadot clock-frequency: 405956d97fSEmmanuel Vadot description: I2C client clock frequency, defined for host when using 415956d97fSEmmanuel Vadot the device on the I2C bus 425956d97fSEmmanuel Vadot minimum: 0 435956d97fSEmmanuel Vadot maximum: 400000 445956d97fSEmmanuel Vadot 455956d97fSEmmanuel Vadot spi-max-frequency: 465956d97fSEmmanuel Vadot description: SPI clock frequency, defined for host, defined when using 475956d97fSEmmanuel Vadot the device on the SPI bus. The throughput is maximum 2 Mbps so the 485956d97fSEmmanuel Vadot typical value is 2000000, if higher rates are used the total throughput 495956d97fSEmmanuel Vadot needs to be restricted to 2 Mbps. 505956d97fSEmmanuel Vadot minimum: 0 515956d97fSEmmanuel Vadot maximum: 6000000 525956d97fSEmmanuel Vadot 535956d97fSEmmanuel Vadot interrupts: 545956d97fSEmmanuel Vadot description: Interrupt to host 555956d97fSEmmanuel Vadot maxItems: 1 565956d97fSEmmanuel Vadot 575956d97fSEmmanuel Vadot vcpin-supply: 585956d97fSEmmanuel Vadot description: Analog power supply regulator on VCPIN pin 595956d97fSEmmanuel Vadot 605956d97fSEmmanuel Vadot vdd-supply: 615956d97fSEmmanuel Vadot description: Digital power supply regulator on VDD pin 625956d97fSEmmanuel Vadot 635956d97fSEmmanuel Vadot reset-gpios: 645956d97fSEmmanuel Vadot description: Reset line for the touchscreen, should be tagged 655956d97fSEmmanuel Vadot as GPIO_ACTIVE_LOW 665956d97fSEmmanuel Vadot 675956d97fSEmmanuel Vadot bootloader-key: 685956d97fSEmmanuel Vadot description: the 8-byte bootloader key that is required to switch 695956d97fSEmmanuel Vadot the chip from bootloader mode (default mode) to application mode 705956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 715956d97fSEmmanuel Vadot minItems: 8 725956d97fSEmmanuel Vadot maxItems: 8 735956d97fSEmmanuel Vadot 745956d97fSEmmanuel Vadot touchscreen-size-x: true 755956d97fSEmmanuel Vadot touchscreen-size-y: true 765956d97fSEmmanuel Vadot touchscreen-fuzz-x: true 775956d97fSEmmanuel Vadot touchscreen-fuzz-y: true 785956d97fSEmmanuel Vadot 795956d97fSEmmanuel Vadot active-distance: 805956d97fSEmmanuel Vadot description: the distance in pixels beyond which a touch must move 815956d97fSEmmanuel Vadot before movement is detected and reported by the device 825956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 835956d97fSEmmanuel Vadot minimum: 0 845956d97fSEmmanuel Vadot maximum: 15 855956d97fSEmmanuel Vadot 865956d97fSEmmanuel Vadot active-interval-ms: 875956d97fSEmmanuel Vadot description: the minimum period in ms between consecutive 885956d97fSEmmanuel Vadot scanning/processing cycles when the chip is in active mode 895956d97fSEmmanuel Vadot minimum: 0 905956d97fSEmmanuel Vadot maximum: 255 915956d97fSEmmanuel Vadot 925956d97fSEmmanuel Vadot lowpower-interval-ms: 935956d97fSEmmanuel Vadot description: the minimum period in ms between consecutive 945956d97fSEmmanuel Vadot scanning/processing cycles when the chip is in low-power mode 955956d97fSEmmanuel Vadot minimum: 0 965956d97fSEmmanuel Vadot maximum: 2550 975956d97fSEmmanuel Vadot 985956d97fSEmmanuel Vadot touch-timeout-ms: 995956d97fSEmmanuel Vadot description: minimum time in ms spent in the active power state while no 1005956d97fSEmmanuel Vadot touches are detected before entering low-power mode 1015956d97fSEmmanuel Vadot minimum: 0 1025956d97fSEmmanuel Vadot maximum: 2550 1035956d97fSEmmanuel Vadot 1045956d97fSEmmanuel Vadot use-handshake: 1055956d97fSEmmanuel Vadot description: enable register-based handshake (boolean). This should only 1065956d97fSEmmanuel Vadot be used if the chip is configured to use 'blocking communication with 1075956d97fSEmmanuel Vadot timeout' (in this case the device generates an interrupt at the end of 1085956d97fSEmmanuel Vadot every scanning/processing cycle) 1095956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 1105956d97fSEmmanuel Vadot 1115956d97fSEmmanuel VadotadditionalProperties: false 1125956d97fSEmmanuel Vadot 1135956d97fSEmmanuel Vadotrequired: 1145956d97fSEmmanuel Vadot - compatible 1155956d97fSEmmanuel Vadot - reg 1165956d97fSEmmanuel Vadot - interrupts 1175956d97fSEmmanuel Vadot - bootloader-key 1185956d97fSEmmanuel Vadot - touchscreen-size-x 1195956d97fSEmmanuel Vadot - touchscreen-size-y 1205956d97fSEmmanuel Vadot 1215956d97fSEmmanuel Vadotexamples: 1225956d97fSEmmanuel Vadot - | 1235956d97fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 1245956d97fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 1255956d97fSEmmanuel Vadot spi { 1265956d97fSEmmanuel Vadot #address-cells = <1>; 1275956d97fSEmmanuel Vadot #size-cells = <0>; 1285956d97fSEmmanuel Vadot num-cs = <1>; 1295956d97fSEmmanuel Vadot cs-gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; 1305956d97fSEmmanuel Vadot 1315956d97fSEmmanuel Vadot touchscreen@0 { 1325956d97fSEmmanuel Vadot compatible = "cypress,cy8ctma340"; 1335956d97fSEmmanuel Vadot reg = <0>; 1345956d97fSEmmanuel Vadot interrupt-parent = <&gpio>; 1355956d97fSEmmanuel Vadot interrupts = <20 IRQ_TYPE_EDGE_FALLING>; 1365956d97fSEmmanuel Vadot reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>; 1375956d97fSEmmanuel Vadot vdd-supply = <&ldo_aux1_reg>; 1385956d97fSEmmanuel Vadot vcpin-supply = <&ldo_aux2_reg>; 1395956d97fSEmmanuel Vadot bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>; 1405956d97fSEmmanuel Vadot touchscreen-size-x = <480>; 1415956d97fSEmmanuel Vadot touchscreen-size-y = <800>; 1425956d97fSEmmanuel Vadot active-interval-ms = <0>; 1435956d97fSEmmanuel Vadot touch-timeout-ms = <255>; 1445956d97fSEmmanuel Vadot lowpower-interval-ms = <10>; 1455956d97fSEmmanuel Vadot }; 1465956d97fSEmmanuel Vadot }; 1475956d97fSEmmanuel Vadot 1485956d97fSEmmanuel Vadot... 149