ec_fw: Initial commit for ec dtsi tool
- Migrated export-ec-devicetree-csv tool from arb cli
- Created pin maps for chips arbitrage tool supported
- Unit tests for new functions
- Example csv/generated dtsi
- Read me files for usage/building
- moved go.mod to root so both ap_fw and ec_fw can share it
BUG=b:427556454, b:475292981
TEST=Compared DTSI files generated by this tool for fatcat, nissa, rex
To output generated by arbitrage tool, verified only differences
resulting from new features/bugs in original arbitrage.
Change-Id: I6dc27ee29971ada122cc74c5be09e66c0cad3aa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/firmweaver/+/8090097
Commit-Queue: Kshitij Shah <tij@google.com>
Tested-by: Kshitij Shah <tij@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Firmweaver is a collection of tools for Chromium OS to assist with initial firmware setup during board bringup.
The Chromium OS project includes tools to assist with initial firmware setup during board bringup. These tools generate certain objects in Application Processor (AP) and Embedded Controller (EC) firmware (e.g., EC devicetree, AP GPIO configuration, etc.).
The tools take a curated sheet as prepared by the hardware team as an input and generate these objects as output. Developers can validate the generated output and contribute them to the concerned project.
ec_fw)ap_fw)The GPIO tool is located in the ap_fw directory.
ap_fw directory:cd ap_fw
go build -o gpio_toolThis will generate the
gpio_tool executable in the ap_fw directory.The EC Devicetree generator is located in the ec_fw directory. See ec_fw/README.md for full details.
ec_fw directory:cd ec_fw
go build -o ec_fwThis will generate the
ec_fw executable in the ec_fw directory.The gpio_tool parses a GPIO map CSV file and generates C configuration code.
./ap_fw/gpio_tool --soc <soc_type> --csv <path_to_csv> [--output <path_to_output_c_file>]
--soc: SoC type. Supported values: intel, qcom, mtk. (Required)--csv: Path to the local CSV file containing the GPIO map. (Required)--output: Path to the output file. If omitted, output is written to stdout.To generate Intel GPIO configuration from the provided example CSV:
./ap_fw/gpio_tool --soc intel --csv ap_fw/test/ExampleGpio.csv --output ap_fw/test/gpio_config.c
The ec_fw tool parses an EC pinout CSV spreadsheet and generates Zephyr devicetree overlays.
./ec_fw/ec_fw --chip <chip_name> --csv <path_to_csv> [--pin-col <variant>] [--output <path_to_output_dtsi>]
To generate Nuvoton NPCX9 Devicetree overlay from the provided example CSV:
./ec_fw/ec_fw --chip npcx99 --csv ec_fw/test/ExampleEcPinout.csv --pin-col "NPCX99 (NPCX)" --output ec_fw/test/generated.dtsi
Run unit tests across all tools in the workspace:
go test -v ./...
This project follows the standard Chromium OS contribution process.