Re: [PATCH v1 08/15] dt-bindings: phy: phy-cadence-torrent: Add clock bindings

2019-12-14 Thread Maxime Ripard
On Tue, Dec 03, 2019 at 11:13:18AM +0100, Yuti Amonkar wrote:
> Add Torrent PHY reference clock bindings.
>
> Signed-off-by: Yuti Amonkar 
> ---
>  .../devicetree/bindings/phy/phy-cadence-torrent.yaml | 12 
> 
>  1 file changed, 12 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml 
> b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
> index d0037bc..6e1d71e5 100644
> --- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
> +++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
> @@ -16,6 +16,14 @@ properties:
>compatible:
>  const: cdns,torrent-phy
>
> +  clocks:
> +maxItems: 1
> +description:
> +  PHY reference clock. Must contain an entry in clock-names.
> +
> +  clock-names:
> +const: "refclk"
> +
>reg:
>  items:
>- description: Offset of the DPTX PHY configuration registers.
> @@ -36,6 +44,8 @@ properties:
>
>  required:
>- compatible
> +  - clocks
> +  - clock-names

This also breaks previous DT that wouldn't have the clocks properties.

What you can do to support what you seem to be doing (changing the
properties and making the clocks properties required for the new one)
is:
  - Add a new compatible to the binding (without removing the older one)
  - Making the older one deprecated
  - Introduce the clocks properties to the binding
  - Making the clocks properties required for the new binding only

Maxime


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v1 08/15] dt-bindings: phy: phy-cadence-torrent: Add clock bindings

2019-12-03 Thread Yuti Amonkar
Add Torrent PHY reference clock bindings.

Signed-off-by: Yuti Amonkar 
---
 .../devicetree/bindings/phy/phy-cadence-torrent.yaml | 12 
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml 
b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
index d0037bc..6e1d71e5 100644
--- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
+++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
@@ -16,6 +16,14 @@ properties:
   compatible:
 const: cdns,torrent-phy
 
+  clocks:
+maxItems: 1
+description:
+  PHY reference clock. Must contain an entry in clock-names.
+
+  clock-names:
+const: "refclk"
+
   reg:
 items:
   - description: Offset of the DPTX PHY configuration registers.
@@ -36,6 +44,8 @@ properties:
 
 required:
   - compatible
+  - clocks
+  - clock-names
   - reg
   - "#phy-cells"
 
@@ -48,5 +58,7 @@ examples:
   num_lanes = <4>;
   max_bit_rate = <8100>;
   #phy-cells = <0>;
+  clocks = <_clk>;
+  clock-names = "refclk";
 };
 ...
-- 
2.7.4

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel