-
Notifications
You must be signed in to change notification settings - Fork 9
Restructured the EC spec to include HID #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fe4a8be
Restructured the EC spec to include HID
philgweber f321587
Address EC specification review feedback
philgweber 6b8a3ac
Fix flow diagrams and missing media
philgweber a39b80c
Add mermaid support
philgweber 302c864
Updated to match latest docx documentation
pgweber 074cc85
Merge branch 'main' into main
philgweber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.