linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: kishon@ti.com, balbi@kernel.org, khilman@baylibre.com,
	martin.blumenstingl@googlemail.com, devicetree@vger.kernel.org
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	linux-amlogic@lists.infradead.org, linux-usb@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 01/14] dt-bindings: usb: amlogic,meson-g12a-usb-ctrl: add the Amlogic GXL and GXM Families USB Glue Bindings
Date: Thu, 26 Mar 2020 14:44:53 +0100	[thread overview]
Message-ID: <20200326134507.4808-2-narmstrong@baylibre.com> (raw)
In-Reply-To: <20200326134507.4808-1-narmstrong@baylibre.com>

The Amlogic GXL and GXM is slightly different from the Amlogic G12A Glue.

The GXL SoCs only embeds 2 USB2 PHYs and no USB3 PHYs, and the GXM SoCs
embeds 3 USB2 PHYs.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../usb/amlogic,meson-g12a-usb-ctrl.yaml      | 73 ++++++++++++++++++-
 1 file changed, 69 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml b/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml
index b0e5e0fe9386..b0af50a7c124 100644
--- a/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml
+++ b/Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml
@@ -25,9 +25,13 @@ description: |
   The Amlogic A1 embeds a DWC3 USB IP Core configured for USB2 in
   host-only mode.
 
+  The Amlogic GXL & GXM SoCs doesn't embed an USB3 PHY.
+
 properties:
   compatible:
     enum:
+      - amlogic,meson-gxl-usb-ctrl
+      - amlogic,meson-gxm-usb-ctrl
       - amlogic,meson-g12a-usb-ctrl
       - amlogic,meson-a1-usb-ctrl
 
@@ -41,6 +45,11 @@ properties:
 
   clocks:
     minItems: 1
+    maxItems: 3
+
+  clock-names:
+    minItems: 1
+    maxItems: 3
 
   resets:
     minItems: 1
@@ -52,10 +61,8 @@ properties:
     maxItems: 1
 
   phy-names:
-    items:
-      - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
-      - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
-      - const: usb3-phy0 # USB3 PHY if USB3_0 is used
+    minItems: 1
+    maxItems: 3
 
   phys:
     minItems: 1
@@ -89,6 +96,61 @@ required:
   - dr_mode
 
 allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-g12a-usb-ctrl
+
+    then:
+      properties:
+        phy-names:
+          items:
+            - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
+            - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
+            - const: usb3-phy0 # USB3 PHY if USB3_0 is used
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gxl-usb-ctrl
+
+    then:
+      properties:
+        clocks:
+          minItems: 2
+        clock-names:
+          items:
+            - const: usb_ctrl
+            - const: ddr
+        phy-names:
+          items:
+            - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
+            - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
+      required:
+        - clock-names
+  - if:
+      properties:
+        compatible:
+          enum:
+            - amlogic,meson-gxm-usb-ctrl
+
+    then:
+      properties:
+        clocks:
+          minItems: 2
+        clock-names:
+          items:
+            - const: usb_ctrl
+            - const: ddr
+        phy-names:
+          items:
+            - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
+            - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
+            - const: usb2-phy2 # USB2 PHY2 if USBOTG_C port is used
+
+      required:
+        - clock-names
   - if:
       properties:
         compatible:
@@ -97,6 +159,9 @@ allOf:
 
     then:
       properties:
+        phy-names:
+          items:
+            - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
         clocks:
           minItems: 3
         clock-names:
-- 
2.22.0


  reply	other threads:[~2020-03-26 13:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 13:44 [PATCH v2 00/14] usb: dwc3: meson: add OTG support for GXL/GXM Neil Armstrong
2020-03-26 13:44 ` Neil Armstrong [this message]
2020-04-04 17:20   ` [PATCH v2 01/14] dt-bindings: usb: amlogic,meson-g12a-usb-ctrl: add the Amlogic GXL and GXM Families USB Glue Bindings Rob Herring
2020-03-26 13:44 ` [PATCH v2 02/14] usb: dwc3: meson-g12a: specify phy names in soc data Neil Armstrong
2020-03-26 13:44 ` [PATCH v2 03/14] usb: dwc3: meson-g12a: handle the phy and glue registers separately Neil Armstrong
2020-03-26 13:44 ` [PATCH v2 04/14] usb: dwc3: meson-g12a: get the reset as shared Neil Armstrong
2020-03-26 13:44 ` [PATCH v2 05/14] usb: dwc3: meson-g12a: check return of dwc3_meson_g12a_usb_init Neil Armstrong
2020-03-26 22:57   ` Martin Blumenstingl
2020-03-26 13:44 ` [PATCH v2 06/14] usb: dwc3: meson-g12a: refactor usb2 phy init Neil Armstrong
2020-03-26 23:08   ` Martin Blumenstingl
2020-03-29 10:35     ` Felipe Balbi
2020-03-26 13:44 ` [PATCH v2 07/14] usb: dwc3: meson-g12a: refactor usb init Neil Armstrong
2020-03-26 23:26   ` Martin Blumenstingl
2020-03-31  8:44     ` Neil Armstrong
2020-03-26 13:45 ` [PATCH v2 08/14] usb: dwc3: meson-g12a: support the GXL/GXM DWC3 host phy disconnect Neil Armstrong
2020-03-26 13:45 ` [PATCH v2 09/14] usb: dwc3: meson-g12a: add support for GXL and GXM SoCs Neil Armstrong
2020-03-26 13:45 ` [PATCH v2 10/14] arm64: dts: amlogic: use the new USB control driver for GXL and GXM Neil Armstrong
2020-04-29 18:17   ` Kevin Hilman
2020-03-26 13:45 ` [PATCH v2 11/14] phy: amlogic: meson-gxl-usb3: remove code for non-existing PHY Neil Armstrong
2020-03-26 13:45 ` [PATCH v2 12/14] usb: dwc3: of-simple: remove Amlogic GXL and AXG compatibles Neil Armstrong
2020-03-26 13:45 ` [PATCH v2 13/14] doc: dt: bindings: usb: dwc3: remove amlogic compatible entries Neil Armstrong
2020-04-04 17:21   ` Rob Herring
2020-03-26 13:45 ` [PATCH v2 14/14] dt-bindings: usb: dwc3: remove old DWC3 wrapper Neil Armstrong
2020-04-04 17:21   ` Rob Herring
2020-03-29 10:36 ` [PATCH v2 00/14] usb: dwc3: meson: add OTG support for GXL/GXM Felipe Balbi
2020-03-31  8:40   ` Neil Armstrong

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=20200326134507.4808-2-narmstrong@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=balbi@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=kishon@ti.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    /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).