1 Copyright (C) 2002-2011 Sentelic Corporation.
2 Last update: Dec-07-2011
4 ==============================================================================
5 * Finger Sensing Pad Intellimouse Mode(scrolling wheel, 4th and 5th buttons)
6 ==============================================================================
7 A) MSID 4: Scrolling wheel mode plus Forward page(4th button) and Backward
9 @1. Set sample rate to 200;
10 @2. Set sample rate to 200;
11 @3. Set sample rate to 80;
12 @4. Issuing the "Get device ID" command (0xF2) and waits for the response;
13 @5. FSP will respond 0x04.
16 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
17 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
18 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|
19 |---------------| |---------------| |---------------| |---------------|
21 Byte 1: Bit7 => Y overflow
26 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
27 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
28 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
29 Byte 2: X Movement(9-bit 2's complement integers)
30 Byte 3: Y Movement(9-bit 2's complement integers)
31 Byte 4: Bit3~Bit0 => the scrolling wheel's movement since the last data report.
33 Bit4 => 1 = 4th mouse button is pressed, Forward one page.
34 0 = 4th mouse button is not pressed.
35 Bit5 => 1 = 5th mouse button is pressed, Backward one page.
36 0 = 5th mouse button is not pressed.
38 B) MSID 6: Horizontal and Vertical scrolling.
39 @ Set bit 1 in register 0x40 to 1
41 # FSP replaces scrolling wheel's movement as 4 bits to show horizontal and
45 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
46 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
47 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|
48 |---------------| |---------------| |---------------| |---------------|
50 Byte 1: Bit7 => Y overflow
55 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
56 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
57 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
58 Byte 2: X Movement(9-bit 2's complement integers)
59 Byte 3: Y Movement(9-bit 2's complement integers)
60 Byte 4: Bit0 => the Vertical scrolling movement downward.
61 Bit1 => the Vertical scrolling movement upward.
62 Bit2 => the Horizontal scrolling movement leftward.
63 Bit3 => the Horizontal scrolling movement rightward.
64 Bit4 => 1 = 4th mouse button is pressed, Forward one page.
65 0 = 4th mouse button is not pressed.
66 Bit5 => 1 = 5th mouse button is pressed, Backward one page.
67 0 = 5th mouse button is not pressed.
70 # FSP uses 2 packets (8 Bytes) to represent Absolute Position.
71 so we have PACKET NUMBER to identify packets.
72 If PACKET NUMBER is 0, the packet is Packet 1.
73 If PACKET NUMBER is 1, the packet is Packet 2.
74 Please count this number in program.
76 # MSID6 special packet will be enable at the same time when enable MSID 7.
78 ==============================================================================
79 * Absolute position for STL3886-G0.
80 ==============================================================================
81 @ Set bit 2 or 3 in register 0x40 to 1
82 @ Set bit 6 in register 0x40 to 1
84 Packet 1 (ABSOLUTE POSITION)
85 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
86 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
87 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|
88 |---------------| |---------------| |---------------| |---------------|
90 Byte 1: Bit7~Bit6 => 00, Normal data packet
91 => 01, Absolute coordination packet
96 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
97 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
98 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
99 Byte 2: X coordinate (xpos[9:2])
100 Byte 3: Y coordinate (ypos[9:2])
101 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
102 Bit3~Bit2 => X coordinate (ypos[1:0])
109 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
110 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
111 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|
112 |---------------| |---------------| |---------------| |---------------|
114 Byte 1: Bit7~Bit6 => 00, Normal data packet
115 => 01, Absolute coordination packet
120 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
121 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
122 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
123 Byte 2: Message Type => 0x5A (Enable/Disable status packet)
124 Mode Type => 0xA5 (Normal/Icon mode status)
125 Byte 3: Message Type => 0x00 (Disabled)
127 Mode Type => 0x00 (Normal)
129 Byte 4: Bit7~Bit0 => Don't Care
131 ==============================================================================
132 * Absolute position for STL3888-Ax.
133 ==============================================================================
134 Packet 1 (ABSOLUTE POSITION)
135 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
136 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
137 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|
138 |---------------| |---------------| |---------------| |---------------|
140 Byte 1: Bit7~Bit6 => 00, Normal data packet
141 => 01, Absolute coordination packet
143 => 11, Normal data packet with on-pad click
144 Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
145 When both fingers are up, the last two reports have zero valid
149 Bit2 => Left Button, 1 is pressed, 0 is released.
152 Byte 2: X coordinate (xpos[9:2])
153 Byte 3: Y coordinate (ypos[9:2])
154 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
155 Bit3~Bit2 => X coordinate (ypos[1:0])
159 Packet 2 (ABSOLUTE POSITION)
160 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
161 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
162 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|
163 |---------------| |---------------| |---------------| |---------------|
165 Byte 1: Bit7~Bit6 => 00, Normal data packet
166 => 01, Absolute coordinates packet
168 => 11, Normal data packet with on-pad click
169 Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
170 When both fingers are up, the last two reports have zero valid
174 Bit2 => Right Button, 1 is pressed, 0 is released.
177 Byte 2: X coordinate (xpos[9:2])
178 Byte 3: Y coordinate (ypos[9:2])
179 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
180 Bit3~Bit2 => X coordinate (ypos[1:0])
184 Notify Packet for STL3888-Ax
185 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
186 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
187 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|
188 |---------------| |---------------| |---------------| |---------------|
190 Byte 1: Bit7~Bit6 => 00, Normal data packet
191 => 01, Absolute coordinates packet
193 => 11, Normal data packet with on-pad click
195 Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
196 0: left button is generated by the on-pad command
197 1: left button is generated by the external button
199 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
200 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
201 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
202 Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
203 Byte 3: Bit7~Bit6 => Don't care
204 Bit5~Bit4 => Number of fingers
205 Bit3~Bit1 => Reserved
206 Bit0 => 1: enter gesture mode; 0: leaving gesture mode
207 Byte 4: Bit7 => scroll right button
208 Bit6 => scroll left button
209 Bit5 => scroll down button
210 Bit4 => scroll up button
211 * Note that if gesture and additional button (Bit4~Bit7)
212 happen at the same time, the button information will not
214 Bit3~Bit0 => Reserved
216 Sample sequence of Multi-finger, Multi-coordinate mode:
218 notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
219 abs pkt 2, ..., notify packet (valid bit == 0)
221 ==============================================================================
222 * Absolute position for STL3888-B0.
223 ==============================================================================
224 Packet 1(ABSOLUTE POSITION)
225 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
226 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
227 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|
228 |---------------| |---------------| |---------------| |---------------|
230 Byte 1: Bit7~Bit6 => 00, Normal data packet
231 => 01, Absolute coordinates packet
233 => 11, Normal data packet with on-pad click
234 Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
235 When both fingers are up, the last two reports have zero valid
237 Bit4 => finger up/down information. 1: finger down, 0: finger up.
239 Bit2 => finger index, 0 is the first finger, 1 is the second finger.
240 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
241 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
242 Byte 2: X coordinate (xpos[9:2])
243 Byte 3: Y coordinate (ypos[9:2])
244 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
245 Bit3~Bit2 => X coordinate (ypos[1:0])
246 Bit4 => scroll down button
247 Bit5 => scroll up button
248 Bit6 => scroll left button
249 Bit7 => scroll right button
251 Packet 2 (ABSOLUTE POSITION)
252 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
253 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
254 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|
255 |---------------| |---------------| |---------------| |---------------|
257 Byte 1: Bit7~Bit6 => 00, Normal data packet
258 => 01, Absolute coordination packet
260 => 11, Normal data packet with on-pad click
261 Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
262 When both fingers are up, the last two reports have zero valid
264 Bit4 => finger up/down information. 1: finger down, 0: finger up.
266 Bit2 => finger index, 0 is the first finger, 1 is the second finger.
267 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
268 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
269 Byte 2: X coordinate (xpos[9:2])
270 Byte 3: Y coordinate (ypos[9:2])
271 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
272 Bit3~Bit2 => X coordinate (ypos[1:0])
273 Bit4 => scroll down button
274 Bit5 => scroll up button
275 Bit6 => scroll left button
276 Bit7 => scroll right button
278 Notify Packet for STL3888-B0
279 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
280 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
281 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|
282 |---------------| |---------------| |---------------| |---------------|
284 Byte 1: Bit7~Bit6 => 00, Normal data packet
285 => 01, Absolute coordination packet
287 => 11, Normal data packet with on-pad click
289 Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
290 0: left button is generated by the on-pad command
291 1: left button is generated by the external button
293 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
294 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
295 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
296 Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
297 Byte 3: Bit7~Bit6 => Don't care
298 Bit5~Bit4 => Number of fingers
299 Bit3~Bit1 => Reserved
300 Bit0 => 1: enter gesture mode; 0: leaving gesture mode
301 Byte 4: Bit7 => scroll right button
302 Bit6 => scroll left button
303 Bit5 => scroll up button
304 Bit4 => scroll down button
305 * Note that if gesture and additional button(Bit4~Bit7)
306 happen at the same time, the button information will not
308 Bit3~Bit0 => Reserved
310 Sample sequence of Multi-finger, Multi-coordinate mode:
312 notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
313 abs pkt 2, ..., notify packet (valid bit == 0)
315 ==============================================================================
316 * Absolute position for STL3888-Cx and STL3888-Dx.
317 ==============================================================================
318 Single Finger, Absolute Coordinate Mode (SFAC)
319 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
320 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
321 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|
322 |---------------| |---------------| |---------------| |---------------|
324 Byte 1: Bit7~Bit6 => 00, Normal data packet
325 => 01, Absolute coordinates packet
327 Bit5 => Coordinate mode(always 0 in SFAC mode):
328 0: single-finger absolute coordinates (SFAC) mode
329 1: multi-finger, multiple coordinates (MFMC) mode
330 Bit4 => 0: The LEFT button is generated by on-pad command (OPC)
331 1: The LEFT button is generated by external button
332 Default is 1 even if the LEFT button is not pressed.
333 Bit3 => Always 1, as specified by PS/2 protocol.
334 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
335 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
336 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
337 Byte 2: X coordinate (xpos[9:2])
338 Byte 3: Y coordinate (ypos[9:2])
339 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
340 Bit3~Bit2 => X coordinate (ypos[1:0])
341 Bit4 => 4th mouse button(forward one page)
342 Bit5 => 5th mouse button(backward one page)
343 Bit6 => scroll left button
344 Bit7 => scroll right button
346 Multi Finger, Multiple Coordinates Mode (MFMC):
347 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
348 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
349 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|
350 |---------------| |---------------| |---------------| |---------------|
352 Byte 1: Bit7~Bit6 => 00, Normal data packet
353 => 01, Absolute coordination packet
355 Bit5 => Coordinate mode (always 1 in MFMC mode):
356 0: single-finger absolute coordinates (SFAC) mode
357 1: multi-finger, multiple coordinates (MFMC) mode
358 Bit4 => 0: The LEFT button is generated by on-pad command (OPC)
359 1: The LEFT button is generated by external button
360 Default is 1 even if the LEFT button is not pressed.
361 Bit3 => Always 1, as specified by PS/2 protocol.
362 Bit2 => Finger index, 0 is the first finger, 1 is the second finger.
363 If bit 1 and 0 are all 1 and bit 4 is 0, the middle external
365 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
366 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
367 Byte 2: X coordinate (xpos[9:2])
368 Byte 3: Y coordinate (ypos[9:2])
369 Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
370 Bit3~Bit2 => X coordinate (ypos[1:0])
371 Bit4 => 4th mouse button(forward one page)
372 Bit5 => 5th mouse button(backward one page)
373 Bit6 => scroll left button
374 Bit7 => scroll right button
376 When one of the two fingers is up, the device will output four consecutive
377 MFMC#0 report packets with zero X and Y to represent 1st finger is up or
378 four consecutive MFMC#1 report packets with zero X and Y to represent that
379 the 2nd finger is up. On the other hand, if both fingers are up, the device
380 will output four consecutive single-finger, absolute coordinate(SFAC) packets
383 Notify Packet for STL3888-Cx/Dx
384 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
385 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
386 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|
387 |---------------| |---------------| |---------------| |---------------|
389 Byte 1: Bit7~Bit6 => 00, Normal data packet
390 => 01, Absolute coordinates packet
393 Bit4 => 0: The LEFT button is generated by on-pad command(OPC)
394 1: The LEFT button is generated by external button
395 Default is 1 even if the LEFT button is not pressed.
397 Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
398 Bit1 => Right Button, 1 is pressed, 0 is not pressed.
399 Bit0 => Left Button, 1 is pressed, 0 is not pressed.
400 Byte 2: Message type:
401 0xba => gesture information
402 0xc0 => one finger hold-rotating gesture
403 Byte 3: The first parameter for the received message:
404 0xba => gesture ID (refer to the 'Gesture ID' section)
406 Byte 4: The second parameter for the received message:
408 0xc0 => finger up/down information
410 Sample sequence of Multi-finger, Multi-coordinates mode:
412 notify packet (valid bit == 1), MFMC packet 1 (byte 1, bit 2 == 0),
413 MFMC packet 2 (byte 1, bit 2 == 1), MFMC packet 1, MFMC packet 2,
414 ..., notify packet (valid bit == 0)
416 That is, when the device is in MFMC mode, the host will receive
417 interleaved absolute coordinate packets for each finger.
419 ==============================================================================
420 * FSP Enable/Disable packet
421 ==============================================================================
422 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
423 BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
424 1 |Y|X|0|0|1|M|R|L| 2 |0|1|0|1|1|0|1|E| 3 | | | | | | | | | 4 | | | | | | | | |
425 |---------------| |---------------| |---------------| |---------------|
427 FSP will send out enable/disable packet when FSP receive PS/2 enable/disable
428 command. Host will receive the packet which Middle, Right, Left button will
429 be set. The packet only use byte 0 and byte 1 as a pattern of original packet.
430 Ignore the other bytes of the packet.
432 Byte 1: Bit7 => 0, Y overflow
433 Bit6 => 0, X overflow
434 Bit5 => 0, Y sign bit
435 Bit4 => 0, X sign bit
437 Bit2 => 1, Middle Button
438 Bit1 => 1, Right Button
439 Bit0 => 1, Left Button
440 Byte 2: Bit7~1 => (0101101b)
444 Byte 4: Don't care (MOUSE ID 3, 4)
445 Byte 5~8: Don't care (Absolute packet)
447 ==============================================================================
449 ==============================================================================
451 FSP supports basic PS/2 commanding set and modes, refer to following URL for
452 details about PS/2 commands:
454 http://www.computer-engineering.org/ps2mouse/
456 ==============================================================================
457 * Programming Sequence for Determining Packet Parsing Flow
458 ==============================================================================
459 1. Identify FSP by reading device ID(0x00) and version(0x01) register
461 2a. For FSP version < STL3888 Cx, determine number of buttons by reading
462 the 'test mode status' (0x20) register:
464 buttons = reg[0x20] & 0x30
466 if buttons == 0x30 or buttons == 0x20:
468 Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
469 section A for packet parsing detail(ignore byte 4, bit ~ 7)
470 elif buttons == 0x10:
472 Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
473 section B for packet parsing detail
474 elif buttons == 0x00:
476 Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
477 section A for packet parsing detail
479 2b. For FSP version >= STL3888 Cx:
480 Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
481 section A for packet parsing detail (ignore byte 4, bit ~ 7)
483 ==============================================================================
484 * Programming Sequence for Register Reading/Writing
485 ==============================================================================
487 Register inversion requirement:
489 Following values needed to be inverted(the '~' operator in C) before being
492 0xe8, 0xe9, 0xee, 0xf2, 0xf3 and 0xff.
494 Register swapping requirement:
496 Following values needed to have their higher 4 bits and lower 4 bits being
497 swapped before being sent to FSP:
499 10, 20, 40, 60, 80, 100 and 200.
501 Register reading sequence:
503 1. send 0xf3 PS/2 command to FSP;
505 2. send 0x66 PS/2 command to FSP;
507 3. send 0x88 PS/2 command to FSP;
509 4. send 0xf3 PS/2 command to FSP;
511 5. if the register address being to read is not required to be
512 inverted(refer to the 'Register inversion requirement' section),
515 5a. send 0x68 PS/2 command to FSP;
517 5b. send the inverted register address to FSP and goto step 8;
519 6. if the register address being to read is not required to be
520 swapped(refer to the 'Register swapping requirement' section),
523 6a. send 0xcc PS/2 command to FSP;
525 6b. send the swapped register address to FSP and goto step 8;
527 7. send 0x66 PS/2 command to FSP;
529 7a. send the original register address to FSP and goto step 8;
531 8. send 0xe9(status request) PS/2 command to FSP;
533 9. the 4th byte of the response read from FSP should be the
534 requested register value(?? indicates don't care byte):
537 3888: 0xfa (??) (??) (val)
539 * Note that since the Cx release, the hardware will return 1's
540 complement of the register value at the 3rd byte of status request
544 3888: 0xfa (??) (~val) (val)
546 Register writing sequence:
548 1. send 0xf3 PS/2 command to FSP;
550 2. if the register address being to write is not required to be
551 inverted(refer to the 'Register inversion requirement' section),
554 2a. send 0x74 PS/2 command to FSP;
556 2b. send the inverted register address to FSP and goto step 5;
558 3. if the register address being to write is not required to be
559 swapped(refer to the 'Register swapping requirement' section),
562 3a. send 0x77 PS/2 command to FSP;
564 3b. send the swapped register address to FSP and goto step 5;
566 4. send 0x55 PS/2 command to FSP;
568 4a. send the register address to FSP and goto step 5;
570 5. send 0xf3 PS/2 command to FSP;
572 6. if the register value being to write is not required to be
573 inverted(refer to the 'Register inversion requirement' section),
576 6a. send 0x47 PS/2 command to FSP;
578 6b. send the inverted register value to FSP and goto step 9;
580 7. if the register value being to write is not required to be
581 swapped(refer to the 'Register swapping requirement' section),
584 7a. send 0x44 PS/2 command to FSP;
586 7b. send the swapped register value to FSP and goto step 9;
588 8. send 0x33 PS/2 command to FSP;
590 8a. send the register value to FSP;
592 9. the register writing sequence is completed.
594 * Note that since the Cx release, the hardware will return 1's
595 complement of the register value at the 3rd byte of status request
596 result. Host can optionally send another 0xe9 (status request) PS/2
597 command to FSP at the end of register writing to verify that the
598 register writing operation is successful (?? indicates don't care
602 3888: 0xfa (??) (~val) (val)
604 ==============================================================================
605 * Programming Sequence for Page Register Reading/Writing
606 ==============================================================================
608 In order to overcome the limitation of maximum number of registers
609 supported, the hardware separates register into different groups called
610 'pages.' Each page is able to include up to 255 registers.
612 The default page after power up is 0x82; therefore, if one has to get
613 access to register 0x8301, one has to use following sequence to switch
614 to page 0x83, then start reading/writing from/to offset 0x01 by using
615 the register read/write sequence described in previous section.
617 Page register reading sequence:
619 1. send 0xf3 PS/2 command to FSP;
621 2. send 0x66 PS/2 command to FSP;
623 3. send 0x88 PS/2 command to FSP;
625 4. send 0xf3 PS/2 command to FSP;
627 5. send 0x83 PS/2 command to FSP;
629 6. send 0x88 PS/2 command to FSP;
631 7. send 0xe9(status request) PS/2 command to FSP;
633 8. the response read from FSP should be the requested page value.
635 Page register writing sequence:
637 1. send 0xf3 PS/2 command to FSP;
639 2. send 0x38 PS/2 command to FSP;
641 3. send 0x88 PS/2 command to FSP;
643 4. send 0xf3 PS/2 command to FSP;
645 5. if the page address being written is not required to be
646 inverted(refer to the 'Register inversion requirement' section),
649 5a. send 0x47 PS/2 command to FSP;
651 5b. send the inverted page address to FSP and goto step 9;
653 6. if the page address being written is not required to be
654 swapped(refer to the 'Register swapping requirement' section),
657 6a. send 0x44 PS/2 command to FSP;
659 6b. send the swapped page address to FSP and goto step 9;
661 7. send 0x33 PS/2 command to FSP;
663 8. send the page address to FSP;
665 9. the page register writing sequence is completed.
667 ==============================================================================
669 ==============================================================================
671 Unlike other devices which sends multiple fingers' coordinates to host,
672 FSP processes multiple fingers' coordinates internally and convert them
673 into a 8 bits integer, namely 'Gesture ID.' Following is a list of
674 supported gesture IDs:
677 0x86 2 finger straight up
678 0x82 2 finger straight down
679 0x80 2 finger straight right
680 0x84 2 finger straight left
681 0x8f 2 finger zoom in
682 0x8b 2 finger zoom out
683 0xc0 2 finger curve, counter clockwise
684 0xc4 2 finger curve, clockwise
685 0x2e 3 finger straight up
686 0x2a 3 finger straight down
687 0x28 3 finger straight right
688 0x2c 3 finger straight left
691 ==============================================================================
693 ==============================================================================
695 Registers are represented in 16 bits values. The higher 8 bits represent
696 the page address and the lower 8 bits represent the relative offset within
697 that particular page. Refer to the 'Programming Sequence for Page Register
698 Reading/Writing' section for instructions on how to change current page
701 offset width default r/w name
702 0x8200 bit7~bit0 0x01 RO device ID
704 0x8201 bit7~bit0 RW version ID
706 0xd0 ~ 0xd2: STL3888 Bx
707 0xe0 ~ 0xe1: STL3888 Cx
708 0xe2 ~ 0xe3: STL3888 Dx
710 0x8202 bit7~bit0 0x01 RO vendor ID
712 0x8203 bit7~bit0 0x01 RO product ID
714 0x8204 bit3~bit0 0x01 RW revision ID
716 0x820b test mode status 1
717 bit3 1 RO 0: rotate 180 degree
719 *only supported by H/W prior to Cx
721 0x820f register file page control
722 bit2 0 RW 1: rotate 180 degree
726 bit0 0 RW 1 to enable page 1 register files
727 *only supported by H/W prior to Cx
729 0x8210 RW system control 1
730 bit0 1 RW Reserved, must be 1
731 bit1 0 RW Reserved, must be 0
732 bit4 0 RW Reserved, must be 0
733 bit5 1 RW register clock gating enable
734 0: read only, 1: read/write enable
735 (Note that following registers does not require clock gating being
736 enabled prior to write: 05 06 07 08 09 0c 0f 10 11 12 16 17 18 23 2e
737 40 41 42 43. In addition to that, this bit must be 1 when gesture
740 0x8220 test mode status
741 bit5~bit4 RO number of buttons
743 10 => 4, lbtn/rbtn/scru/scrd
744 01 => 6, lbtn/rbtn/scru/scrd/scrl/scrr
745 00 => 6, lbtn/rbtn/scru/scrd/fbtn/bbtn
746 *only supported by H/W prior to Cx
748 0x8231 RW on-pad command detection
749 bit7 0 RW on-pad command left button down tag
751 0: disable, 1: enable
752 *only supported by H/W prior to Cx
754 0x8234 RW on-pad command control 5
755 bit4~bit0 0x05 RW XLO in 0s/4/1, so 03h = 0010.1b = 2.5
756 (Note that position unit is in 0.5 scanline)
757 *only supported by H/W prior to Cx
759 bit7 0 RW on-pad tap zone enable
760 0: disable, 1: enable
761 *only supported by H/W prior to Cx
763 0x8235 RW on-pad command control 6
764 bit4~bit0 0x1d RW XHI in 0s/4/1, so 19h = 1100.1b = 12.5
765 (Note that position unit is in 0.5 scanline)
766 *only supported by H/W prior to Cx
768 0x8236 RW on-pad command control 7
769 bit4~bit0 0x04 RW YLO in 0s/4/1, so 03h = 0010.1b = 2.5
770 (Note that position unit is in 0.5 scanline)
771 *only supported by H/W prior to Cx
773 0x8237 RW on-pad command control 8
774 bit4~bit0 0x13 RW YHI in 0s/4/1, so 11h = 1000.1b = 8.5
775 (Note that position unit is in 0.5 scanline)
776 *only supported by H/W prior to Cx
778 0x8240 RW system control 5
779 bit1 0 RW FSP Intellimouse mode enable
780 0: disable, 1: enable
781 *only supported by H/W prior to Cx
783 bit2 0 RW movement + abs. coordinate mode enable
784 0: disable, 1: enable
785 (Note that this function has the functionality of bit 1 even when
786 bit 1 is not set. However, the format is different from that of bit 1.
787 In addition, when bit 1 and bit 2 are set at the same time, bit 2 will
789 *only supported by H/W prior to Cx
791 bit3 0 RW abs. coordinate only mode enable
792 0: disable, 1: enable
793 (Note that this function has the functionality of bit 1 even when
794 bit 1 is not set. However, the format is different from that of bit 1.
795 In addition, when bit 1, bit 2 and bit 3 are set at the same time,
796 bit 3 will override bit 1 and 2.)
797 *only supported by H/W prior to Cx
799 bit5 0 RW auto switch enable
800 0: disable, 1: enable
801 *only supported by H/W prior to Cx
803 bit6 0 RW G0 abs. + notify packet format enable
804 0: disable, 1: enable
805 (Note that the absolute/relative coordinate output still depends on
806 bit 2 and 3. That is, if any of those bit is 1, host will receive
807 absolute coordinates; otherwise, host only receives packets with
808 relative coordinate.)
809 *only supported by H/W prior to Cx
811 bit7 0 RW EN_PS2_F2: PS/2 gesture mode 2nd
813 0: disable, 1: enable
814 *only supported by H/W prior to Cx
816 0x8243 RW on-pad control
817 bit0 0 RW on-pad control enable
818 0: disable, 1: enable
819 (Note that if this bit is cleared, bit 3/5 will be ineffective)
820 *only supported by H/W prior to Cx
822 bit3 0 RW on-pad fix vertical scrolling enable
823 0: disable, 1: enable
824 *only supported by H/W prior to Cx
826 bit5 0 RW on-pad fix horizontal scrolling enable
827 0: disable, 1: enable
828 *only supported by H/W prior to Cx
830 0x8290 RW software control register 1
831 bit0 0 RW absolute coordination mode
832 0: disable, 1: enable
835 bit1 0 RW gesture ID output
836 0: disable, 1: enable
839 bit2 0 RW two fingers' coordinates output
840 0: disable, 1: enable
843 bit3 0 RW finger up one packet output
844 0: disable, 1: enable
847 bit4 0 RW absolute coordination continuous mode
848 0: disable, 1: enable
851 bit6~bit5 00 RW gesture group selection
858 bit7 0 RW Bx packet output compatible mode
859 0: disable, 1: enable *supported since Cx
863 0x833d RW on-pad command control 1
864 bit7 1 RW on-pad command detection enable
865 0: disable, 1: enable
868 0x833e RW on-pad command detection
869 bit7 0 RW on-pad command left button down tag
870 enable. Works only in H/W based PS/2
872 0: disable, 1: enable