summaryrefslogtreecommitdiff
path: root/docs/new_board_checklist.md
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2021-01-26 10:38:55 -0800
committerCommit Bot <commit-bot@chromium.org>2021-01-28 16:38:57 +0000
commit2f40b71b625bcd826fd0cb4a005985abef0b8903 (patch)
tree1f67563e6de1dc64fd4d40bb50ea70d2a17d18a7 /docs/new_board_checklist.md
parent4e950b9fde9e5d7197d2558f7a36bc809e193a49 (diff)
downloadchrome-ec-2f40b71b625bcd826fd0cb4a005985abef0b8903.tar.gz
docs: Run mdformat on all .md files
BRANCH=none BUG=b:178648877 TEST=view in gitiles Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I0ac5581ba7bc512234d40dbf34222422afa9c725 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2650551 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'docs/new_board_checklist.md')
-rw-r--r--docs/new_board_checklist.md151
1 files changed, 79 insertions, 72 deletions
diff --git a/docs/new_board_checklist.md b/docs/new_board_checklist.md
index 22e8d25988..69a9e78638 100644
--- a/docs/new_board_checklist.md
+++ b/docs/new_board_checklist.md
@@ -6,38 +6,47 @@
This document describes the high-level steps needed to create a new EC board. If
you're creating a new board based on existing baseboard, you can jump straight
-to the relevant link found under [Configuring EC
-Features](#Configure-EC-Features) and focus on known board changes.
+to the relevant link found under
+[Configuring EC Features](#Configure-EC-Features) and focus on known board
+changes.
## Conventions
+
### Key Files
+
Before you get started, it's important to understand the role of a few key files
in the EC codebase.
-- [`include/config.h`](../include/config.h) {#config_h} - Contains the list of
- top-level configuration options for the Chrome EC codebase. Each configuration
- option is documented inline and is considered the authoritative definition.
-
-- `baseboard/<name>/` - This directory contains header files and source files
- shared by all boards in a baseboard family.
- - `baseboard.h` - Contains the EC configuration options shared by all
- devices in the baseboard family.
- - `baseboard.c` - Contains code shared by all devices in the baseboard
- family.
- - `build.mk` - The board family makefile specifies C source files compiled
- into all boards in the baseboard family.
-
-- `board/<board>` - Files in this directory are only built for a single board.
- - `board.h` - EC configuration options specific to a single board.
- - `board.c` - Code built only on this board.
- - `build.mk` {#board_build_mk} - The board makefile defines the EC chipset family, defines the
- baseboard name, and specifies the C source files that are compiled.
- - `gpio.inc` - This C header file defines the interrupts, GPIOs, and
- alternate function selection for all pins on the EC chipset.
- - `ec.tasklist` - This C header defines the lists of tasks that are enabled
- on the board. See the main EC documentation more details on [EC tasks].
+- [`include/config.h`](../include/config.h) {#config_h} - Contains the list of
+ top-level configuration options for the Chrome EC codebase. Each
+ configuration option is documented inline and is considered the
+ authoritative definition.
+
+- `baseboard/<name>/` - This directory contains header files and source files
+ shared by all boards in a baseboard family.
+
+ - `baseboard.h` - Contains the EC configuration options shared by all
+ devices in the baseboard family.
+ - `baseboard.c` - Contains code shared by all devices in the baseboard
+ family.
+ - `build.mk` - The board family makefile specifies C source files compiled
+ into all boards in the baseboard family.
+
+- `board/<board>` - Files in this directory are only built for a single board.
+
+ - `board.h` - EC configuration options specific to a single board.
+ - `board.c` - Code built only on this board.
+ - `build.mk` {#board_build_mk} - The board makefile defines the EC chipset
+ family, defines the baseboard name, and specifies the C source files
+ that are compiled.
+ - `gpio.inc` - This C header file defines the interrupts, GPIOs, and
+ alternate function selection for all pins on the EC chipset.
+ - `ec.tasklist` - This C header defines the lists of tasks that are
+ enabled on the board. See the main EC documentation more details on
+ [EC tasks].
### GPIO Naming
+
Many drivers and libraries in the common EC code rely on board variants defining
an exact GPIO signal name. Examples include the `GPIO_LID_OPEN`,
`GPIO_ENTERING_RW`, and `GPIO_SYS_RESET_L` signals. The net names in schematics
@@ -46,7 +55,7 @@ all the `GPIO_INT()`, `GPIO()`, `ALTERNATE()`, and `UNIMPLEMENTED()` definitions
in `gpio.inc` use the schematic net name. You then create `#define` macros in
`board.h` to map the net names to the EC common names.
-Below is an example configuration for the SYS_RESET_L signal. The schematic net
+Below is an example configuration for the SYS_RESET_L signal. The schematic net
name of this signal is EC_RST_ODL and the signal connects to the EC chipset pin
GPIO02.
@@ -63,6 +72,7 @@ Please see the [GPIO](./configuration/gpio.md) documentation for additional
details on the GPIO macros.
## How to use this document
+
Each of the following sections details a single feature set that may need to be
modified or configured for your new board. The feature sets are organized so
they can be implemented with a reasonably sized change list, and can be worked
@@ -70,34 +80,31 @@ on independently.
Each configuration feature document includes the following sub-tasks:
-- **Config Options** - This section details the `CONFIG_*` options relevant to
- the feature. Use the documentation found in [config.h] to determine whether
- each option should be enabled (using #define) or disabled (using #undef) in
- the relevant `baseboard.h` or `board.h` file.
-- **Feature Parameters** - This section details parameters that control the
- operation of the feature. Similar to the config options, feature parameters
- are defined in [config.h] and prefixed with `CONFIG_*`. However, feature
- parameters are assigned a default value, which can be overridden in by
- `baseboard.h` or `board.h` using an `#undef/#define` pair.
- ```c
- #undef CONFIG_UART_TX_BUF_SIZE
- #define CONFIG_UART_TX_BUF_SIZE 4096
- ```
-- **GPIOs and Alternate Pins** - This section details signals and pins relevant
- to the feature. Add the required `GPIO_INT()`, `GPIO()`, `ALTERNATE()`, and
- `UNIMPLEMENTED()` definitions to `gpio.inc`, making sure to follow the [GPIO
- naming conventions].
-- **Data Structures** - This section details the data structures required to
- configure the feature for correct operation. Add the data structures to
- `baseboard.c` or `board.c`. Note that most data structures required by the
- common EC code should be declared `const` to save on RAM usage.
-- **Tasks** - This section details the tasks that the EC feature requires for
- operation.
-- **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** - When present, this section walks through a complete example for
- configuring an EC feature based on an existing board implementation.
+- **Config Options** - This section details the `CONFIG_*` options relevant to
+ the feature. Use the documentation found in [config.h] to determine whether
+ each option should be enabled (using #define) or disabled (using #undef) in
+ the relevant `baseboard.h` or `board.h` file.
+- **Feature Parameters** - This section details parameters that control the
+ operation of the feature. Similar to the config options, feature parameters
+ are defined in [config.h] and prefixed with `CONFIG_*`. However, feature
+ parameters are assigned a default value, which can be overridden in by
+ `baseboard.h` or `board.h` using an `#undef/#define` pair. `c #undef
+ CONFIG_UART_TX_BUF_SIZE #define CONFIG_UART_TX_BUF_SIZE 4096`
+- **GPIOs and Alternate Pins** - This section details signals and pins
+ relevant to the feature. Add the required `GPIO_INT()`, `GPIO()`,
+ `ALTERNATE()`, and `UNIMPLEMENTED()` definitions to `gpio.inc`, making sure
+ to follow the [GPIO naming conventions].
+- **Data Structures** - This section details the data structures required to
+ configure the feature for correct operation. Add the data structures to
+ `baseboard.c` or `board.c`. Note that most data structures required by the
+ common EC code should be declared `const` to save on RAM usage.
+- **Tasks** - This section details the tasks that the EC feature requires for
+ operation.
+- **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** - When present, this section walks through a complete example
+ for configuring an EC feature based on an existing board implementation.
## Create the new EC board
@@ -113,8 +120,8 @@ are found in the corresponding [README.md] documentation.
The [new_variant.py] script also verifies the new EC board compiles and prepares
a changelist to upload to Gerrit. You should upload this changelist unmodified
-for review and submission (you may need to run `make buildall -k` to satisfy
-the EC pre-submit tests).
+for review and submission (you may need to run `make buildall -k` to satisfy the
+EC pre-submit tests).
The next step is to review the following sections to make any needed
modifications to your new board files, test the changes, and upload the changes
@@ -128,8 +135,8 @@ populate these directories with the minimum set of files required compile the EC
board. The initial changelists for the Hatch and Volteer reference boards
provide good examples for how to start.
- * [Volteer EC skeleton build]
- * [Hatch EC skeleton build]
+* [Volteer EC skeleton build]
+* [Hatch EC skeleton build]
After submitting the skeleton builds, review the following sections and add each
feature set as required by your design.
@@ -143,20 +150,20 @@ priority and should be ready before the first prototypes arrive. Use the
documentation link for details about the code changes required to implement each
feature.
-| EC Feature | Needed for Power On |
-| :--------- | ------------------: |
-| [Configure EC Chipset](./configuration/ec_chipset.md) | yes |
-| [Configure AP to EC Communication](./configuration/config_ap_to_ec_comm.md) | yes |
-| [Configure AP Power Sequencing](./configuration/ap_power_sequencing.md) | yes |
-| [Configure USB-C](./usb-c.md) | yes |
-| [Configure Charger (TODO)](./configuration/template.md) | yes |
-| [Configure I2C Buses](./configuration/i2c.md) | no |
-| [Configure CrOS Board Information (CBI)](./configuration/cbi.md) | no |
-| [Configure Keyboard](./configuration/keyboard.md) | no |
-| [Configure LEDs](./configuration/leds.md) | no |
-| [Configure Motion Sensors (TODO)](./configuration/motion_sensors.md) | no |
-| [Configure BC1.2 Charger Detector (TODO)](./configuration/template.md) | no |
-| [Configure Battery (TODO)](./configuration/template.md) | no |
+EC Feature | Needed for Power On
+:-------------------------------------------------------------------------- | ------------------:
+[Configure EC Chipset](./configuration/ec_chipset.md) | yes
+[Configure AP to EC Communication](./configuration/config_ap_to_ec_comm.md) | yes
+[Configure AP Power Sequencing](./configuration/ap_power_sequencing.md) | yes
+[Configure USB-C](./usb-c.md) | yes
+[Configure Charger (TODO)](./configuration/template.md) | yes
+[Configure I2C Buses](./configuration/i2c.md) | no
+[Configure CrOS Board Information (CBI)](./configuration/cbi.md) | no
+[Configure Keyboard](./configuration/keyboard.md) | no
+[Configure LEDs](./configuration/leds.md) | no
+[Configure Motion Sensors (TODO)](./configuration/motion_sensors.md) | no
+[Configure BC1.2 Charger Detector (TODO)](./configuration/template.md) | no
+[Configure Battery (TODO)](./configuration/template.md) | no
After finishing the changes required for all EC features, it is recommended that
you make one final pass over all the GPIOs and pin assignments used on your
@@ -169,4 +176,4 @@ board. Refer to the [GPIO](./configuration/gpio.md) documentation for details.
[Hatch EC skeleton build]:https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1377569/
[config.h]: ./new_board_checklist.md#config_h
[EC tasks]: ../README.md#Tasks
-[GPIO naming conventions]: ./new_board_checklist.md#GPIO-Naming \ No newline at end of file
+[GPIO naming conventions]: ./new_board_checklist.md#GPIO-Naming