-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
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:
zephyr/boards/shields/x_nucleo_iks01a2/x_nucleo_iks01a2.overlay
Lines 28 to 30 in eafc4f8
| lsm6dsl: lsm6dsl@6b { | |
| compatible = "st,lsm6dsl"; | |
| reg = <0x6b>; |
zephyr/boards/arm/b_l4s5i_iot01a/b_l4s5i_iot01a.dts
Lines 113 to 115 in eafc4f8
| 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