Embedded controller: Difference between revisions
RafaelOrtiz (talk | contribs) m (Features) |
No edit summary |
||
(60 intermediate revisions by 16 users not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
{{Olpcboxtop}} |
|||
{{OBX source dev|projects/openec}} |
|||
{{Olpcboxbottom}} |
|||
⚫ | |||
⚫ | |||
{{OLPC}} |
{{OLPC}} |
||
⚫ | |||
= Introduction = |
== Introduction == |
||
The [[Hardware#XO_Laptop|XO-1 laptop]] uses a small micro-controller, an ENE KB3700 ([[Media:KB3700-ds-01.pdf|Datasheet]]), to control the battery charging operation and perform other tasks associated with starting and stopping the laptop. |
|||
OLPC is now working in an Open implementation of the XOs Embedded Controller. |
|||
The code of the EC is programed to a [[Image:KB3700-ds-01.pdf]] that has an 8051 microprocessor, for the code to be open we need to compile everything in [[SDCC]] or OFW. |
|||
The need for an open implementation is due to the fact that the actual EC has some flakiness in the recovery process.(among many other things). |
|||
An example of a bug of the old EC can be found in {{ticket|477}} |
|||
This Embedded Controller (EC) consists of a 8051 micro-controller, a dedicated LPC interface to communicate with the processor, and an SPI Flash ROM interface. The SPI Flash ROM supports two code segments, and a table of [[Manufacturing Data]]. The EC supports the Boot Hub Protocol, allowing the XO's main processor to boot from one of the code segments in the SPI Flash. |
|||
== |
== Details == |
||
The EC |
The EC, implemented as a KB3700, has a paramount importance in controlling the XO when the CPU is not active. To do so, the KB3700 communicates with the CPU via the [[Revised_EC_Port_6C_Command_Protocol|EC protocol]] over a physical LPC interface. For more information, see the [[Ec specification]]. |
||
For doing so the KB3700 has to communicate with the CPU via the [[Revised_EC_Port_6C_Command_Protocol|EC protocol]], this protocol is managed in the ports 0x66 and 0x62 of the KB3700. These two ports are serially connected with the 0x6C and 0x68 ports of the CPU. (for more info check [[Ec_specification]]). |
|||
But the KB3700 has to communicate also with the DS2657 (The battery charger) via the 1 wire Dallas protocol. |
|||
One can deduce some of the inside programing of the EC via the [http://dev.laptop.org/~joel/ec-dump.fth ec-dump.fth] under OpenFirmware. |
|||
Running the ec-dump script give us valuable data about internals of the ec, mostly the [[EC_Register_Settings]] |
|||
The KB3700 also communicates with the Maxim [http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5104 DS2756] battery fuel gauge IC within the battery pack, via the [http://en.wikipedia.org/wiki/1-Wire 1-wire] Dallas protocol. [[Media:DS2756.pdf|DS2756 data sheet]]. |
|||
= Actual development = |
|||
=== ec-status === |
|||
All the work is going to be in the git repository [http://dev.laptop.org/git.do?p=projects/openec;a=summary OpenEC] |
|||
One can deduce part of the internal state of the EC using [http://dev.laptop.org/~joel/ec-dump.fth ec-dump.fth] under [[Open Firmware]]. Running the ec-dump script gives us valuable data about internals of the EC, being the [[EC Register Settings]]. |
|||
The procedure to run '''ec-dump''' over internet in a wireless connection is: |
|||
To get this code in your machine please do: |
|||
ok wifi media lab 802.11 *change it to your name AP |
|||
git-clone git://dev.laptop.org/git.do?p=projects/openec |
|||
ok fl http:\\18.85.2.147\~joel\ec-dump.fth *change to your AP IP direction |
|||
Running '''ec-dump''' over internet and saving the file in a USB key: |
|||
''For info check [[Importing_your_project]]'' |
|||
ok wifi media lab 802.11 *change it to your name AP |
|||
ok fload http:\\18.85.2.147\~rafael\to-file.fth |
|||
ok to-file u:\ec-dump fload http:\\18.85.2.147\~joel\ec-dump.fth |
|||
== |
== Source and Licensing == |
||
* Failsafe Code |
|||
* Easy debugging |
|||
* Forth/C implementation. |
|||
The firmware running on the XO-1's EC, while heavily modified and supported by OLPC, was originally written by two different companies. OLPC had no success convincing those companies to open source their code. |
|||
== To Do == |
|||
* Implement KB3700 special registers in KB3700 header |
|||
* Testing |
|||
The OLPC community did work on [[OpenEC]], an Open Source implementation of the XO-1's Embedded Controller firmware. It reached an early stage and was not functional. |
|||
==Mail list== |
|||
The XO-1.75 and XO-4 embedded controller firmware is open source. See [[Firmware]]. |
|||
* http://lists.laptop.org/listinfo/openec |
|||
== Related Documentation == |
|||
*[[XO_Full_Reset|Rebooting the Embedded Controller in a laptop]] |
|||
*[[Media:KB3700-ds-01.pdf|ENE KB3700 Datasheet]] |
|||
* See other articles in [[:Category:EC]] |
|||
⚫ | |||
[[Category:Developers]] |
|||
[[Category:EC]] |
[[Category:EC]] |
||
⚫ |
Latest revision as of 04:05, 13 August 2013
Introduction
The XO-1 laptop uses a small micro-controller, an ENE KB3700 (Datasheet), to control the battery charging operation and perform other tasks associated with starting and stopping the laptop.
This Embedded Controller (EC) consists of a 8051 micro-controller, a dedicated LPC interface to communicate with the processor, and an SPI Flash ROM interface. The SPI Flash ROM supports two code segments, and a table of Manufacturing Data. The EC supports the Boot Hub Protocol, allowing the XO's main processor to boot from one of the code segments in the SPI Flash.
Details
The EC, implemented as a KB3700, has a paramount importance in controlling the XO when the CPU is not active. To do so, the KB3700 communicates with the CPU via the EC protocol over a physical LPC interface. For more information, see the Ec specification.
The KB3700 also communicates with the Maxim DS2756 battery fuel gauge IC within the battery pack, via the 1-wire Dallas protocol. DS2756 data sheet.
ec-status
One can deduce part of the internal state of the EC using ec-dump.fth under Open Firmware. Running the ec-dump script gives us valuable data about internals of the EC, being the EC Register Settings.
The procedure to run ec-dump over internet in a wireless connection is:
ok wifi media lab 802.11 *change it to your name AP ok fl http:\\18.85.2.147\~joel\ec-dump.fth *change to your AP IP direction
Running ec-dump over internet and saving the file in a USB key:
ok wifi media lab 802.11 *change it to your name AP ok fload http:\\18.85.2.147\~rafael\to-file.fth ok to-file u:\ec-dump fload http:\\18.85.2.147\~joel\ec-dump.fth
Source and Licensing
The firmware running on the XO-1's EC, while heavily modified and supported by OLPC, was originally written by two different companies. OLPC had no success convincing those companies to open source their code.
The OLPC community did work on OpenEC, an Open Source implementation of the XO-1's Embedded Controller firmware. It reached an early stage and was not functional.
The XO-1.75 and XO-4 embedded controller firmware is open source. See Firmware.
Related Documentation
- Rebooting the Embedded Controller in a laptop
- ENE KB3700 Datasheet
- See other articles in Category:EC