This doc: http://go/cros-ite-ec-reflash
First written: 2019-04-02
Last updated: 2024-04-17
Familiarity with Chromium OS and 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.
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 -occd openfactory mode.ccd reset factoryThis 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_microIf 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.
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.binThis 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"lsusb -d 18d1:504a -v | grep iSeriallsusb -d 18d1:5014 -v | grep iSerial$ build/host/util/iteflash --i2c-interface=usb --serial 12018039-4c59c752 --send-waveform=1 --erase --write=build/"$board"/ec.binWARNING: 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.)