#1646 NORM BTest-4: Keyboard doesn't work the first time power is applied to the EC

Zarro Boogs per Child bugtracker at laptop.org
Tue Jun 5 05:34:50 EDT 2007


#1646: Keyboard doesn't work the first time power is applied to the EC
---------------------------------+------------------------------------------
 Reporter:  wmb at firmworks.com    |       Owner:  David.Lin              
     Type:  defect               |      Status:  new                    
 Priority:  normal               |   Milestone:  BTest-4                
Component:  embedded controller  |     Version:  OFW development version
 Keywords:                       |    Verified:  0                      
---------------------------------+------------------------------------------
 This is with the new test EC code.  You can try it with
 http://dev.laptop.org/~wmb/q2c14h.rom

 I have observed this bug on a B3 and a preB3.

 There are two easy ways to trigger this problem:

 {{{
 Way 1:

 a) Remove all power from the unit (battery and AC)
 b) Reinstate the power (battery or AC or both)
 c) Press the power button until the LED comes on
 d) Press the X game key until the screen says "Release the game key to
 continue"
 e) Wait for the countdown then type the ESC key (upper left corner of
 keyboard)
 f) Notice that you do *not* get an ok prompt
 g) Press the power button until the power LED goes off
 h) Repeat steps (c) - (e)
 i) This time you do get an ok prompt, and the keyboard works

 Way 2:

 A) Get to the ok prompt
 B) Type  "kbc-off kbc-on"  The power will go off
 C) Repeat steps (c) - (i) above.  Note that the result is the same as Way
 1.
 }}

 Note that OFW normally executes "kbc-off" before, and "kbc-on" after,
 reflashing the SPI FLASH.  kbc-off turns off the 8051 microprocessor in
 the EC so that it doesn't fetch from SPI FLASH during reflashing, and kbc-
 on turns it back on in a way that results in a hard reset.

 It appears that this kind of hard reset is identical to a reset-from-no-
 power with respect to the keyboard startup behavior.

 Here is some other data that may be useful in debugging this problem:

 1) The value of EC register fc80 (KBCCB, page 15) is 0x60 when the
 keyboard is working, 0x70 when not.  The 0x10 bit is "Keyboard Device
 Disable".

 2) The value of EC register fee0 (PS2CFG, page 24) is 0x2f when the
 keyboard is working, 0x0f when not.  The 0x20 bit is "Enable PS2 Port 1"

 3) If, in the not-working case, I clear 0x10 in 0xfc80 (using a serial
 console), then type a few keys on the keyboard, then set 0x20 in 0xfee0, I
 can read the keys that I typed from the EC keyboard channel in the normal
 way.  However, after those pre-typed keys are returned, the 0x20 bit in
 0xfee0 reverts to 0, and further keyboard input does not work until I
 manually set the 0x20 bit again (and it auto-clears as before).

 4) In the non-working state, if I suspend with the 's' command (e.g. typed
 on the serial console), then resume by pressing the power button, the
 keyboard starts to work.

-- 
Ticket URL: <http://dev.laptop.org/ticket/1646>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list