[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210210132518.de7eyzrb5p5xycox@kozik-lap>
Date: Wed, 10 Feb 2021 14:25:18 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Tony Lindgren <tony@...mide.com>
Cc: Hector Martin <marcan@...can.st>, Arnd Bergmann <arnd@...nel.org>,
devicetree@...r.kernel.org, Marc Zyngier <maz@...nel.org>,
linux-kernel@...r.kernel.org, soc@...nel.org, robh+dt@...nel.org,
Olof Johansson <olof@...om.net>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1)
devicetree
On Wed, Feb 10, 2021 at 03:19:46PM +0200, Tony Lindgren wrote:
> * Krzysztof Kozlowski <krzk@...nel.org> [210210 12:56]:
> > On Wed, Feb 10, 2021 at 01:34:50PM +0200, Tony Lindgren wrote:
> > > * Hector Martin <marcan@...can.st> [210210 11:14]:
> > > > On 10/02/2021 19.19, Tony Lindgren wrote:
> > > > > * Hector Martin 'marcan' <marcan@...can.st> [210208 12:05]:
> > > > > > On 08/02/2021 20.04, Krzysztof Kozlowski wrote:
> > > > > ...
> > > > >
> > > > > > > > + clk24: clk24 {
> > > > > > >
> > > > > > > Just "clock". Node names should be generic.
> > > > > >
> > > > > > Really? Almost every other device device tree uses unique clock node names.
> > > > >
> > > > > Yeah please just use generic node name "clock". FYI, we're still hurting
> > > > > because of this for the TI clock node names years after because the drivers
> > > > > got a chance to rely on the clock node name..
> > > > >
> > > > > Using "clock" means your clock driver code won't get a chance to wrongly
> > > > > use the node name and you avoid similar issues.
> > > >
> > > > That means it'll end up like this (so that we can have more than one
> > > > fixed-clock):
> > > >
> > > > clocks {
> > > > #address-cells = <1>;
> > > > #size-cells = <0>;
> > > >
> > > > clk123: clock@0 {
> > > > ...
> > > > reg = <0>
> > > > }
> > > >
> > > > clk456: clock@1 {
> > > > ...
> > > > reg = <1>
> > > > }
> > > > }
> > > >
> > > > Correct?
> > >
> > > Yeah, just don't use an imaginary dummy index for the reg. Use a real
> > > register offset from a clock controller instance base, and a register
> > > bit offset too if needed.
> >
> > No, there is no need for fake "clocks" node with fake addresses. If you
> > have multiple clocks, the rules are the same as for other similar cases,
> > e.g. leds:
> >
> > {
> > clock-0 {
> > ...
> > };
> >
> > clock-1 {
> > ..
> > };
> >
> > soc@0 {
> > };
> > }
> >
> > This should not generate any dtc W=1 warnings and work with dtschema
> > (you need to check for both).
>
> OK yeah so no need for the node name there after the "clock-" :)
> Sounds good to me.
You also could add a suffix or prefix ("fixed-clock-0", "clock-ext").
There is no strict requirement and Rob admitted that as-is was good
enough.
>From my point of view, the dt spec mentions "clock" as one of preferred
names, so I would stick to it.
Anyway, it's not that important. :)
Best regards,
Krzysztof
Powered by blists - more mailing lists