diff mbox series

[1/2] dt-bindings: usb: samsung,exynos-dwc3: add exynos7870 support

Message ID 20250204-exynos7870-usb-v1-1-a7753f8183a4@disroot.org (mailing list archive)
State New
Headers show
Series Introduce DWC3 support for Exynos7870 | expand

Commit Message

Kaustabh Chakraborty Feb. 3, 2025, 8:39 p.m. UTC
Document compatible string for Exynos7870 DWC3-compatible USB 2.0
driver. The devicetree node requires three clocks, named "usbdrd20",
"usbdrd20_ctrl_clk", and "usbdrd20_ref_clk".

Unlike other variants, Exynos7870's USB node doesn't require extra
regulators. Assert that the regulator nodes are required for all variants
other than Exynos7870's on an individual basis, instead of asserting it
globally.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
---
 .../bindings/usb/samsung,exynos-dwc3.yaml          | 34 ++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski Feb. 5, 2025, 8:48 a.m. UTC | #1
On Tue, Feb 04, 2025 at 02:09:29AM +0530, Kaustabh Chakraborty wrote:
> Document compatible string for Exynos7870 DWC3-compatible USB 2.0
> driver. The devicetree node requires three clocks, named "usbdrd20",
> "usbdrd20_ctrl_clk", and "usbdrd20_ref_clk".
> 
> Unlike other variants, Exynos7870's USB node doesn't require extra

I don't think that's true. What makes you think it does not require
them? Device works without power?

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml b/Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml
index 2b3430cebe99106f3b6201ab31d4d9e3fcc55627..fb67d0538c60f03ec221cb7fe36852fa060ded06 100644
--- a/Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/samsung,exynos-dwc3.yaml
@@ -16,6 +16,7 @@  properties:
       - samsung,exynos5250-dwusb3
       - samsung,exynos5433-dwusb3
       - samsung,exynos7-dwusb3
+      - samsung,exynos7870-dwusb2
       - samsung,exynos850-dwusb3
 
   '#address-cells':
@@ -52,8 +53,6 @@  required:
   - clock-names
   - ranges
   - '#size-cells'
-  - vdd10-supply
-  - vdd33-supply
 
 allOf:
   - if:
@@ -72,6 +71,9 @@  allOf:
             - const: susp_clk
             - const: link_aclk
             - const: link_pclk
+      required:
+        - vdd10-supply
+        - vdd33-supply
 
   - if:
       properties:
@@ -86,6 +88,9 @@  allOf:
         clock-names:
           items:
             - const: usbdrd30
+      required:
+        - vdd10-supply
+        - vdd33-supply
 
   - if:
       properties:
@@ -103,6 +108,9 @@  allOf:
             - const: susp_clk
             - const: phyclk
             - const: pipe_pclk
+      required:
+        - vdd10-supply
+        - vdd33-supply
 
   - if:
       properties:
@@ -119,6 +127,25 @@  allOf:
             - const: usbdrd30
             - const: usbdrd30_susp_clk
             - const: usbdrd30_axius_clk
+      required:
+        - vdd10-supply
+        - vdd33-supply
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos7870-dwusb2
+    then:
+      properties:
+        clocks:
+          minItems: 3
+          maxItems: 3
+        clock-names:
+          items:
+            - const: usbdrd20
+            - const: usbdrd20_ctrl_clk
+            - const: usbdrd20_ref_clk
 
   - if:
       properties:
@@ -134,6 +161,9 @@  allOf:
           items:
             - const: bus_early
             - const: ref
+      required:
+        - vdd10-supply
+        - vdd33-supply
 
 additionalProperties: false