Skip to content

shields: Settle on nodelabels naming scheme #50040

@erwango

Description

@erwango

When using shields with boards, it may happen that shields and board both describe use the same nodelabel (to describe the same device: sensor, display, ..), leading to a conflict at device tree compilation.
For instance, same node label 'lsm6dsl' is used for both board and shield description:

lsm6dsl: lsm6dsl@6b {
compatible = "st,lsm6dsl";
reg = <0x6b>;

lsm6dsl: lsm6dsl@6a {
compatible = "st,lsm6dsl";
reg = <0x6a>;

This was discussed initially in #48780.

Conclusion of the discussion was to use, in shields device tree description, the following device nodelabel naming scheme:
<device>_<address>

Then #50034 was merged using a different approach:
<device>_<shield_name>
Reason is that <device>_<address> will give conflicts (in dtc) when using multiple shields using devices at same address but on different busses.
Note that this proposal was initially rejected in #48780 because not concise enough.

Aim of this issue is to settle on agreement that can be applied in all cases, document it and update in-tree shields accordingly

Metadata

Metadata

Labels

EnhancementChanges/Updates/Additions to existing featuresarea: ShieldsShields (add-on boards)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions