diff mbox series

[V4,1/3] dt-bindings: usb: xhci: Add support for BCM2711

Message ID 20231205200531.8232-2-wahrenst@gmx.net
State New
Headers show
Series ARM: dts: bcm2711: Add BCM2711 xHCI support | expand

Commit Message

Stefan Wahren Dec. 5, 2023, 8:05 p.m. UTC
The xHCI IP on the BCM2711 SoC is compatible to "brcm,xhci-brcm-v2",
but also requires a power domain. So introduce a new compatible
and the specific constraints. Since the key allOf can only occur
once, merge the reference below.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../devicetree/bindings/usb/generic-xhci.yaml | 25 ++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

--
2.34.1

Comments

Florian Fainelli Dec. 5, 2023, 10:51 p.m. UTC | #1
On 12/5/23 12:05, Stefan Wahren wrote:
> The xHCI IP on the BCM2711 SoC is compatible to "brcm,xhci-brcm-v2",
> but also requires a power domain. So introduce a new compatible
> and the specific constraints. Since the key allOf can only occur
> once, merge the reference below.
> 
> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/generic-xhci.yaml b/Documentation/devicetree/bindings/usb/generic-xhci.yaml
index 594ebb3ee432..6ceafa4af292 100644
--- a/Documentation/devicetree/bindings/usb/generic-xhci.yaml
+++ b/Documentation/devicetree/bindings/usb/generic-xhci.yaml
@@ -9,9 +9,6 @@  title: USB xHCI Controller
 maintainers:
   - Mathias Nyman <mathias.nyman@intel.com>

-allOf:
-  - $ref: usb-xhci.yaml#
-
 properties:
   compatible:
     oneOf:
@@ -25,6 +22,11 @@  properties:
               - marvell,armada-380-xhci
               - marvell,armada-8k-xhci
           - const: generic-xhci
+      - description: Broadcom SoCs with power domains
+        items:
+          - enum:
+              - brcm,bcm2711-xhci
+          - const: brcm,xhci-brcm-v2
       - description: Broadcom STB SoCs with xHCI
         enum:
           - brcm,xhci-brcm-v2
@@ -49,6 +51,9 @@  properties:
       - const: core
       - const: reg

+  power-domains:
+    maxItems: 1
+
 unevaluatedProperties: false

 required:
@@ -56,6 +61,20 @@  required:
   - reg
   - interrupts

+allOf:
+  - $ref: usb-xhci.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: brcm,bcm2711-xhci
+    then:
+      required:
+        - power-domains
+    else:
+      properties:
+        power-domains: false
+
 examples:
   - |
     usb@f0931000 {