From: Yao Zi <ziyao@disroot.org>
To: "Heiko Stübner" <heiko@sntech.de>,
"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>,
"Philipp Zabel" <p.zabel@pengutronix.de>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/5] dt-bindings: clock: Document clock and reset unit of RK3528
Date: Mon, 24 Feb 2025 17:35:04 +0000 [thread overview]
Message-ID: <Z7ytqSQkwwi3RmB9@pie.lan> (raw)
In-Reply-To: <49730692.MN2xkq1pzW@diego>
On Mon, Feb 24, 2025 at 10:09:29AM +0100, Heiko Stübner wrote:
> Am Montag, 17. Februar 2025, 07:11:42 MEZ schrieb Yao Zi:
> > There are two types of clocks in RK3528 SoC, CRU-managed and
> > SCMI-managed. Independent IDs are assigned to them.
> >
> > For the reset part, differing from previous Rockchip SoCs and
> > downstream bindings which embeds register offsets into the IDs, gapless
> > numbers starting from zero are used.
> >
> > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > ---
> > .../bindings/clock/rockchip,rk3528-cru.yaml | 64 +++
> > .../dt-bindings/clock/rockchip,rk3528-cru.h | 453 ++++++++++++++++++
> > .../dt-bindings/reset/rockchip,rk3528-cru.h | 241 ++++++++++
> > 3 files changed, 758 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml
> > create mode 100644 include/dt-bindings/clock/rockchip,rk3528-cru.h
> > create mode 100644 include/dt-bindings/reset/rockchip,rk3528-cru.h
> >
> > diff --git a/Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml b/Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml
> > new file mode 100644
> > index 000000000000..5a3ec902351c
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml
> > @@ -0,0 +1,64 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/clock/rockchip,rk3528-cru.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Rockchip RK3528 Clock and Reset Controller
> > +
> > +maintainers:
> > + - Yao Zi <ziyao@disroot.org>
> > +
> > +description: |
> > + The RK3528 clock controller generates the clock and also implements a reset
> > + controller for SoC peripherals. For example, it provides SCLK_UART0 and
> > + PCLK_UART0 as well as SRST_P_UART0 and SRST_S_UART0 for the first UART
> > + module.
> > + Each clock is assigned an identifier, consumer nodes can use it to specify
> > + the clock. All available clock and reset IDs are defined in dt-binding
> > + headers.
> > +
> > +properties:
> > + compatible:
> > + const: rockchip,rk3528-cru
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
>
> I do think this needs a
> minItems: 1
> maxItems: 2
> or similar.
>
> xin24m is the main oscillator everything else is supplied from, so is
> absolutely required, but that gmac0 supply comes from an (probably)
> optional clock supply from a mac phy?
>
> So is possibly not available on a system without ethernet hardware?
I don't think so. By the CRU commit message[1] in the vendor driver, the
"phy module" should mean the integrated phy for GMAC0,
The io-in clocks are module phy output clock, gating child
clocks by disabling phy output but not CRU gate.
Add gmac0 clocks. They are all orphans if clk_gmac0_io_i is not
registered by GMAC driver. But it's fine that GMAC driver only
get it but not to set/get rate.
(gmac0 is called "clk_gmac0_io_i" in the vendor driver).
Taking that both the upstream and downstream Rockchip GMAC glue (GMAC
driver) takes some care of the integrated phy, if the clock is an
out-of-SoC supply, the second paragraph sounds less sensible: the clock
should be registered by the external PHY instead of the GMAC driver in
this case.
And there cannot be a case that an integrated clocksource is missing.
>
>
> Heiko
>
>
Thanks,
Yao Zi
[1]: https://github.com/rockchip-linux/kernel/commit/16f512f1e10375dc48aa6c26cedeb7079aba01de
next prev parent reply other threads:[~2025-02-24 17:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 6:11 [PATCH v3 0/5] Support clock and reset unit of Rockchip RK3528 Yao Zi
2025-02-17 6:11 ` [PATCH v3 1/5] dt-bindings: clock: Document clock and reset unit of RK3528 Yao Zi
2025-02-17 11:16 ` Krzysztof Kozlowski
2025-02-24 9:09 ` Heiko Stübner
2025-02-24 17:35 ` Yao Zi [this message]
2025-02-17 6:11 ` [PATCH v3 2/5] clk: rockchip: Add PLL flag ROCKCHIP_PLL_FIXED_MODE Yao Zi
2025-02-17 6:11 ` [PATCH v3 3/5] clk: rockchip: Add clock controller driver for RK3528 SoC Yao Zi
2025-02-17 6:11 ` [PATCH v3 4/5] arm64: dts: rockchip: Add clock generators " Yao Zi
2025-02-17 6:11 ` [PATCH v3 5/5] arm64: dts: rockchip: Add UART clocks " Yao Zi
2025-02-26 19:49 ` [PATCH v3 0/5] Support clock and reset unit of Rockchip RK3528 Heiko Stuebner
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=Z7ytqSQkwwi3RmB9@pie.lan \
--to=ziyao@disroot.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@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