146f07718SMichael Gmelin.\" Copyright (c) 2015 Michael Gmelin <freebsd@grem.de> 246f07718SMichael Gmelin.\" All rights reserved. 346f07718SMichael Gmelin.\" 446f07718SMichael Gmelin.\" Redistribution and use in source and binary forms, with or without 546f07718SMichael Gmelin.\" modification, are permitted provided that the following conditions 646f07718SMichael Gmelin.\" are met: 746f07718SMichael Gmelin.\" 1. Redistributions of source code must retain the above copyright 846f07718SMichael Gmelin.\" notice, this list of conditions and the following disclaimer. 946f07718SMichael Gmelin.\" 2. Redistributions in binary form must reproduce the above copyright 1046f07718SMichael Gmelin.\" notice, this list of conditions and the following disclaimer in the 1146f07718SMichael Gmelin.\" documentation and/or other materials provided with the distribution. 1246f07718SMichael Gmelin.\" 1346f07718SMichael Gmelin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1446f07718SMichael Gmelin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1546f07718SMichael Gmelin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1646f07718SMichael Gmelin.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1746f07718SMichael Gmelin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1846f07718SMichael Gmelin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1946f07718SMichael Gmelin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2046f07718SMichael Gmelin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2146f07718SMichael Gmelin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2246f07718SMichael Gmelin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2346f07718SMichael Gmelin.\" SUCH DAMAGE. 2446f07718SMichael Gmelin.\" 25d4ee9420SAndriy Gapon.Dd December 18, 2018 2646f07718SMichael Gmelin.Dt CYAPA 4 2746f07718SMichael Gmelin.Os 2846f07718SMichael Gmelin.Sh NAME 2946f07718SMichael Gmelin.Nm cyapa 3046f07718SMichael Gmelin.Nd Cypress APA trackpad with I2C interface driver 3146f07718SMichael Gmelin.Sh SYNOPSIS 3246f07718SMichael GmelinTo compile this driver into the kernel, place the following lines into 3346f07718SMichael Gmelinthe kernel configuration file: 3446f07718SMichael Gmelin.Bd -ragged -offset indent 3546f07718SMichael Gmelin.Cd "device cyapa" 3646f07718SMichael Gmelin.Cd "device ig4" 37448897d3SAndriy Gapon.Cd "device iicbus" 3846f07718SMichael Gmelin.Ed 3946f07718SMichael Gmelin.Pp 4046f07718SMichael GmelinAlternatively, to load the driver as a module at boot time, place the following line in 4146f07718SMichael Gmelin.Xr loader.conf 5 : 4246f07718SMichael Gmelin.Bd -literal -offset indent 4346f07718SMichael Gmelincyapa_load="YES" 4446f07718SMichael Gmelinig4_load="YES" 4546f07718SMichael Gmelin.Ed 46448897d3SAndriy Gapon.Pp 47d4ee9420SAndriy GaponOn many Chromebook models this driver can be automatically configured with the 48d4ee9420SAndriy Gaponhelp of the 49d4ee9420SAndriy Gapon.Xr chromebook_platform 4 50d4ee9420SAndriy Gapondriver. 51d4ee9420SAndriy GaponAlternatively, the 52d4ee9420SAndriy Gapon.Nm 53d4ee9420SAndriy Gapondriver can be manually configured in 54448897d3SAndriy Gapon.Pa /boot/device.hints : 55448897d3SAndriy Gapon.Cd hint.cyapa.0.at="iicbus0" 56448897d3SAndriy Gapon.Cd hint.cyapa.0.addr="0xCE" 57448897d3SAndriy Gapon.Cd hint.cyapa.1.at="iicbus1" 58448897d3SAndriy Gapon.Cd hint.cyapa.1.addr="0xCE" 5946f07718SMichael Gmelin.Sh DESCRIPTION 6046f07718SMichael GmelinThe 6146f07718SMichael Gmelin.Nm 6246f07718SMichael Gmelindriver provides support for the Cypress APA trackpad. 6346f07718SMichael GmelinIt emulates the IntelliMouse PS/2 protocol. 6446f07718SMichael GmelinIt supports basic mouse ioctls, so that 6546f07718SMichael Gmelin.Xr moused 8 6646f07718SMichael Gmelinis supported properly. 6746f07718SMichael Gmelin.Ss Trackpad layout 6846f07718SMichael Gmelin.Bd -literal 6946f07718SMichael Gmelin 2/3 1/3 7046f07718SMichael Gmelin +--------------------+------------+ 7146f07718SMichael Gmelin | | Middle | 7246f07718SMichael Gmelin | | Button | 7346f07718SMichael Gmelin | Left | | 7446f07718SMichael Gmelin | Button +------------+ 7546f07718SMichael Gmelin | | Right | 7646f07718SMichael Gmelin | | Button | 7746f07718SMichael Gmelin +--------------------+............| 7846f07718SMichael Gmelin | Thumb/Button Area | 15% 7946f07718SMichael Gmelin +---------------------------------+ 8046f07718SMichael Gmelin.Ed 8146f07718SMichael Gmelin.Ss Trackpad features 8246f07718SMichael Gmelin.Bl -tag -width 8n 8346f07718SMichael Gmelin.It Va Two finger scrolling 8446f07718SMichael GmelinUse two fingers for Z axis scrolling. 8546f07718SMichael Gmelin.It Va Button down/second finger 8646f07718SMichael GmelinWhile one finger clicks and holds down the touchpad, the second finger can be 8746f07718SMichael Gmelinused to move the mouse cursor. 8846f07718SMichael GmelinThis can be useful for drawing or selecting text. 8946f07718SMichael Gmelin.It Va Thumb/Button area 9046f07718SMichael GmelinThe lower 15% of the trackpad will not affect the mouse cursor position. 9146f07718SMichael GmelinThis allows for high precision clicking, by controlling the cursor with the 9246f07718SMichael Gmelinindex finger and pushing/holding the pad down with the thumb. 9346f07718SMichael Gmelin.It Va Trackpad button 9446f07718SMichael GmelinPush physical button. 9546f07718SMichael GmelinThe left two thirds of the pad issues a LEFT button event. 9646f07718SMichael GmelinThe upper right corner issues a MIDDLE button event. 9746f07718SMichael GmelinThe lower right corner issues a RIGHT button. 9846f07718SMichael GmelinOptionally, tap to click can be enabled (see below). 9946f07718SMichael Gmelin.El 100448897d3SAndriy Gapon.Pp 101448897d3SAndriy GaponOn a system using 102448897d3SAndriy Gapon.Xr device.hints 5 , 103448897d3SAndriy Gaponthese values are configurable for 104448897d3SAndriy Gapon.Nm : 105448897d3SAndriy Gapon.Bl -tag -width "hint.cyapa.%d.addr" 106448897d3SAndriy Gapon.It Va hint.cyapa.%d.at 107448897d3SAndriy Gapontarget 108448897d3SAndriy Gapon.Xr iicbus 4 . 109448897d3SAndriy Gapon.It Va hint.cyapa.%d.addr 110448897d3SAndriy Gapon.Nm 111448897d3SAndriy Gaponi2c address on the 112448897d3SAndriy Gapon.Xr iicbus 4 . 113448897d3SAndriy Gapon.El 11446f07718SMichael Gmelin.Sh SYSCTL VARIABLES 11546f07718SMichael GmelinThese 11646f07718SMichael Gmelin.Xr sysctl 8 11746f07718SMichael Gmelinvariables are available: 11846f07718SMichael Gmelin.Bl -tag -width 8n 11946f07718SMichael Gmelin.It Va debug.cyapa_idle_freq 12046f07718SMichael GmelinScan frequency in idle mode, the default is 1. 12146f07718SMichael Gmelin.It Va debug.cyapa_slow_freq 12246f07718SMichael GmelinScan frequency in slow mode, the default is 20. 12346f07718SMichael Gmelin.It Va debug.cyapa_norm_freq 12446f07718SMichael GmelinScan frequency in normal mode, the default is 100. 12546f07718SMichael Gmelin.It Va debug.cyapa_minpressure 12646f07718SMichael GmelinMinimum pressure to detect a finger, the default is 12. 12746f07718SMichael Gmelin.It Va debug.cyapa_enable_tapclick 12846f07718SMichael GmelinControls tap to click. 12946f07718SMichael GmelinPossible values: 13046f07718SMichael Gmelin.Bl -tag -width 8n 13146f07718SMichael Gmelin.It 0 13246f07718SMichael GmelinTap to click is disabled. 13346f07718SMichael GmelinThis is the default value. 13446f07718SMichael Gmelin.It 1 13546f07718SMichael GmelinTap to click always generates a left mouse button event. 13646f07718SMichael Gmelin.It 2 13746f07718SMichael GmelinTap to click generates left mouse button event if the left 2/3rds of the pad 13846f07718SMichael Gmelinare tapped and a right mouse button event otherwise. 13946f07718SMichael Gmelin.It 3 14046f07718SMichael GmelinTap to click generates mouse button events as if the physical button was 14146f07718SMichael Gmelinpressed (see 14246f07718SMichael Gmelin.Sx DESCRIPTION 14346f07718SMichael Gmelinabove). 14446f07718SMichael Gmelin.El 14546f07718SMichael Gmelin.It Va debug.cyapa_tapclick_min_ticks 14646f07718SMichael GmelinMinimum tap duration in ticks to create a click, the default is 1. 14746f07718SMichael Gmelin.It Va debug.cyapa_tapclick_max_ticks 14846f07718SMichael GmelinMaximum tap duration in ticks to create a click, the default is 8. 14946f07718SMichael Gmelin.It Va debug.cyapa_move_min_ticks 15046f07718SMichael GmelinMinimum ticks before cursor movement occurs, the default is 4. 15146f07718SMichael Gmelin.It Va debug.cyapa_scroll_wait_ticks 15246f07718SMichael GmelinTicks to wait before starting to scroll, the default is 0. 15346f07718SMichael Gmelin.It Va debug.cyapa_scroll_stick_ticks 15446f07718SMichael GmelinTicks while preventing cursor movement on single finger after scroll, 15546f07718SMichael Gmelinthe default is 15. 15646f07718SMichael Gmelin.It Va debug.cyapa_thumbarea_percent 15746f07718SMichael GmelinSize of bottom thumb area in percent, the default is 15. 15846f07718SMichael Gmelin.It Va debug.cyapa_debug 15946f07718SMichael GmelinSetting this to a non-zero value enables debug output to console and syslog, 16046f07718SMichael Gmelinthe default is 0. 16146f07718SMichael Gmelin.It Va debug.cyapa_reset 16246f07718SMichael GmelinSetting this to a non-zero value reinitializes the device. 16346f07718SMichael GmelinThe sysctl resets to zero immediately. 16446f07718SMichael Gmelin.El 16546f07718SMichael Gmelin.Sh FILES 16646f07718SMichael Gmelin.Nm 16746f07718SMichael Gmelincreates 16846f07718SMichael Gmelin.Pa /dev/cyapa0 , 16946f07718SMichael Gmelinwhich presents the mouse as an 17046f07718SMichael Gmelin.Ar IntelliMouse PS/2 17146f07718SMichael Gmelindevice. 17246f07718SMichael GmelinIt supports 17346f07718SMichael Gmelin.Xr moused 8 17446f07718SMichael Gmelinlevels 0 through 2, level 1 is used by default. 17546f07718SMichael Gmelin.Sh EXAMPLES 17646f07718SMichael GmelinTo use 17746f07718SMichael Gmelin.Nm 17846f07718SMichael Gmelinwith 17946f07718SMichael Gmelin.Xr moused 8 , 18046f07718SMichael Gmelinadd the following lines to the 18146f07718SMichael Gmelin.Xr rc.conf 5 18246f07718SMichael Gmelinfile: 18346f07718SMichael Gmelin.Pp 18446f07718SMichael Gmelin.Dl moused_enable="YES" 18546f07718SMichael Gmelin.Dl moused_port="/dev/cyapa0" 18646f07718SMichael Gmelin.Pp 18746f07718SMichael GmelinIf vertical scrolling is not desired, add 18846f07718SMichael Gmelin.Pp 18946f07718SMichael Gmelin.Dl moused_flags="-l0" 19046f07718SMichael Gmelin.Pp 19146f07718SMichael Gmelinto 19246f07718SMichael Gmelin.Xr rc.conf 5 . 19346f07718SMichael Gmelin.Pp 19446f07718SMichael GmelinEnable tap to click for the left and the right mouse button and 19546f07718SMichael Gmelindisable the thumb area by adding these lines to the 19646f07718SMichael Gmelin.Xr sysctl.conf 5 19746f07718SMichael Gmelinfile: 19846f07718SMichael Gmelin.Pp 19946f07718SMichael Gmelin.Dl debug.cyapa_thumbarea_percent=0 20046f07718SMichael Gmelin.Dl debug.cyapa_enable_tapclick=2 20146f07718SMichael Gmelin.Sh SEE ALSO 202d4ee9420SAndriy Gapon.Xr chromebook_platform 4 , 20346f07718SMichael Gmelin.Xr ig4 4 , 204448897d3SAndriy Gapon.Xr iicbus 4 , 205225636dcSEdward Tomasz Napierala.Xr sysmouse 4 , 206225636dcSEdward Tomasz Napierala.Xr moused 8 20746f07718SMichael Gmelin.Sh AUTHORS 20846f07718SMichael Gmelin.An -nosplit 20946f07718SMichael GmelinThe original 21046f07718SMichael Gmelin.Nm 211*1cc60ae8SBenedict Reuschlingdriver was written for 212*1cc60ae8SBenedict Reuschling.Dx 213*1cc60ae8SBenedict Reuschlingby 21446f07718SMichael Gmelin.An Matthew Dillon . 21546f07718SMichael Gmelin.Pp 21646f07718SMichael GmelinIt has been ported, modified, and enhanced for 21746f07718SMichael Gmelin.Fx 21846f07718SMichael Gmelinby 21946f07718SMichael Gmelin.An Michael Gmelin Aq Mt freebsd@grem.de . 22046f07718SMichael Gmelin.Pp 22146f07718SMichael GmelinThis manual page was written by 22246f07718SMichael Gmelin.An Michael Gmelin Aq Mt freebsd@grem.de . 22346f07718SMichael Gmelin.Sh BUGS 22446f07718SMichael GmelinThe 22546f07718SMichael Gmelin.Nm 226448897d3SAndriy Gapondriver detects the device from the I2C address. 22746f07718SMichael GmelinThis might have unforeseen consequences if the initialization sequence 22846f07718SMichael Gmelinis sent to an unknown device at that address. 229