xref: /freebsd/share/man/man4/cyapa.4 (revision bfcc09ddd422c95a1a2e4e794b63ee54c4902398)
1.\" Copyright (c) 2015 Michael Gmelin <freebsd@grem.de>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd December 18, 2018
28.Dt CYAPA 4
29.Os
30.Sh NAME
31.Nm cyapa
32.Nd Cypress APA trackpad with I2C interface driver
33.Sh SYNOPSIS
34To compile this driver into the kernel, place the following lines into
35the kernel configuration file:
36.Bd -ragged -offset indent
37.Cd "device cyapa"
38.Cd "device ig4"
39.Cd "device iicbus"
40.Ed
41.Pp
42Alternatively, to load the driver as a module at boot time, place the following line in
43.Xr loader.conf 5 :
44.Bd -literal -offset indent
45cyapa_load="YES"
46ig4_load="YES"
47.Ed
48.Pp
49On many Chromebook models this driver can be automatically configured with the
50help of the
51.Xr chromebook_platform 4
52driver.
53Alternatively, the
54.Nm
55driver can be manually configured in
56.Pa /boot/device.hints :
57.Cd hint.cyapa.0.at="iicbus0"
58.Cd hint.cyapa.0.addr="0xCE"
59.Cd hint.cyapa.1.at="iicbus1"
60.Cd hint.cyapa.1.addr="0xCE"
61.Sh DESCRIPTION
62The
63.Nm
64driver provides support for the Cypress APA trackpad.
65It emulates the IntelliMouse PS/2 protocol.
66It supports basic mouse ioctls, so that
67.Xr moused 8
68is supported properly.
69.Ss Trackpad layout
70.Bd -literal
71                   2/3               1/3
72          +--------------------+------------+
73          |                    |   Middle   |
74          |                    |   Button   |
75          |       Left         |            |
76          |      Button        +------------+
77          |                    |   Right    |
78          |                    |   Button   |
79          +--------------------+............|
80          |     Thumb/Button Area           | 15%
81          +---------------------------------+
82.Ed
83.Ss Trackpad features
84.Bl -tag -width 8n
85.It Va Two finger scrolling
86Use two fingers for Z axis scrolling.
87.It Va Button down/second finger
88While one finger clicks and holds down the touchpad, the second finger can be
89used to move the mouse cursor.
90This can be useful for drawing or selecting text.
91.It Va Thumb/Button area
92The lower 15% of the trackpad will not affect the mouse cursor position.
93This allows for high precision clicking, by controlling the cursor with the
94index finger and pushing/holding the pad down with the thumb.
95.It Va Trackpad button
96Push physical button.
97The left two thirds of the pad issues a LEFT button event.
98The upper right corner issues a MIDDLE button event.
99The lower right corner issues a RIGHT button.
100Optionally, tap to click can be enabled (see below).
101.El
102.Pp
103On a system using
104.Xr device.hints 5 ,
105these values are configurable for
106.Nm :
107.Bl -tag -width "hint.cyapa.%d.addr"
108.It Va hint.cyapa.%d.at
109target
110.Xr iicbus 4 .
111.It Va hint.cyapa.%d.addr
112.Nm
113i2c address on the
114.Xr iicbus 4 .
115.El
116.Sh SYSCTL VARIABLES
117These
118.Xr sysctl 8
119variables are available:
120.Bl -tag -width 8n
121.It Va debug.cyapa_idle_freq
122Scan frequency in idle mode, the default is 1.
123.It Va debug.cyapa_slow_freq
124Scan frequency in slow mode, the default is 20.
125.It Va debug.cyapa_norm_freq
126Scan frequency in normal mode, the default is 100.
127.It Va debug.cyapa_minpressure
128Minimum pressure to detect a finger, the default is 12.
129.It Va debug.cyapa_enable_tapclick
130Controls tap to click.
131Possible values:
132.Bl -tag -width 8n
133.It 0
134Tap to click is disabled.
135This is the default value.
136.It 1
137Tap to click always generates a left mouse button event.
138.It 2
139Tap to click generates left mouse button event if the left 2/3rds of the pad
140are tapped and a right mouse button event otherwise.
141.It 3
142Tap to click generates mouse button events as if the physical button was
143pressed (see
144.Sx DESCRIPTION
145above).
146.El
147.It Va debug.cyapa_tapclick_min_ticks
148Minimum tap duration in ticks to create a click, the default is 1.
149.It Va debug.cyapa_tapclick_max_ticks
150Maximum tap duration in ticks to create a click, the default is 8.
151.It Va debug.cyapa_move_min_ticks
152Minimum ticks before cursor movement occurs, the default is 4.
153.It Va debug.cyapa_scroll_wait_ticks
154Ticks to wait before starting to scroll, the default is 0.
155.It Va debug.cyapa_scroll_stick_ticks
156Ticks while preventing cursor movement on single finger after scroll,
157the default is 15.
158.It Va debug.cyapa_thumbarea_percent
159Size of bottom thumb area in percent, the default is 15.
160.It Va debug.cyapa_debug
161Setting this to a non-zero value enables debug output to console and syslog,
162the default is 0.
163.It Va debug.cyapa_reset
164Setting this to a non-zero value reinitializes the device.
165The sysctl resets to zero immediately.
166.El
167.Sh FILES
168.Nm
169creates
170.Pa /dev/cyapa0 ,
171which presents the mouse as an
172.Ar IntelliMouse PS/2
173device.
174It supports
175.Xr moused 8
176levels 0 through 2, level 1 is used by default.
177.Sh EXAMPLES
178To use
179.Nm
180with
181.Xr moused 8 ,
182add the following lines to the
183.Xr rc.conf 5
184file:
185.Pp
186.Dl moused_enable="YES"
187.Dl moused_port="/dev/cyapa0"
188.Pp
189If vertical scrolling is not desired, add
190.Pp
191.Dl moused_flags="-l0"
192.Pp
193to
194.Xr rc.conf 5 .
195.Pp
196Enable tap to click for the left and the right mouse button and
197disable the thumb area by adding these lines to the
198.Xr sysctl.conf 5
199file:
200.Pp
201.Dl debug.cyapa_thumbarea_percent=0
202.Dl debug.cyapa_enable_tapclick=2
203.Sh SEE ALSO
204.Xr chromebook_platform 4 ,
205.Xr ig4 4 ,
206.Xr iicbus 4 ,
207.Xr sysmouse 4 ,
208.Xr moused 8
209.Sh AUTHORS
210.An -nosplit
211The original
212.Nm
213driver was written for
214.Dx
215by
216.An Matthew Dillon .
217.Pp
218It has been ported, modified, and enhanced for
219.Fx
220by
221.An Michael Gmelin Aq Mt freebsd@grem.de .
222.Pp
223This manual page was written by
224.An Michael Gmelin Aq Mt freebsd@grem.de .
225.Sh BUGS
226The
227.Nm
228driver detects the device from the I2C address.
229This might have unforeseen consequences if the initialization sequence
230is sent to an unknown device at that address.
231