Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 3.23 KB

design.rst

File metadata and controls

87 lines (61 loc) · 3.23 KB

Design goals

Zephyr's use of devicetree has evolved significantly over time, and further changes are expected. The following are the general design goals, along with specific examples about how they impact Zephyr's source code, and areas where more work remains to be done.

Single source for hardware information

Zephyr's built-in device drivers and sample applications shall obtain configurable hardware descriptions from devicetree.

Examples

Example remaining work

  • Zephyr's :ref:`twister_script` currently use :file:`board.yaml` files to determine the hardware supported by a board. This should be obtained from devicetree instead.
  • Legacy device drivers currently use Kconfig to determine which instances of a particular compatible are enabled. This can and should be done with devicetree overlays instead.
  • Board-level documentation still contains tables of hardware support which are generated and maintained by hand. This can and should be obtained from the board level devicetree instead.
  • Runtime determination of struct device relationships should be done using information obtained from devicetree, e.g. for device power management.

Source compatibility with other operating systems

Zephyr's devicetree tooling is based on a generic layer which is interoperable with other devicetree users, such as the Linux kernel.

Zephyr's binding language semantics can support Zephyr-specific attributes, but shall not express Zephyr-specific relationships.

Examples

Example remaining work

  • Zephyr has a custom :ref:`dt-bindings` language syntax. While Linux's dtschema does not yet meet Zephyr's needs, we should try to follow what it is capable of representing in Zephyr's own bindings.
  • Due to inflexibility in the bindings language, Zephyr cannot support the full set of bindings supported by Linux.
  • Devicetree source sharing between Zephyr and Linux is not done.