summaryrefslogtreecommitdiff
path: root/docs/zephyr
diff options
context:
space:
mode:
authorFabio Baltieri <fabiobaltieri@google.com>2022-08-09 05:55:50 +0100
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-10 07:56:31 +0000
commit1b6e7b4659e0b4e03f679ddff1e445db271f7433 (patch)
treed2d08f9b11044caa9d82f3d7298bee3fba0c2ec2 /docs/zephyr
parent6784ec01a55a487470fdffc6bee4469eb2885363 (diff)
downloadchrome-ec-1b6e7b4659e0b4e03f679ddff1e445db271f7433.tar.gz
zephyr: doc: add a note about alternate function GPIOs
On NPCX platforms some pins default to a specific (non GPIO) function after reset, but are switched to GPIO in the initialization code. This may be confusing if one is only referencing the manual default pin multiplexing configuration. Adding a note about that in the GPIO doc page to reference this behavior. BRANCH=none BUG=b:241734677 TEST=check the page on gitiles Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I3f6fa9f93c339771e15ac5b62c53442b28d1d2ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3817775 Reviewed-by: Madhu P <mparuchuri@google.com> Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Diffstat (limited to 'docs/zephyr')
-rw-r--r--docs/zephyr/zephyr_gpio.md12
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/zephyr/zephyr_gpio.md b/docs/zephyr/zephyr_gpio.md
index 8dbf1ea5c8..5204e6107f 100644
--- a/docs/zephyr/zephyr_gpio.md
+++ b/docs/zephyr/zephyr_gpio.md
@@ -70,6 +70,15 @@ included from the main board DTS file.
For platform specific features, other flags may be available in the Zephyr
[dt-bindings/gpio/gpio.h] file, such as `GPIO_VOLTAGE_1P8`.
+### Alternate functions
+
+All pins are configured as GPIO by default, so normally pinctrl configuration
+for GPIO pins is not required. Note that on NPCX ECs some pins default to a
+non-GPIO function after reset. These are explicitly set to GPIO during
+initialization, based on the `def-io-conf-list` node in [npcx9.dtsi], so they
+do not need to be set to GPIO usage, but they need an explicit `pinctrl-x`
+entry to be set back to the specific function.
+
### Legacy enum-name usage
Only GPIOs that require referencing from legacy common code should have
@@ -456,4 +465,5 @@ project.
[gpio.dts]: ../../zephyr/projects/volteer/volteer/gpio.dts
[interrupts.dts]: ../../zephyr/projects/volteer/volteer/interrupts.dts
[BUILD.py]: ../../zephyr/projects/volteer/volteer/BUILD.py
-[*node label*]: https://docs.zephyrproject.org/latest/build/dts/intro.html#dt-node-labels \ No newline at end of file
+[*node label*]: https://docs.zephyrproject.org/latest/build/dts/intro.html#dt-node-labels
+[npcx9.dtsi]: https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/arm/nuvoton/npcx9.dtsi