summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2022-04-08 15:43:16 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-11 17:35:47 +0000
commitcfc6004eb8d2198b5f3a9c56ff6dafb7f984f739 (patch)
tree4bdf96db624d5802a378c3c6bc0a3db3173e38e9
parent1877bafe1604cee209b4b340224b70ae5cd6e4d9 (diff)
downloadchrome-ec-cfc6004eb8d2198b5f3a9c56ff6dafb7f984f739.tar.gz
zephyr: docs: Add references to the Zephyr devicetree intro
Add references to the Zephyr devicetree introduction documents upstream. Also add direct references to the "node label" definition, as this is a common source of confusion for new users. BUG=b:207403708 BRANCH=none TEST=View docs with gitiles Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I6fad8781cfe51a0d7741cd7eb2ba13b5e744661d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3579985 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--docs/zephyr/zephyr_battery.md3
-rw-r--r--docs/zephyr/zephyr_gpio.md13
-rw-r--r--docs/zephyr/zephyr_i2c.md3
-rw-r--r--docs/zephyr/zephyr_new_board_checklist.md5
4 files changed, 15 insertions, 9 deletions
diff --git a/docs/zephyr/zephyr_battery.md b/docs/zephyr/zephyr_battery.md
index 6b084bf95f..99f70a9c10 100644
--- a/docs/zephyr/zephyr_battery.md
+++ b/docs/zephyr/zephyr_battery.md
@@ -50,7 +50,7 @@ Example:
```
-Here `vendor_part` will be the default battery type. If this node label is
+Here `vendor_part` will be the default battery type. If this [*node label*] is
present in the overlay, the [DEFAULT_BATTERY_TYPE] is set in the battery shim
code with the labeled battery type. The `vendor` and `part` references must
match an existing battery defined in [battery bindings directory].
@@ -183,3 +183,4 @@ shutdown_soc:4 %
[battery-smart enum]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/battery/battery-smart.yaml?q=%22enum:%22&ss=chromiumos
[cros-ec-i2c-port-base.yaml]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml
[task]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/shim/include/shimmed_task_id.h
+[*node label*]: https://docs.zephyrproject.org/latest/build/dts/intro.html#dt-node-labels
diff --git a/docs/zephyr/zephyr_gpio.md b/docs/zephyr/zephyr_gpio.md
index 1d563513cd..5e70562ab9 100644
--- a/docs/zephyr/zephyr_gpio.md
+++ b/docs/zephyr/zephyr_gpio.md
@@ -24,7 +24,7 @@ the devicetree node with
all GPIOs from this node (unless the `no-auto-init` property is present).
Legacy C source code accesses GPIOs using the specified
`enum-name` property as an enum name of the GPIO.
-Zephyr based code uses the node label, an alias, or other node reference
+Zephyr based code uses the [*node label*], an alias, or other node reference
to identify the GPIO.
Named GPIO properties:
@@ -41,7 +41,7 @@ initialization time, and selectively enabled by code at some later time.
The file [gpio-enum-name.yaml] defines the list of valid `enum-name` values.
In the GPIO declaration use the lowercase net name from the schematic as the
-*node name*, and the same net name prefixed with `gpio_` as *node label*.
+*node name*, and the same net name prefixed with `gpio_` as [*node label*].
For example:
```
@@ -87,7 +87,7 @@ GPIOs references that are not in legacy common code should use the
to access the GPIO.
GPIOs are referenced in the `named-gpios` child nodes using the
-node label (if one exists), an alias to a node label, or
+[*node label*] (if one exists), an alias to a [*node label*], or
indirectly as a node reference via as a `phandle` in another node.
To facilitate this, all GPIO child nodes in `named-gpios`
@@ -97,7 +97,7 @@ These pointers are accessible via the following macros:
Macro | Argument | Description
:------- | :---------- | :-------
-`GPIO_DT_FROM_NODELABEL` | nodelabel | Uses a node label to reference the GPIO node.
+`GPIO_DT_FROM_NODELABEL` | nodelabel | Uses a [*node label*] to reference the GPIO node.
`GPIO_DT_FROM_NODE` | node | Uses a node id (referenced as a `phandle` in another node).
`GPIO_DT_FROM_ALIAS` | alias | Uses an alias to a label on the GPIO node.
@@ -279,7 +279,7 @@ Child nodes of this single node contain the following properties:
Property | Description | Settings
:------- | :---------- | :-------
-`irq-pin` | A reference via a node label to the named-gpio that is associated with this interrupt. | `<&gpio_label>`
+`irq-pin` | A reference via a [*node label*] to the named-gpio that is associated with this interrupt. | `<&gpio_label>`
`flags` | The GPIO [interrupt flags](https://docs.zephyrproject.org/latest/reference/peripherals/gpio.html) that define how the interrupt is generated. | `GPIO_INT_<flags>`
`handler` | The C name of the interrupt handler that handles the interrupt. | C function name.
@@ -431,7 +431,7 @@ property `GPIO_ENTERING_RW`.
val = gpio_get_level(GPIO_ENTERING_RW);
```
-Use the `node label` to reference the GPIO in other devicetree nodes:
+Use the [*node label*] to reference the GPIO in other devicetree nodes:
```
my_node: my-node {
@@ -456,3 +456,4 @@ 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
diff --git a/docs/zephyr/zephyr_i2c.md b/docs/zephyr/zephyr_i2c.md
index 4f001e4408..da54a373a5 100644
--- a/docs/zephyr/zephyr_i2c.md
+++ b/docs/zephyr/zephyr_i2c.md
@@ -47,7 +47,7 @@ Example enabling I2C0 and I2C3 at 100 KHz and 1 MHz, respectively.
Nuvoton ECs use two devicetree nodes to describe the I2C buses used, an I2C
controller and an I2C port.
-Nuvoton I2C node labels use the following pattern:
+Nuvoton I2C [*node labels*] use the following pattern:
- I2C controller: `&i2c_ctrl<controller>`
- I2C port: `&i2c<controller>_<port>`
@@ -352,3 +352,4 @@ below:
[`CONFIG_I2C_SHELL`]: https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_I2C_SHELL
[cros-ec-i2c-port-base.yaml]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml
[volteer.dts]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/boards/arm/volteer/volteer.dts;
+[*node labels*]: https://docs.zephyrproject.org/latest/build/dts/intro.html#dt-node-labels \ No newline at end of file
diff --git a/docs/zephyr/zephyr_new_board_checklist.md b/docs/zephyr/zephyr_new_board_checklist.md
index f83aa3a188..f2299a896d 100644
--- a/docs/zephyr/zephyr_new_board_checklist.md
+++ b/docs/zephyr/zephyr_new_board_checklist.md
@@ -25,7 +25,8 @@ Each feature includes the following sub-tasks:
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.
+ properties required by the feature. The [Zephyr Introduction to Devicetree]
+ provides a conceptual overview of devicetree and how Zephyr uses it.
- **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
@@ -66,3 +67,5 @@ EC Feature | Ne
[Configure BC1.2 Charger Detector (TODO)](./zephyr_template.md) | no
[Configure ADC](./zephyr_adc.md) | no
[Configure Temperature Sensors](./zephyr_temperature_sensor.md) | no
+
+[Zephyr Introduction to Devicetree]: https://docs.zephyrproject.org/latest/build/dts/intro.html