From: Min Li <[email protected]>
Add device tree binding doc for the IDT FemtoClock Frequency
Clock Synthesizers.
Signed-off-by: Min Li <[email protected]>
---
.../devicetree/bindings/ptp/ptp-idtfc3.yaml | 47 +++++++++++++++++++
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 <[email protected]>
+
+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
+
+ reg:
+ maxItems: 1
+ description:
+ I2C slave address of the device.
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phc@9 { /* FemtoClock3 */
+ compatible = "idt,rc38xxx0";
+ reg = <0x9>;
+ };
+ };
--
2.39.2
On 10/04/2024 20:41, Min Li wrote:
> From: Min Li <[email protected]>
>
> 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 <[email protected]>
> ---
> .../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 <[email protected]>
> +
> +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
On Wed, 10 Apr 2024 14:41:47 -0400, Min Li wrote:
> From: Min Li <[email protected]>
>
> Add device tree binding doc for the IDT FemtoClock Frequency
> Clock Synthesizers.
>
> Signed-off-by: Min Li <[email protected]>
> ---
> .../devicetree/bindings/ptp/ptp-idtfc3.yaml | 47 +++++++++++++++++++
> 1 file changed, 47 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml:43:1: [error] syntax error: found character '\t' that cannot start any token (syntax)
dtschema/dtc warnings/errors:
make[2]: *** Deleting file 'Documentation/devicetree/bindings/ptp/ptp-idtfc3.example.dts'
Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml:43:1: found a tab character where an indentation space is expected
make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/ptp/ptp-idtfc3.example.dts] Error 1
make[2]: *** Waiting for unfinished jobs....
/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml:43:1: found a tab character where an indentation space is expected
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/ptp/ptp-idtfc3.yaml: ignoring, error parsing file
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1430: dt_binding_check] Error 2
make: *** [Makefile:240: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/LV3P220MB1202BACF71E85F949FC09A29A0062@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.