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

From: Krzysztof Kozlowski
Date: Thu Mar 02 2023 - 03:43:47 EST


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@xxxxxxxxxxx>
> ---
> .../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