cros ec

From chromebook hackers wiki
Revision as of 12:08, 13 April 2025 by WeirdTreeThing (talk | contribs)
Jump to navigationJump to search


note: this page is a stub. someone should help me by expanding it

cros_ec, the Embedded Controller or just EC for short, is a microcontroller present on all Chromebook models. It handles power states, battery charging, LEDs (including the keyboard backlight), sensors, and some input devices. Depending on the platform, it can have several additional tasks; for instance, on some Zork boards, it also handles the microphone.

Unlike conventional laptops, cros_ec's firmware is fully open source. The first version is easily buildable given a generic arm-none-eabi toolchain (and a few trivial source patches, if you're building on plain Linux); Newer boards switched to Zephyr RTOS, which at the present requires a ChromeOS chroot.

Architecture

Based on chips by a variety of manufacturers, including Nuvoton and ITE. (expand this list please)

In most cases, EC has a separate SPI flash divided into two parts: EC_RO and EC_RW. EC_RO is supposed to be only written by the factory, while EC_RW updates get shipped within coreboot.rom, and flashed on runtime if the hash mismatches. this behavior is actually quite complicated and should be explored deeper, especially around softbricks due to newer EC_RW version than the one in coreboot

Common misconceptions

  • cros_ec != Cr50/Ti50 != SuzyQ

Cr50 is a completely separate chip on the board. This is why in most cases you can recover a bad EC flash with a SuzyQ cable; Cr50's firmware never gets touched outside the factory.

Variants

cros_fp

The fingerprint MCUs used in chromebooks also run cros_ec firmware. These builds are slimmed down and include proprietary components for fingerprint matching and sensor drivers. It is unknown whether the firmware can be replaced or modified.

There are several different chips/firmwares used for cros_fp, such as bloonchipper(hatch_fp) and dartmonkey(nami_fp/nocturne_fp) (Bloons TD references).

cros_pd

The USB PD chips on some/all(?) chromebooks run cros_ec firmware. The main ec communicates with the PD chips for firmware updates and control. Coreboot on some boards will expose cros_pd to the os.

cros_scp

The SCP is a MCU on Mediatek chips. On chromebooks, this runs cros_ec firmware. The SCP handles functions such as video processing, power management, sleep, and others. The firmware for this lives in /lib/firmware/mediatek/$SOC/scp.img and is loaded on boot by the kernel driver.

cros_ish

ISH stands for Intel Sensor Hub, which sort of acts like an ec. This variant is most likely only used on Intel reference boards as all recent chromebooks have a dedicated ec.

cros_tp

This variant is used by the Google Pixelbook(eve)'s touchpad (rose). It simply communicates with the touchpad and os to communicate input events. The firmware can be upgraded via Google's flashrom fork. It is unknown if this is used in other chromebook models.

Hammer

On chromebooks with a detachable keyboard, the keyboard runs a firmware called Hammer, which is cros_ec. There are several hammer variants, which are bland, don, duck, eel, gelatin, hammer, jewel, magnemite, masterball, moonball, staff, star, wand, whiskers, whitebeard, zed. The firmware can be update via ChromeOS, it is unknown how to manually update though.