Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@
- [Development](development.md)
- [Supply-chain auditing](supply-chain.md)
- [Specifications](specs/specifications.md)
- [Embedded Controller Interface](specs/ec_interface/ec_interface.md)
- [Embedded Controller Interface](specs/ec_interface/README.md)
- [EC SoC Interface](specs/ec_interface/ec-soc-interface.md)
- [Legacy EC Interface](specs/ec_interface/legacy-ec-interface.md)
- [Secure EC Services Overview](specs/ec_interface/secure-ec-services-overview.md)
- [EC Firmware Management](specs/ec_interface/ec-firmware-management.md)
- [EC Power Service](specs/ec_interface/ec-power-service.md)
- [Battery Service](specs/ec_interface/battery-service.md)
- [Thermal Service](specs/ec_interface/thermal-service.md)
- [UCSI Interface](specs/ec_interface/ucsi-interface.md)
- [EC Input Management](specs/ec_interface/ec-input-management.md)
- [EC Time Alarm Service](specs/ec_interface/ec-time-alarm-service.md)
- [EC Debug Service](specs/ec_interface/ec-debug-service.md)
- [EC Manufacturing Service](specs/ec_interface/ec-manufacturing-service.md)
- [EC OEM Service](specs/ec_interface/ec-oem-service.md)
- [Sample System Implementation](specs/ec_interface/sample-system-implementation.md)
- [Legacy EC Interface](specs/ec_interface/legacy/README.md)
- [FF-A EC Interface](specs/ec_interface/ffa/README.md)
- [EC Firmware Management](specs/ec_interface/ffa/management.md)
- [EC Power Service](specs/ec_interface/ffa/power.md)
- [Battery Service](specs/ec_interface/ffa/battery.md)
- [Thermal Service](specs/ec_interface/ffa/thermal.md)
- [UCSI Interface](specs/ec_interface/ffa/ucsi.md)
- [EC Input Management](specs/ec_interface/ffa/input.md)
- [EC Time Alarm Service](specs/ec_interface/ffa/time-alarm.md)
- [EC Debug Service](specs/ec_interface/ffa/debug.md)
- [EC Manufacturing Service](specs/ec_interface/ffa/manufacturing.md)
- [EC OEM Service](specs/ec_interface/ffa/oem.md)
- [Sample System Implementation](specs/ec_interface/ffa/acpi-sample.md)
- [HID EC Interface](specs/ec_interface/hid/README.md)
- [HID Time and Alarm](specs/ec_interface/hid/HUTRR120-SystemWakeTimerAndRTC.md)
- [HID Battery](specs/ec_interface/hid/HUTRR-DRAFT-Battery.md)
- [eSPI PCC Specification](specs/ec_interface/espi/espi_pcc_draft.md)
147 changes: 147 additions & 0 deletions docs/src/specs/ec_interface/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Embedded Controller Interface Specification

The Embedded Controller (EC) Interface Specification describes a base set of requirements for interfacing with core
Windows features.

It covers the following areas:
- Firmware Management
- Battery
- Time and Alarm
- UCSI
- Thermal
- Power
- Input Devices
- Customization

## Protocols and Stacks

There are 3 ways to communicate with the EC:

- ACPI specification for Legacy EC controller (eSPI) based interface on x86 devices, directly accessed through OperationRegion in ACPI
- ACPI through FFA driver and in secure world an SV or OEM customer driver to communicate with the EC on ARM devices
- Directly through HID class driver for bus based devices, I2C, I3C and eSPI

This specification is organized accordingly and you can find the details for each protocol in the sub folder.

[Legacy EC Interface](legacy/README.md)

[FFA EC Interface](ffa/README.md)

[HID EC Interface](hid/README.md)


## Transports

While other transports can be wired up to work with OEM or SV drivers we are focused on supporting I2C, I3C and eSPI natively both through direct ACPI access and the HID stacks.

Today there is partial support for I2C and eSPI in ACPI and support for I2C and I3C on HID. To support eSPI natively work is being done to better standardize eSPI based on PCC specification.

