devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Paul Elder <paul.elder@ideasonboard.com>
Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 3/3] arm64: dts: mediatek: mt8365-pumpkin: Add overlays for thp7312 cameras
Date: Thu, 7 Sep 2023 18:04:08 +0300	[thread overview]
Message-ID: <20230907150408.GC17610@pendragon.ideasonboard.com> (raw)
In-Reply-To: <ZPnkUVmDZYb0ysu0@pyrite.rasen.tech>

On Thu, Sep 07, 2023 at 11:55:13PM +0900, Paul Elder wrote:
> On Wed, Sep 06, 2023 at 02:14:29PM +0300, Laurent Pinchart wrote:
> > On Wed, Sep 06, 2023 at 12:01:43PM +0100, Kieran Bingham wrote:
> > > Quoting Laurent Pinchart (2023-09-06 10:35:31)
> > > > On Wed, Sep 06, 2023 at 11:21:31AM +0200, Krzysztof Kozlowski wrote:
> > > > > On 06/09/2023 11:00, Laurent Pinchart wrote:
> > > > > >>> has a regulator@0. There are similar instances for clocks.
> > > > > >>>
> > > > > >>> I understand why it may not be a good idea, and how the root node is
> > > > > >>> indeed not a bus. In some cases, those regulators and clocks are grouped
> > > > > >>> in a regulators or clocks node that has a "simple-bus" compatible. I'm
> > > > > >>> not sure if that's a good idea, but at least it should validate.
> > > > > >>>
> > > > > >>> What's the best practice for discrete board-level clocks and regulators
> > > > > >>> in overlays ? How do we ensure that their node name will not conflict
> > > > > >>> with the board to which the overlay is attached ?
> > > > > >>
> > > > > >> Top-level nodes (so under /) do not have unit addresses. If they have -
> > > > > >> it's an error, because it is not a bus. Also, unit address requires reg.
> > > > > >> No reg? No unit address. DTC reports this as warnings as well.
> > > > > > 
> > > > > > I agree with all that, but what's the recommended practice to add
> > > > > > top-level clocks and regulators in overlays, in a way that avoids
> > > > > > namespace clashes with the base board ?
> > > > > 
> > > > > Whether you use regulator@0 or regulator-0, you have the same chances of
> > > > > clash.
> > > > 
> > > > No disagreement there. My question is whether there's a recommended
> > > > practice to avoid clashes, or if it's an unsolved problem that gets
> > > > ignored for now because there's only 36h in a day and there are more
> > > > urgent things to do.
> > > 
> > > Should an overlay add these items to a simple-bus specific to that
> > > overlay/device that is being supported?
> > > 
> > > That would 'namespace' the added fixed-clocks/fixed-regulators etc...
> > > 
> > > But maybe it's overengineering or mis-using the simple-bus.
> > 
> > You would still need to name the node that groups the regulators and
> > clocks in a way that wouldn't clash between multiple overlays and the
> > base board. It would be nice to have nodes that are "private" to an
> > overlay.
> 
> What's the best solution to this then :/

It seems we don't have a good solution. For now, I'd recommend just
picking a name for the regulator that has a high chance to be unique,
like reg-thp7312-1v2 for instance.

> > > And the items are still not on a 'bus' with an address - they just exist
> > > on a presumably externally provided board....

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2023-09-07 15:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 23:31 [PATCH 0/3] media: i2c: Add driver for THine THP7312 ISP Paul Elder
2023-09-05 23:31 ` [PATCH 1/3] dt-bindings: media: Add " Paul Elder
2023-09-06  0:10   ` Rob Herring
2023-09-06  7:18   ` Krzysztof Kozlowski
2023-09-06  8:15     ` Laurent Pinchart
2023-09-07 14:49       ` Paul Elder
2023-09-07 14:56         ` Laurent Pinchart
2023-09-07 14:53     ` Paul Elder
2023-09-05 23:31 ` [PATCH 2/3] media: i2c: Add driver for THine THP7312 Paul Elder
2023-09-06  7:25   ` Krzysztof Kozlowski
2023-09-06  9:03     ` Laurent Pinchart
2023-09-06 10:50   ` Dave Stevenson
2023-09-07 14:54     ` Paul Elder
2023-09-06 10:58   ` Laurent Pinchart
2023-09-05 23:31 ` [PATCH 3/3] arm64: dts: mediatek: mt8365-pumpkin: Add overlays for thp7312 cameras Paul Elder
2023-09-06  7:27   ` Krzysztof Kozlowski
2023-09-06  8:32     ` Laurent Pinchart
2023-09-06  8:48       ` Krzysztof Kozlowski
2023-09-06  9:00         ` Laurent Pinchart
2023-09-06  9:21           ` Krzysztof Kozlowski
2023-09-06  9:35             ` Laurent Pinchart
2023-09-06 11:01               ` Kieran Bingham
2023-09-06 11:14                 ` Laurent Pinchart
2023-09-07 14:55                   ` Paul Elder
2023-09-07 15:04                     ` Laurent Pinchart [this message]
2023-09-07 15:04                       ` Laurent Pinchart
2023-09-08 20:52   ` Rob Herring
2023-09-09 15:37     ` Laurent Pinchart

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=20230907150408.GC17610@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --cc=paul.elder@ideasonboard.com \
    --cc=robh+dt@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).