From: Rob Herring <robh@kernel.org>
To: Aradhya Bhatia <a-bhatia1@ti.com>
Cc: Frank Rowand <frowand.list@gmail.com>,
Devicetree List <devicetree@vger.kernel.org>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
Andrew Davis <afd@ti.com>, Nishanth Menon <nm@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Devarsh Thakkar <devarsht@ti.com>, Jai Luthra <j-luthra@ti.com>,
Jayesh Choudhary <j-choudhary@ti.com>
Subject: Re: [PATCH] scripts/dtc: Allow ports to have a single port@0 child
Date: Wed, 25 Oct 2023 14:31:13 -0500 [thread overview]
Message-ID: <20231025193113.GA994152-robh@kernel.org> (raw)
In-Reply-To: <20231013085424.7137-1-a-bhatia1@ti.com>
On Fri, Oct 13, 2023 at 02:24:24PM +0530, Aradhya Bhatia wrote:
> Exempt 'ports' from the rule which asserts that nodes with single child
> node having reg = 0, should not have the '#size-cells' and
> '#address-cells' properties.
>
> Ports of certain hardware do need to be described as only having a
> single child node 'port@0', especially when hardware has multiple ports,
> and the other ports 'port@x' are planned to be added subsequently. In
> such cases, just using 'port', would be an inaccurate hardware
> description.
>
> For example, Texas Instruments' DSS (display-subsystem), which has 2 or
> 4 video ports depending on the SoC. Describing the first video port with
> just 'port' under ports would be inaccurate and even slightly
> misleading. Simply using port@0 (when other ports are not added)
> produces the following warning, while making dtbs with W=1 flag set[0].
There's a reason this is behind W=1.
In general, if you only have a single 'port' it should be just 'port'
which is equivalent to port 0. There's exceptions to that, so the
warning is off by default.
> code-block ::
>
> Warning (graph_child_address): /bus@100000/dss@4a00000/ports:
> graph node has single child node 'port@0',
> #address-cells/#size-cells are not necessary
>
> Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
>
> [0]: https://lore.kernel.org/all/570903b6-8239-d44a-5fac-71700804cb5d@ti.com/
> ---
> scripts/dtc/checks.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
This is a copy of upstream dtc. We don't take patches for it (except in
emergency). Look at the commit history.
Rob
next prev parent reply other threads:[~2023-10-25 19:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 8:54 [PATCH] scripts/dtc: Allow ports to have a single port@0 child Aradhya Bhatia
2023-10-25 19:31 ` Rob Herring [this message]
2023-10-31 16:38 ` Aradhya Bhatia
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=20231025193113.GA994152-robh@kernel.org \
--to=robh@kernel.org \
--cc=a-bhatia1@ti.com \
--cc=afd@ti.com \
--cc=devarsht@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=j-choudhary@ti.com \
--cc=j-luthra@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).