From: Herve Codina <herve.codina@bootlin.com>
To: Rob Herring <robh@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Allan Nielsen <allan.nielsen@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Steen Hegelund <steen.hegelund@microchip.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property'
Date: Mon, 28 Oct 2024 18:43:43 +0100 [thread overview]
Message-ID: <20241028184343.74ad5a26@bootlin.com> (raw)
In-Reply-To: <CAL_JsqK7SjfJ7Re4k-A8fQB+tNHyM3r2Rcpct_zUfR2yhEj+iQ@mail.gmail.com>
Hi Rob,
On Mon, 28 Oct 2024 08:55:24 -0500
Rob Herring <robh@kernel.org> wrote:
> On Mon, Oct 28, 2024 at 7:24 AM Herve Codina <herve.codina@bootlin.com> wrote:
> >
> > dtc generates the following warnings when building the LAN966x device
> > tree overlay (lan966x_pci.dtso):
> > Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/cpu_clk: missing or empty reg/ranges property
> > Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/ddr_clk: missing or empty reg/ranges property
> > Warning (simple_bus_reg): /fragment@0/__overlay__/pci-ep-bus@0/sys_clk: missing or empty reg/ranges property
> >
> > Indeed, related nodes are under the pci-ep-bus (simple-bus) which is not
> > correct.
> >
> > Put them outside this node.
> >
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Closes: https://lore.kernel.org/all/20241025110919.64b1cffb@canb.auug.org.au/
> > Fixes: 185686beb464 ("misc: Add support for LAN966x PCI device")
> > Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> > ---
> > The referenced commit is in the reset tree
> > ---
> > drivers/misc/lan966x_pci.dtso | 36 +++++++++++++++++------------------
> > 1 file changed, 18 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/misc/lan966x_pci.dtso b/drivers/misc/lan966x_pci.dtso
> > index 7282687df25f..5466d013da7d 100644
> > --- a/drivers/misc/lan966x_pci.dtso
> > +++ b/drivers/misc/lan966x_pci.dtso
> > @@ -19,6 +19,24 @@ __overlay__ {
> > #address-cells = <3>;
> > #size-cells = <2>;
> >
> > + cpu_clk: cpu_clk {
>
> Preferred node name is "clock-<freq-in-hz>"
I based the name on the lan966x.dtsi
https://elixir.bootlin.com/linux/v6.12-rc1/source/arch/arm/boot/dts/microchip/lan966x.dtsi#L38
Of course, I can rename the cpu_clk, ddr_clk and sys_clk nodes but this will create
a difference against lan966x.dtsi on some points that should be identical.
Let me know with that in mind if I need to rename those nodes in this series.
>
> Also, as a general rule, don't use "_" in node names (and properties).
>
> Isn't there a schema for the device which needs these nodes added to
> it? If not, there should be.
>
No, there is no schema yet for this device.
How can we describe schema for this kind of devices that are using
device-tree overlays?
I mean, this overlay is applied on a PCI device DT node. This DT node is
computed at runtime. It is, in the end, available in the base DT before
applying the overlay.
The compatible string that could be used to check the dtso against schema
cannot be set in the overlay (at least not at the correct place in the
hierarchy) without causing a property memory leak at runtime. An overlay
cannot add a property in a base DT node without generating a memory leak
and so, we avoid adding such properties in the base DT from the overlay.
Is this missing schema blocking for this series ?
Best regards,
Hervé
--
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2024-10-28 17:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 12:24 [PATCH 0/2] Fix dtc warnings when building the LAN966x device tree overlay Herve Codina
2024-10-28 12:24 ` [PATCH 1/2] misc: lan966x_pci: Fix dtc warns 'missing or empty reg/ranges property' Herve Codina
2024-10-28 13:55 ` Rob Herring
2024-10-28 17:43 ` Herve Codina [this message]
2024-10-28 19:52 ` Rob Herring
2024-10-29 7:26 ` Herve Codina
2024-10-28 12:24 ` [PATCH 2/2] misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent' Herve Codina
2024-10-28 13:56 ` Rob Herring
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=20241028184343.74ad5a26@bootlin.com \
--to=herve.codina@bootlin.com \
--cc=allan.nielsen@microchip.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=horatiu.vultur@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=steen.hegelund@microchip.com \
--cc=thomas.petazzoni@bootlin.com \
/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