All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] dt-bindings: phy: cdns,torrent-phy: add reset-names
@ 2020-09-18  8:37 Tomi Valkeinen
  2020-09-18  8:37 ` [PATCH v2 2/2] dt-bindings: phy: ti,phy-j721e-wiz: fix bindings for torrent phy Tomi Valkeinen
  2020-09-23  5:28 ` [PATCH v2 1/2] dt-bindings: phy: cdns,torrent-phy: add reset-names Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2020-09-18  8:37 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Vinod Koul, Rob Herring, Swapnil Jakhade,
	Yuti Amonkar
  Cc: linux-kernel, devicetree, Sekhar Nori, Tomi Valkeinen

Add reset-names as a required property.

There are no dts files using torrent phy yet, so it is safe to add a new
required property.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---

Changes in v2:

* Base on phy-next
* Update example
* Add torrent_apb

 .../devicetree/bindings/phy/phy-cadence-torrent.yaml   | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
index 26480f89627d..e266ade53d87 100644
--- a/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
+++ b/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml
@@ -57,6 +57,13 @@ properties:
       - description: Torrent PHY reset.
       - description: Torrent APB reset. This is optional.
 
+  reset-names:
+    minItems: 1
+    maxItems: 2
+    items:
+      - const: torrent_reset
+      - const: torrent_apb
+
 patternProperties:
   '^phy@[0-3]$':
     type: object
@@ -127,6 +134,7 @@ required:
   - reg
   - reg-names
   - resets
+  - reset-names
 
 additionalProperties: false
 
@@ -144,6 +152,7 @@ examples:
                   <0xf0 0xfb030a00 0x0 0x00000040>;
             reg-names = "torrent_phy", "dptx_phy";
             resets = <&phyrst 0>;
+            reset-names = "torrent_reset";
             clocks = <&ref_clk>;
             clock-names = "refclk";
             #address-cells = <1>;
@@ -172,6 +181,7 @@ examples:
             reg = <0xf0 0xfb500000 0x0 0x00100000>;
             reg-names = "torrent_phy";
             resets = <&phyrst 0>, <&phyrst 1>;
+            reset-names = "torrent_reset", "torrent_apb";
             clocks = <&ref_clk>;
             clock-names = "refclk";
             #address-cells = <1>;
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 2/2] dt-bindings: phy: ti,phy-j721e-wiz: fix bindings for torrent phy
  2020-09-18  8:37 [PATCH v2 1/2] dt-bindings: phy: cdns,torrent-phy: add reset-names Tomi Valkeinen
@ 2020-09-18  8:37 ` Tomi Valkeinen
  2020-09-23  5:28 ` [PATCH v2 1/2] dt-bindings: phy: cdns,torrent-phy: add reset-names Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2020-09-18  8:37 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Vinod Koul, Rob Herring, Swapnil Jakhade,
	Yuti Amonkar
  Cc: linux-kernel, devicetree, Sekhar Nori, Tomi Valkeinen

When WIZ wraps a Cadence Torrent PHY (instead of Cadence Sierra PHY)
there is a difference in the refclk-dig node: Torrent only has two
clocks instead of Sierra's four clocks. Add minItems: 2 to solve this.

Additionally, in our use case we only need to use assigned-clock for a
single clock, but the current binding requires either no assigned-clocks
or two. Fix this by adding minItems: 1 to all the assigned-clock
properties.

There was also an extra trailing whitespace, which this patch removes.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---

Changes in v2:

* Base on phy-next

 .../devicetree/bindings/phy/ti,phy-j721e-wiz.yaml   | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
index 5ffc95c62909..c33e9bc79521 100644
--- a/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
+++ b/Documentation/devicetree/bindings/phy/ti,phy-j721e-wiz.yaml
@@ -45,9 +45,15 @@ properties:
   ranges: true
 
   assigned-clocks:
+    minItems: 1
     maxItems: 2
 
   assigned-clock-parents:
+    minItems: 1
+    maxItems: 2
+
+  assigned-clock-rates:
+    minItems: 1
     maxItems: 2
 
   typec-dir-gpios:
@@ -119,9 +125,10 @@ patternProperties:
       logic.
     properties:
       clocks:
+        minItems: 2
         maxItems: 4
-        description: Phandle to four clock nodes representing the inputs to
-          refclk_dig
+        description: Phandle to two (Torrent) or four (Sierra) clock nodes representing
+          the inputs to refclk_dig
 
       "#clock-cells":
         const: 0
@@ -203,7 +210,7 @@ examples:
            };
 
            refclk-dig {
-                  clocks = <&k3_clks 292 11>, <&k3_clks 292 0>, 
+                  clocks = <&k3_clks 292 11>, <&k3_clks 292 0>,
                           <&dummy_cmn_refclk>, <&dummy_cmn_refclk1>;
                   #clock-cells = <0>;
                   assigned-clocks = <&wiz0_refclk_dig>;
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: phy: cdns,torrent-phy: add reset-names
  2020-09-18  8:37 [PATCH v2 1/2] dt-bindings: phy: cdns,torrent-phy: add reset-names Tomi Valkeinen
  2020-09-18  8:37 ` [PATCH v2 2/2] dt-bindings: phy: ti,phy-j721e-wiz: fix bindings for torrent phy Tomi Valkeinen
@ 2020-09-23  5:28 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-09-23  5:28 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Kishon Vijay Abraham I, Rob Herring, Swapnil Jakhade,
	Yuti Amonkar, linux-kernel, devicetree, Sekhar Nori

On 18-09-20, 11:37, Tomi Valkeinen wrote:
> Add reset-names as a required property.
> 
> There are no dts files using torrent phy yet, so it is safe to add a new
> required property.

Applied both, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-23  5:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18  8:37 [PATCH v2 1/2] dt-bindings: phy: cdns,torrent-phy: add reset-names Tomi Valkeinen
2020-09-18  8:37 ` [PATCH v2 2/2] dt-bindings: phy: ti,phy-j721e-wiz: fix bindings for torrent phy Tomi Valkeinen
2020-09-23  5:28 ` [PATCH v2 1/2] dt-bindings: phy: cdns,torrent-phy: add reset-names Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.