|
| 1 | +# Framework Laptop Embedded Controller (EC) |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +This project holds the code used for the Framework Laptop Embedded Controller. |
| 6 | + |
| 7 | +## Warning |
| 8 | + |
| 9 | +The Embedded Controller on your Framework Laptop handles low level functions, including power sequencing the system. Modifying the EC code can cause your system to not power on or boot or cause damage to the mainboard, battery, or other parts of the system or devices attached to the system. **Hardware damage caused by EC firmware modifications would not be covered under the Framework Limited Warranty.** |
| 10 | + |
| 11 | +## Building |
| 12 | + |
| 13 | +### Environment Configuration |
| 14 | + |
| 15 | +The Framework Laptop EC code can be built easily outside the Chromium development environment as a standalone project with a minimal set of tools. |
| 16 | + |
| 17 | +On Ubuntu you can install the development tools easily. |
| 18 | + |
| 19 | +``` |
| 20 | +sudo apt install gcc-arm-none-eabi libftdi1-dev |
| 21 | +``` |
| 22 | + |
| 23 | +## Framework Laptop EC for Intel 11th Gen Core Processors |
| 24 | + |
| 25 | +Building the project |
| 26 | +``` |
| 27 | +make BOARD=hx20 CROSS_COMPILE=arm-none-eabi- |
| 28 | +``` |
| 29 | + |
| 30 | +The output artifact is ```build/hx20/ec.bin``` which can be flashed to the EC SPI flash ROM. |
| 31 | + |
| 32 | +### EC Flash configuration |
| 33 | + |
| 34 | +When flashing the EC for Framework Laptops with Intel 11th Gen Core Processors, do not erase or overwrite the sectors 0x3C000 to 0x3FFFF, or 0x79000 to 0x7FFFF. |
| 35 | + |
| 36 | +Currently the EC only runs from the ro region. |
| 37 | +``` |
| 38 | +00000000:00000fff bootsector |
| 39 | +00001000:00039fff lfwro |
| 40 | +00040000:00078fff rw |
| 41 | +``` |
| 42 | +## EC background information |
| 43 | +The EC is a MEC1521H-B0-I-SZ WFBGA144 which has 256kB of RAM. |
| 44 | + |
| 45 | +Most changes are limited to the following folders, however there are some modifications in common. |
| 46 | +``` |
| 47 | +board/hx20 |
| 48 | +chip/mchp |
| 49 | +``` |
| 50 | + |
| 51 | +### EC Boot process |
| 52 | +Note that the EC has a checksum and header verification of the EC code image. Arbitarily modifying code, for example with a reverse engineering tool will cause the EC to fail to boot. Compiling the code from source will correctly generate the required checksum information to allow the EC to boot. |
| 53 | + |
| 54 | +### EC Debug |
| 55 | +The EC has debug header in the upper right corner of the Mainboard next to the on-board power button. This is the 10 pin EC debug connector JECDB. Pin 1 is nearest the power button. The EC is configured for 2 wire SWD. |
| 56 | + |
| 57 | +|Pin|Description| |
| 58 | +| --- | --- | |
| 59 | +| 1 | EC_VCC_3.3 | |
| 60 | +| 2 | TDI | |
| 61 | +| 3 | TMS | |
| 62 | +| 4 | CLK | |
| 63 | +| 5 | TDO | |
| 64 | +| 6 | UART_TX | |
| 65 | +| 7 | UART_RX | |
| 66 | +| 8 | | |
| 67 | +| 9 | EC_RESETI | |
| 68 | +| 10 | GND | |
| 69 | + |
| 70 | +## Background |
| 71 | + |
| 72 | +The Framework Laptop EC is based upon the Google Chromium EC repository: https://chromium.googlesource.com/chromiumos/platform/ec. We upstream common features where they fit into the design decisions of Chrome OS. However, there are a number of features and changes that will be unlikely to be upstreamed because they are unnecessary for Chrome OS operation or do not fit the philosophy of Chrome OS. |
| 73 | + |
| 74 | +For example, we implement memory mapped regions that are not used in Chrome OS such as the UCSI driver. |
| 75 | + |
| 76 | +The remainder of this README file is directly from Google's Chromium EC project. |
| 77 | + |
| 78 | +--- |
| 79 | + |
1 | 80 | # Embedded Controller (EC)
|
2 | 81 |
|
3 | 82 | [TOC]
|
|
0 commit comments