[PATCH 2/6] dt-bindings: clock: Bindings for Meson T7 clock controller

Conor Dooley conor at kernel.org
Thu Jun 15 14:41:14 PDT 2023


Hey Lucas,

On Thu, Jun 15, 2023 at 07:29:34PM +0100, Lucas Tanure wrote:
> Add documentation for T7 the clock controller.

Other than the bot's complaint, few comments for ya.

> Signed-off-by: Lucas Tanure <tanure at linux.com>
> ---
>  .../bindings/clock/amlogic,mesont7.yaml       |  69 +++
>  include/dt-bindings/clock/mesont7-clkc.h      | 487 ++++++++++++++++++
>  2 files changed, 556 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/amlogic,mesont7.yaml
>  create mode 100644 include/dt-bindings/clock/mesont7-clkc.h
> 
> diff --git a/Documentation/devicetree/bindings/clock/amlogic,mesont7.yaml b/Documentation/devicetree/bindings/clock/amlogic,mesont7.yaml
> new file mode 100644
> index 000000000000..18e7cca0c0e1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/amlogic,mesont7.yaml

The filename should match the compatible - please test the bindings,
dt_binding_check will complain.

> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/amlogic,mesont7-clk.yaml#

and this should match the filename

> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Meson T7 Clock Controller
> +
> +maintainers:
> +  - Lucas Tanure <tanure at linux.com>
> +
> +description: |
> +  The Amlogic Meson T7 clock controller generates and supplies clock to
> +  various peripherals within the SoC.
> +
> +  This binding uses common clock bindings
> +  [1] Documentation/devicetree/bindings/clock/clock-bindings.txt

This doesn't add anything as you're adding a yaml binding. I'd drop it
(and the | from description: since you would no longer have formatting
to preserve).

> +
> +properties:
> +  compatible:
> +    const: amlogic,t7-clkc
> +
> +  reg:
> +    items:
> +      - description: basic registers

What does "basic registers" mean? I think you should be more specific in
your description.

> +      - description: pll registers
> +      - description: cpu_clk registers
> +
> +  reg-names:
> +    items:
> +      - const: basic
> +      - const: pll
> +      - const: cpu_clk
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: xtal
> +
> +  '#clock-cells':
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - clocks
> +  - clock-names
> +  - '#clock-cells'
> +
> +additionalProperties: false
> +
> +examples:
> +  # Clock controller node:
> +  - |
> +    clkc: clock-controller {

The comment above and the node name here can be dropped.
You do however need to change "clock-controller" to
"clock-controller@<addr>".

> +        compatible = "amlogic,t7-clkc";
> +        #clock-cells = <1>;
> +        reg = <0x0 0x0000 0x00 0x49c>,
> +              <0x0 0x8000 0x00 0x320>,
> +              <0x0 0xe040 0x00 0x0bc>;

Drop the 0x0 stuff from here.

> +        reg-names = "basic", "pll", "cpu_clk";
> +        clocks = <&xtal>;
> +        clock-names = "xtal";
> +        status = "okay";

status can be dropped, okay is the default.

Cheers,
Conor.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20230615/141076da/attachment.sig>


More information about the linux-amlogic mailing list