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

Dt3 #62

Merged
merged 4 commits into from Nov 15, 2021
Merged

Dt3 #62

merged 4 commits into from Nov 15, 2021

Conversation

sjg20
Copy link

@sjg20 sjg20 commented Oct 28, 2021

This is version 3 of the binding initially proposed here:

https://lkml.org/lkml/2021/10/3/185

Changes are based on the feedback and what seems to be a resolution of this issue.

Also includes a few README tweaks that might be useful.

examples:
- |
options {
u-boot,config {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be just 'u-boot' for the node name. You get 1 node in the hierarchy for your component.

Whatever we decide, please define as a '$nodename' property.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

# Based on the precedent set by IEEE 1275-1994 IEEE Standard for Boot
# (Initialization Configuration) Firmware: Core Requirements and Practices
# https://www.openfirmware.info/data/docs/of1275.pdf

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is worth being in the description, not a comment. Someday we might generate documentation from this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

production firmware which does not happen on developer firmware, because they
are completely different builds.

The options node provides useful functionality for this. It allows the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quote 'options'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And probably should be '/options'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


"#address-cells": true
"#size-cells": true
ranges: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would these properties be used? Do you expect to have translatable addresses in child nodes? If so, then only 1,2 are valid.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly, but I am not sure yet.

I dropped ranges, hope that is what you mean.

"#size-cells": true
ranges: true

additionalProperties: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work. From a schema perspective, nodes are also json-schema properties. You need to say only other thing allowed is child nodes:

additionalProperties:
type: object

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

The descriptions are based on chosen.yaml with some additional notes to
explain the purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
U-Boot makes use of the devicetree for its driver model. Devices are bound
based on the hardware description in the devicetree.

Since U-Boot is not an operating system, it has no command line or user
space to provide configuration and policy information. This must be made
available in some other way.

Therefore U-Boot uses devicetree for configuration and run-time control
and has done for approximately 9 years. This works extremely well in the
project and is very flexible. However the bindings have never been
incorporated in the devicetree bindings in the Linux tree. This could be
a good time to start this work as we try to create standard bindings for
communicating between firmware components.

Add an initial binding for this node, covering just the config node, which
is the main requirement. It is similar in concept to the chosen node, but
used for passing information between firmware components, instead of from
firmware to the operating system.

Signed-off-by: Simon Glass <sjg@chromium.org>
The Python 2 version does not exist on some newer distributions, such as
Ubuntu 20.04

Signed-off-by: Simon Glass <sjg@chromium.org>
Show these in a different style to make them stand out more.

Signed-off-by: Simon Glass <sjg@chromium.org>
@robherring robherring merged commit 6e8cc9c into devicetree-org:main Nov 15, 2021
@sjg20 sjg20 deleted the dt3 branch November 15, 2021 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants