From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Li Chen <lchen@ambarella.com>, Li Chen <me@linux.beauty>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: "moderated list:ARM/Ambarella SoC support"
<linux-arm-kernel@lists.infradead.org>,
"open list:COMMON CLK FRAMEWORK" <linux-clk@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 07/15] dt-bindings: clock: Add Ambarella clock bindings
Date: Mon, 23 Jan 2023 09:11:08 +0100 [thread overview]
Message-ID: <0c19efb4-3bca-f500-ca24-14b9d24369ef@linaro.org> (raw)
In-Reply-To: <20230123073305.149940-8-lchen@ambarella.com>
On 23/01/2023 08:32, Li Chen wrote:
> This patch introduce clock bindings for Ambarella.
>
> Signed-off-by: Li Chen <lchen@ambarella.com>
> Change-Id: I29018a23ed3a5b79a1103e859a5c7ed7bb83a261
All the same problems plus new:
Subject: drop second/last, redundant "bindings". The "dt-bindings"
prefix is already stating that these are bindings.
> ---
> .../clock/ambarella,composite-clock.yaml | 52 ++++++++++++++++
> .../bindings/clock/ambarella,pll-clock.yaml | 59 +++++++++++++++++++
> MAINTAINERS | 2 +
> 3 files changed, 113 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/ambarella,composite-clock.yaml
> create mode 100644 Documentation/devicetree/bindings/clock/ambarella,pll-clock.yaml
>
> diff --git a/Documentation/devicetree/bindings/clock/ambarella,composite-clock.yaml b/Documentation/devicetree/bindings/clock/ambarella,composite-clock.yaml
> new file mode 100644
> index 000000000000..fac1cb9379c4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/ambarella,composite-clock.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/ambarella,composite-clock.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Ambarella Composite Clock
> +
> +maintainers:
> + - Li Chen <lchen@ambarella.com>
> +
Missing description.
> +properties:
> + compatible:
> + items:
Drop items.
> + - const: ambarella,composite-clock
Missing SoC specific compatible. This is anyway not really correct
compatible...
> +
> + clocks: true
No, needs constraints.
> + assigned-clocks: true
> + assigned-clock-parents: true
> + assigned-clock-rates: true
Drop these three.
> + clock-output-names: true
Missing constraints.
> + amb,mux-regmap: true
NAK.
It's enough. The patches have very, very poor quality.
Missing description, missing type/$ref, wrong prefix.
> + amb,div-regmap: true
> + amb,div-width: true
> + amb,div-shift: true
These two are arguments to phandle.
> +
> + '#clock-cells':
> + const: 0
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - '#clock-cells'
> +
> +additionalProperties: false
So why you decided to add it here and not in other places?
> +
> +examples:
> + - |
> + gclk_uart0: gclk-uart0 {
Wrong indentation.
> + #clock-cells = <0>;
> + compatible = "ambarella,composite-clock";
> + clocks = <&osc>, <&gclk_core>, <&pll_out_enet>, <&pll_out_sd>;
> + clock-output-names = "gclk_uart0";
> + assigned-clocks = <&gclk_uart0>;
> + assigned-clock-parents = <&osc>;
> + assigned-clock-rates = <24000000>;
> + amb,mux-regmap = <&rct_syscon 0x1c8>;
> + amb,div-regmap = <&rct_syscon 0x038>;
> + amb,div-width = <24>;
> + amb,div-shift = <0>;
> + };
> diff --git a/Documentation/devicetree/bindings/clock/ambarella,pll-clock.yaml b/Documentation/devicetree/bindings/clock/ambarella,pll-clock.yaml
> new file mode 100644
> index 000000000000..65c1feb60041
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/ambarella,pll-clock.yaml
> @@ -0,0 +1,59 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/ambarella,pll-clock.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Ambarella PLL Clock
> +
> +maintainers:
> + - Li Chen <lchen@ambarella.com>
> +
> +properties:
> + compatible:
> + enum:
> + - ambarella,pll-clock
> + - ambarella,clkpll-v0
> +
> +if:
No, this does not work like that. It sits under "allOf", located after
"required:".
> + properties:
> + compatible:
> + const: ambarella,pll-clock
> +
> +then:
> + properties:
> + clocks:
> + maxItems: 1
> +
> + clock-output-names: true
> + amb,clk-regmap: true
> + amb,frac-mode: true
> + assigned-clocks: true
> + assigned-clock-rates: true
Same problems.
> + gclk_axi: gclk-axi {
> + #clock-cells = <0>;
> + compatible = "fixed-factor-clock";
What is this example about? Not related at all. Provide real example.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-01-23 8:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 7:32 [PATCH 00/15] Ambarella S6LM SoC bring-up Li Chen
[not found] ` <20230123073305.149940-8-lchen@ambarella.com>
2023-01-23 8:11 ` Krzysztof Kozlowski [this message]
2023-01-25 9:28 ` [PATCH 07/15] dt-bindings: clock: Add Ambarella clock bindings Li Chen
2023-01-25 9:55 ` Krzysztof Kozlowski
2023-01-25 12:06 ` Li Chen
2023-01-25 12:14 ` Krzysztof Kozlowski
2023-01-25 13:40 ` Li Chen
2023-01-26 11:29 ` Krzysztof Kozlowski
2023-01-27 14:48 ` Li Chen
2023-01-27 15:08 ` Krzysztof Kozlowski
2023-01-28 9:42 ` Li Chen
2023-01-28 10:08 ` Krzysztof Kozlowski
2023-01-28 10:11 ` Li Chen
2023-02-06 11:28 ` Li Chen
2023-02-06 13:41 ` Krzysztof Kozlowski
2023-02-06 14:57 ` Li Chen
2023-02-08 10:27 ` Krzysztof Kozlowski
2023-01-27 15:11 ` Krzysztof Kozlowski
2023-01-28 9:45 ` Li Chen
2023-01-23 8:39 ` [PATCH 00/15] Ambarella S6LM SoC bring-up Arnd Bergmann
2023-01-24 2:08 ` Bagas Sanjaya
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=0c19efb4-3bca-f500-ca24-14b9d24369ef@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lchen@ambarella.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@linux.beauty \
--cc=mturquette@baylibre.com \
--cc=robh+dt@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