1*b08c118cSDmitry Torokhov.. include:: <isonum.txt>
2*b08c118cSDmitry Torokhov
3*b08c118cSDmitry Torokhov=================
4*b08c118cSDmitry TorokhovSentelic Touchpad
5*b08c118cSDmitry Torokhov=================
6*b08c118cSDmitry Torokhov
7*b08c118cSDmitry Torokhov
8*b08c118cSDmitry Torokhov:Copyright: |copy| 2002-2011 Sentelic Corporation.
9*b08c118cSDmitry Torokhov
10*b08c118cSDmitry Torokhov:Last update: Dec-07-2011
11*b08c118cSDmitry Torokhov
12*b08c118cSDmitry TorokhovFinger Sensing Pad Intellimouse Mode (scrolling wheel, 4th and 5th buttons)
13*b08c118cSDmitry Torokhov============================================================================
14*b08c118cSDmitry Torokhov
15*b08c118cSDmitry TorokhovA) MSID 4: Scrolling wheel mode plus Forward page(4th button) and Backward
16*b08c118cSDmitry Torokhov   page (5th button)
17*b08c118cSDmitry Torokhov
18*b08c118cSDmitry Torokhov1. Set sample rate to 200;
19*b08c118cSDmitry Torokhov2. Set sample rate to 200;
20*b08c118cSDmitry Torokhov3. Set sample rate to 80;
21*b08c118cSDmitry Torokhov4. Issuing the "Get device ID" command (0xF2) and waits for the response;
22*b08c118cSDmitry Torokhov5. FSP will respond 0x04.
23*b08c118cSDmitry Torokhov
24*b08c118cSDmitry Torokhov::
25*b08c118cSDmitry Torokhov
26*b08c118cSDmitry Torokhov    Packet 1
27*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
28*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
29*b08c118cSDmitry Torokhov      1   |Y|X|y|x|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 | | |B|F|W|W|W|W|
30*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
31*b08c118cSDmitry Torokhov
32*b08c118cSDmitry Torokhov    Byte 1: Bit7 => Y overflow
33*b08c118cSDmitry Torokhov	    Bit6 => X overflow
34*b08c118cSDmitry Torokhov	    Bit5 => Y sign bit
35*b08c118cSDmitry Torokhov	    Bit4 => X sign bit
36*b08c118cSDmitry Torokhov	    Bit3 => 1
37*b08c118cSDmitry Torokhov	    Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
38*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
39*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
40*b08c118cSDmitry Torokhov    Byte 2: X Movement(9-bit 2's complement integers)
41*b08c118cSDmitry Torokhov    Byte 3: Y Movement(9-bit 2's complement integers)
42*b08c118cSDmitry Torokhov    Byte 4: Bit3~Bit0 => the scrolling wheel's movement since the last data report.
43*b08c118cSDmitry Torokhov			valid values, -8 ~ +7
44*b08c118cSDmitry Torokhov	    Bit4 => 1 = 4th mouse button is pressed, Forward one page.
45*b08c118cSDmitry Torokhov		    0 = 4th mouse button is not pressed.
46*b08c118cSDmitry Torokhov	    Bit5 => 1 = 5th mouse button is pressed, Backward one page.
47*b08c118cSDmitry Torokhov		    0 = 5th mouse button is not pressed.
48*b08c118cSDmitry Torokhov
49*b08c118cSDmitry TorokhovB) MSID 6: Horizontal and Vertical scrolling
50*b08c118cSDmitry Torokhov
51*b08c118cSDmitry Torokhov- Set bit 1 in register 0x40 to 1
52*b08c118cSDmitry Torokhov
53*b08c118cSDmitry TorokhovFSP replaces scrolling wheel's movement as 4 bits to show horizontal and
54*b08c118cSDmitry Torokhovvertical scrolling.
55*b08c118cSDmitry Torokhov
56*b08c118cSDmitry Torokhov::
57*b08c118cSDmitry Torokhov
58*b08c118cSDmitry Torokhov    Packet 1
59*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
60*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
61*b08c118cSDmitry Torokhov      1   |Y|X|y|x|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 | | |B|F|r|l|u|d|
62*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
63*b08c118cSDmitry Torokhov
64*b08c118cSDmitry Torokhov    Byte 1: Bit7 => Y overflow
65*b08c118cSDmitry Torokhov	    Bit6 => X overflow
66*b08c118cSDmitry Torokhov	    Bit5 => Y sign bit
67*b08c118cSDmitry Torokhov	    Bit4 => X sign bit
68*b08c118cSDmitry Torokhov	    Bit3 => 1
69*b08c118cSDmitry Torokhov	    Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
70*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
71*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
72*b08c118cSDmitry Torokhov    Byte 2: X Movement(9-bit 2's complement integers)
73*b08c118cSDmitry Torokhov    Byte 3: Y Movement(9-bit 2's complement integers)
74*b08c118cSDmitry Torokhov    Byte 4: Bit0 => the Vertical scrolling movement downward.
75*b08c118cSDmitry Torokhov	    Bit1 => the Vertical scrolling movement upward.
76*b08c118cSDmitry Torokhov	    Bit2 => the Horizontal scrolling movement leftward.
77*b08c118cSDmitry Torokhov	    Bit3 => the Horizontal scrolling movement rightward.
78*b08c118cSDmitry Torokhov	    Bit4 => 1 = 4th mouse button is pressed, Forward one page.
79*b08c118cSDmitry Torokhov		    0 = 4th mouse button is not pressed.
80*b08c118cSDmitry Torokhov	    Bit5 => 1 = 5th mouse button is pressed, Backward one page.
81*b08c118cSDmitry Torokhov		    0 = 5th mouse button is not pressed.
82*b08c118cSDmitry Torokhov
83*b08c118cSDmitry TorokhovC) MSID 7
84*b08c118cSDmitry Torokhov
85*b08c118cSDmitry TorokhovFSP uses 2 packets (8 Bytes) to represent Absolute Position.
86*b08c118cSDmitry Torokhovso we have PACKET NUMBER to identify packets.
87*b08c118cSDmitry Torokhov
88*b08c118cSDmitry Torokhov  If PACKET NUMBER is 0, the packet is Packet 1.
89*b08c118cSDmitry Torokhov  If PACKET NUMBER is 1, the packet is Packet 2.
90*b08c118cSDmitry Torokhov  Please count this number in program.
91*b08c118cSDmitry Torokhov
92*b08c118cSDmitry TorokhovMSID6 special packet will be enable at the same time when enable MSID 7.
93*b08c118cSDmitry Torokhov
94*b08c118cSDmitry TorokhovAbsolute position for STL3886-G0
95*b08c118cSDmitry Torokhov================================
96*b08c118cSDmitry Torokhov
97*b08c118cSDmitry Torokhov1. Set bit 2 or 3 in register 0x40 to 1
98*b08c118cSDmitry Torokhov2. Set bit 6 in register 0x40 to 1
99*b08c118cSDmitry Torokhov
100*b08c118cSDmitry Torokhov::
101*b08c118cSDmitry Torokhov
102*b08c118cSDmitry Torokhov    Packet 1 (ABSOLUTE POSITION)
103*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
104*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
105*b08c118cSDmitry Torokhov      1   |0|1|V|1|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|d|u|X|X|Y|Y|
106*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
107*b08c118cSDmitry Torokhov
108*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
109*b08c118cSDmitry Torokhov		    => 01, Absolute coordination packet
110*b08c118cSDmitry Torokhov		    => 10, Notify packet
111*b08c118cSDmitry Torokhov	    Bit5 => valid bit
112*b08c118cSDmitry Torokhov	    Bit4 => 1
113*b08c118cSDmitry Torokhov	    Bit3 => 1
114*b08c118cSDmitry Torokhov	    Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
115*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
116*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
117*b08c118cSDmitry Torokhov    Byte 2: X coordinate (xpos[9:2])
118*b08c118cSDmitry Torokhov    Byte 3: Y coordinate (ypos[9:2])
119*b08c118cSDmitry Torokhov    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
120*b08c118cSDmitry Torokhov	    Bit3~Bit2 => X coordinate (ypos[1:0])
121*b08c118cSDmitry Torokhov	    Bit4 => scroll up
122*b08c118cSDmitry Torokhov	    Bit5 => scroll down
123*b08c118cSDmitry Torokhov	    Bit6 => scroll left
124*b08c118cSDmitry Torokhov	    Bit7 => scroll right
125*b08c118cSDmitry Torokhov
126*b08c118cSDmitry Torokhov    Notify Packet for G0
127*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
128*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
129*b08c118cSDmitry Torokhov      1   |1|0|0|1|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |M|M|M|M|M|M|M|M|  4 |0|0|0|0|0|0|0|0|
130*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
131*b08c118cSDmitry Torokhov
132*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
133*b08c118cSDmitry Torokhov		    => 01, Absolute coordination packet
134*b08c118cSDmitry Torokhov		    => 10, Notify packet
135*b08c118cSDmitry Torokhov	    Bit5 => 0
136*b08c118cSDmitry Torokhov	    Bit4 => 1
137*b08c118cSDmitry Torokhov	    Bit3 => 1
138*b08c118cSDmitry Torokhov	    Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
139*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
140*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
141*b08c118cSDmitry Torokhov    Byte 2: Message Type => 0x5A (Enable/Disable status packet)
142*b08c118cSDmitry Torokhov	    Mode Type => 0xA5 (Normal/Icon mode status)
143*b08c118cSDmitry Torokhov    Byte 3: Message Type => 0x00 (Disabled)
144*b08c118cSDmitry Torokhov			=> 0x01 (Enabled)
145*b08c118cSDmitry Torokhov	    Mode Type    => 0x00 (Normal)
146*b08c118cSDmitry Torokhov			=> 0x01 (Icon)
147*b08c118cSDmitry Torokhov    Byte 4: Bit7~Bit0 => Don't Care
148*b08c118cSDmitry Torokhov
149*b08c118cSDmitry TorokhovAbsolute position for STL3888-Ax
150*b08c118cSDmitry Torokhov================================
151*b08c118cSDmitry Torokhov
152*b08c118cSDmitry Torokhov::
153*b08c118cSDmitry Torokhov
154*b08c118cSDmitry Torokhov    Packet 1 (ABSOLUTE POSITION)
155*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
156*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
157*b08c118cSDmitry Torokhov      1   |0|1|V|A|1|L|0|1|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |x|x|y|y|X|X|Y|Y|
158*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
159*b08c118cSDmitry Torokhov
160*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
161*b08c118cSDmitry Torokhov		    => 01, Absolute coordination packet
162*b08c118cSDmitry Torokhov		    => 10, Notify packet
163*b08c118cSDmitry Torokhov		    => 11, Normal data packet with on-pad click
164*b08c118cSDmitry Torokhov	    Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
165*b08c118cSDmitry Torokhov		    When both fingers are up, the last two reports have zero valid
166*b08c118cSDmitry Torokhov		    bit.
167*b08c118cSDmitry Torokhov	    Bit4 => arc
168*b08c118cSDmitry Torokhov	    Bit3 => 1
169*b08c118cSDmitry Torokhov	    Bit2 => Left Button, 1 is pressed, 0 is released.
170*b08c118cSDmitry Torokhov	    Bit1 => 0
171*b08c118cSDmitry Torokhov	    Bit0 => 1
172*b08c118cSDmitry Torokhov    Byte 2: X coordinate (xpos[9:2])
173*b08c118cSDmitry Torokhov    Byte 3: Y coordinate (ypos[9:2])
174*b08c118cSDmitry Torokhov    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
175*b08c118cSDmitry Torokhov	    Bit3~Bit2 => X coordinate (ypos[1:0])
176*b08c118cSDmitry Torokhov	    Bit5~Bit4 => y1_g
177*b08c118cSDmitry Torokhov	    Bit7~Bit6 => x1_g
178*b08c118cSDmitry Torokhov
179*b08c118cSDmitry Torokhov    Packet 2 (ABSOLUTE POSITION)
180*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
181*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
182*b08c118cSDmitry Torokhov      1   |0|1|V|A|1|R|1|0|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |x|x|y|y|X|X|Y|Y|
183*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
184*b08c118cSDmitry Torokhov
185*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
186*b08c118cSDmitry Torokhov		    => 01, Absolute coordinates packet
187*b08c118cSDmitry Torokhov		    => 10, Notify packet
188*b08c118cSDmitry Torokhov		    => 11, Normal data packet with on-pad click
189*b08c118cSDmitry Torokhov	    Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
190*b08c118cSDmitry Torokhov		    When both fingers are up, the last two reports have zero valid
191*b08c118cSDmitry Torokhov		    bit.
192*b08c118cSDmitry Torokhov	    Bit4 => arc
193*b08c118cSDmitry Torokhov	    Bit3 => 1
194*b08c118cSDmitry Torokhov	    Bit2 => Right Button, 1 is pressed, 0 is released.
195*b08c118cSDmitry Torokhov	    Bit1 => 1
196*b08c118cSDmitry Torokhov	    Bit0 => 0
197*b08c118cSDmitry Torokhov    Byte 2: X coordinate (xpos[9:2])
198*b08c118cSDmitry Torokhov    Byte 3: Y coordinate (ypos[9:2])
199*b08c118cSDmitry Torokhov    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
200*b08c118cSDmitry Torokhov	    Bit3~Bit2 => X coordinate (ypos[1:0])
201*b08c118cSDmitry Torokhov	    Bit5~Bit4 => y2_g
202*b08c118cSDmitry Torokhov	    Bit7~Bit6 => x2_g
203*b08c118cSDmitry Torokhov
204*b08c118cSDmitry Torokhov    Notify Packet for STL3888-Ax
205*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
206*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
207*b08c118cSDmitry Torokhov      1   |1|0|1|P|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |0|0|F|F|0|0|0|i|  4 |r|l|d|u|0|0|0|0|
208*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
209*b08c118cSDmitry Torokhov
210*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
211*b08c118cSDmitry Torokhov		    => 01, Absolute coordinates packet
212*b08c118cSDmitry Torokhov		    => 10, Notify packet
213*b08c118cSDmitry Torokhov		    => 11, Normal data packet with on-pad click
214*b08c118cSDmitry Torokhov	    Bit5 => 1
215*b08c118cSDmitry Torokhov	    Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
216*b08c118cSDmitry Torokhov		    0: left button is generated by the on-pad command
217*b08c118cSDmitry Torokhov		    1: left button is generated by the external button
218*b08c118cSDmitry Torokhov	    Bit3 => 1
219*b08c118cSDmitry Torokhov	    Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
220*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
221*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
222*b08c118cSDmitry Torokhov    Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
223*b08c118cSDmitry Torokhov    Byte 3: Bit7~Bit6 => Don't care
224*b08c118cSDmitry Torokhov	    Bit5~Bit4 => Number of fingers
225*b08c118cSDmitry Torokhov	    Bit3~Bit1 => Reserved
226*b08c118cSDmitry Torokhov	    Bit0 => 1: enter gesture mode; 0: leaving gesture mode
227*b08c118cSDmitry Torokhov    Byte 4: Bit7 => scroll right button
228*b08c118cSDmitry Torokhov	    Bit6 => scroll left button
229*b08c118cSDmitry Torokhov	    Bit5 => scroll down button
230*b08c118cSDmitry Torokhov	    Bit4 => scroll up button
231*b08c118cSDmitry Torokhov		* Note that if gesture and additional button (Bit4~Bit7)
232*b08c118cSDmitry Torokhov		happen at the same time, the button information will not
233*b08c118cSDmitry Torokhov		be sent.
234*b08c118cSDmitry Torokhov	    Bit3~Bit0 => Reserved
235*b08c118cSDmitry Torokhov
236*b08c118cSDmitry TorokhovSample sequence of Multi-finger, Multi-coordinate mode:
237*b08c118cSDmitry Torokhov
238*b08c118cSDmitry Torokhov	notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
239*b08c118cSDmitry Torokhov	abs pkt 2, ..., notify packet (valid bit == 0)
240*b08c118cSDmitry Torokhov
241*b08c118cSDmitry TorokhovAbsolute position for STL3888-B0
242*b08c118cSDmitry Torokhov================================
243*b08c118cSDmitry Torokhov
244*b08c118cSDmitry Torokhov::
245*b08c118cSDmitry Torokhov
246*b08c118cSDmitry Torokhov    Packet 1(ABSOLUTE POSITION)
247*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
248*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
249*b08c118cSDmitry Torokhov      1   |0|1|V|F|1|0|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|u|d|X|X|Y|Y|
250*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
251*b08c118cSDmitry Torokhov
252*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
253*b08c118cSDmitry Torokhov		    => 01, Absolute coordinates packet
254*b08c118cSDmitry Torokhov		    => 10, Notify packet
255*b08c118cSDmitry Torokhov		    => 11, Normal data packet with on-pad click
256*b08c118cSDmitry Torokhov	    Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
257*b08c118cSDmitry Torokhov		    When both fingers are up, the last two reports have zero valid
258*b08c118cSDmitry Torokhov		    bit.
259*b08c118cSDmitry Torokhov	    Bit4 => finger up/down information. 1: finger down, 0: finger up.
260*b08c118cSDmitry Torokhov	    Bit3 => 1
261*b08c118cSDmitry Torokhov	    Bit2 => finger index, 0 is the first finger, 1 is the second finger.
262*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
263*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
264*b08c118cSDmitry Torokhov    Byte 2: X coordinate (xpos[9:2])
265*b08c118cSDmitry Torokhov    Byte 3: Y coordinate (ypos[9:2])
266*b08c118cSDmitry Torokhov    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
267*b08c118cSDmitry Torokhov	    Bit3~Bit2 => X coordinate (ypos[1:0])
268*b08c118cSDmitry Torokhov	    Bit4 => scroll down button
269*b08c118cSDmitry Torokhov	    Bit5 => scroll up button
270*b08c118cSDmitry Torokhov	    Bit6 => scroll left button
271*b08c118cSDmitry Torokhov	    Bit7 => scroll right button
272*b08c118cSDmitry Torokhov
273*b08c118cSDmitry Torokhov    Packet 2 (ABSOLUTE POSITION)
274*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
275*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
276*b08c118cSDmitry Torokhov      1   |0|1|V|F|1|1|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|u|d|X|X|Y|Y|
277*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
278*b08c118cSDmitry Torokhov
279*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
280*b08c118cSDmitry Torokhov		    => 01, Absolute coordination packet
281*b08c118cSDmitry Torokhov		    => 10, Notify packet
282*b08c118cSDmitry Torokhov		    => 11, Normal data packet with on-pad click
283*b08c118cSDmitry Torokhov	    Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
284*b08c118cSDmitry Torokhov		    When both fingers are up, the last two reports have zero valid
285*b08c118cSDmitry Torokhov		    bit.
286*b08c118cSDmitry Torokhov	    Bit4 => finger up/down information. 1: finger down, 0: finger up.
287*b08c118cSDmitry Torokhov	    Bit3 => 1
288*b08c118cSDmitry Torokhov	    Bit2 => finger index, 0 is the first finger, 1 is the second finger.
289*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
290*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
291*b08c118cSDmitry Torokhov    Byte 2: X coordinate (xpos[9:2])
292*b08c118cSDmitry Torokhov    Byte 3: Y coordinate (ypos[9:2])
293*b08c118cSDmitry Torokhov    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
294*b08c118cSDmitry Torokhov	    Bit3~Bit2 => X coordinate (ypos[1:0])
295*b08c118cSDmitry Torokhov	    Bit4 => scroll down button
296*b08c118cSDmitry Torokhov	    Bit5 => scroll up button
297*b08c118cSDmitry Torokhov	    Bit6 => scroll left button
298*b08c118cSDmitry Torokhov	    Bit7 => scroll right button
299*b08c118cSDmitry Torokhov
300*b08c118cSDmitry TorokhovNotify Packet for STL3888-B0::
301*b08c118cSDmitry Torokhov
302*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
303*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
304*b08c118cSDmitry Torokhov      1   |1|0|1|P|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |0|0|F|F|0|0|0|i|  4 |r|l|u|d|0|0|0|0|
305*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
306*b08c118cSDmitry Torokhov
307*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
308*b08c118cSDmitry Torokhov		    => 01, Absolute coordination packet
309*b08c118cSDmitry Torokhov		    => 10, Notify packet
310*b08c118cSDmitry Torokhov		    => 11, Normal data packet with on-pad click
311*b08c118cSDmitry Torokhov	    Bit5 => 1
312*b08c118cSDmitry Torokhov	    Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
313*b08c118cSDmitry Torokhov		    0: left button is generated by the on-pad command
314*b08c118cSDmitry Torokhov		    1: left button is generated by the external button
315*b08c118cSDmitry Torokhov	    Bit3 => 1
316*b08c118cSDmitry Torokhov	    Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
317*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
318*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
319*b08c118cSDmitry Torokhov    Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
320*b08c118cSDmitry Torokhov    Byte 3: Bit7~Bit6 => Don't care
321*b08c118cSDmitry Torokhov	    Bit5~Bit4 => Number of fingers
322*b08c118cSDmitry Torokhov	    Bit3~Bit1 => Reserved
323*b08c118cSDmitry Torokhov	    Bit0 => 1: enter gesture mode; 0: leaving gesture mode
324*b08c118cSDmitry Torokhov    Byte 4: Bit7 => scroll right button
325*b08c118cSDmitry Torokhov	    Bit6 => scroll left button
326*b08c118cSDmitry Torokhov	    Bit5 => scroll up button
327*b08c118cSDmitry Torokhov	    Bit4 => scroll down button
328*b08c118cSDmitry Torokhov		* Note that if gesture and additional button(Bit4~Bit7)
329*b08c118cSDmitry Torokhov		happen at the same time, the button information will not
330*b08c118cSDmitry Torokhov		be sent.
331*b08c118cSDmitry Torokhov	    Bit3~Bit0 => Reserved
332*b08c118cSDmitry Torokhov
333*b08c118cSDmitry TorokhovSample sequence of Multi-finger, Multi-coordinate mode:
334*b08c118cSDmitry Torokhov
335*b08c118cSDmitry Torokhov	notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
336*b08c118cSDmitry Torokhov	abs pkt 2, ..., notify packet (valid bit == 0)
337*b08c118cSDmitry Torokhov
338*b08c118cSDmitry TorokhovAbsolute position for STL3888-Cx and STL3888-Dx
339*b08c118cSDmitry Torokhov===============================================
340*b08c118cSDmitry Torokhov
341*b08c118cSDmitry Torokhov::
342*b08c118cSDmitry Torokhov
343*b08c118cSDmitry Torokhov    Single Finger, Absolute Coordinate Mode (SFAC)
344*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
345*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
346*b08c118cSDmitry Torokhov      1   |0|1|0|P|1|M|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|B|F|X|X|Y|Y|
347*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
348*b08c118cSDmitry Torokhov
349*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
350*b08c118cSDmitry Torokhov		    => 01, Absolute coordinates packet
351*b08c118cSDmitry Torokhov		    => 10, Notify packet
352*b08c118cSDmitry Torokhov	    Bit5 => Coordinate mode(always 0 in SFAC mode):
353*b08c118cSDmitry Torokhov		    0: single-finger absolute coordinates (SFAC) mode
354*b08c118cSDmitry Torokhov		    1: multi-finger, multiple coordinates (MFMC) mode
355*b08c118cSDmitry Torokhov	    Bit4 => 0: The LEFT button is generated by on-pad command (OPC)
356*b08c118cSDmitry Torokhov		    1: The LEFT button is generated by external button
357*b08c118cSDmitry Torokhov		    Default is 1 even if the LEFT button is not pressed.
358*b08c118cSDmitry Torokhov	    Bit3 => Always 1, as specified by PS/2 protocol.
359*b08c118cSDmitry Torokhov	    Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
360*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
361*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
362*b08c118cSDmitry Torokhov    Byte 2: X coordinate (xpos[9:2])
363*b08c118cSDmitry Torokhov    Byte 3: Y coordinate (ypos[9:2])
364*b08c118cSDmitry Torokhov    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
365*b08c118cSDmitry Torokhov	    Bit3~Bit2 => X coordinate (ypos[1:0])
366*b08c118cSDmitry Torokhov	    Bit4 => 4th mouse button(forward one page)
367*b08c118cSDmitry Torokhov	    Bit5 => 5th mouse button(backward one page)
368*b08c118cSDmitry Torokhov	    Bit6 => scroll left button
369*b08c118cSDmitry Torokhov	    Bit7 => scroll right button
370*b08c118cSDmitry Torokhov
371*b08c118cSDmitry Torokhov    Multi Finger, Multiple Coordinates Mode (MFMC):
372*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
373*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
374*b08c118cSDmitry Torokhov      1   |0|1|1|P|1|F|R|L|  2  |X|X|X|X|X|X|X|X|  3 |Y|Y|Y|Y|Y|Y|Y|Y|  4 |r|l|B|F|X|X|Y|Y|
375*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
376*b08c118cSDmitry Torokhov
377*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
378*b08c118cSDmitry Torokhov		    => 01, Absolute coordination packet
379*b08c118cSDmitry Torokhov		    => 10, Notify packet
380*b08c118cSDmitry Torokhov	    Bit5 => Coordinate mode (always 1 in MFMC mode):
381*b08c118cSDmitry Torokhov		    0: single-finger absolute coordinates (SFAC) mode
382*b08c118cSDmitry Torokhov		    1: multi-finger, multiple coordinates (MFMC) mode
383*b08c118cSDmitry Torokhov	    Bit4 => 0: The LEFT button is generated by on-pad command (OPC)
384*b08c118cSDmitry Torokhov		    1: The LEFT button is generated by external button
385*b08c118cSDmitry Torokhov		    Default is 1 even if the LEFT button is not pressed.
386*b08c118cSDmitry Torokhov	    Bit3 => Always 1, as specified by PS/2 protocol.
387*b08c118cSDmitry Torokhov	    Bit2 => Finger index, 0 is the first finger, 1 is the second finger.
388*b08c118cSDmitry Torokhov		    If bit 1 and 0 are all 1 and bit 4 is 0, the middle external
389*b08c118cSDmitry Torokhov		    button is pressed.
390*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
391*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
392*b08c118cSDmitry Torokhov    Byte 2: X coordinate (xpos[9:2])
393*b08c118cSDmitry Torokhov    Byte 3: Y coordinate (ypos[9:2])
394*b08c118cSDmitry Torokhov    Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
395*b08c118cSDmitry Torokhov	    Bit3~Bit2 => X coordinate (ypos[1:0])
396*b08c118cSDmitry Torokhov	    Bit4 => 4th mouse button(forward one page)
397*b08c118cSDmitry Torokhov	    Bit5 => 5th mouse button(backward one page)
398*b08c118cSDmitry Torokhov	    Bit6 => scroll left button
399*b08c118cSDmitry Torokhov	    Bit7 => scroll right button
400*b08c118cSDmitry Torokhov
401*b08c118cSDmitry TorokhovWhen one of the two fingers is up, the device will output four consecutive
402*b08c118cSDmitry TorokhovMFMC#0 report packets with zero X and Y to represent 1st finger is up or
403*b08c118cSDmitry Torokhovfour consecutive MFMC#1 report packets with zero X and Y to represent that
404*b08c118cSDmitry Torokhovthe 2nd finger is up.  On the other hand, if both fingers are up, the device
405*b08c118cSDmitry Torokhovwill output four consecutive single-finger, absolute coordinate(SFAC) packets
406*b08c118cSDmitry Torokhovwith zero X and Y.
407*b08c118cSDmitry Torokhov
408*b08c118cSDmitry TorokhovNotify Packet for STL3888-Cx/Dx::
409*b08c118cSDmitry Torokhov
410*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
411*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
412*b08c118cSDmitry Torokhov      1   |1|0|0|P|1|M|R|L|  2  |C|C|C|C|C|C|C|C|  3 |0|0|F|F|0|0|0|i|  4 |r|l|u|d|0|0|0|0|
413*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
414*b08c118cSDmitry Torokhov
415*b08c118cSDmitry Torokhov    Byte 1: Bit7~Bit6 => 00, Normal data packet
416*b08c118cSDmitry Torokhov		    => 01, Absolute coordinates packet
417*b08c118cSDmitry Torokhov		    => 10, Notify packet
418*b08c118cSDmitry Torokhov	    Bit5 => Always 0
419*b08c118cSDmitry Torokhov	    Bit4 => 0: The LEFT button is generated by on-pad command(OPC)
420*b08c118cSDmitry Torokhov		    1: The LEFT button is generated by external button
421*b08c118cSDmitry Torokhov		    Default is 1 even if the LEFT button is not pressed.
422*b08c118cSDmitry Torokhov	    Bit3 => 1
423*b08c118cSDmitry Torokhov	    Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
424*b08c118cSDmitry Torokhov	    Bit1 => Right Button, 1 is pressed, 0 is not pressed.
425*b08c118cSDmitry Torokhov	    Bit0 => Left Button, 1 is pressed, 0 is not pressed.
426*b08c118cSDmitry Torokhov    Byte 2: Message type:
427*b08c118cSDmitry Torokhov	    0xba => gesture information
428*b08c118cSDmitry Torokhov	    0xc0 => one finger hold-rotating gesture
429*b08c118cSDmitry Torokhov    Byte 3: The first parameter for the received message:
430*b08c118cSDmitry Torokhov	    0xba => gesture ID (refer to the 'Gesture ID' section)
431*b08c118cSDmitry Torokhov	    0xc0 => region ID
432*b08c118cSDmitry Torokhov    Byte 4: The second parameter for the received message:
433*b08c118cSDmitry Torokhov	    0xba => N/A
434*b08c118cSDmitry Torokhov	    0xc0 => finger up/down information
435*b08c118cSDmitry Torokhov
436*b08c118cSDmitry TorokhovSample sequence of Multi-finger, Multi-coordinates mode:
437*b08c118cSDmitry Torokhov
438*b08c118cSDmitry Torokhov	notify packet (valid bit == 1), MFMC packet 1 (byte 1, bit 2 == 0),
439*b08c118cSDmitry Torokhov	MFMC packet 2 (byte 1, bit 2 == 1), MFMC packet 1, MFMC packet 2,
440*b08c118cSDmitry Torokhov	..., notify packet (valid bit == 0)
441*b08c118cSDmitry Torokhov
442*b08c118cSDmitry Torokhov	That is, when the device is in MFMC mode, the host will receive
443*b08c118cSDmitry Torokhov	interleaved absolute coordinate packets for each finger.
444*b08c118cSDmitry Torokhov
445*b08c118cSDmitry TorokhovFSP Enable/Disable packet
446*b08c118cSDmitry Torokhov=========================
447*b08c118cSDmitry Torokhov
448*b08c118cSDmitry Torokhov::
449*b08c118cSDmitry Torokhov
450*b08c118cSDmitry Torokhov    Bit 7 6 5 4 3 2 1 0       7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0      7 6 5 4 3 2 1 0
451*b08c118cSDmitry Torokhov    BYTE  |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
452*b08c118cSDmitry Torokhov      1   |Y|X|0|0|1|M|R|L|  2  |0|1|0|1|1|0|1|E|  3 | | | | | | | | |  4 | | | | | | | | |
453*b08c118cSDmitry Torokhov	  |---------------|     |---------------|    |---------------|    |---------------|
454*b08c118cSDmitry Torokhov
455*b08c118cSDmitry Torokhov    FSP will send out enable/disable packet when FSP receive PS/2 enable/disable
456*b08c118cSDmitry Torokhov    command. Host will receive the packet which Middle, Right, Left button will
457*b08c118cSDmitry Torokhov    be set. The packet only use byte 0 and byte 1 as a pattern of original packet.
458*b08c118cSDmitry Torokhov    Ignore the other bytes of the packet.
459*b08c118cSDmitry Torokhov
460*b08c118cSDmitry Torokhov    Byte 1: Bit7 => 0, Y overflow
461*b08c118cSDmitry Torokhov	    Bit6 => 0, X overflow
462*b08c118cSDmitry Torokhov	    Bit5 => 0, Y sign bit
463*b08c118cSDmitry Torokhov	    Bit4 => 0, X sign bit
464*b08c118cSDmitry Torokhov	    Bit3 => 1
465*b08c118cSDmitry Torokhov	    Bit2 => 1, Middle Button
466*b08c118cSDmitry Torokhov	    Bit1 => 1, Right Button
467*b08c118cSDmitry Torokhov	    Bit0 => 1, Left Button
468*b08c118cSDmitry Torokhov    Byte 2: Bit7~1 => (0101101b)
469*b08c118cSDmitry Torokhov	    Bit0 => 1 = Enable
470*b08c118cSDmitry Torokhov		    0 = Disable
471*b08c118cSDmitry Torokhov    Byte 3: Don't care
472*b08c118cSDmitry Torokhov    Byte 4: Don't care (MOUSE ID 3, 4)
473*b08c118cSDmitry Torokhov    Byte 5~8: Don't care (Absolute packet)
474*b08c118cSDmitry Torokhov
475*b08c118cSDmitry TorokhovPS/2 Command Set
476*b08c118cSDmitry Torokhov================
477*b08c118cSDmitry Torokhov
478*b08c118cSDmitry TorokhovFSP supports basic PS/2 commanding set and modes, refer to following URL for
479*b08c118cSDmitry Torokhovdetails about PS/2 commands:
480*b08c118cSDmitry Torokhov
481*b08c118cSDmitry Torokhovhttp://www.computer-engineering.org/ps2mouse/
482*b08c118cSDmitry Torokhov
483*b08c118cSDmitry TorokhovProgramming Sequence for Determining Packet Parsing Flow
484*b08c118cSDmitry Torokhov========================================================
485*b08c118cSDmitry Torokhov
486*b08c118cSDmitry Torokhov1. Identify FSP by reading device ID(0x00) and version(0x01) register
487*b08c118cSDmitry Torokhov
488*b08c118cSDmitry Torokhov2. For FSP version < STL3888 Cx, determine number of buttons by reading
489*b08c118cSDmitry Torokhov   the 'test mode status' (0x20) register::
490*b08c118cSDmitry Torokhov
491*b08c118cSDmitry Torokhov	buttons = reg[0x20] & 0x30
492*b08c118cSDmitry Torokhov
493*b08c118cSDmitry Torokhov	if buttons == 0x30 or buttons == 0x20:
494*b08c118cSDmitry Torokhov		# two/four buttons
495*b08c118cSDmitry Torokhov		Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
496*b08c118cSDmitry Torokhov		section A for packet parsing detail(ignore byte 4, bit ~ 7)
497*b08c118cSDmitry Torokhov	elif buttons == 0x10:
498*b08c118cSDmitry Torokhov		# 6 buttons
499*b08c118cSDmitry Torokhov		Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
500*b08c118cSDmitry Torokhov		section B for packet parsing detail
501*b08c118cSDmitry Torokhov	elif buttons == 0x00:
502*b08c118cSDmitry Torokhov		# 6 buttons
503*b08c118cSDmitry Torokhov		Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
504*b08c118cSDmitry Torokhov		section A for packet parsing detail
505*b08c118cSDmitry Torokhov
506*b08c118cSDmitry Torokhov3. For FSP version >= STL3888 Cx:
507*b08c118cSDmitry Torokhov	Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
508*b08c118cSDmitry Torokhov	section A for packet parsing detail (ignore byte 4, bit ~ 7)
509*b08c118cSDmitry Torokhov
510*b08c118cSDmitry TorokhovProgramming Sequence for Register Reading/Writing
511*b08c118cSDmitry Torokhov=================================================
512*b08c118cSDmitry Torokhov
513*b08c118cSDmitry TorokhovRegister inversion requirement:
514*b08c118cSDmitry Torokhov
515*b08c118cSDmitry TorokhovFollowing values needed to be inverted(the '~' operator in C) before being
516*b08c118cSDmitry Torokhovsent to FSP::
517*b08c118cSDmitry Torokhov
518*b08c118cSDmitry Torokhov	0xe8, 0xe9, 0xee, 0xf2, 0xf3 and 0xff.
519*b08c118cSDmitry Torokhov
520*b08c118cSDmitry TorokhovRegister swapping requirement:
521*b08c118cSDmitry Torokhov
522*b08c118cSDmitry TorokhovFollowing values needed to have their higher 4 bits and lower 4 bits being
523*b08c118cSDmitry Torokhovswapped before being sent to FSP::
524*b08c118cSDmitry Torokhov
525*b08c118cSDmitry Torokhov	10, 20, 40, 60, 80, 100 and 200.
526*b08c118cSDmitry Torokhov
527*b08c118cSDmitry TorokhovRegister reading sequence:
528*b08c118cSDmitry Torokhov
529*b08c118cSDmitry Torokhov	1. send 0xf3 PS/2 command to FSP;
530*b08c118cSDmitry Torokhov
531*b08c118cSDmitry Torokhov	2. send 0x66 PS/2 command to FSP;
532*b08c118cSDmitry Torokhov
533*b08c118cSDmitry Torokhov	3. send 0x88 PS/2 command to FSP;
534*b08c118cSDmitry Torokhov
535*b08c118cSDmitry Torokhov	4. send 0xf3 PS/2 command to FSP;
536*b08c118cSDmitry Torokhov
537*b08c118cSDmitry Torokhov	5. if the register address being to read is not required to be
538*b08c118cSDmitry Torokhov	inverted(refer to the 'Register inversion requirement' section),
539*b08c118cSDmitry Torokhov	goto step 6
540*b08c118cSDmitry Torokhov
541*b08c118cSDmitry Torokhov	  a. send 0x68 PS/2 command to FSP;
542*b08c118cSDmitry Torokhov
543*b08c118cSDmitry Torokhov	  b. send the inverted register address to FSP and goto step 8;
544*b08c118cSDmitry Torokhov
545*b08c118cSDmitry Torokhov	6. if the register address being to read is not required to be
546*b08c118cSDmitry Torokhov	swapped(refer to the 'Register swapping requirement' section),
547*b08c118cSDmitry Torokhov	goto step 7
548*b08c118cSDmitry Torokhov
549*b08c118cSDmitry Torokhov	  a. send 0xcc PS/2 command to FSP;
550*b08c118cSDmitry Torokhov
551*b08c118cSDmitry Torokhov	  b. send the swapped register address to FSP and goto step 8;
552*b08c118cSDmitry Torokhov
553*b08c118cSDmitry Torokhov	7. send 0x66 PS/2 command to FSP;
554*b08c118cSDmitry Torokhov
555*b08c118cSDmitry Torokhov	  a. send the original register address to FSP and goto step 8;
556*b08c118cSDmitry Torokhov
557*b08c118cSDmitry Torokhov	8. send 0xe9(status request) PS/2 command to FSP;
558*b08c118cSDmitry Torokhov
559*b08c118cSDmitry Torokhov	9. the 4th byte of the response read from FSP should be the
560*b08c118cSDmitry Torokhov	requested register value(?? indicates don't care byte)::
561*b08c118cSDmitry Torokhov
562*b08c118cSDmitry Torokhov		host: 0xe9
563*b08c118cSDmitry Torokhov		3888: 0xfa (??) (??) (val)
564*b08c118cSDmitry Torokhov
565*b08c118cSDmitry Torokhov	* Note that since the Cx release, the hardware will return 1's
566*b08c118cSDmitry Torokhov	  complement of the register value at the 3rd byte of status request
567*b08c118cSDmitry Torokhov	  result::
568*b08c118cSDmitry Torokhov
569*b08c118cSDmitry Torokhov		host: 0xe9
570*b08c118cSDmitry Torokhov		3888: 0xfa (??) (~val) (val)
571*b08c118cSDmitry Torokhov
572*b08c118cSDmitry TorokhovRegister writing sequence:
573*b08c118cSDmitry Torokhov
574*b08c118cSDmitry Torokhov	1. send 0xf3 PS/2 command to FSP;
575*b08c118cSDmitry Torokhov
576*b08c118cSDmitry Torokhov	2. if the register address being to write is not required to be
577*b08c118cSDmitry Torokhov	inverted(refer to the 'Register inversion requirement' section),
578*b08c118cSDmitry Torokhov	goto step 3
579*b08c118cSDmitry Torokhov
580*b08c118cSDmitry Torokhov	  a. send 0x74 PS/2 command to FSP;
581*b08c118cSDmitry Torokhov
582*b08c118cSDmitry Torokhov	  b. send the inverted register address to FSP and goto step 5;
583*b08c118cSDmitry Torokhov
584*b08c118cSDmitry Torokhov	3. if the register address being to write is not required to be
585*b08c118cSDmitry Torokhov	swapped(refer to the 'Register swapping requirement' section),
586*b08c118cSDmitry Torokhov	goto step 4
587*b08c118cSDmitry Torokhov
588*b08c118cSDmitry Torokhov	  a. send 0x77 PS/2 command to FSP;
589*b08c118cSDmitry Torokhov
590*b08c118cSDmitry Torokhov	  b. send the swapped register address to FSP and goto step 5;
591*b08c118cSDmitry Torokhov
592*b08c118cSDmitry Torokhov	4. send 0x55 PS/2 command to FSP;
593*b08c118cSDmitry Torokhov
594*b08c118cSDmitry Torokhov	  a. send the register address to FSP and goto step 5;
595*b08c118cSDmitry Torokhov
596*b08c118cSDmitry Torokhov	5. send 0xf3 PS/2 command to FSP;
597*b08c118cSDmitry Torokhov
598*b08c118cSDmitry Torokhov	6. if the register value being to write is not required to be
599*b08c118cSDmitry Torokhov	inverted(refer to the 'Register inversion requirement' section),
600*b08c118cSDmitry Torokhov	goto step 7
601*b08c118cSDmitry Torokhov
602*b08c118cSDmitry Torokhov	  a. send 0x47 PS/2 command to FSP;
603*b08c118cSDmitry Torokhov
604*b08c118cSDmitry Torokhov	  b. send the inverted register value to FSP and goto step 9;
605*b08c118cSDmitry Torokhov
606*b08c118cSDmitry Torokhov	7. if the register value being to write is not required to be
607*b08c118cSDmitry Torokhov	swapped(refer to the 'Register swapping requirement' section),
608*b08c118cSDmitry Torokhov	goto step 8
609*b08c118cSDmitry Torokhov
610*b08c118cSDmitry Torokhov	  a. send 0x44 PS/2 command to FSP;
611*b08c118cSDmitry Torokhov
612*b08c118cSDmitry Torokhov	  b. send the swapped register value to FSP and goto step 9;
613*b08c118cSDmitry Torokhov
614*b08c118cSDmitry Torokhov	8. send 0x33 PS/2 command to FSP;
615*b08c118cSDmitry Torokhov
616*b08c118cSDmitry Torokhov	  a. send the register value to FSP;
617*b08c118cSDmitry Torokhov
618*b08c118cSDmitry Torokhov	9. the register writing sequence is completed.
619*b08c118cSDmitry Torokhov
620*b08c118cSDmitry Torokhov	* Since the Cx release, the hardware will return 1's
621*b08c118cSDmitry Torokhov	  complement of the register value at the 3rd byte of status request
622*b08c118cSDmitry Torokhov	  result. Host can optionally send another 0xe9 (status request) PS/2
623*b08c118cSDmitry Torokhov	  command to FSP at the end of register writing to verify that the
624*b08c118cSDmitry Torokhov	  register writing operation is successful (?? indicates don't care
625*b08c118cSDmitry Torokhov	  byte)::
626*b08c118cSDmitry Torokhov
627*b08c118cSDmitry Torokhov		host: 0xe9
628*b08c118cSDmitry Torokhov		3888: 0xfa (??) (~val) (val)
629*b08c118cSDmitry Torokhov
630*b08c118cSDmitry TorokhovProgramming Sequence for Page Register Reading/Writing
631*b08c118cSDmitry Torokhov======================================================
632*b08c118cSDmitry Torokhov
633*b08c118cSDmitry TorokhovIn order to overcome the limitation of maximum number of registers
634*b08c118cSDmitry Torokhovsupported, the hardware separates register into different groups called
635*b08c118cSDmitry Torokhov'pages.' Each page is able to include up to 255 registers.
636*b08c118cSDmitry Torokhov
637*b08c118cSDmitry TorokhovThe default page after power up is 0x82; therefore, if one has to get
638*b08c118cSDmitry Torokhovaccess to register 0x8301, one has to use following sequence to switch
639*b08c118cSDmitry Torokhovto page 0x83, then start reading/writing from/to offset 0x01 by using
640*b08c118cSDmitry Torokhovthe register read/write sequence described in previous section.
641*b08c118cSDmitry Torokhov
642*b08c118cSDmitry TorokhovPage register reading sequence:
643*b08c118cSDmitry Torokhov
644*b08c118cSDmitry Torokhov	1. send 0xf3 PS/2 command to FSP;
645*b08c118cSDmitry Torokhov
646*b08c118cSDmitry Torokhov	2. send 0x66 PS/2 command to FSP;
647*b08c118cSDmitry Torokhov
648*b08c118cSDmitry Torokhov	3. send 0x88 PS/2 command to FSP;
649*b08c118cSDmitry Torokhov
650*b08c118cSDmitry Torokhov	4. send 0xf3 PS/2 command to FSP;
651*b08c118cSDmitry Torokhov
652*b08c118cSDmitry Torokhov	5. send 0x83 PS/2 command to FSP;
653*b08c118cSDmitry Torokhov
654*b08c118cSDmitry Torokhov	6. send 0x88 PS/2 command to FSP;
655*b08c118cSDmitry Torokhov
656*b08c118cSDmitry Torokhov	7. send 0xe9(status request) PS/2 command to FSP;
657*b08c118cSDmitry Torokhov
658*b08c118cSDmitry Torokhov	8. the response read from FSP should be the requested page value.
659*b08c118cSDmitry Torokhov
660*b08c118cSDmitry Torokhov
661*b08c118cSDmitry TorokhovPage register writing sequence:
662*b08c118cSDmitry Torokhov
663*b08c118cSDmitry Torokhov	1. send 0xf3 PS/2 command to FSP;
664*b08c118cSDmitry Torokhov
665*b08c118cSDmitry Torokhov	2. send 0x38 PS/2 command to FSP;
666*b08c118cSDmitry Torokhov
667*b08c118cSDmitry Torokhov	3. send 0x88 PS/2 command to FSP;
668*b08c118cSDmitry Torokhov
669*b08c118cSDmitry Torokhov	4. send 0xf3 PS/2 command to FSP;
670*b08c118cSDmitry Torokhov
671*b08c118cSDmitry Torokhov	5. if the page address being written is not required to be
672*b08c118cSDmitry Torokhov	inverted(refer to the 'Register inversion requirement' section),
673*b08c118cSDmitry Torokhov	goto step 6
674*b08c118cSDmitry Torokhov
675*b08c118cSDmitry Torokhov	  a. send 0x47 PS/2 command to FSP;
676*b08c118cSDmitry Torokhov
677*b08c118cSDmitry Torokhov	  b. send the inverted page address to FSP and goto step 9;
678*b08c118cSDmitry Torokhov
679*b08c118cSDmitry Torokhov	6. if the page address being written is not required to be
680*b08c118cSDmitry Torokhov	swapped(refer to the 'Register swapping requirement' section),
681*b08c118cSDmitry Torokhov	goto step 7
682*b08c118cSDmitry Torokhov
683*b08c118cSDmitry Torokhov	  a. send 0x44 PS/2 command to FSP;
684*b08c118cSDmitry Torokhov
685*b08c118cSDmitry Torokhov	  b. send the swapped page address to FSP and goto step 9;
686*b08c118cSDmitry Torokhov
687*b08c118cSDmitry Torokhov	7. send 0x33 PS/2 command to FSP;
688*b08c118cSDmitry Torokhov
689*b08c118cSDmitry Torokhov	8. send the page address to FSP;
690*b08c118cSDmitry Torokhov
691*b08c118cSDmitry Torokhov	9. the page register writing sequence is completed.
692*b08c118cSDmitry Torokhov
693*b08c118cSDmitry TorokhovGesture ID
694*b08c118cSDmitry Torokhov==========
695*b08c118cSDmitry Torokhov
696*b08c118cSDmitry TorokhovUnlike other devices which sends multiple fingers' coordinates to host,
697*b08c118cSDmitry TorokhovFSP processes multiple fingers' coordinates internally and convert them
698*b08c118cSDmitry Torokhovinto a 8 bits integer, namely 'Gesture ID.'  Following is a list of
699*b08c118cSDmitry Torokhovsupported gesture IDs:
700*b08c118cSDmitry Torokhov
701*b08c118cSDmitry Torokhov	======= ==================================
702*b08c118cSDmitry Torokhov	ID	Description
703*b08c118cSDmitry Torokhov	======= ==================================
704*b08c118cSDmitry Torokhov	0x86	2 finger straight up
705*b08c118cSDmitry Torokhov	0x82	2 finger straight down
706*b08c118cSDmitry Torokhov	0x80	2 finger straight right
707*b08c118cSDmitry Torokhov	0x84	2 finger straight left
708*b08c118cSDmitry Torokhov	0x8f	2 finger zoom in
709*b08c118cSDmitry Torokhov	0x8b	2 finger zoom out
710*b08c118cSDmitry Torokhov	0xc0	2 finger curve, counter clockwise
711*b08c118cSDmitry Torokhov	0xc4	2 finger curve, clockwise
712*b08c118cSDmitry Torokhov	0x2e	3 finger straight up
713*b08c118cSDmitry Torokhov	0x2a	3 finger straight down
714*b08c118cSDmitry Torokhov	0x28	3 finger straight right
715*b08c118cSDmitry Torokhov	0x2c	3 finger straight left
716*b08c118cSDmitry Torokhov	0x38	palm
717*b08c118cSDmitry Torokhov	======= ==================================
718*b08c118cSDmitry Torokhov
719*b08c118cSDmitry TorokhovRegister Listing
720*b08c118cSDmitry Torokhov================
721*b08c118cSDmitry Torokhov
722*b08c118cSDmitry TorokhovRegisters are represented in 16 bits values. The higher 8 bits represent
723*b08c118cSDmitry Torokhovthe page address and the lower 8 bits represent the relative offset within
724*b08c118cSDmitry Torokhovthat particular page.  Refer to the 'Programming Sequence for Page Register
725*b08c118cSDmitry TorokhovReading/Writing' section for instructions on how to change current page
726*b08c118cSDmitry Torokhovaddress::
727*b08c118cSDmitry Torokhov
728*b08c118cSDmitry Torokhov offset	width		default	r/w	name
729*b08c118cSDmitry Torokhov 0x8200	bit7~bit0	0x01	RO	device ID
730*b08c118cSDmitry Torokhov
731*b08c118cSDmitry Torokhov 0x8201	bit7~bit0		RW	version ID
732*b08c118cSDmitry Torokhov					0xc1: STL3888 Ax
733*b08c118cSDmitry Torokhov					0xd0 ~ 0xd2: STL3888 Bx
734*b08c118cSDmitry Torokhov					0xe0 ~ 0xe1: STL3888 Cx
735*b08c118cSDmitry Torokhov					0xe2 ~ 0xe3: STL3888 Dx
736*b08c118cSDmitry Torokhov
737*b08c118cSDmitry Torokhov 0x8202	bit7~bit0	0x01	RO	vendor ID
738*b08c118cSDmitry Torokhov
739*b08c118cSDmitry Torokhov 0x8203	bit7~bit0	0x01	RO	product ID
740*b08c118cSDmitry Torokhov
741*b08c118cSDmitry Torokhov 0x8204	bit3~bit0	0x01	RW	revision ID
742*b08c118cSDmitry Torokhov
743*b08c118cSDmitry Torokhov 0x820b					test mode status 1
744*b08c118cSDmitry Torokhov	bit3		1	RO	0: rotate 180 degree
745*b08c118cSDmitry Torokhov					1: no rotation
746*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
747*b08c118cSDmitry Torokhov
748*b08c118cSDmitry Torokhov 0x820f					register file page control
749*b08c118cSDmitry Torokhov	bit2		0	RW	1: rotate 180 degree
750*b08c118cSDmitry Torokhov					0: no rotation
751*b08c118cSDmitry Torokhov					*supported since Cx
752*b08c118cSDmitry Torokhov
753*b08c118cSDmitry Torokhov	bit0		0	RW	1 to enable page 1 register files
754*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
755*b08c118cSDmitry Torokhov
756*b08c118cSDmitry Torokhov 0x8210				RW	system control 1
757*b08c118cSDmitry Torokhov	bit0		1	RW	Reserved, must be 1
758*b08c118cSDmitry Torokhov	bit1		0	RW	Reserved, must be 0
759*b08c118cSDmitry Torokhov	bit4		0	RW	Reserved, must be 0
760*b08c118cSDmitry Torokhov	bit5		1	RW	register clock gating enable
761*b08c118cSDmitry Torokhov					0: read only, 1: read/write enable
762*b08c118cSDmitry Torokhov	(Note that following registers does not require clock gating being
763*b08c118cSDmitry Torokhov	enabled prior to write: 05 06 07 08 09 0c 0f 10 11 12 16 17 18 23 2e
764*b08c118cSDmitry Torokhov	40 41 42 43.  In addition to that, this bit must be 1 when gesture
765*b08c118cSDmitry Torokhov	mode is enabled)
766*b08c118cSDmitry Torokhov
767*b08c118cSDmitry Torokhov 0x8220					test mode status
768*b08c118cSDmitry Torokhov	bit5~bit4		RO	number of buttons
769*b08c118cSDmitry Torokhov					11 => 2, lbtn/rbtn
770*b08c118cSDmitry Torokhov					10 => 4, lbtn/rbtn/scru/scrd
771*b08c118cSDmitry Torokhov					01 => 6, lbtn/rbtn/scru/scrd/scrl/scrr
772*b08c118cSDmitry Torokhov					00 => 6, lbtn/rbtn/scru/scrd/fbtn/bbtn
773*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
774*b08c118cSDmitry Torokhov
775*b08c118cSDmitry Torokhov 0x8231				RW	on-pad command detection
776*b08c118cSDmitry Torokhov	bit7		0	RW	on-pad command left button down tag
777*b08c118cSDmitry Torokhov					enable
778*b08c118cSDmitry Torokhov					0: disable, 1: enable
779*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
780*b08c118cSDmitry Torokhov
781*b08c118cSDmitry Torokhov 0x8234				RW	on-pad command control 5
782*b08c118cSDmitry Torokhov	bit4~bit0	0x05	RW	XLO in 0s/4/1, so 03h = 0010.1b = 2.5
783*b08c118cSDmitry Torokhov	(Note that position unit is in 0.5 scanline)
784*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
785*b08c118cSDmitry Torokhov
786*b08c118cSDmitry Torokhov	bit7		0	RW	on-pad tap zone enable
787*b08c118cSDmitry Torokhov					0: disable, 1: enable
788*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
789*b08c118cSDmitry Torokhov
790*b08c118cSDmitry Torokhov 0x8235				RW	on-pad command control 6
791*b08c118cSDmitry Torokhov	bit4~bit0	0x1d	RW	XHI in 0s/4/1, so 19h = 1100.1b = 12.5
792*b08c118cSDmitry Torokhov	(Note that position unit is in 0.5 scanline)
793*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
794*b08c118cSDmitry Torokhov
795*b08c118cSDmitry Torokhov 0x8236				RW	on-pad command control 7
796*b08c118cSDmitry Torokhov	bit4~bit0	0x04	RW	YLO in 0s/4/1, so 03h = 0010.1b = 2.5
797*b08c118cSDmitry Torokhov	(Note that position unit is in 0.5 scanline)
798*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
799*b08c118cSDmitry Torokhov
800*b08c118cSDmitry Torokhov 0x8237				RW	on-pad command control 8
801*b08c118cSDmitry Torokhov	bit4~bit0	0x13	RW	YHI in 0s/4/1, so 11h = 1000.1b = 8.5
802*b08c118cSDmitry Torokhov	(Note that position unit is in 0.5 scanline)
803*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
804*b08c118cSDmitry Torokhov
805*b08c118cSDmitry Torokhov 0x8240				RW	system control 5
806*b08c118cSDmitry Torokhov	bit1		0	RW	FSP Intellimouse mode enable
807*b08c118cSDmitry Torokhov					0: disable, 1: enable
808*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
809*b08c118cSDmitry Torokhov
810*b08c118cSDmitry Torokhov	bit2		0	RW	movement + abs. coordinate mode enable
811*b08c118cSDmitry Torokhov					0: disable, 1: enable
812*b08c118cSDmitry Torokhov	(Note that this function has the functionality of bit 1 even when
813*b08c118cSDmitry Torokhov	bit 1 is not set. However, the format is different from that of bit 1.
814*b08c118cSDmitry Torokhov	In addition, when bit 1 and bit 2 are set at the same time, bit 2 will
815*b08c118cSDmitry Torokhov	override bit 1.)
816*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
817*b08c118cSDmitry Torokhov
818*b08c118cSDmitry Torokhov	bit3		0	RW	abs. coordinate only mode enable
819*b08c118cSDmitry Torokhov					0: disable, 1: enable
820*b08c118cSDmitry Torokhov	(Note that this function has the functionality of bit 1 even when
821*b08c118cSDmitry Torokhov	bit 1 is not set. However, the format is different from that of bit 1.
822*b08c118cSDmitry Torokhov	In addition, when bit 1, bit 2 and bit 3 are set at the same time,
823*b08c118cSDmitry Torokhov	bit 3 will override bit 1 and 2.)
824*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
825*b08c118cSDmitry Torokhov
826*b08c118cSDmitry Torokhov	bit5		0	RW	auto switch enable
827*b08c118cSDmitry Torokhov					0: disable, 1: enable
828*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
829*b08c118cSDmitry Torokhov
830*b08c118cSDmitry Torokhov	bit6		0	RW	G0 abs. + notify packet format enable
831*b08c118cSDmitry Torokhov					0: disable, 1: enable
832*b08c118cSDmitry Torokhov	(Note that the absolute/relative coordinate output still depends on
833*b08c118cSDmitry Torokhov	bit 2 and 3.  That is, if any of those bit is 1, host will receive
834*b08c118cSDmitry Torokhov	absolute coordinates; otherwise, host only receives packets with
835*b08c118cSDmitry Torokhov	relative coordinate.)
836*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
837*b08c118cSDmitry Torokhov
838*b08c118cSDmitry Torokhov	bit7		0	RW	EN_PS2_F2: PS/2 gesture mode 2nd
839*b08c118cSDmitry Torokhov					finger packet enable
840*b08c118cSDmitry Torokhov					0: disable, 1: enable
841*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
842*b08c118cSDmitry Torokhov
843*b08c118cSDmitry Torokhov 0x8243				RW	on-pad control
844*b08c118cSDmitry Torokhov	bit0		0	RW	on-pad control enable
845*b08c118cSDmitry Torokhov					0: disable, 1: enable
846*b08c118cSDmitry Torokhov	(Note that if this bit is cleared, bit 3/5 will be ineffective)
847*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
848*b08c118cSDmitry Torokhov
849*b08c118cSDmitry Torokhov	bit3		0	RW	on-pad fix vertical scrolling enable
850*b08c118cSDmitry Torokhov					0: disable, 1: enable
851*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
852*b08c118cSDmitry Torokhov
853*b08c118cSDmitry Torokhov	bit5		0	RW	on-pad fix horizontal scrolling enable
854*b08c118cSDmitry Torokhov					0: disable, 1: enable
855*b08c118cSDmitry Torokhov					*only supported by H/W prior to Cx
856*b08c118cSDmitry Torokhov
857*b08c118cSDmitry Torokhov 0x8290				RW	software control register 1
858*b08c118cSDmitry Torokhov	bit0		0	RW	absolute coordination mode
859*b08c118cSDmitry Torokhov					0: disable, 1: enable
860*b08c118cSDmitry Torokhov					*supported since Cx
861*b08c118cSDmitry Torokhov
862*b08c118cSDmitry Torokhov	bit1		0	RW	gesture ID output
863*b08c118cSDmitry Torokhov					0: disable, 1: enable
864*b08c118cSDmitry Torokhov					*supported since Cx
865*b08c118cSDmitry Torokhov
866*b08c118cSDmitry Torokhov	bit2		0	RW	two fingers' coordinates output
867*b08c118cSDmitry Torokhov					0: disable, 1: enable
868*b08c118cSDmitry Torokhov					*supported since Cx
869*b08c118cSDmitry Torokhov
870*b08c118cSDmitry Torokhov	bit3		0	RW	finger up one packet output
871*b08c118cSDmitry Torokhov					0: disable, 1: enable
872*b08c118cSDmitry Torokhov					*supported since Cx
873*b08c118cSDmitry Torokhov
874*b08c118cSDmitry Torokhov	bit4		0	RW	absolute coordination continuous mode
875*b08c118cSDmitry Torokhov					0: disable, 1: enable
876*b08c118cSDmitry Torokhov					*supported since Cx
877*b08c118cSDmitry Torokhov
878*b08c118cSDmitry Torokhov	bit6~bit5	00	RW	gesture group selection
879*b08c118cSDmitry Torokhov					00: basic
880*b08c118cSDmitry Torokhov					01: suite
881*b08c118cSDmitry Torokhov					10: suite pro
882*b08c118cSDmitry Torokhov					11: advanced
883*b08c118cSDmitry Torokhov					*supported since Cx
884*b08c118cSDmitry Torokhov
885*b08c118cSDmitry Torokhov	bit7		0	RW	Bx packet output compatible mode
886*b08c118cSDmitry Torokhov					0: disable, 1: enable
887*b08c118cSDmitry Torokhov					*supported since Cx
888*b08c118cSDmitry Torokhov					*supported since Cx
889*b08c118cSDmitry Torokhov
890*b08c118cSDmitry Torokhov
891*b08c118cSDmitry Torokhov 0x833d				RW	on-pad command control 1
892*b08c118cSDmitry Torokhov	bit7		1	RW	on-pad command detection enable
893*b08c118cSDmitry Torokhov					0: disable, 1: enable
894*b08c118cSDmitry Torokhov					*supported since Cx
895*b08c118cSDmitry Torokhov
896*b08c118cSDmitry Torokhov 0x833e				RW	on-pad command detection
897*b08c118cSDmitry Torokhov	bit7		0	RW	on-pad command left button down tag
898*b08c118cSDmitry Torokhov					enable. Works only in H/W based PS/2
899*b08c118cSDmitry Torokhov					data packet mode.
900*b08c118cSDmitry Torokhov					0: disable, 1: enable
901*b08c118cSDmitry Torokhov					*supported since Cx
902