diff mbox series

[3/7] dt-bindings: phy: cadence-torrent: Add bindings to support dual input reference clock configurations

Message ID 20230301131125.6084-4-sjakhade@cadence.com
State Changes Requested
Headers show
Series PHY: Add support for USXGMII and dual refclk configurations in Cadence Torrent PHY | expand

Commit Message

Swapnil Kashinath Jakhade March 1, 2023, 1:11 p.m. UTC
Torrent(SD0801) PHY supports one external and one internal reference
clocks. Update bindings to support dual reference clock multilink
configurations.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
---
 .../bindings/phy/phy-cadence-torrent.yaml     | 35 ++++++++++++++-----
 1 file changed, 26 insertions(+), 9 deletions(-)

Comments

Krzysztof Kozlowski March 2, 2023, 8:43 a.m. UTC | #1
On 01/03/2023 14:11, Swapnil Jakhade wrote:
> Torrent(SD0801) PHY supports one external and one internal reference
> clocks. Update bindings to support dual reference clock multilink

Subject: drop second/last, redundant "bindings". The "dt-bindings"
prefix is already stating that these are bindings. Drop also "to
support", just describe what you add/fix/change. Your subject is way too
long.


> configurations.
> 
> Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
> ---
>  .../bindings/phy/phy-cadence-torrent.yaml     | 35 ++++++++++++++-----
>  1 file changed, 26 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
> index 2ad1faadda2a..711097e167bc 100644
> --- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
> +++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
> @@ -32,17 +32,34 @@ properties:
>      const: 1
>  
>    clocks:
> -    minItems: 1
> -    maxItems: 2
> -    description:
> -      PHY reference clock for 1 item. Must contain an entry in clock-names.
> -      Optional Parent to enable output reference clock.
> +    anyOf:

oneOf (just like your clock-names)

> +      - items:
> +          - description: PHY input reference clock. Must contain an entry in clock-names.

Drop "Must contain an entry in clock-names." everywhere.

> +      - items:
> +          - description: PHY input reference clock. Must contain an entry in clock-names.
> +          - description: Optional Parent to enable output reference clock.
> +      - items:
> +          - description: PHY input reference clock. Must contain an entry in clock-names.
> +          - description: Second optional input reference clock. Must contain an entry in clock-names.

Your commit msg says this is "internal reference", so call it like this,
not "first" and "second"

> +      - items:
> +          - description: PHY input reference clock. Must contain an entry in clock-names.
> +          - description: Second optional input reference clock. Must contain an entry in clock-names.
> +          - description: Optional Parent to enable output reference clock.
>  
>    clock-names:
> -    minItems: 1
> -    items:
> -      - const: refclk
> -      - const: phy_en_refclk
> +    oneOf:
> +      - items:
> +          - const: refclk
> +      - items:
> +          - const: refclk
> +          - const: phy_en_refclk
> +      - items:
> +          - const: refclk
> +          - const: refclk1

ref_internal_clk?

> +      - items:
> +          - const: refclk
> +          - const: refclk1
> +          - const: phy_en_refclk
>  
>    assigned-clocks:
>      maxItems: 3

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
index 2ad1faadda2a..711097e167bc 100644
--- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
+++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
@@ -32,17 +32,34 @@  properties:
     const: 1
 
   clocks:
-    minItems: 1
-    maxItems: 2
-    description:
-      PHY reference clock for 1 item. Must contain an entry in clock-names.
-      Optional Parent to enable output reference clock.
+    anyOf:
+      - items:
+          - description: PHY input reference clock. Must contain an entry in clock-names.
+      - items:
+          - description: PHY input reference clock. Must contain an entry in clock-names.
+          - description: Optional Parent to enable output reference clock.
+      - items:
+          - description: PHY input reference clock. Must contain an entry in clock-names.
+          - description: Second optional input reference clock. Must contain an entry in clock-names.
+      - items:
+          - description: PHY input reference clock. Must contain an entry in clock-names.
+          - description: Second optional input reference clock. Must contain an entry in clock-names.
+          - description: Optional Parent to enable output reference clock.
 
   clock-names:
-    minItems: 1
-    items:
-      - const: refclk
-      - const: phy_en_refclk
+    oneOf:
+      - items:
+          - const: refclk
+      - items:
+          - const: refclk
+          - const: phy_en_refclk
+      - items:
+          - const: refclk
+          - const: refclk1
+      - items:
+          - const: refclk
+          - const: refclk1
+          - const: phy_en_refclk
 
   assigned-clocks:
     maxItems: 3