The following is a visual of the driver stacks planned to interface with the EC from the OS.

## CPU-to-Embedded-Controller Architecture

```mermaid
flowchart TB
subgraph CPU["CPU / PC"]
direction LR

subgraph NSW["Non-Secure World"]
direction TB

subgraph STACK["Top-Level Stack"]
direction LR
INPUT["Input"]
BATTERY["Battery"]
TAD["TAD"]
MPTF["MPTF"]
OEM["OEM"]
end

subgraph HID_DRIVERS["HID Class Drivers"]
direction LR
INPUT_HID["Input HID Driver"]
BATTERY_HID["Battery HID Driver"]
TAD_HID["TAD HID Driver"]
MPTF_HID["MPTF HID Driver"]
OEM_HID["OEM HID Driver"]
end

INPUT --> INPUT_HID
BATTERY --> BATTERY_HID
TAD --> TAD_HID
MPTF --> MPTF_HID
OEM --> OEM_HID

subgraph OS_DRIVERS["OS Driver Layer"]
direction LR
HIDCLASS["HIDClass Driver"]
ACPI["ACPI Driver"]
end

INPUT_HID --> HIDCLASS
BATTERY_HID --> HIDCLASS
TAD_HID --> HIDCLASS
MPTF_HID --> HIDCLASS
OEM_HID --> HIDCLASS

subgraph HID_SUPPORT["HID Transport Support"]
direction LR
HIDSPBCX["HIDSpbCx"]
HIDI3C["HIDI3C"]
HIDESPI["HIDeSPI"]
end

HIDCLASS --> HIDSPBCX
HIDCLASS --> HIDI3C
HIDCLASS --> HIDESPI

I2C["I2C Transport"]
I3C["I3C Transport"]
ESPI["eSPI Transport"]

HIDSPBCX --> I2C
HIDI3C --> I3C
HIDESPI --> ESPI

FFA["FF-A"]
I2CI3C["I2C/I3C"]
ESPIA["ESPI"]
ACPI --> FFA
ACPI --> I2CI3C
ACPI --> ESPIA
end

subgraph SW["Secure World"]
direction TB
HAFNIUM["Hafnium"]
ECSP["EC SP"]
CUSTOM["Custom Transport Driver"]

HAFNIUM --> ECSP
ECSP --> CUSTOM
end

FFA --> HAFNIUM
end

subgraph EC["Embedded Controller"]
direction TB
EC_IF["EC Transport Interfaces"]
EC_FW["EC Firmware / Services"]
EC_IF --> EC_FW
end

I2C -->|I2C| EC_IF
I3C -->|I3C| EC_IF
ESPI -->|eSPI| EC_IF
ESPIA -->|eSPI| EC_IF
I2CI3C --> |ACPI| EC_IF
CUSTOM -->|Custom secure transport| EC_IF

classDef nonsecure fill:#dbeafe,stroke:#2563eb,color:#111827;
classDef secure fill:#fef3c7,stroke:#d97706,color:#111827;
classDef controller fill:#dcfce7,stroke:#16a34a,color:#111827;
class INPUT,BATTERY,TAD,MPTF,OEM,INPUT_HID,BATTERY_HID,TAD_HID,MPTF_HID,OEM_HID,HIDCLASS,ACPI,HIDSPBCX,HIDI3C,HIDESPI,I2C,I3C,ESPI,FFA nonsecure;
class HAFNIUM,ECSP,CUSTOM secure;
class EC_IF,EC_FW controller;
```
3 changes: 2 additions & 1 deletion docs/src/specs/ec_interface/ec-soc-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ work towards a more robust solution that will handle routing, larger
packets and security in a common way across OS’s and across SV
architectures.

![EC connections to apps](media/odp_arch.png)
See the [CPU-to-Embedded-Controller Architecture](README.md#cpu-to-embedded-controller-architecture) for the supported
software stacks and transport paths.
11 changes: 0 additions & 11 deletions docs/src/specs/ec_interface/ec_interface.md

This file was deleted.

Loading
Loading