devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>, Lee Jones <lee.jones@linaro.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: linux-phy@lists.infradead.org,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Chunfeng Yun" <chunfeng.yun@mediatek.com>,
	devicetree@vger.kernel.org, "Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH 2/4] dt-bindings: phy: brcm,ns-usb2-phy: bind just a PHY block
Date: Mon, 13 Sep 2021 10:00:22 +0200	[thread overview]
Message-ID: <20210913080024.6951-2-zajec5@gmail.com> (raw)
In-Reply-To: <20210913080024.6951-1-zajec5@gmail.com>

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(-)

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>;
-- 
2.26.2


  reply	other threads:[~2021-09-13  8:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  8:00 [PATCH 1/4] dt-bindings: mfd: brcm,cru: add clkset syscon Rafał Miłecki
2021-09-13  8:00 ` Rafał Miłecki [this message]
2021-09-21 20:19   ` [PATCH 2/4] dt-bindings: phy: brcm,ns-usb2-phy: bind just a PHY block Rob Herring
2021-10-01 10:08   ` Vinod Koul
2021-09-13  8:00 ` [PATCH 3/4] dt-bindings: mfd: brcm,cru: add USB 2.0 PHY Rafał Miłecki
2021-09-21 20:19   ` Rob Herring
2021-09-22  7:57   ` Lee Jones
2021-09-23 15:01     ` Rob Herring
2021-09-23 20:06       ` Lee Jones
2021-09-13  8:00 ` [PATCH 4/4] phy: bcm-ns-usb2: support updated DT binding with PHY reg space Rafał Miłecki
2021-09-21 20:19 ` [PATCH 1/4] dt-bindings: mfd: brcm,cru: add clkset syscon Rob Herring
2021-09-22  7:57 ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210913080024.6951-2-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=kishon@ti.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=rafal@milecki.pl \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).