This doc: http://go/cros-ite-ec-reflash
First written: 2019-04-02
Last updated: 2019-04-03
Familiarity with Chromium OS Embedded Controller (EC) development is assumed.
ITE EC refers to the ITE IT8320 Embedded Controller (EC) microcontroller when used as a Chromium OS / Chrome OS EC.
CrOS refers to Chromium OS, Chrome OS, or both, depending on the context. The distinction between Chromium OS and Chrome OS is largely immaterial to this document.
Servo refers to a debug board providing direct debug access to various circuits on a Chrome OS device motherboard. As of this writing, the most common servos used by CrOS developers are CR50 (CCD), Servo Micro, and Servo v2. (Note that Servo v4 is not a Servo in this sense. It is a USB hub with a microcontroller that proxies Servo functionality from either CR50 or Servo Micro.) See also Case-Closed Debug in Chromebooks and Servo Micro.
An ITE EC is reflashed using a Servo by:
Sending special non-I2C waveforms over its I2C clock and data lines, to enable a debug mode / direct firmware update (DFU) mode.
Communicating with it using I2C, including transferring the actual EC image over I2C. The ITE EC will only respond over I2C after receiving the special waveforms.
Googlers, and Partners involved in ITE EC projects, see The State of ITE CrOS EC Reflashing. That document is not public, do not request access if you lack it.
This section applies whether using CR50 CCD via Servo v4 or SuzyQ aka SuzyQable.
CR50 MP minimum firmware version: 0.3.15
CR50 pre-PVT minimum firmware version: 0.4.15
Googlers, to upgrade CR50 firmware if needed see How to use CCD on CR50. That document is not public, do not request access if you lack it.
The CR50 CCD capabilities must be set to always
. To achieve this:
$ gsctool -o
ccd open
factory
mode.ccd reset factory
Reflashing with CR50 also requires the i2c-pseudo kernel module, unless using the CR50 CCD sans servod alternative method.
This section applies whether the Servo Micro is connected directly to your development host, or through a Servo v4.
Servo Micro minimum firmware version: servo_micro_v2.3.5
To upgrade Servo Micro firmware if needed:
$ cros_sdk
$ sudo servo_updater --board=servo_micro
If that still results in too old of a firmware version, use repo sync
and update_chroot
to update your CrOS development environment, then try again.
Reflashing with Servo Micro also requires the i2c-pseudo kernel module.
i2c-pseudo
Linux kernel module. (Do this outside of the chroot!)$ cd src/platform/ec/extra/i2c_pseudo
$ ./install
If the above fails, your system may be missing packages necessary for building kernel modules. Consult your Linux distribution's documentation and support forums. After installing any packages that might be missing, simply try the install script again.
You will need to reinstall i2c-pseudo
after each kernel upgrade.
There is an intention to upstream i2c-pseudo, though even if accepted upstream, it may or may not become included with common Linux distribution kernels.
These instructions apply when using any kind of Servo, including those with no special prerequisites (such as Servo v2 with its Yoshi flex cable connected to the DUT).
$ cros_sdk --no-ns-pid
$ sudo servod --board=<servod_board_name>
$ cros_sdk
$ cd ~/trunk/src/platform/ec
$ board=<board_name>
$ make -j BOARD="$board"
$ util/flash_ec --board="$board" --image=build/"$board"/ec.bin
This section applies whether using CR50 CCD via Servo v4 or SuzyQ aka SuzyQable.
When using CR50 CCD, it is possible to reflash without servod, which must not be running when using this method.
$ cros_sdk
$ cd ~/trunk/src/platform/ec
$ board=<board_name>
$ make -j BOARD="$board"
$ build/"$board"/util/iteflash --i2c-interface=ccd --i2c-mux --send-waveform=1 --erase --write=build/"$board"/ec.bin
WARNING: The --i2c-mux
flag is only required for some ITE EC boards. For boards without an I2C mux between CR50 and the EC, that flag must not be specified. (This is handled for you when using flash_ec
+ servod
because the latter has knowledge of which boards are expected to have the I2C mux.)