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

Device Tree support overhaul #8499

Closed
5 of 6 tasks
carlescufi opened this issue Jun 20, 2018 · 13 comments
Closed
5 of 6 tasks

Device Tree support overhaul #8499

carlescufi opened this issue Jun 20, 2018 · 13 comments
Assignees
Labels
area: Configuration System area: Devicetree Feature A planned feature with a milestone priority: medium Medium impact/importance bug

Comments

@carlescufi
Copy link
Member

carlescufi commented Jun 20, 2018

This is an umbrella issue for a series of changes to the way Zephyr uses Device Tree.
The following items need to be addressed in order to consider this issue closed:

ELCE meeting path forward issue: #10821

@SebastianBoe
Copy link
Collaborator

SebastianBoe commented Jun 27, 2018

@erwango : I have replaced the codegen PR with your prototype PR under "Code generation for instancing of devices".

Is the prototype PR supposed to be a part of this effort? If so it should take into account the repercussions of running device tree before Kconfig. Or else we risk having to rewrite the whole thing again.

@erwango
Copy link
Member

erwango commented Jun 27, 2018

@SebastianBoe

Is the prototype PR supposed to be a part of this effort?

From what we discussed last week, one of the (/the) first step was to demonstrate the feasibility of using codegen to provide and acceptable solution for driver instantiation (from zephyr user point of view, the end user API). This is what #8561 aims at doing.
This task was supposed to go straight to the point, so I took whatever was available and tried to come up with a demonstrator. If there is a general agreement this is acceptable, then everything should be done the right way.

Doing so, there will be some additional efforts, but at least a plan is there and I hope showing something concrete will help people agreeing this is a desirable thing to have and efforts should be done to achieve the plan. (Rather than endless debates that happened so far in the various PR/issues)

@nashif nashif added Feature A planned feature with a milestone and removed Enhancement Changes/Updates/Additions to existing features labels Jul 10, 2018
@nashif nashif added the priority: medium Medium impact/importance bug label Aug 21, 2018
@erwango
Copy link
Member

erwango commented Sep 7, 2018

Added #9406 as bullet of 'Run Device Tree before Kconfig '

#9604 proposes a way to provide a DTS generated set of flag that could be handled by Kconfig for driver build control.

@erwango
Copy link
Member

erwango commented Sep 7, 2018

Comment about: " Code generation for instancing of devices ":

Current PR for this point is #8561.
#8561 is based on #6762 that introduces Codegen support. It adds a friendly device declaration module on top of Codegen. It aims at hiding python code from the user in the driver code by providing a nearly python agnostic API.

@erwango
Copy link
Member

erwango commented Sep 11, 2018

Added #9876 as a cut out of #6762 (Codegen introduction)
#9876 focuses on edts database generation that should be used as input for codegen script.
It could also be used as input for "DTS compatibles flags generation" (#9604)

@b0661
Copy link
Collaborator

b0661 commented Sep 12, 2018

Sequence of merges for " Code generation for instancing of devices ":

  • Code generation for instancing of devices
  1. PR script/dts: Generate Extended Device Tree database #9876 - creation of extended DTS database using extract_dts_includes.py
  2. PR scripts: add Zephyr inline code generation with Python #6762 - inline code generation - codegen
  3. PRs for device driver instantiation by code generation

@galak
Copy link
Collaborator

galak commented Jul 30, 2019

edts work handled by PR #17660

@mbolivar-nordic
Copy link
Contributor

  • Code generation for instancing of devices

Is anyone still advocating for this? I remain unconvinced that we need it and am opposed to the introduction of yet another domain specific language that this would imply for complexity reasons.

(optional) Integrate DT support in menuconfig

If nobody is still advocating for codegen and the above check box can be fixed, perhaps this can be moved to a separate enhancement and this issue can at last be closed. It isn't doing its job as an umbrella issue since we're not actively using it, and all the other items are checked.

@erwango
Copy link
Member

erwango commented Oct 16, 2020

@mbolivar-nordic Fine with me on both points!

@mbolivar-nordic
Copy link
Contributor

Great, thanks @erwango. I've filed this issue for a 'menuconfig'-like (really 'guiconfig'-like) interface to devicetree here:

#29295

I think that covers the last unchecked box in this umbrella issue, so let's close it at last and discuss/prioritize additional work elsewhere.

@carlescufi
Copy link
Member Author

  • Code generation for instancing of devices

Is anyone still advocating for this? I remain unconvinced that we need it and am opposed to the introduction of yet another domain specific language that this would imply for complexity reasons.

Not really, but I do recall that there was some talk about whether pinctrl could effectively be implemented without code generation. Aside from that, the rest of the usecases (mainly instantiation of the device structures) I think are not justification enough to think about introducing this infrastructure.

@erwango
Copy link
Member

erwango commented Oct 21, 2020

Not really, but I do recall that there was some talk about whether pinctrl could effectively be implemented without code generation.

@carlescufi Since it is actually available at least on some targets (such as STM32 and Atmel) today, I think we can say this is doable.

@carlescufi
Copy link
Member Author

Not really, but I do recall that there was some talk about whether pinctrl could effectively be implemented without code generation.

@carlescufi Since it is actually available at least on some targets (such as STM32 and Atmel) today, I think we can say this is doable.

Indeed, and the goal now is to extend that support to all SoCs in a common manner, thanks for commenting on this @erwango, this just confirms what I already thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Configuration System area: Devicetree Feature A planned feature with a milestone priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

8 participants