From: Andre Przywara <andre.przywara@arm.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Chen-Yu Tsai <wens@csie.org>,
Samuel Holland <samuel@sholland.org>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev,
Mikhail Kalashnikov <iuncuim@gmail.com>
Subject: Re: [PATCH 1/5] dt-bindings: clock: sun55i-a523-ccu: Add A523 CPU CCU clock controller
Date: Wed, 3 Sep 2025 10:46:44 +0100 [thread overview]
Message-ID: <20250903104644.7359a86d@donnerap> (raw)
In-Reply-To: <20250903-meticulous-didactic-degu-621fe0@kuoka>
On Wed, 3 Sep 2025 10:08:33 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:
Hi,
> On Wed, Sep 03, 2025 at 01:09:06AM +0100, Andre Przywara wrote:
> > There are four clock controllers in the A523 SoC, but only three are
> > described in the DT binding so far.
> >
> > Add a description for the CPU CCU, which provides separate clocks for
> > the two CPU clusters and the DSU interconnect.
> >
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> > ---
> > .../clock/allwinner,sun55i-a523-ccu.yaml | 25 +++++++++++++++++++
> > .../dt-bindings/clock/sun55i-a523-cpu-ccu.h | 13 ++++++++++
> > 2 files changed, 38 insertions(+)
> > create mode 100644 include/dt-bindings/clock/sun55i-a523-cpu-ccu.h
> >
> > diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml
> > index 1dbd92febc471..367d26800fd0d 100644
> > --- a/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml
> > +++ b/Documentation/devicetree/bindings/clock/allwinner,sun55i-a523-ccu.yaml
> > @@ -19,6 +19,7 @@ properties:
> > compatible:
> > enum:
> > - allwinner,sun55i-a523-ccu
> > + - allwinner,sun55i-a523-cpu-ccu
> > - allwinner,sun55i-a523-mcu-ccu
> > - allwinner,sun55i-a523-r-ccu
> >
> > @@ -64,6 +65,30 @@ allOf:
> > - const: iosc
> > - const: losc-fanout
> >
> > + - if:
> > + properties:
> > + compatible:
> > + enum:
> > + - allwinner,sun55i-a523-cpu-ccu
> > +
> > + then:
> > + properties:
> > + clocks:
> > + items:
> > + - description: High Frequency Oscillator (usually at 24MHz)
> > + - description: Low Frequency Oscillator (usually at 32kHz)
> > + - description: Internal Oscillator
> > + - description: Peripherals PLL 0 (1200 MHz output)
> > + - description: Peripherals PLL 0 (600 MHz output)
> > +
> > + clock-names:
> > + items:
> > + - const: hosc
> > + - const: losc
> > + - const: iosc
> > + - const: pll-periph0-2x
> > + - const: pll-periph0-600m
> > +
> > - if:
> > properties:
> > compatible:
> > diff --git a/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h
> > new file mode 100644
> > index 0000000000000..042f2310f64de
> > --- /dev/null
> > +++ b/include/dt-bindings/clock/sun55i-a523-cpu-ccu.h
>
> Filename based on compatible.
>
>
> > @@ -0,0 +1,13 @@
> > +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
> > +/*
> > + * Copyright 2025 Arm Ltd.
> > + */
> > +
> > +#ifndef _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_
> > +#define _DT_BINDINGS_CLK_SUN55I_A523_CPU_CCU_H_
> > +
> > +#define CLK_CPU_L 7
> > +#define CLK_CPU_DSU 8
> > +#define CLK_CPU_B 9
>
> I don't see the header being used by the driver and odd numbers (they
> should start from 0 or 1) suggest these are not bindings.
This header is included by the private header (at the end of patch 4/5).
The private header is then included by the driver.
Happy to change that, but that's the pattern used in all the other drivers.
Those numbers represent the publicly exposed clocks, the other clocks are
internal. Having gaps in those numbers is somewhat common in sunxi-ng
(check sun50i-h616-ccu.h). This large gap at the beginning here is mostly
due to the somewhat extreme design of this CCU, which requires quite some
helper clocks to get to the actual ones.
We could sort the identifiers to have the public clocks first, but
that would only be the case until we discover a missed clock (which seems
to happen from times to times). And again, that's the pattern used in the
sibling drivers, so I'd rather stay consistent here.
Cheers,
Andre
> Otherwise please explain in commit msg what exactly are you binding
> here.
>
> Best regards,
> Krzysztof
>
next prev parent reply other threads:[~2025-09-03 10:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 0:09 [PATCH 0/5] arm64: allwinner: a523: Enable CPU clocks Andre Przywara
2025-09-03 0:09 ` [PATCH 1/5] dt-bindings: clock: sun55i-a523-ccu: Add A523 CPU CCU clock controller Andre Przywara
2025-09-03 8:08 ` Krzysztof Kozlowski
2025-09-03 9:46 ` Andre Przywara [this message]
2025-09-03 10:25 ` Krzysztof Kozlowski
2025-09-03 0:09 ` [PATCH 2/5] clk: sunxi-ng: generalise update bit Andre Przywara
2025-09-06 4:15 ` Chen-Yu Tsai
2025-09-09 16:06 ` Chen-Yu Tsai
2025-09-09 16:39 ` Andre Przywara
2025-09-03 0:09 ` [PATCH 3/5] clk: sunxi-ng: mp: support clocks with just a shift register Andre Przywara
2025-09-03 4:20 ` Chen-Yu Tsai
2025-09-03 10:20 ` Andre Przywara
2025-09-09 13:32 ` Chen-Yu Tsai
2025-09-03 0:09 ` [PATCH 4/5] clk: sunxi-ng: add support for the A523/T527 CPU CCU Andre Przywara
2025-09-03 10:26 ` Krzysztof Kozlowski
2025-09-03 0:09 ` [PATCH 5/5] arm64: dts: allwinner: a523: add CPU clocks Andre Przywara
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=20250903104644.7359a86d@donnerap \
--to=andre.przywara@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=iuncuim@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=samuel@sholland.org \
--cc=sboyd@kernel.org \
--cc=wens@csie.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).