2020-02-19 21:57:20

by Min Li

[permalink] [raw]
Subject: [PATCH v3 1/2] dt-bindings: ptp: Add device tree binding for IDT 82P33 based PTP clock

From: Min Li <[email protected]>

Add device tree binding doc for the PTP clock based on IDT 82P33
Synchronization Management Unit (SMU).

Changes since v1:
- As suggested by Rob Herring:
1. Drop reg description for i2c
2. Replace i2c@1 with i2c
3. Add addtionalProperties: false

Signed-off-by: Min Li <[email protected]>
---
.../devicetree/bindings/ptp/ptp-idt82p33.yaml | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 Documentation/devicetree/bindings/ptp/ptp-idt82p33.yaml

diff --git a/Documentation/devicetree/bindings/ptp/ptp-idt82p33.yaml b/Documentation/devicetree/bindings/ptp/ptp-idt82p33.yaml
new file mode 100644
index 0000000..25806de
--- /dev/null
+++ b/Documentation/devicetree/bindings/ptp/ptp-idt82p33.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ptp/ptp-idt82p33.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IDT 82P33 PTP Clock Device Tree Bindings
+
+description: |
+ IDT 82P33XXX Synchronization Management Unit (SMU) based PTP clock
+
+maintainers:
+ - Min Li <[email protected]>
+
+properties:
+ compatible:
+ enum:
+ - idt,82p33810
+ - idt,82p33813
+ - idt,82p33814
+ - idt,82p33831
+ - idt,82p33910
+ - idt,82p33913
+ - idt,82p33914
+ - idt,82p33931
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+addtionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ phc@51 {
+ compatible = "idt,82p33810";
+ reg = <0x51>;
+ };
+ };
--
2.7.4


2020-02-20 20:34:24

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] dt-bindings: ptp: Add device tree binding for IDT 82P33 based PTP clock

On Wed, Feb 19, 2020 at 3:56 PM <[email protected]> wrote:
>
> From: Min Li <[email protected]>
>
> Add device tree binding doc for the PTP clock based on IDT 82P33
> Synchronization Management Unit (SMU).
>
> Changes since v1:
> - As suggested by Rob Herring:
> 1. Drop reg description for i2c
> 2. Replace i2c@1 with i2c
> 3. Add addtionalProperties: false

You copied my typo. Should be 'additionalProperties'

'make dt_binding_check' would have caught this for you. Please run it.

With that fixed,

Reviewed-by: Rob Herring <[email protected]>

>
> Signed-off-by: Min Li <[email protected]>
> ---
> .../devicetree/bindings/ptp/ptp-idt82p33.yaml | 45 ++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/ptp/ptp-idt82p33.yaml
>
> diff --git a/Documentation/devicetree/bindings/ptp/ptp-idt82p33.yaml b/Documentation/devicetree/bindings/ptp/ptp-idt82p33.yaml
> new file mode 100644
> index 0000000..25806de
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ptp/ptp-idt82p33.yaml
> @@ -0,0 +1,45 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/ptp/ptp-idt82p33.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: IDT 82P33 PTP Clock Device Tree Bindings
> +
> +description: |
> + IDT 82P33XXX Synchronization Management Unit (SMU) based PTP clock
> +
> +maintainers:
> + - Min Li <[email protected]>
> +
> +properties:
> + compatible:
> + enum:
> + - idt,82p33810
> + - idt,82p33813
> + - idt,82p33814
> + - idt,82p33831
> + - idt,82p33910
> + - idt,82p33913
> + - idt,82p33914
> + - idt,82p33931
> +
> + reg:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> +
> +addtionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + phc@51 {
> + compatible = "idt,82p33810";
> + reg = <0x51>;
> + };
> + };
> --
> 2.7.4
>