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

dts: bindings: improve base.yaml descriptions #70701

Merged

Conversation

mbolivar-ampere
Copy link
Contributor

@mbolivar-ampere mbolivar-ampere commented Mar 25, 2024

This file defines some of the most important properties in the devicetree, including core concepts like 'compatible', 'reg', and 'interrupts'. For some reason, we've never prioritized writing up proper descriptions that indicate their importance or show where the user can get more information about them in the specs or elsewhere.

Give this file a once-over to improve the situation.

@mbolivar-ampere mbolivar-ampere requested a review from kartben March 25, 2024 21:45
@zephyrbot zephyrbot added the area: Devicetree Binding PR modifies or adds a Device Tree binding label Mar 25, 2024
@zephyrbot zephyrbot requested a review from galak March 25, 2024 21:45
Comment on lines 40 to 42
The compatible property can have multiple values. Additional values are
useful when the device is a specific instance of a more general family, to
allow the system to match from most- to least-specific device drivers.
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps explicitly mention that the list goes from "most specific" to "least specific"?

Copy link
Collaborator

Choose a reason for hiding this comment

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

please check reworded version

dts/bindings/base/base.yaml Outdated Show resolved Hide resolved

"#size-cells":
type: int
description: number of size cells in reg property
description: |
This property encodes the number of bits required by register block
Copy link
Member

Choose a reason for hiding this comment

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

Technically, it encodes the number of u32 cells required by register block sizes. As far as I know, there is no established convention that these must be concatenated in order to form a total number of bits (i.e. #size-cells = <2> meaning 64 bit size)?

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 we should reword both the #size-cells and #address-cells descriptions to be more like what is in the devicetree spec 0.4, section 2.3.5:

The #address-cells property defines the number of <u32> cells used to encode the address field in a childnode’s reg property. The #size-cells property defines the number of <u32> cells used to encode the size field in a childnode’s reg property.

Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@henrikbrixandersen
Copy link
Member

@mbolivar-ampere Ping

@kartben
Copy link
Collaborator

kartben commented Aug 9, 2024

@mbolivar-ampere will you be able to come back to this PR?

Copy link

github-actions bot commented Oct 9, 2024

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Oct 9, 2024
@kartben kartben self-assigned this Nov 24, 2024
@kartben
Copy link
Collaborator

kartben commented Nov 24, 2024

Assigning to myself to help get this to mergeable

@kartben
Copy link
Collaborator

kartben commented Nov 25, 2024

simple rebase for now -- will follow-up with more changes

@kartben kartben force-pushed the improve-dt-binding-docs branch from 786faf0 to 45ee122 Compare November 25, 2024 10:07
@kartben
Copy link
Collaborator

kartben commented Nov 25, 2024

Implemented some of @henrikbrixandersen requested changes and also proposed descriptions for the power domain properties that have been introduced since this PR was last touched.

@kartben kartben added this to the v4.1.0 milestone Nov 25, 2024
an abbreviated name of the vendor. The "device" is usually from
the datasheet.

The compatible property can have multiple values, usually ordered from
Copy link
Member

Choose a reason for hiding this comment

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

Not usually, always.

Suggested change
The compatible property can have multiple values, usually ordered from
The compatible property can have multiple values, ordered from


"#size-cells":
type: int
description: number of size cells in reg property
description: |
This property encodes the number of bits required by register block
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 we should reword both the #size-cells and #address-cells descriptions to be more like what is in the devicetree spec 0.4, section 2.3.5:

The #address-cells property defines the number of <u32> cells used to encode the address field in a childnode’s reg property. The #size-cells property defines the number of <u32> cells used to encode the size field in a childnode’s reg property.

@kartben
Copy link
Collaborator

kartben commented Jan 30, 2025

@mbolivar you might be able to help push this one over the finish line

This file defines some of the most important properties in the
devicetree, including core concepts like 'compatible', 'reg', and
'interrupts'. For some reason, we've never prioritized writing up
proper descriptions that indicate their importance or show where the
user can get more information about them in the specs or elsewhere.

Give this file a once-over to improve the situation.

Signed-off-by: Martí Bolívar <[email protected]>
Signed-off-by: Martí Bolívar <[email protected]>
@mbolivar mbolivar force-pushed the improve-dt-binding-docs branch from 45ee122 to df9528c Compare January 30, 2025 17:52
@kartben kartben assigned mbolivar and unassigned kartben Jan 30, 2025
@kartben kartben self-assigned this Jan 30, 2025
@kartben kartben merged commit de9db18 into zephyrproject-rtos:main Jan 30, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding area: Devicetree
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants