sentelic.txt 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. Copyright (C) 2002-2010 Sentelic Corporation.
  2. Last update: Jan-13-2010
  3. ==============================================================================
  4. * Finger Sensing Pad Intellimouse Mode(scrolling wheel, 4th and 5th buttons)
  5. ==============================================================================
  6. A) MSID 4: Scrolling wheel mode plus Forward page(4th button) and Backward
  7. page (5th button)
  8. @1. Set sample rate to 200;
  9. @2. Set sample rate to 200;
  10. @3. Set sample rate to 80;
  11. @4. Issuing the "Get device ID" command (0xF2) and waits for the response;
  12. @5. FSP will respond 0x04.
  13. Packet 1
  14. 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
  15. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  16. 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|
  17. |---------------| |---------------| |---------------| |---------------|
  18. Byte 1: Bit7 => Y overflow
  19. Bit6 => X overflow
  20. Bit5 => Y sign bit
  21. Bit4 => X sign bit
  22. Bit3 => 1
  23. Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
  24. Bit1 => Right Button, 1 is pressed, 0 is not pressed.
  25. Bit0 => Left Button, 1 is pressed, 0 is not pressed.
  26. Byte 2: X Movement(9-bit 2's complement integers)
  27. Byte 3: Y Movement(9-bit 2's complement integers)
  28. Byte 4: Bit3~Bit0 => the scrolling wheel's movement since the last data report.
  29. valid values, -8 ~ +7
  30. Bit4 => 1 = 4th mouse button is pressed, Forward one page.
  31. 0 = 4th mouse button is not pressed.
  32. Bit5 => 1 = 5th mouse button is pressed, Backward one page.
  33. 0 = 5th mouse button is not pressed.
  34. B) MSID 6: Horizontal and Vertical scrolling.
  35. @ Set bit 1 in register 0x40 to 1
  36. # FSP replaces scrolling wheel's movement as 4 bits to show horizontal and
  37. vertical scrolling.
  38. Packet 1
  39. 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
  40. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  41. 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|
  42. |---------------| |---------------| |---------------| |---------------|
  43. Byte 1: Bit7 => Y overflow
  44. Bit6 => X overflow
  45. Bit5 => Y sign bit
  46. Bit4 => X sign bit
  47. Bit3 => 1
  48. Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
  49. Bit1 => Right Button, 1 is pressed, 0 is not pressed.
  50. Bit0 => Left Button, 1 is pressed, 0 is not pressed.
  51. Byte 2: X Movement(9-bit 2's complement integers)
  52. Byte 3: Y Movement(9-bit 2's complement integers)
  53. Byte 4: Bit0 => the Vertical scrolling movement downward.
  54. Bit1 => the Vertical scrolling movement upward.
  55. Bit2 => the Horizontal scrolling movement leftward.
  56. Bit3 => the Horizontal scrolling movement rightward.
  57. Bit4 => 1 = 4th mouse button is pressed, Forward one page.
  58. 0 = 4th mouse button is not pressed.
  59. Bit5 => 1 = 5th mouse button is pressed, Backward one page.
  60. 0 = 5th mouse button is not pressed.
  61. C) MSID 7:
  62. # FSP uses 2 packets (8 Bytes) to represent Absolute Position.
  63. so we have PACKET NUMBER to identify packets.
  64. If PACKET NUMBER is 0, the packet is Packet 1.
  65. If PACKET NUMBER is 1, the packet is Packet 2.
  66. Please count this number in program.
  67. # MSID6 special packet will be enable at the same time when enable MSID 7.
  68. ==============================================================================
  69. * Absolute position for STL3886-G0.
  70. ==============================================================================
  71. @ Set bit 2 or 3 in register 0x40 to 1
  72. @ Set bit 6 in register 0x40 to 1
  73. Packet 1 (ABSOLUTE POSITION)
  74. 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
  75. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  76. 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|
  77. |---------------| |---------------| |---------------| |---------------|
  78. Byte 1: Bit7~Bit6 => 00, Normal data packet
  79. => 01, Absolute coordination packet
  80. => 10, Notify packet
  81. Bit5 => valid bit
  82. Bit4 => 1
  83. Bit3 => 1
  84. Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
  85. Bit1 => Right Button, 1 is pressed, 0 is not pressed.
  86. Bit0 => Left Button, 1 is pressed, 0 is not pressed.
  87. Byte 2: X coordinate (xpos[9:2])
  88. Byte 3: Y coordinate (ypos[9:2])
  89. Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
  90. Bit3~Bit2 => X coordinate (ypos[1:0])
  91. Bit4 => scroll up
  92. Bit5 => scroll down
  93. Bit6 => scroll left
  94. Bit7 => scroll right
  95. Notify Packet for G0
  96. 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
  97. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  98. 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|
  99. |---------------| |---------------| |---------------| |---------------|
  100. Byte 1: Bit7~Bit6 => 00, Normal data packet
  101. => 01, Absolute coordination packet
  102. => 10, Notify packet
  103. Bit5 => 0
  104. Bit4 => 1
  105. Bit3 => 1
  106. Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
  107. Bit1 => Right Button, 1 is pressed, 0 is not pressed.
  108. Bit0 => Left Button, 1 is pressed, 0 is not pressed.
  109. Byte 2: Message Type => 0x5A (Enable/Disable status packet)
  110. Mode Type => 0xA5 (Normal/Icon mode status)
  111. Byte 3: Message Type => 0x00 (Disabled)
  112. => 0x01 (Enabled)
  113. Mode Type => 0x00 (Normal)
  114. => 0x01 (Icon)
  115. Byte 4: Bit7~Bit0 => Don't Care
  116. ==============================================================================
  117. * Absolute position for STL3888-Ax.
  118. ==============================================================================
  119. Packet 1 (ABSOLUTE POSITION)
  120. 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
  121. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  122. 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|
  123. |---------------| |---------------| |---------------| |---------------|
  124. Byte 1: Bit7~Bit6 => 00, Normal data packet
  125. => 01, Absolute coordination packet
  126. => 10, Notify packet
  127. Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
  128. When both fingers are up, the last two reports have zero valid
  129. bit.
  130. Bit4 => arc
  131. Bit3 => 1
  132. Bit2 => Left Button, 1 is pressed, 0 is released.
  133. Bit1 => 0
  134. Bit0 => 1
  135. Byte 2: X coordinate (xpos[9:2])
  136. Byte 3: Y coordinate (ypos[9:2])
  137. Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
  138. Bit3~Bit2 => X coordinate (ypos[1:0])
  139. Bit5~Bit4 => y1_g
  140. Bit7~Bit6 => x1_g
  141. Packet 2 (ABSOLUTE POSITION)
  142. 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
  143. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  144. 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|
  145. |---------------| |---------------| |---------------| |---------------|
  146. Byte 1: Bit7~Bit6 => 00, Normal data packet
  147. => 01, Absolute coordinates packet
  148. => 10, Notify packet
  149. Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
  150. When both fingers are up, the last two reports have zero valid
  151. bit.
  152. Bit4 => arc
  153. Bit3 => 1
  154. Bit2 => Right Button, 1 is pressed, 0 is released.
  155. Bit1 => 1
  156. Bit0 => 0
  157. Byte 2: X coordinate (xpos[9:2])
  158. Byte 3: Y coordinate (ypos[9:2])
  159. Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
  160. Bit3~Bit2 => X coordinate (ypos[1:0])
  161. Bit5~Bit4 => y2_g
  162. Bit7~Bit6 => x2_g
  163. Notify Packet for STL3888-Ax
  164. 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
  165. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  166. 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|
  167. |---------------| |---------------| |---------------| |---------------|
  168. Byte 1: Bit7~Bit6 => 00, Normal data packet
  169. => 01, Absolute coordinates packet
  170. => 10, Notify packet
  171. Bit5 => 1
  172. Bit4 => when in absolute coordinates mode (valid when EN_PKT_GO is 1):
  173. 0: left button is generated by the on-pad command
  174. 1: left button is generated by the external button
  175. Bit3 => 1
  176. Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
  177. Bit1 => Right Button, 1 is pressed, 0 is not pressed.
  178. Bit0 => Left Button, 1 is pressed, 0 is not pressed.
  179. Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
  180. Byte 3: Bit7~Bit6 => Don't care
  181. Bit5~Bit4 => Number of fingers
  182. Bit3~Bit1 => Reserved
  183. Bit0 => 1: enter gesture mode; 0: leaving gesture mode
  184. Byte 4: Bit7 => scroll right button
  185. Bit6 => scroll left button
  186. Bit5 => scroll down button
  187. Bit4 => scroll up button
  188. * Note that if gesture and additional buttoni (Bit4~Bit7)
  189. happen at the same time, the button information will not
  190. be sent.
  191. Bit3~Bit0 => Reserved
  192. Sample sequence of Multi-finger, Multi-coordinate mode:
  193. notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
  194. abs pkt 2, ..., notify packet (valid bit == 0)
  195. ==============================================================================
  196. * Absolute position for STL3888-B0.
  197. ==============================================================================
  198. Packet 1(ABSOLUTE POSITION)
  199. 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
  200. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  201. 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|
  202. |---------------| |---------------| |---------------| |---------------|
  203. Byte 1: Bit7~Bit6 => 00, Normal data packet
  204. => 01, Absolute coordinates packet
  205. => 10, Notify packet
  206. Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
  207. When both fingers are up, the last two reports have zero valid
  208. bit.
  209. Bit4 => finger up/down information. 1: finger down, 0: finger up.
  210. Bit3 => 1
  211. Bit2 => finger index, 0 is the first finger, 1 is the second finger.
  212. Bit1 => Right Button, 1 is pressed, 0 is not pressed.
  213. Bit0 => Left Button, 1 is pressed, 0 is not pressed.
  214. Byte 2: X coordinate (xpos[9:2])
  215. Byte 3: Y coordinate (ypos[9:2])
  216. Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
  217. Bit3~Bit2 => X coordinate (ypos[1:0])
  218. Bit4 => scroll down button
  219. Bit5 => scroll up button
  220. Bit6 => scroll left button
  221. Bit7 => scroll right button
  222. Packet 2 (ABSOLUTE POSITION)
  223. 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
  224. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  225. 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|
  226. |---------------| |---------------| |---------------| |---------------|
  227. Byte 1: Bit7~Bit6 => 00, Normal data packet
  228. => 01, Absolute coordination packet
  229. => 10, Notify packet
  230. Bit5 => Valid bit, 0 means that the coordinate is invalid or finger up.
  231. When both fingers are up, the last two reports have zero valid
  232. bit.
  233. Bit4 => finger up/down information. 1: finger down, 0: finger up.
  234. Bit3 => 1
  235. Bit2 => finger index, 0 is the first finger, 1 is the second finger.
  236. Bit1 => Right Button, 1 is pressed, 0 is not pressed.
  237. Bit0 => Left Button, 1 is pressed, 0 is not pressed.
  238. Byte 2: X coordinate (xpos[9:2])
  239. Byte 3: Y coordinate (ypos[9:2])
  240. Byte 4: Bit1~Bit0 => Y coordinate (xpos[1:0])
  241. Bit3~Bit2 => X coordinate (ypos[1:0])
  242. Bit4 => scroll down button
  243. Bit5 => scroll up button
  244. Bit6 => scroll left button
  245. Bit7 => scroll right button
  246. Notify Packet for STL3888-B0
  247. 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. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  249. 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|
  250. |---------------| |---------------| |---------------| |---------------|
  251. Byte 1: Bit7~Bit6 => 00, Normal data packet
  252. => 01, Absolute coordination packet
  253. => 10, Notify packet
  254. Bit5 => 1
  255. Bit4 => when in absolute coordinate mode (valid when EN_PKT_GO is 1):
  256. 0: left button is generated by the on-pad command
  257. 1: left button is generated by the external button
  258. Bit3 => 1
  259. Bit2 => Middle Button, 1 is pressed, 0 is not pressed.
  260. Bit1 => Right Button, 1 is pressed, 0 is not pressed.
  261. Bit0 => Left Button, 1 is pressed, 0 is not pressed.
  262. Byte 2: Message Type => 0xB7 (Multi Finger, Multi Coordinate mode)
  263. Byte 3: Bit7~Bit6 => Don't care
  264. Bit5~Bit4 => Number of fingers
  265. Bit3~Bit1 => Reserved
  266. Bit0 => 1: enter gesture mode; 0: leaving gesture mode
  267. Byte 4: Bit7 => scroll right button
  268. Bit6 => scroll left button
  269. Bit5 => scroll up button
  270. Bit4 => scroll down button
  271. * Note that if gesture and additional button(Bit4~Bit7)
  272. happen at the same time, the button information will not
  273. be sent.
  274. Bit3~Bit0 => Reserved
  275. Sample sequence of Multi-finger, Multi-coordinate mode:
  276. notify packet (valid bit == 1), abs pkt 1, abs pkt 2, abs pkt 1,
  277. abs pkt 2, ..., notify packet (valid bit == 0)
  278. ==============================================================================
  279. * FSP Enable/Disable packet
  280. ==============================================================================
  281. 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
  282. BYTE |---------------|BYTE |---------------|BYTE|---------------|BYTE|---------------|
  283. 1 |Y|X|0|0|1|M|R|L| 2 |0|1|0|1|1|0|1|E| 3 | | | | | | | | | 4 | | | | | | | | |
  284. |---------------| |---------------| |---------------| |---------------|
  285. FSP will send out enable/disable packet when FSP receive PS/2 enable/disable
  286. command. Host will receive the packet which Middle, Right, Left button will
  287. be set. The packet only use byte 0 and byte 1 as a pattern of original packet.
  288. Ignore the other bytes of the packet.
  289. Byte 1: Bit7 => 0, Y overflow
  290. Bit6 => 0, X overflow
  291. Bit5 => 0, Y sign bit
  292. Bit4 => 0, X sign bit
  293. Bit3 => 1
  294. Bit2 => 1, Middle Button
  295. Bit1 => 1, Right Button
  296. Bit0 => 1, Left Button
  297. Byte 2: Bit7~1 => (0101101b)
  298. Bit0 => 1 = Enable
  299. 0 = Disable
  300. Byte 3: Don't care
  301. Byte 4: Don't care (MOUSE ID 3, 4)
  302. Byte 5~8: Don't care (Absolute packet)
  303. ==============================================================================
  304. * PS/2 Command Set
  305. ==============================================================================
  306. FSP supports basic PS/2 commanding set and modes, refer to following URL for
  307. details about PS/2 commands:
  308. http://www.computer-engineering.org/ps2mouse/
  309. ==============================================================================
  310. * Programming Sequence for Determining Packet Parsing Flow
  311. ==============================================================================
  312. 1. Identify FSP by reading device ID(0x00) and version(0x01) register
  313. 2. Determine number of buttons by reading status2 (0x0b) register
  314. buttons = reg[0x0b] & 0x30
  315. if buttons == 0x30 or buttons == 0x20:
  316. # two/four buttons
  317. Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
  318. section A for packet parsing detail(ignore byte 4, bit ~ 7)
  319. elif buttons == 0x10:
  320. # 6 buttons
  321. Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
  322. section B for packet parsing detail
  323. elif buttons == 0x00:
  324. # 6 buttons
  325. Refer to 'Finger Sensing Pad PS/2 Mouse Intellimouse'
  326. section A for packet parsing detail
  327. ==============================================================================
  328. * Programming Sequence for Register Reading/Writing
  329. ==============================================================================
  330. Register inversion requirement:
  331. Following values needed to be inverted(the '~' operator in C) before being
  332. sent to FSP:
  333. 0xe9, 0xee, 0xf2 and 0xff.
  334. Register swapping requirement:
  335. Following values needed to have their higher 4 bits and lower 4 bits being
  336. swapped before being sent to FSP:
  337. 10, 20, 40, 60, 80, 100 and 200.
  338. Register reading sequence:
  339. 1. send 0xf3 PS/2 command to FSP;
  340. 2. send 0x66 PS/2 command to FSP;
  341. 3. send 0x88 PS/2 command to FSP;
  342. 4. send 0xf3 PS/2 command to FSP;
  343. 5. if the register address being to read is not required to be
  344. inverted(refer to the 'Register inversion requirement' section),
  345. goto step 6
  346. 5a. send 0x68 PS/2 command to FSP;
  347. 5b. send the inverted register address to FSP and goto step 8;
  348. 6. if the register address being to read is not required to be
  349. swapped(refer to the 'Register swapping requirement' section),
  350. goto step 7
  351. 6a. send 0xcc PS/2 command to FSP;
  352. 6b. send the swapped register address to FSP and goto step 8;
  353. 7. send 0x66 PS/2 command to FSP;
  354. 7a. send the original register address to FSP and goto step 8;
  355. 8. send 0xe9(status request) PS/2 command to FSP;
  356. 9. the response read from FSP should be the requested register value.
  357. Register writing sequence:
  358. 1. send 0xf3 PS/2 command to FSP;
  359. 2. if the register address being to write is not required to be
  360. inverted(refer to the 'Register inversion requirement' section),
  361. goto step 3
  362. 2a. send 0x74 PS/2 command to FSP;
  363. 2b. send the inverted register address to FSP and goto step 5;
  364. 3. if the register address being to write is not required to be
  365. swapped(refer to the 'Register swapping requirement' section),
  366. goto step 4
  367. 3a. send 0x77 PS/2 command to FSP;
  368. 3b. send the swapped register address to FSP and goto step 5;
  369. 4. send 0x55 PS/2 command to FSP;
  370. 4a. send the register address to FSP and goto step 5;
  371. 5. send 0xf3 PS/2 command to FSP;
  372. 6. if the register value being to write is not required to be
  373. inverted(refer to the 'Register inversion requirement' section),
  374. goto step 7
  375. 6a. send 0x47 PS/2 command to FSP;
  376. 6b. send the inverted register value to FSP and goto step 9;
  377. 7. if the register value being to write is not required to be
  378. swapped(refer to the 'Register swapping requirement' section),
  379. goto step 8
  380. 7a. send 0x44 PS/2 command to FSP;
  381. 7b. send the swapped register value to FSP and goto step 9;
  382. 8. send 0x33 PS/2 command to FSP;
  383. 8a. send the register value to FSP;
  384. 9. the register writing sequence is completed.
  385. ==============================================================================
  386. * Register Listing
  387. ==============================================================================
  388. offset width default r/w name
  389. 0x00 bit7~bit0 0x01 RO device ID
  390. 0x01 bit7~bit0 0xc0 RW version ID
  391. 0x02 bit7~bit0 0x01 RO vendor ID
  392. 0x03 bit7~bit0 0x01 RO product ID
  393. 0x04 bit3~bit0 0x01 RW revision ID
  394. 0x0b RO test mode status 1
  395. bit3 1 RO 0: rotate 180 degree, 1: no rotation
  396. bit5~bit4 RO number of buttons
  397. 11 => 2, lbtn/rbtn
  398. 10 => 4, lbtn/rbtn/scru/scrd
  399. 01 => 6, lbtn/rbtn/scru/scrd/scrl/scrr
  400. 00 => 6, lbtn/rbtn/scru/scrd/fbtn/bbtn
  401. 0x0f RW register file page control
  402. bit0 0 RW 1 to enable page 1 register files
  403. 0x10 RW system control 1
  404. bit0 1 RW Reserved, must be 1
  405. bit1 0 RW Reserved, must be 0
  406. bit4 1 RW Reserved, must be 0
  407. bit5 0 RW register clock gating enable
  408. 0: read only, 1: read/write enable
  409. (Note that following registers does not require clock gating being
  410. enabled prior to write: 05 06 07 08 09 0c 0f 10 11 12 16 17 18 23 2e
  411. 40 41 42 43. In addition to that, this bit must be 1 when gesture
  412. mode is enabled)
  413. 0x31 RW on-pad command detection
  414. bit7 0 RW on-pad command left button down tag
  415. enable
  416. 0: disable, 1: enable
  417. 0x34 RW on-pad command control 5
  418. bit4~bit0 0x05 RW XLO in 0s/4/1, so 03h = 0010.1b = 2.5
  419. (Note that position unit is in 0.5 scanline)
  420. bit7 0 RW on-pad tap zone enable
  421. 0: disable, 1: enable
  422. 0x35 RW on-pad command control 6
  423. bit4~bit0 0x1d RW XHI in 0s/4/1, so 19h = 1100.1b = 12.5
  424. (Note that position unit is in 0.5 scanline)
  425. 0x36 RW on-pad command control 7
  426. bit4~bit0 0x04 RW YLO in 0s/4/1, so 03h = 0010.1b = 2.5
  427. (Note that position unit is in 0.5 scanline)
  428. 0x37 RW on-pad command control 8
  429. bit4~bit0 0x13 RW YHI in 0s/4/1, so 11h = 1000.1b = 8.5
  430. (Note that position unit is in 0.5 scanline)
  431. 0x40 RW system control 5
  432. bit1 0 RW FSP Intellimouse mode enable
  433. 0: disable, 1: enable
  434. bit2 0 RW movement + abs. coordinate mode enable
  435. 0: disable, 1: enable
  436. (Note that this function has the functionality of bit 1 even when
  437. bit 1 is not set. However, the format is different from that of bit 1.
  438. In addition, when bit 1 and bit 2 are set at the same time, bit 2 will
  439. override bit 1.)
  440. bit3 0 RW abs. coordinate only mode enable
  441. 0: disable, 1: enable
  442. (Note that this function has the functionality of bit 1 even when
  443. bit 1 is not set. However, the format is different from that of bit 1.
  444. In addition, when bit 1, bit 2 and bit 3 are set at the same time,
  445. bit 3 will override bit 1 and 2.)
  446. bit5 0 RW auto switch enable
  447. 0: disable, 1: enable
  448. bit6 0 RW G0 abs. + notify packet format enable
  449. 0: disable, 1: enable
  450. (Note that the absolute/relative coordinate output still depends on
  451. bit 2 and 3. That is, if any of those bit is 1, host will receive
  452. absolute coordinates; otherwise, host only receives packets with
  453. relative coordinate.)
  454. bit7 0 RW EN_PS2_F2: PS/2 gesture mode 2nd
  455. finger packet enable
  456. 0: disable, 1: enable
  457. 0x43 RW on-pad control
  458. bit0 0 RW on-pad control enable
  459. 0: disable, 1: enable
  460. (Note that if this bit is cleared, bit 3/5 will be ineffective)
  461. bit3 0 RW on-pad fix vertical scrolling enable
  462. 0: disable, 1: enable
  463. bit5 0 RW on-pad fix horizontal scrolling enable
  464. 0: disable, 1: enable