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/ti,am3359-tsc.yaml# 562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 662306a36Sopenharmony_ci 762306a36Sopenharmony_cititle: TI AM3359 Touchscreen controller 862306a36Sopenharmony_ci 962306a36Sopenharmony_cimaintainers: 1062306a36Sopenharmony_ci - Miquel Raynal <miquel.raynal@bootlin.com> 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ciproperties: 1362306a36Sopenharmony_ci compatible: 1462306a36Sopenharmony_ci const: ti,am3359-tsc 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci ti,wires: 1762306a36Sopenharmony_ci description: Wires refer to application modes i.e. 4/5/8 wire touchscreen 1862306a36Sopenharmony_ci support on the platform. 1962306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 2062306a36Sopenharmony_ci enum: [4, 5, 8] 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci ti,x-plate-resistance: 2362306a36Sopenharmony_ci description: X plate resistance 2462306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci ti,coordinate-readouts: 2762306a36Sopenharmony_ci description: The sequencer supports a total of 16 programmable steps. Each 2862306a36Sopenharmony_ci step is used to read a single coordinate. A single readout is enough but 2962306a36Sopenharmony_ci multiple reads can increase the quality. A value of 5 means, 5 reads for 3062306a36Sopenharmony_ci X, 5 for Y and 2 for Z (always). This utilises 12 of the 16 software steps 3162306a36Sopenharmony_ci available. The remaining 4 can be used by the ADC. 3262306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 3362306a36Sopenharmony_ci minimum: 1 3462306a36Sopenharmony_ci maximum: 6 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci ti,wire-config: 3762306a36Sopenharmony_ci description: Different boards could have a different order for connecting 3862306a36Sopenharmony_ci wires on touchscreen. We need to provide an 8-bit number where the 3962306a36Sopenharmony_ci first four bits represent the analog lines and the next 4 bits represent 4062306a36Sopenharmony_ci positive/negative terminal on that input line. Notations to represent the 4162306a36Sopenharmony_ci input lines and terminals respectively are as follows, AIN0 = 0, AIN1 = 1 4262306a36Sopenharmony_ci and so on until AIN7 = 7. XP = 0, XN = 1, YP = 2, YN = 3. 4362306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32-array 4462306a36Sopenharmony_ci minItems: 4 4562306a36Sopenharmony_ci maxItems: 8 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci ti,charge-delay: 4862306a36Sopenharmony_ci description: Length of touch screen charge delay step in terms of ADC clock 4962306a36Sopenharmony_ci cycles. Charge delay value should be large in order to avoid false pen-up 5062306a36Sopenharmony_ci events. This value effects the overall sampling speed, hence need to be 5162306a36Sopenharmony_ci kept as low as possible, while avoiding false pen-up event. Start from a 5262306a36Sopenharmony_ci lower value, say 0x400, and increase value until false pen-up events are 5362306a36Sopenharmony_ci avoided. The pen-up detection happens immediately after the charge step, 5462306a36Sopenharmony_ci so this does in fact function as a hardware knob for adjusting the amount 5562306a36Sopenharmony_ci of "settling time". 5662306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_cirequired: 5962306a36Sopenharmony_ci - compatible 6062306a36Sopenharmony_ci - ti,wires 6162306a36Sopenharmony_ci - ti,x-plate-resistance 6262306a36Sopenharmony_ci - ti,coordinate-readouts 6362306a36Sopenharmony_ci - ti,wire-config 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ciadditionalProperties: false 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ciexamples: 6862306a36Sopenharmony_ci - | 6962306a36Sopenharmony_ci tsc { 7062306a36Sopenharmony_ci compatible = "ti,am3359-tsc"; 7162306a36Sopenharmony_ci ti,wires = <4>; 7262306a36Sopenharmony_ci ti,x-plate-resistance = <200>; 7362306a36Sopenharmony_ci ti,coordinate-readouts = <5>; 7462306a36Sopenharmony_ci ti,wire-config = <0x00 0x11 0x22 0x33>; 7562306a36Sopenharmony_ci ti,charge-delay = <0x400>; 7662306a36Sopenharmony_ci }; 77