Re: [PATCH net-next 1/1] dt-bindings: ptp: Add device tree binding for IDT FemtoClock

From: Krzysztof Kozlowski
Date: Wed Apr 10 2024 - 15:23:21 EST


On 10/04/2024 20:41, Min Li wrote:
> From: Min Li <min.li.xe@xxxxxxxxxxx>
>
> Add device tree binding doc for the IDT FemtoClock Frequency
> Clock Synthesizers.

A nit, subject: drop second/last, redundant "device tree binding for"
The "dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18

>
> Signed-off-by: Min Li <min.li.xe@xxxxxxxxxxx>
> ---
> .../devicetree/bindings/ptp/ptp-idtfc3.yaml | 47 +++++++++++++++++++

Filename based on compatible, e.g. idt,rc38xxx.yaml

> 1 file changed, 47 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
>
> diff --git a/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml b/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
> new file mode 100644
> index 000000000000..3e1c3135df5a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/ptp/ptp-idtfc3.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: RENESAS FemtoClock (TM) Frequency Clock Synthesizers
> +
> +maintainers:
> + - Min Li <min.li.xe@xxxxxxxxxxx>
> +
> +properties:
> + compatible:
> + enum:
> + # For System Synchronizer
> + - idt,rc38xxx0
> + - idt,rc38xxx1
> + - idt,rc38xxx2
> + - idt,rc38xxx3
> + - idt,rc38xxx4
> + - idt,rc38xxx5
> + - idt,rc38xxx6
> + - idt,rc38xxx7
> + - idt,rc38xxx8
> + - idt,rc38xxx9

What are the "xxx"? Wild-cards? Are these compatible? Please read
writing-bindings.

> +
> + reg:
> + maxItems: 1
> + description:
> + I2C slave address of the device.

Drop description, it is redundant.

This looks quite incomplete. Why it cannot be part of existing idt binding?

> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + phc@9 { /* FemtoClock3 */

You have totally messed indentation. What's more, this was not tested.

What is "FemtoClock3" doing here? What is it exactly?

> + compatible = "idt,rc38xxx0";
> + reg = <0x9>;

What's more, where is any user of it? What's the point of adding binding
without any users? Please read submitting patches in DT bindings directory.

Best regards,
Krzysztof