xref: /freebsd/sys/contrib/device-tree/Bindings/input/touchscreen/ads7846.txt (revision dd21556857e8d40f66bf5ad54754d9d52669ebf7)
1Device tree bindings for TI's ADS7843, ADS7845, ADS7846, ADS7873, TSC2046
2SPI driven touch screen controllers.
3
4The node for this driver must be a child node of a SPI controller, hence
5all mandatory properties described in
6
7	Documentation/devicetree/bindings/spi/spi-bus.txt
8
9must be specified.
10
11Additional required properties:
12
13	compatible		Must be one of the following, depending on the
14				model:
15					"ti,tsc2046"
16					"ti,ads7843"
17					"ti,ads7845"
18					"ti,ads7846"
19					"ti,ads7873"
20
21	interrupts		An interrupt node describing the IRQ line the chip's
22				!PENIRQ pin is connected to.
23	vcc-supply		A regulator node for the supply voltage.
24
25
26Optional properties:
27
28	ti,vref-delay-usecs		vref supply delay in usecs, 0 for
29					external vref (u16).
30	ti,vref-mv			The VREF voltage, in millivolts (u16).
31					Set to 0 to use internal references
32					(ADS7846).
33	ti,keep-vref-on			set to keep vref on for differential
34					measurements as well
35	ti,settle-delay-usec		Settling time of the analog signals;
36					a function of Vcc and the capacitance
37					on the X/Y drivers.  If set to non-zero,
38					two samples are taken with settle_delay
39					us apart, and the second one is used.
40					~150 uSec with 0.01uF caps (u16).
41	ti,penirq-recheck-delay-usecs	If set to non-zero, after samples are
42					taken this delay is applied and penirq
43					is rechecked, to help avoid false
44					events.  This value is affected by the
45					material used to build the touch layer
46					(u16).
47	ti,x-plate-ohms			Resistance of the X-plate,
48					in Ohms (u16).
49	ti,y-plate-ohms			Resistance of the Y-plate,
50					in Ohms (u16).
51	ti,x-min			Minimum value on the X axis (u16).
52	ti,y-min			Minimum value on the Y axis (u16).
53	ti,debounce-tol			Tolerance used for filtering (u16).
54	ti,debounce-rep			Additional consecutive good readings
55					required after the first two (u16).
56	ti,pendown-gpio-debounce	Platform specific debounce time for the
57					pendown-gpio (u32).
58	pendown-gpio			GPIO handle describing the pin the !PENIRQ
59					line is connected to.
60	ti,hsync-gpios			GPIO line to poll for hsync
61	wakeup-source			use any event on touchscreen as wakeup event.
62					(Legacy property support: "linux,wakeup")
63	touchscreen-size-x		General touchscreen binding, see [1].
64	touchscreen-size-y		General touchscreen binding, see [1].
65	touchscreen-max-pressure	General touchscreen binding, see [1].
66	touchscreen-min-pressure	General touchscreen binding, see [1].
67	touchscreen-average-samples	General touchscreen binding, see [1].
68	touchscreen-inverted-x		General touchscreen binding, see [1].
69	touchscreen-inverted-y		General touchscreen binding, see [1].
70	touchscreen-swapped-x-y		General touchscreen binding, see [1].
71
72[1] All general touchscreen properties are described in
73    Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt.
74
75Deprecated properties:
76
77	ti,swap-xy			swap x and y axis
78	ti,x-max			Maximum value on the X axis (u16).
79	ti,y-max			Maximum value on the Y axis (u16).
80	ti,pressure-min			Minimum reported pressure value
81					(threshold) - u16.
82	ti,pressure-max			Maximum reported pressure value (u16).
83	ti,debounce-max			Max number of additional readings per
84					sample (u16).
85
86Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC::
87
88	spi_controller {
89		tsc2046@0 {
90			reg = <0>;	/* CS0 */
91			compatible = "ti,tsc2046";
92			interrupt-parent = <&gpio1>;
93			interrupts = <8 0>;	/* BOOT6 / GPIO 8 */
94			spi-max-frequency = <1000000>;
95			pendown-gpio = <&gpio1 8 0>;
96			vcc-supply = <&reg_vcc3>;
97
98			ti,x-min = /bits/ 16 <0>;
99			ti,x-max = /bits/ 16 <8000>;
100			ti,y-min = /bits/ 16 <0>;
101			ti,y-max = /bits/ 16 <4800>;
102			ti,x-plate-ohms = /bits/ 16 <40>;
103			ti,pressure-max = /bits/ 16 <255>;
104
105			wakeup-source;
106		};
107	};
108