Ec specification: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (...)
(game key and write sci mask commands were interchanged)
Line 38: Line 38:
** 0x10 Ebook mode change
** 0x10 Ebook mode change
** 0x20?? Lid status change
** 0x20?? Lid status change
* 0x1b Game key status (2 bytes) 9 bits of key status. 1 indicates key is depressed.
* 0x1c Read SCI mask (1 byte)
* 0x1b Write SCI mask (1 byte)
* 0x1d Game key status (2 bytes) 9 bits of key status. 1 indicates key is depressed.
** Bit 1: KEY_LR_R
** Bit 1: KEY_LR_R
** Bit 2: KEY_RT_R
** Bit 2: KEY_RT_R
Line 48: Line 50:
** Bit 8: KEY_UP_R
** Bit 8: KEY_UP_R
** Bit 9: KEY_DN_R
** Bit 9: KEY_DN_R
* 0x1c Read SCI mask (1 byte)
* 0x1d Write SCI mask (1 byte)
* 0x1e Set date (day/mon/year)
* 0x1e Set date (day/mon/year)
** Need details for using this.
** Need details for using this.

Revision as of 20:51, 10 May 2007

  This page is monitored by the OLPC team.

Operational Specification of the XO embedded controller (EC)

These pages will eventually document the commands and responsibilities of the EC in the XO system. Currently its not much more than a cut and paste from a variety of emails, trac tickets, and operational info extracted from the way the EC is known to work. Some of the descriptions are a bit odd and terse as the source is from non-native English speakers. More verbosity and better descriptions will be added as time allows.

EC Command List

  • 0x10 Read voltage (2 bytes)
  • 0x11 Read current (2 bytes)
  • 0x12 Read ACR (2 bytes)
  • 0x13 Read battery temperature (2 bytes)
  • 0x14 Read ambient temperature (2 bytes)
  • 0x15 Read battery status (1 byte)
    • Bit 0: 1: battery exists
    • Bit 1: 1: battery full charged
    • Bit 2: 1: battery low
    • Bit 3: 1: battery destroyed
    • Bit 4: 1: AC in
    • Bits 5-7 Not defined
  • 0x16 Read Battery State of Charge (SOC) (1 byte)
  • 0x17 Read Battery gas gauge chip serial number (6 bytes)
  • 0x18 Read Battery gas gauge data
  • 0x19 Read board id (1 byte)
  • 0x1a Read SCI source (1 byte)
    • 0x01 Game button
    • 0x02 Battery Status Change. Generated for any of:
      • AC plugged/unplugged
      • Battery inserted/removed
      • Battery Low
      • Battery full
      • Battery destroyed
    • 0x04 Battery SOC Change
    • 0x08 Battery subsystem error
    • 0x10 Ebook mode change
    • 0x20?? Lid status change
  • 0x1c Read SCI mask (1 byte)
  • 0x1b Write SCI mask (1 byte)
  • 0x1d Game key status (2 bytes) 9 bits of key status. 1 indicates key is depressed.
    • Bit 1: KEY_LR_R
    • Bit 2: KEY_RT_R
    • Bit 3: KEY_UP_L
    • Bit 4: KEY_DN_L
    • Bit 5: KEY_LF_L
    • Bit 6: KEY_RT_L
    • Bit 7: KEY_COLOR/MONO
    • Bit 8: KEY_UP_R
    • Bit 9: KEY_DN_R
  • 0x1e Set date (day/mon/year)
    • Need details for using this.
  • 0x1f Read battery subsystem error code (1 byte)
    • 0x02 Pack info fail (LiFePO4 & NiMH)
    • 0x04 Over voltage checking fail (LiFePO4)
    • 0x05 Over temperature (58C) (LiFePO4)
    • 0x06 Gauge stop or sensor break (LiFePO4 & NiMH)
    • 0x07 Sensor out of control (NiMH)
    • 0x09 Battery ID fail & temperature > 52C
    • 0x10 ACR fail (NiMH)
  • 0x23 Set WLAN Power on/off
  • 0x24 Wake up WLAN
  • 0x25 WLAN reset
  • 0x26 DCON power enable/disable
  • 0x27?? Read power rail status
    • DCON status
    • WLAN status

EC IO Pinout

  • Pin 6: GPIO00 VR_ON#
  • Pin 9: GPIO01 WLAN_EN
  • Pin 10: GPIO02 SWI#
  • Pin 23: GPIO06 TX
  • Pin 24: GPIO07 RX/BAT_L0
  • Pin 25: GPIO08 EC_EAPD
  • Pin 26: GPIO09 LED_PWR#
  • Pin 27: GPIO0A LED_CHG_R#
  • Pin 28: GPIO0B WAKEUP
  • Pin 29: GPIO0C PWR_BUT#
  • Pin 31: GPIO0E CHG
  • Pin 32: GPIO0F CC0
  • Pin 37: GPIO10 EC->WLAN Wakeup
    • Fix schematic!!
  • Pin 1: GPIOE0 EC_WP#
  • Pin 2: GPIOE1 CV_SET
  • Pin 3: GPIOE2 DQ
  • Pin 4: GPIOE3 LED_CHG_G
  • Pin 33: GPIOE8 BAT_L1
  • Pin

KeyCodes for Buttons

Key matrix Make code Break code
Bit 9: KEY_DN_R, {0xE0,0x66,0x00} {0xE0,0xE6,0x00}
Bit 8: KEY_UP_R, {0xE0,0x65,0x00} {0xE0,0xE5,0x00}
Bit 7:KEY_COLOR/MONO {0x69,0x00,0x00} {0xE9,0x00,0x00}
Bit 6: KEY_RT_L, {0x68,0x00,0x00} {0xE8,0x00,0x00}
Bit 5: KEY_LF_L, {0x67,0x00,0x00} {0xE7,0x00,0x00}
Bit 4:KEY_DN_L, {0x66,0x00,0x00} {0xE6,0x00,0x00}
Bit 3: KEY_UP_L, {0x65,0x00,0x00} {0xE5,0x00,0x00}
Bit 2: KEY_RT_R, {0xE0,0x68,0x00} {0xE0,0xE8,0x00}
Bit 1:KEY_LR_R {0xE0,0x67,0x00} {0xE0,0xE7,0x00}

Firmware Address Map

0x00000 - 0ffff EC
0x10000 - dffff OFW
0xe0000 - ef7ff Reserved
0xef800 - effff Manufacturing data
0xf0000 - fffff Early startup code