summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-11-18 16:11:19 -0700
committerCommit Bot <commit-bot@chromium.org>2021-12-04 01:15:24 +0000
commitfdbc457cc80443829cb3b3cb9590d151d5ce7a78 (patch)
treeee097e8dd4c503fe60a50e0dcc2cf5d7f5abeff9 /docs
parent86b76eb3b0d11ce50d06b45444e8dbcabdcd1e9f (diff)
downloadchrome-ec-fdbc457cc80443829cb3b3cb9590d151d5ce7a78.tar.gz
docs: Add Zephyr New Board checklist
Add the initial new board checklist for Zephyr ECs. BUG=b:207403708 BRANCH=none TEST=View docs using gerrit preview/browse Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I1e2585709eaf9b1f9db4f57c9ae665797b3e5608 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3296745 Reviewed-by: Yuval Peress <peress@google.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/zephyr/zephyr_new_board_checklist.md65
-rw-r--r--docs/zephyr/zephyr_template.md56
2 files changed, 121 insertions, 0 deletions
diff --git a/docs/zephyr/zephyr_new_board_checklist.md b/docs/zephyr/zephyr_new_board_checklist.md
new file mode 100644
index 0000000000..c90bd4e2f2
--- /dev/null
+++ b/docs/zephyr/zephyr_new_board_checklist.md
@@ -0,0 +1,65 @@
+# Creating a New Zephyr EC Project
+
+[TOC]
+
+## Overview
+
+This document describes the high-level steps needed to create a new Zephyr EC
+project for a Chromebook design.
+
+## Intended Audience
+
+This document is for use by software engineers working in the EC codebase. This
+document and the linked documents provide a guide for creating new Zephyr EC
+projects and for modifying/maintaining existing Zephyr EC projects.
+
+## How to use this document
+
+The following sections detail a single feature set that needs modification for
+your board design. Each feature set can be implemented with a reasonably sized
+change list, and can be worked on independently.
+
+Each feature includes the following sub-tasks:
+
+- **Kconfig Options** - This section details the `Kconfig` options relevant to
+ the feature. `Kconfig` options are enabled in one of the [project
+ configuration files].
+- **Devicetree Nodes** - This section details the devicetree nodes and
+ properties required by the feature.
+- **Board Specific Code** - When present, this section details any C code that
+ your project must implement.
+- **Threads** - This section details the threads created by the feature and
+ provides an overview of each thread.
+- **Testing and Debugging** - This section details strategies for testing the EC
+ feature set and for debugging issues. This section also documents EC console
+ commands related to the feature set.
+- **Example** - This section walks through a complete example for configuring an
+ EC feature based on existing board implementation.
+
+## Adding a new board to zmake
+
+Refer the [zmake](TODO) documentation to add a new board project to zmake.
+
+## Configure EC Features
+
+The checklist below provides an overview of EC features that you must configure
+for correct operation of a Chromebook. The “Needed for Power On” column
+indicates the critical features needed during board bringup. Use the
+documentation link for details about the code changes required to implement each
+feature.
+
+EC Feature | Needed for Power On
+:-------------------------------------------------------------------------- | :-----------------:
+[Configure EC Chipset (TODO)](./zephyr_template.md) | yes
+[Configure AP to EC Communication (TOD0)](./zephyr_template.md) | yes
+[Configure AP Power Sequencing (TODO)](./zephyr_template.md) | yes
+[Configure USB-C (TODO)](./zephyr_template.md) | yes
+[Configure Charger (TODO)](./zephyr_template.md) | yes
+[Configure I2C Buses (TODO)](./zephyr_template.md) | yes
+[Configure Batteries (TODO)](./zephyr_template.md) | no
+[Configure CrOS Board Information (CBI) (TODO)](./zephyr_template.md) | no
+[Configure Keyboard (TODO)](./zephyr_template.md) | no
+[Configure LEDs (TODO)](./zephyr_template.md) | no
+[Configure Motion Sensors (TODO)](./zephyr_template.md) | no
+[Configure BC1.2 Charger Detector (TODO)](./zephyr_template.md) | no
+[Configure Battery (TODO)](./zephyr_template.md) | no
diff --git a/docs/zephyr/zephyr_template.md b/docs/zephyr/zephyr_template.md
new file mode 100644
index 0000000000..f75883eec9
--- /dev/null
+++ b/docs/zephyr/zephyr_template.md
@@ -0,0 +1,56 @@
+# Zephyr EC Feature Configuration Template
+
+[TOC]
+
+## Overview
+
+*Description of the Zephyr EC feature and the capabilities provided*
+
+## Kconfig Options
+
+*List the Kconfig options that enable the feature and list any sub-configuration
+options that control the behavior of the feature.*
+
+Kconfig Option | Default | Documentation
+:------------------------------------- | :-----: | :------------
+`CONFIG_PLATFORM_EC_<option>` | y/n | [zephyr/Kconfig](../zephyr/Kconfig)
+
+Kconfig sub-option | Default | Documentation
+:------------------------------------- | :-----: | :------------
+`CONFIG_PLATFORM_EC_<option>` | y/n | [zephyr/Kconfig](../zephyr/Kconfig)
+
+
+*Note - Avoid documenting `CONFIG_` options in the markdown as the relevant
+`Kconfig*` contains the authoritative definition. Link directly to the Kconfig
+option in source like this: [I2C Passthru Restricted].*
+
+## Devicetree Nodes
+
+*Detail the devicetree nodes that configure the feature.*
+
+*Note - avoid documenting node properties here. Point to the relevant `.yaml`
+file instead, which contains the authoritative definition.*
+
+## Board Specific Code
+
+*Document any board specific routines that a user must create to successfully
+compile and run. For many features, this can section can be empty.*
+
+## Threads
+
+*Document any threads enabled by this feature.*
+
+## Testing and Debugging
+
+*Provide any tips for testing and debugging the EC feature.*
+
+## Example
+
+*Provide code snippets from a working board to walk the user through
+all code that must be created to enable this feature.*
+
+<!--
+The following demonstrates linking to a code search result for a Kconfig option.
+Reference this link in your text by matching the text in brackets exactly.
+-->
+[I2C Passthru Restricted]:https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/Kconfig?q=%22config%20PLATFORM_EC_I2C_PASSTHRU_RESTRICTED%22&ss=chromiumos