1*8c4838a8SMiquel Raynal# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*8c4838a8SMiquel Raynal%YAML 1.2 3*8c4838a8SMiquel Raynal--- 4*8c4838a8SMiquel Raynal$id: http://devicetree.org/schemas/input/touchscreen/ti,am3359-tsc.yaml# 5*8c4838a8SMiquel Raynal$schema: http://devicetree.org/meta-schemas/core.yaml# 6*8c4838a8SMiquel Raynal 7*8c4838a8SMiquel Raynaltitle: TI AM3359 Touchscreen controller 8*8c4838a8SMiquel Raynal 9*8c4838a8SMiquel Raynalmaintainers: 10*8c4838a8SMiquel Raynal - Miquel Raynal <miquel.raynal@bootlin.com> 11*8c4838a8SMiquel Raynal 12*8c4838a8SMiquel Raynalproperties: 13*8c4838a8SMiquel Raynal compatible: 14*8c4838a8SMiquel Raynal const: ti,am3359-tsc 15*8c4838a8SMiquel Raynal 16*8c4838a8SMiquel Raynal ti,wires: 17*8c4838a8SMiquel Raynal description: Wires refer to application modes i.e. 4/5/8 wire touchscreen 18*8c4838a8SMiquel Raynal support on the platform. 19*8c4838a8SMiquel Raynal $ref: /schemas/types.yaml#/definitions/uint32 20*8c4838a8SMiquel Raynal enum: [4, 5, 8] 21*8c4838a8SMiquel Raynal 22*8c4838a8SMiquel Raynal ti,x-plate-resistance: 23*8c4838a8SMiquel Raynal description: X plate resistance 24*8c4838a8SMiquel Raynal $ref: /schemas/types.yaml#/definitions/uint32 25*8c4838a8SMiquel Raynal 26*8c4838a8SMiquel Raynal ti,coordinate-readouts: 27*8c4838a8SMiquel Raynal description: The sequencer supports a total of 16 programmable steps. Each 28*8c4838a8SMiquel Raynal step is used to read a single coordinate. A single readout is enough but 29*8c4838a8SMiquel Raynal multiple reads can increase the quality. A value of 5 means, 5 reads for 30*8c4838a8SMiquel Raynal X, 5 for Y and 2 for Z (always). This utilises 12 of the 16 software steps 31*8c4838a8SMiquel Raynal available. The remaining 4 can be used by the ADC. 32*8c4838a8SMiquel Raynal $ref: /schemas/types.yaml#/definitions/uint32 33*8c4838a8SMiquel Raynal minimum: 1 34*8c4838a8SMiquel Raynal maximum: 6 35*8c4838a8SMiquel Raynal 36*8c4838a8SMiquel Raynal ti,wire-config: 37*8c4838a8SMiquel Raynal description: Different boards could have a different order for connecting 38*8c4838a8SMiquel Raynal wires on touchscreen. We need to provide an 8-bit number where the 39*8c4838a8SMiquel Raynal first four bits represent the analog lines and the next 4 bits represent 40*8c4838a8SMiquel Raynal positive/negative terminal on that input line. Notations to represent the 41*8c4838a8SMiquel Raynal input lines and terminals respectively are as follows, AIN0 = 0, AIN1 = 1 42*8c4838a8SMiquel Raynal and so on until AIN7 = 7. XP = 0, XN = 1, YP = 2, YN = 3. 43*8c4838a8SMiquel Raynal $ref: /schemas/types.yaml#/definitions/uint32-array 44*8c4838a8SMiquel Raynal minItems: 4 45*8c4838a8SMiquel Raynal maxItems: 8 46*8c4838a8SMiquel Raynal 47*8c4838a8SMiquel Raynal ti,charge-delay: 48*8c4838a8SMiquel Raynal description: Length of touch screen charge delay step in terms of ADC clock 49*8c4838a8SMiquel Raynal cycles. Charge delay value should be large in order to avoid false pen-up 50*8c4838a8SMiquel Raynal events. This value effects the overall sampling speed, hence need to be 51*8c4838a8SMiquel Raynal kept as low as possible, while avoiding false pen-up event. Start from a 52*8c4838a8SMiquel Raynal lower value, say 0x400, and increase value until false pen-up events are 53*8c4838a8SMiquel Raynal avoided. The pen-up detection happens immediately after the charge step, 54*8c4838a8SMiquel Raynal so this does in fact function as a hardware knob for adjusting the amount 55*8c4838a8SMiquel Raynal of "settling time". 56*8c4838a8SMiquel Raynal $ref: /schemas/types.yaml#/definitions/uint32 57*8c4838a8SMiquel Raynal 58*8c4838a8SMiquel Raynalrequired: 59*8c4838a8SMiquel Raynal - compatible 60*8c4838a8SMiquel Raynal - ti,wires 61*8c4838a8SMiquel Raynal - ti,x-plate-resistance 62*8c4838a8SMiquel Raynal - ti,coordinate-readouts 63*8c4838a8SMiquel Raynal - ti,wire-config 64*8c4838a8SMiquel Raynal 65*8c4838a8SMiquel RaynaladditionalProperties: false 66*8c4838a8SMiquel Raynal 67*8c4838a8SMiquel Raynalexamples: 68*8c4838a8SMiquel Raynal - | 69*8c4838a8SMiquel Raynal tsc { 70*8c4838a8SMiquel Raynal compatible = "ti,am3359-tsc"; 71*8c4838a8SMiquel Raynal ti,wires = <4>; 72*8c4838a8SMiquel Raynal ti,x-plate-resistance = <200>; 73*8c4838a8SMiquel Raynal ti,coordinate-readouts = <5>; 74*8c4838a8SMiquel Raynal ti,wire-config = <0x00 0x11 0x22 0x33>; 75*8c4838a8SMiquel Raynal ti,charge-delay = <0x400>; 76*8c4838a8SMiquel Raynal }; 77