mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: Francesco Dolcini <francesco@dolcini.it>,
	Ernest Van Hoecke <ernestvanhoecke@gmail.com>,
	Frank Li <Frank.Li@nxp.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
Subject: Re: [PATCH 0/4] arm64: dts: freescale: Add Toradex iMX95 overlays
Date: Wed, 23 Sep 2026 10:41:11 +0200	[thread overview]
Message-ID: <20260923084111.GA460930@francesco-nb> (raw)
In-Reply-To: <arLJl3jyyytfS_Qw@SMW015318>

Hello Frank,

On Tue, Sep 22, 2026 at 01:31:51PM -0500, Frank Li wrote:
> On Tue, Sep 22, 2026 at 06:58:46PM +0200, Francesco Dolcini wrote:
> > On Tue, Sep 22, 2026 at 11:07:44AM -0500, Frank Li wrote:
> > > On Tue, Sep 22, 2026 at 04:33:45PM +0200, Ernest Van Hoecke wrote:
> > > > This series adds device tree overlays for the Toradex Verdin, Aquila,
> > > > and SMARC iMX95 SoMs.
> > > >
> > > > The series adds support for:
> > > > - NAU8822 Bridge Tied Load configuration on the Verdin Development Board
> > > > - UART_4 reservation for Cortex-M7 firmware on Verdin and Aquila
> > > > - SER0 reservation for Cortex-M7 firmware on SMARC
> > > >
> > > > The UART overlays mark the port as reserved so Linux does not claim it.
> > > > Firmware remains responsible for configuring the UART and its pads.
> > > >
> > > > The Makefile entries build standalone DTBOs and ready-to-use composed
> > > > DTBs for the corresponding Development Boards.
> > > >
> > > > Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
> > > > ---
> > > > Ernest Van Hoecke (4):
> > > >       arm64: dts: freescale: imx95-verdin: Add NAU8822 Bridge Tied Load
> > > >       arm64: dts: freescale: imx95-verdin: Add Cortex-M7 UART_4 overlay
> > > >       arm64: dts: freescale: imx95-aquila: Add Cortex-M7 UART_4 overlay
> > >
> > > both reserved lpuart2, can you share one dtso?
> >
> > The comment in the DT file must be different because it's important to
> > reference the actual board it applies to.
> >
> > So to fulfill this request we would need to add a common dtsi, include
> > it from two different dtso files.
> 
> No, direct use one dtso. see
> 
> https://elixir.bootlin.com/linux/v7.3-rc3/source/arch/arm64/boot/dts/freescale/imx-pcie0-ep.dtso
> 
> And makefile to check how apply the same dtso for difference boards

imx-pcie0-ep.dtso works as a single shared file because its content is
generic, there is no board name anywhere in it, and nobody needs to
apply that specific dtbo by hand to know what it is for.

These overlays are different: they are meant to be picked up and applied
directly by the end user, in addition to also being combined in-tree
into a ready DTB. Put yourself in that user's shoes: they have a Verdin
board, they want to free up UART_4 for their Cortex-M7 firmware, and
they go looking in arch/arm64/boot/dts/freescale/ for the overlay that
does that for their board. What they need at that point is a file name
that says "this is for Verdin" and "this is the UART_4 one", and once
they open it, a comment that confirms both: which board and which
specific UART. That is the whole point of shipping the overlay
separately from a combined DTB: it is meant to be readable and
applicable on its own by someone who is not a DT expert.

There is also a second, even more constrained user: the one who never
looks at the kernel sources at all, and only gets the compiled .dtbo as
deployed on their distribution, e.g. under /boot/overlays/ on the
target, or the more generic paths used by distributions like Debian
(/boot/firmware/overlays/) or Armbian (user_overlays= in
armbianEnv.txt), picking it by name from an overlay list or a U-Boot
env variable. Comments do not survive dtc compilation, so for that user
the file name is the only information available, there is no comment to
fall back on.

A single dtso shared between Verdin and Aquila fails that on both
counts: the name has to become something generic like
imx95-verdin-aquila-uart4-mcu.dtso (immediately confusing: which board
is it really for? can I use it on either?), and the comment inside can
no longer say which board it targets either. That is worse for the
person using it, for the sake of avoiding 2 lines of duplication:

  &lpuart2 {
  	status = "reserved";
  };

It also does not reduce the Makefile churn: we need the same number of
Makefile lines/combos either way, one dtso reused for two boards or two
dedicated ones. And this file will not change once merged, so there is
no maintenance overhead from keeping it per board.

We agree that avoiding duplication is generally the right call. When
there is real, growing duplication across dtso files, the right fix is
a shared dtsi included by the dtso files, not merging them into one. In
this case the duplication is 2 lines that will not change, so it does
not meet that bar either way.

We would like to keep the two dedicated dtso files.

Francesco

  reply	other threads:[~2026-09-23  8:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 14:33 Ernest Van Hoecke
2026-09-22 14:33 ` [PATCH 1/4] arm64: dts: freescale: imx95-verdin: Add NAU8822 Bridge Tied Load Ernest Van Hoecke
2026-09-22 14:33 ` [PATCH 2/4] arm64: dts: freescale: imx95-verdin: Add Cortex-M7 UART_4 overlay Ernest Van Hoecke
2026-09-22 14:33 ` [PATCH 3/4] arm64: dts: freescale: imx95-aquila: " Ernest Van Hoecke
2026-09-22 14:33 ` [PATCH 4/4] arm64: dts: freescale: imx95-toradex-smarc: Add Cortex-M7 SER0 overlay Ernest Van Hoecke
2026-09-22 16:07 ` [PATCH 0/4] arm64: dts: freescale: Add Toradex iMX95 overlays Frank Li
2026-09-22 16:58   ` Francesco Dolcini
2026-09-22 18:31     ` Frank Li
2026-09-23  8:41       ` Francesco Dolcini [this message]
2026-09-23 15:06         ` Frank Li

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=20260923084111.GA460930@francesco-nb \
    --to=francesco@dolcini.it \
    --cc=Frank.Li@nxp.com \
    --cc=Frank.li@oss.nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ernest.vanhoecke@toradex.com \
    --cc=ernestvanhoecke@gmail.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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

all inboxes | Powered by JetHome®