#1771 HIGH FRS: Send SCI events through keyboard queue

Zarro Boogs per Child bugtracker at laptop.org
Fri Jul 6 10:30:38 EDT 2007


#1771: Send SCI events through keyboard queue
----------------------------------+-----------------------------------------
  Reporter:  kimquirk             |       Owner:  wmb at firmworks.com
      Type:  enhancement          |      Status:  new              
  Priority:  high                 |   Milestone:  FRS              
 Component:  embedded controller  |     Version:                   
Resolution:                       |    Keywords:                   
  Verified:  0                    |  
----------------------------------+-----------------------------------------
Changes (by wmb at firmworks.com):

  * milestone:  Trial-2 => FRS

Comment:

 Here is a way this could work.  The key idea (thanks to David Woodhouse)
 is to
 use the "Active PS/2 Multiplexing" technique defined by
 http://www.synaptics.com/decaf/utilities/ps2-mux.PDF

 The kernel already supports that technique, and I suspect that the EC code
 does also.

 In brief, the technique allows the EC to support up to 4 PS/2 mice,
 instead of just 1 mouse.  There is a 3-byte "activation sequence" that
 puts the EC in active mux mode (D3/F0>F0 D3/56>56 D3/A4>xy, see page 8).
 (D3/56>56 means write D3 to port 64 and 56 to port 60 and expect the
 device to return 56).

 To send a byte zz to mouse n (0..3), write 0x9n to port 64 then write zz
 to port 60.

 When receiving a byte from the EC in active mux mode, the upper two bits
 (7,6) of port 64 are the port number (in legacy mode they signify parity
 and timeout errors).

 So it is easy to use the PS/2 channel for multiple "devices".

 I think we should take advantage of this to simplify the EC code.  We
 could define a "pseudo device" for unsolicited events from things like the
 battery and wakeup events, and another one for synchronous commands like
 read-eeprom.  The port 66 and port 6c mechanisms could just go away
 entirely.

-- 
Ticket URL: <http://dev.laptop.org/ticket/1771#comment:3>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list