diff mbox series

[2/4] dt-bindings: phy: brcm,ns-usb2-phy: bind just a PHY block

Message ID 20210913080024.6951-2-zajec5@gmail.com
State New
Headers show
Series [1/4] dt-bindings: mfd: brcm,cru: add clkset syscon | expand

Commit Message

Rafał Miłecki Sept. 13, 2021, 8 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

The old binding was covering the whole DMU block space (DMU block
contains CRU block which contains USB PHY). It was a bad design,
overkill and a non-generic solution.

Northstar's USB 2.0 PHY is a small block (part of the CRU MFD) and
binding should be designed to represent that properly. Rework the
binding to map just PHY with the "reg" property and use syscon to
reference shared register that controls block access.

The old binding is deprecated now.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../bindings/phy/bcm-ns-usb2-phy.yaml         | 25 ++++++++++++++-----
 1 file changed, 19 insertions(+), 6 deletions(-)

Comments

Rob Herring Sept. 21, 2021, 8:19 p.m. UTC | #1
On Mon, 13 Sep 2021 10:00:22 +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>

> 

> The old binding was covering the whole DMU block space (DMU block

> contains CRU block which contains USB PHY). It was a bad design,

> overkill and a non-generic solution.

> 

> Northstar's USB 2.0 PHY is a small block (part of the CRU MFD) and

> binding should be designed to represent that properly. Rework the

> binding to map just PHY with the "reg" property and use syscon to

> reference shared register that controls block access.

> 

> The old binding is deprecated now.

> 

> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

> ---

>  .../bindings/phy/bcm-ns-usb2-phy.yaml         | 25 ++++++++++++++-----

>  1 file changed, 19 insertions(+), 6 deletions(-)

> 


Reviewed-by: Rob Herring <robh@kernel.org>
Vinod Koul Oct. 1, 2021, 10:08 a.m. UTC | #2
On 13-09-21, 10:00, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>

> 

> The old binding was covering the whole DMU block space (DMU block

> contains CRU block which contains USB PHY). It was a bad design,

> overkill and a non-generic solution.

> 

> Northstar's USB 2.0 PHY is a small block (part of the CRU MFD) and

> binding should be designed to represent that properly. Rework the

> binding to map just PHY with the "reg" property and use syscon to

> reference shared register that controls block access.

> 

> The old binding is deprecated now.


Applied, thanks

-- 
~Vinod
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.yaml
index 05b4dcd80019..426101530a21 100644
--- a/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/bcm-ns-usb2-phy.yaml
@@ -18,13 +18,21 @@  properties:
     const: brcm,ns-usb2-phy
 
   reg:
-    items:
-      - description: iomem address range of DMU (Device Management Unit)
+    anyOf:
+      - maxItems: 1
+        description: PHY control register
+      - maxItems: 1
+        description: iomem address range of DMU (Device Management Unit)
+        deprecated: true
 
   reg-names:
     items:
       - const: dmu
 
+  brcm,syscon-clkset:
+    description: phandle to syscon for clkset register
+    $ref: /schemas/types.yaml#/definitions/phandle
+
   clocks:
     items:
       - description: USB PHY reference clock
@@ -39,20 +47,25 @@  properties:
 required:
   - compatible
   - reg
-  - reg-names
   - clocks
   - clock-names
   - "#phy-cells"
 
+oneOf:
+  - required:
+      - brcm,syscon-clkset
+  - required:
+      - reg-names
+
 additionalProperties: false
 
 examples:
   - |
     #include <dt-bindings/clock/bcm-nsp.h>
-    phy@1800c000 {
+    phy@1800c164 {
         compatible = "brcm,ns-usb2-phy";
-        reg = <0x1800c000 0x1000>;
-        reg-names = "dmu";
+        reg = <0x1800c164 0x4>;
+        brcm,syscon-clkset = <&clkset>;
         clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>;
         clock-names = "phy-ref-clk";
         #phy-cells = <0>;