From: Conor Dooley <conor@kernel.org>
To: Yao Zi <ziyao@disroot.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>,
Heiko Stuebner <heiko@sntech.de>,
Philipp Zabel <p.zabel@pengutronix.de>,
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,
Celeste Liu <CoelacanthusHex@gmail.com>
Subject: Re: [PATCH 3/8] dt-bindings: clock: Add rockchip,rk3528-cru
Date: Wed, 2 Oct 2024 09:49:21 +0100 [thread overview]
Message-ID: <20241002-sash-gigantic-f79da2043875@spud> (raw)
In-Reply-To: <Zvxm71YvGbF1s_2w@pineapple>
[-- Attachment #1: Type: text/plain, Size: 3766 bytes --]
On Tue, Oct 01, 2024 at 09:18:03PM +0000, Yao Zi wrote:
> On Tue, Oct 01, 2024 at 05:29:15PM +0100, Conor Dooley wrote:
> > On Tue, Oct 01, 2024 at 04:23:57AM +0000, Yao Zi wrote:
> > > Document Rockchip RK3528 clock and reset unit.
> > >
> > > Signed-off-by: Yao Zi <ziyao@disroot.org>
> > > ---
> > > .../bindings/clock/rockchip,rk3528-cru.yaml | 63 +++++++++++++++++++
> > > 1 file changed, 63 insertions(+)
> > > create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml
> > >
> > > 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..ae51dfde5bb9
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/clock/rockchip,rk3528-cru.yaml
> > > @@ -0,0 +1,63 @@
> > > +# 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:
> > > + enum:
> > > + - rockchip,rk3528-cru
> >
> > nit: This can probably be a const, rather than an enum.
> >
> > > +
> > > + reg:
> > > + maxItems: 1
> > > +
> > > + assigned-clocks: true
> > > +
> > > + assigned-clock-rates: true
> > > +
> > > + clocks:
> > > + minItems: 2
> > > + maxItems: 2
> > > +
> > > + clock-names:
> > > + items:
> > > + - const: xin24m
> > > + - const: phy_50m_out
> >
> > Why is this input clock named "out"? clocks should be named after how
> > they're used in the IP in question, not the name of the source of that
> > clock in the SoC.
> > Without descriptions provided in the clocks property, it is hard to
> > understand what this second clock is for.
>
> Thanks for explaination, it should something like "clk_gmac0".
So it is actually an input clock to the cru? I'd like to see an items
list in the clocks property please, describing what these clocks are.
Also, "clk" is redundant, since these are all clocks, so drop that from
the name.
>
> > > +
> > > + "#clock-cells":
> > > + const: 1
> > > +
> > > + "#reset-cells":
> > > + const: 1
> > > +
> > > +required:
> > > + - compatible
> > > + - reg
> >
> > Why would the input clocks be optional?
>
> This follows other Rockchip SoCs, which often omit input clocks in
> devicetree and depend on clock names registered in common clock
> framework to work.
>
> For completeness, they really shouldn't be optional.
Then please make it required. If the input clocks are required to make
the clock controller function, they should be marked as required.
>
> > > + - "#clock-cells"
> > > + - "#reset-cells"
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > + - |
> > > + cru: clock-controller@ff4a0000 {
> >
> > nit: the cru label is not used and can be dropped.
>
> All comments will be adapted in next revision. Thanks.
Cool.
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-10-02 8:49 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 4:23 [PATCH 0/8] Support clock and reset unit of Rockchip RK3528 Yao Zi
2024-10-01 4:23 ` [PATCH 1/8] dt-bindings: clock: Add clock ID definition for " Yao Zi
2024-10-02 6:32 ` Krzysztof Kozlowski
2024-10-02 9:24 ` Yao Zi
2024-10-01 4:23 ` [PATCH 2/8] dt-bindings: reset: Add reset " Yao Zi
2024-10-01 16:29 ` Conor Dooley
2024-10-02 6:31 ` Krzysztof Kozlowski
2024-10-02 9:54 ` Yao Zi
2024-10-02 10:07 ` Heiko Stübner
2024-10-02 10:19 ` Yao Zi
2024-10-01 4:23 ` [PATCH 3/8] dt-bindings: clock: Add rockchip,rk3528-cru Yao Zi
2024-10-01 16:29 ` Conor Dooley
2024-10-01 21:18 ` Yao Zi
2024-10-02 8:49 ` Conor Dooley [this message]
2024-10-02 10:02 ` Yao Zi
2024-10-01 4:23 ` [PATCH 4/8] clk: rockchip: Add PLL flag ROCKCHIP_PLL_FIXED_MODE Yao Zi
2024-10-02 8:16 ` Heiko Stübner
2024-10-02 10:08 ` Yao Zi
2024-10-02 10:12 ` Heiko Stübner
2024-10-02 10:22 ` Yao Zi
2024-10-01 4:23 ` [PATCH 5/8] clk: rockchip: Add clock type GATE_NO_SET_RATE Yao Zi
2024-10-02 8:08 ` Heiko Stübner
2024-10-02 10:30 ` Yao Zi
2024-10-01 4:24 ` [PATCH 6/8] clk: rockchip: Add clock controller driver for RK3528 SoC Yao Zi
2024-10-02 10:21 ` Heiko Stübner
2024-10-02 10:38 ` Yao Zi
2024-10-01 4:38 ` [PATCH 7/8] arm64: dts: rockchip: Add clock generators " Yao Zi
2024-10-01 4:38 ` [PATCH 8/8] arm64: dts: rockchip: Add UART clocks " Yao Zi
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=20241002-sash-gigantic-f79da2043875@spud \
--to=conor@kernel.org \
--cc=CoelacanthusHex@gmail.com \
--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 \
--cc=ziyao@disroot.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).