devicetree-spec.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree-spec@vger.kernel.org
Cc: "kernel@pengutronix.de" <kernel@pengutronix.de>,
	quentin.schulz@cherry.de
Subject: SoC-specific device tree aliases?
Date: Thu, 13 Nov 2025 09:28:56 +0100	[thread overview]
Message-ID: <ebc08400-c16d-4ed0-b487-9aabe13bbf0f@pengutronix.de> (raw)

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 |


             reply	other threads:[~2025-11-13  8:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13  8:28 Ahmad Fatoum [this message]
2025-11-13 18:04 ` SoC-specific device tree aliases? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebc08400-c16d-4ed0-b487-9aabe13bbf0f@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree-spec@vger.kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=quentin.schulz@cherry.de \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).