xref: /openbmc/linux/Documentation/devicetree/bindings/input/touchscreen/ads7846.txt (revision 9f4813b531a0b8cc502fcfb142937fe4e9104d77)
16afb6b6eSH. Nikolaus SchallerDevice tree bindings for TI's ADS7843, ADS7845, ADS7846, ADS7873, TSC2046
26afb6b6eSH. Nikolaus SchallerSPI driven touch screen controllers.
36afb6b6eSH. Nikolaus Schaller
46afb6b6eSH. Nikolaus SchallerThe node for this driver must be a child node of a SPI controller, hence
56afb6b6eSH. Nikolaus Schallerall mandatory properties described in
66afb6b6eSH. Nikolaus Schaller
76afb6b6eSH. Nikolaus Schaller	Documentation/devicetree/bindings/spi/spi-bus.txt
86afb6b6eSH. Nikolaus Schaller
96afb6b6eSH. Nikolaus Schallermust be specified.
106afb6b6eSH. Nikolaus Schaller
116afb6b6eSH. Nikolaus SchallerAdditional required properties:
126afb6b6eSH. Nikolaus Schaller
136afb6b6eSH. Nikolaus Schaller	compatible		Must be one of the following, depending on the
146afb6b6eSH. Nikolaus Schaller				model:
156afb6b6eSH. Nikolaus Schaller					"ti,tsc2046"
166afb6b6eSH. Nikolaus Schaller					"ti,ads7843"
176afb6b6eSH. Nikolaus Schaller					"ti,ads7845"
186afb6b6eSH. Nikolaus Schaller					"ti,ads7846"
196afb6b6eSH. Nikolaus Schaller					"ti,ads7873"
206afb6b6eSH. Nikolaus Schaller
216afb6b6eSH. Nikolaus Schaller	interrupts		An interrupt node describing the IRQ line the chip's
226afb6b6eSH. Nikolaus Schaller				!PENIRQ pin is connected to.
236afb6b6eSH. Nikolaus Schaller	vcc-supply		A regulator node for the supply voltage.
246afb6b6eSH. Nikolaus Schaller
256afb6b6eSH. Nikolaus Schaller
266afb6b6eSH. Nikolaus SchallerOptional properties:
276afb6b6eSH. Nikolaus Schaller
286afb6b6eSH. Nikolaus Schaller	ti,vref-delay-usecs		vref supply delay in usecs, 0 for
296afb6b6eSH. Nikolaus Schaller					external vref (u16).
306afb6b6eSH. Nikolaus Schaller	ti,vref-mv			The VREF voltage, in millivolts (u16).
316afb6b6eSH. Nikolaus Schaller					Set to 0 to use internal references
326afb6b6eSH. Nikolaus Schaller					(ADS7846).
336afb6b6eSH. Nikolaus Schaller	ti,keep-vref-on			set to keep vref on for differential
346afb6b6eSH. Nikolaus Schaller					measurements as well
356afb6b6eSH. Nikolaus Schaller	ti,settle-delay-usec		Settling time of the analog signals;
366afb6b6eSH. Nikolaus Schaller					a function of Vcc and the capacitance
376afb6b6eSH. Nikolaus Schaller					on the X/Y drivers.  If set to non-zero,
386afb6b6eSH. Nikolaus Schaller					two samples are taken with settle_delay
396afb6b6eSH. Nikolaus Schaller					us apart, and the second one is used.
406afb6b6eSH. Nikolaus Schaller					~150 uSec with 0.01uF caps (u16).
416afb6b6eSH. Nikolaus Schaller	ti,penirq-recheck-delay-usecs	If set to non-zero, after samples are
426afb6b6eSH. Nikolaus Schaller					taken this delay is applied and penirq
436afb6b6eSH. Nikolaus Schaller					is rechecked, to help avoid false
446afb6b6eSH. Nikolaus Schaller					events.  This value is affected by the
456afb6b6eSH. Nikolaus Schaller					material used to build the touch layer
466afb6b6eSH. Nikolaus Schaller					(u16).
476afb6b6eSH. Nikolaus Schaller	ti,x-plate-ohms			Resistance of the X-plate,
486afb6b6eSH. Nikolaus Schaller					in Ohms (u16).
496afb6b6eSH. Nikolaus Schaller	ti,y-plate-ohms			Resistance of the Y-plate,
506afb6b6eSH. Nikolaus Schaller					in Ohms (u16).
516afb6b6eSH. Nikolaus Schaller	ti,x-min			Minimum value on the X axis (u16).
526afb6b6eSH. Nikolaus Schaller	ti,y-min			Minimum value on the Y axis (u16).
536afb6b6eSH. Nikolaus Schaller	ti,debounce-tol			Tolerance used for filtering (u16).
546afb6b6eSH. Nikolaus Schaller	ti,debounce-rep			Additional consecutive good readings
556afb6b6eSH. Nikolaus Schaller					required after the first two (u16).
566afb6b6eSH. Nikolaus Schaller	ti,pendown-gpio-debounce	Platform specific debounce time for the
576afb6b6eSH. Nikolaus Schaller					pendown-gpio (u32).
586afb6b6eSH. Nikolaus Schaller	pendown-gpio			GPIO handle describing the pin the !PENIRQ
596afb6b6eSH. Nikolaus Schaller					line is connected to.
606afb6b6eSH. Nikolaus Schaller	wakeup-source			use any event on touchscreen as wakeup event.
616afb6b6eSH. Nikolaus Schaller					(Legacy property support: "linux,wakeup")
62*a2f99330SMarco Felsch	touchscreen-size-x		General touchscreen binding, see [1].
63*a2f99330SMarco Felsch	touchscreen-size-y		General touchscreen binding, see [1].
64*a2f99330SMarco Felsch	touchscreen-max-pressure	General touchscreen binding, see [1].
65*a2f99330SMarco Felsch	touchscreen-min-pressure	General touchscreen binding, see [1].
66*a2f99330SMarco Felsch	touchscreen-average-samples	General touchscreen binding, see [1].
67*a2f99330SMarco Felsch	touchscreen-inverted-x		General touchscreen binding, see [1].
68*a2f99330SMarco Felsch	touchscreen-inverted-y		General touchscreen binding, see [1].
69*a2f99330SMarco Felsch	touchscreen-swapped-x-y		General touchscreen binding, see [1].
706afb6b6eSH. Nikolaus Schaller
71*a2f99330SMarco Felsch[1] All general touchscreen properties are described in
72*a2f99330SMarco Felsch    Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt.
73*a2f99330SMarco Felsch
74*a2f99330SMarco FelschDeprecated properties:
75*a2f99330SMarco Felsch
76*a2f99330SMarco Felsch	ti,swap-xy			swap x and y axis
77*a2f99330SMarco Felsch	ti,x-max			Maximum value on the X axis (u16).
78*a2f99330SMarco Felsch	ti,y-max			Maximum value on the Y axis (u16).
79*a2f99330SMarco Felsch	ti,pressure-min			Minimum reported pressure value
80*a2f99330SMarco Felsch					(threshold) - u16.
81*a2f99330SMarco Felsch	ti,pressure-max			Maximum reported pressure value (u16).
82*a2f99330SMarco Felsch	ti,debounce-max			Max number of additional readings per
83*a2f99330SMarco Felsch					sample (u16).
846afb6b6eSH. Nikolaus Schaller
856afb6b6eSH. Nikolaus SchallerExample for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::
866afb6b6eSH. Nikolaus Schaller
876afb6b6eSH. Nikolaus Schaller	spi_controller {
886afb6b6eSH. Nikolaus Schaller		tsc2046@0 {
896afb6b6eSH. Nikolaus Schaller			reg = <0>;	/* CS0 */
906afb6b6eSH. Nikolaus Schaller			compatible = "ti,tsc2046";
916afb6b6eSH. Nikolaus Schaller			interrupt-parent = <&gpio1>;
926afb6b6eSH. Nikolaus Schaller			interrupts = <8 0>;	/* BOOT6 / GPIO 8 */
936afb6b6eSH. Nikolaus Schaller			spi-max-frequency = <1000000>;
946afb6b6eSH. Nikolaus Schaller			pendown-gpio = <&gpio1 8 0>;
956afb6b6eSH. Nikolaus Schaller			vcc-supply = <&reg_vcc3>;
966afb6b6eSH. Nikolaus Schaller
976afb6b6eSH. Nikolaus Schaller			ti,x-min = /bits/ 16 <0>;
986afb6b6eSH. Nikolaus Schaller			ti,x-max = /bits/ 16 <8000>;
996afb6b6eSH. Nikolaus Schaller			ti,y-min = /bits/ 16 <0>;
1006afb6b6eSH. Nikolaus Schaller			ti,y-max = /bits/ 16 <4800>;
1016afb6b6eSH. Nikolaus Schaller			ti,x-plate-ohms = /bits/ 16 <40>;
1026afb6b6eSH. Nikolaus Schaller			ti,pressure-max = /bits/ 16 <255>;
1036afb6b6eSH. Nikolaus Schaller
1046afb6b6eSH. Nikolaus Schaller			wakeup-source;
1056afb6b6eSH. Nikolaus Schaller		};
1066afb6b6eSH. Nikolaus Schaller	};
107