devicetree-spec.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SoC-specific device tree aliases?
@ 2025-11-13  8:28 Ahmad Fatoum
  2025-11-13 18:04 ` Rob Herring
  2025-11-17  7:38 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 18+ messages in thread
From: Ahmad Fatoum @ 2025-11-13  8:28 UTC (permalink / raw)
  To: devicetree@vger.kernel.org, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree-spec
  Cc: kernel@pengutronix.de, quentin.schulz

Hello,

With /chosen/bootsource now part of dt-schema, I would like to raise a
related point: The need for SoC-specific device tree aliases.

For many SoCs, there is a canonical numbering for peripherals; it's used
in the datasheet and BootROMs often makes use of it at runtime to report
the bootsource as a pair:

  - One value to enumerate type of boot medium (e.g. mmc, spi-nor..)
  - Another value that describes which instance (e.g. SDHC1, SPI3, ...)

Some examples, where this is the case, are AT91, STM32MP or i.MX.

barebox has traditionally used /aliases to translate BootROM information
to a device tree node to fixup /chosen/bootsource.

This doesn't work out for many newer SoC support, because of different
expectations: For upstream, aliases are relevant to a board, while
barebox traditionally expected them to be SoC-specific (because they
used to be on i.MX, probably).

To accommodate this, barebox nowadays extends upstream device trees with
/chosen/barebox,bootsource-${alias} properties, which can be used as
translation table instead of aliases.

This solves the issue, but there is occasional breakage when upstream
decides to remove aliases from the SoC DTSI and move them into the
boards until barebox is made to add the /chosen/barebox, overrides.

As described above, I think the data sheet numbering is pretty much an
aspect of the hardware and it has a place in the upstream SoC DTSI.


So what are the thoughts on adding /soc/aliases or some other top-level
node to hold this information?
Or would a h"ardware-label" property or similar be more tenable?


Thanks!
Ahmad

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-11-17 16:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-13  8:28 SoC-specific device tree aliases? Ahmad Fatoum
2025-11-13 18:04 ` Rob Herring
2025-11-13 19:17   ` Doug Anderson
2025-11-13 20:24     ` Heiko Stübner
2025-11-14  9:13   ` Ahmad Fatoum
2025-11-17  7:38 ` Krzysztof Kozlowski
2025-11-17  8:26   ` Sascha Hauer
2025-11-17  9:52     ` Krzysztof Kozlowski
2025-11-17 10:34       ` Sascha Hauer
2025-11-17 10:41         ` Krzysztof Kozlowski
2025-11-17 12:56           ` Marc Kleine-Budde
2025-11-17 13:18             ` Krzysztof Kozlowski
2025-11-17 14:52               ` Sascha Hauer
2025-11-17 14:57                 ` Krzysztof Kozlowski
2025-11-17 15:23                   ` Sascha Hauer
2025-11-17 15:44                     ` Krzysztof Kozlowski
2025-11-17 16:06                       ` Rob Herring
2025-11-17 16:29                         ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).