Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The guidelines for whether something should be in DTS or Kconfig are too vague #7230

Closed
SebastianBoe opened this issue Apr 27, 2018 · 2 comments
Assignees

Comments

@SebastianBoe
Copy link
Collaborator

We need improved guidelines for determining if a configuration knob belongs in Kconfig or DTS.
The existing guidelines are attached below.

From the guidelines one can read that DTS should be used for:

  • HW description
  • Zephyr-specific configuration
  • Some of the use-cases where Kconfig is currently applied
  • Not all of the use-cases where CMSIS (and similair) is currently applied

This is pretty vague in my opinion.

Zephyr DTS guidelines

In Zephyr, device tree is used to not only describe hardware, but also to describe Zephyr-specific configuration information. The Zephyr-specific information is intended to augment the device tree descriptions. The main reason for this is to leverage existing device tree files that a SoC vendor may already have defined for a given platform.

Today, configuration in Zephyr comes from a number of different places. It can come from Kconfig files, CMSIS header files, vendor header files, prj.conf files, and other miscellaneous sources. The intent of using device tree is to replace or curtail the use of Kconfig files throughout the system, and instead use device tree files to describe the configuration of device nodes. CMSIS and vendor header files can be used in conjunction with the device tree to fully describe hardware. Device tree is not intended to replace CMSIS or vendor include files.

@carlescufi
Copy link
Member

Assigning to @galak since I believe he's in the better position to evaluate how to approach this.

@erwango
Copy link
Member

erwango commented May 31, 2018

As commented in #7302, DTS has (/is) a specification (https://www.devicetree.org/), so I think we should rely on it

carlescufi added a commit to carlescufi/zephyr that referenced this issue Jun 22, 2018
Try to clarify the scope of Device Tree vs Kconfig in order to allow
Zephyr users to identify where a particular configuration option when
developing an application, board support or SoC support.

Fixes zephyrproject-rtos#7230

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
carlescufi added a commit that referenced this issue Jun 25, 2018
Try to clarify the scope of Device Tree vs Kconfig in order to allow
Zephyr users to identify where a particular configuration option when
developing an application, board support or SoC support.

Fixes #7230

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants