[PATCH 3/6] dt-bindings: phy: realtek,usb2phy.yaml: extend for resets and RTL9607C support

Rustam Adilov posted 6 patches 6 days, 23 hours ago
There is a newer version of this series
[PATCH 3/6] dt-bindings: phy: realtek,usb2phy.yaml: extend for resets and RTL9607C support
Posted by Rustam Adilov 6 days, 23 hours ago
Add the "realtek,rtl9607-usb2phy" compatible for USB2 PHY on the RTL9607C
SoC series.

Add a resets property to properties to describe the usb2phy reset line.

In RTL9607C, USB2 PHY reset line is from "IP Enable controller" which is
multipurpose and handle activating various SoC peripherals.

It is unclear whether RTD SoCs have something similar to that but make it
available to them anyway.

RTL9607C requires the "resets" to be specified so add the corresponding
if check for the "realtek,rtl9607-usb2phy" compatible.

Signed-off-by: Rustam Adilov <adilov@disroot.org>
---
 .../bindings/phy/realtek,usb2phy.yaml         | 23 ++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/realtek,usb2phy.yaml b/Documentation/devicetree/bindings/phy/realtek,usb2phy.yaml
index 9911ada39ee7..cdc7b72e5f60 100644
--- a/Documentation/devicetree/bindings/phy/realtek,usb2phy.yaml
+++ b/Documentation/devicetree/bindings/phy/realtek,usb2phy.yaml
@@ -11,10 +11,12 @@ maintainers:
   - Stanley Chang <stanley_chang@realtek.com>
 
 description: |
-  Realtek USB 2.0 PHY support the digital home center (DHC) RTD series SoCs.
+  Realtek USB 2.0 PHY support the digital home center (DHC) RTD and
+  RTL9607C series SoCs.
   The USB 2.0 PHY driver is designed to support the XHCI controller. The SoCs
   support multiple XHCI controllers. One PHY device node maps to one XHCI
   controller.
+  This driver also supports the OCHI and EHCI controllers.
 
   RTD1295/RTD1619 SoCs USB
   The USB architecture includes three XHCI controllers.
@@ -57,6 +59,12 @@ description: |
   XHCI controller#1 -- usb2phy -- phy#0
   XHCI controller#2 -- usb2phy -- phy#0
 
+  RTL9607C SoCs USB
+  The USB architecture includes OHCI and EHCI controllers.
+  Both of them map to one USB2.0 PHY.
+  OHCI controller#0 -- usb2phy -- phy#0
+  EHCI controller#0 -- usb2phy -- phy#0
+
 properties:
   compatible:
     enum:
@@ -69,6 +77,7 @@ properties:
       - realtek,rtd1395-usb2phy-2port
       - realtek,rtd1619-usb2phy
       - realtek,rtd1619b-usb2phy
+      - realtek,rtl9607-usb2phy
 
   reg:
     items:
@@ -130,6 +139,9 @@ properties:
     minimum: -8
     maximum: 8
 
+  resets:
+    maxItems: 1
+
 required:
   - compatible
   - reg
@@ -157,6 +169,15 @@ allOf:
     then:
       properties:
         realtek,driving-level-compensate: false
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - realtek,rtl9607-usb2phy
+    then:
+      required:
+        - resets
 
 additionalProperties: false
 
-- 
2.53.0
Re: [PATCH 3/6] dt-bindings: phy: realtek,usb2phy.yaml: extend for resets and RTL9607C support
Posted by Krzysztof Kozlowski 6 days, 10 hours ago
On Fri, Mar 27, 2026 at 12:34:16AM +0500, Rustam Adilov wrote:
>  description: |
> -  Realtek USB 2.0 PHY support the digital home center (DHC) RTD series SoCs.
> +  Realtek USB 2.0 PHY support the digital home center (DHC) RTD and
> +  RTL9607C series SoCs.
>    The USB 2.0 PHY driver is designed to support the XHCI controller. The SoCs
>    support multiple XHCI controllers. One PHY device node maps to one XHCI
>    controller.
> +  This driver also supports the OCHI and EHCI controllers.

Hardware is fixed, does not change. Don't reference your driver changes
here.

>  
>    RTD1295/RTD1619 SoCs USB
>    The USB architecture includes three XHCI controllers.
> @@ -57,6 +59,12 @@ description: |
>    XHCI controller#1 -- usb2phy -- phy#0
>    XHCI controller#2 -- usb2phy -- phy#0
>  
> +  RTL9607C SoCs USB
> +  The USB architecture includes OHCI and EHCI controllers.
> +  Both of them map to one USB2.0 PHY.
> +  OHCI controller#0 -- usb2phy -- phy#0
> +  EHCI controller#0 -- usb2phy -- phy#0
> +
>  properties:
>    compatible:
>      enum:
> @@ -69,6 +77,7 @@ properties:
>        - realtek,rtd1395-usb2phy-2port
>        - realtek,rtd1619-usb2phy
>        - realtek,rtd1619b-usb2phy
> +      - realtek,rtl9607-usb2phy
>  
>    reg:
>      items:
> @@ -130,6 +139,9 @@ properties:
>      minimum: -8
>      maximum: 8
>  
> +  resets:
> +    maxItems: 1
> +
>  required:
>    - compatible
>    - reg
> @@ -157,6 +169,15 @@ allOf:
>      then:
>        properties:
>          realtek,driving-level-compensate: false
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - realtek,rtl9607-usb2phy
> +    then:
> +      required:
> +        - resets

If it is unclear, they might not have it so,

else: ... :false

see example-schema.

Best regards,
Krzysztof
Re: [PATCH 3/6] dt-bindings: phy: realtek,usb2phy.yaml: extend for resets and RTL9607C support
Posted by Rustam Adilov 6 days, 4 hours ago
On 2026-03-27 08:28, Krzysztof Kozlowski wrote:
> On Fri, Mar 27, 2026 at 12:34:16AM +0500, Rustam Adilov wrote:
>>  description: |
>> -  Realtek USB 2.0 PHY support the digital home center (DHC) RTD series SoCs.
>> +  Realtek USB 2.0 PHY support the digital home center (DHC) RTD and
>> +  RTL9607C series SoCs.
>>    The USB 2.0 PHY driver is designed to support the XHCI controller. The SoCs
>>    support multiple XHCI controllers. One PHY device node maps to one XHCI
>>    controller.
>> +  This driver also supports the OCHI and EHCI controllers.
> 
> Hardware is fixed, does not change. Don't reference your driver changes
> here.

Will remove this line.
>>  
>>    RTD1295/RTD1619 SoCs USB
>>    The USB architecture includes three XHCI controllers.
>> @@ -57,6 +59,12 @@ description: |
>>    XHCI controller#1 -- usb2phy -- phy#0
>>    XHCI controller#2 -- usb2phy -- phy#0
>>  
>> +  RTL9607C SoCs USB
>> +  The USB architecture includes OHCI and EHCI controllers.
>> +  Both of them map to one USB2.0 PHY.
>> +  OHCI controller#0 -- usb2phy -- phy#0
>> +  EHCI controller#0 -- usb2phy -- phy#0
>> +
>>  properties:
>>    compatible:
>>      enum:
>> @@ -69,6 +77,7 @@ properties:
>>        - realtek,rtd1395-usb2phy-2port
>>        - realtek,rtd1619-usb2phy
>>        - realtek,rtd1619b-usb2phy
>> +      - realtek,rtl9607-usb2phy
>>  
>>    reg:
>>      items:
>> @@ -130,6 +139,9 @@ properties:
>>      minimum: -8
>>      maximum: 8
>>  
>> +  resets:
>> +    maxItems: 1
>> +
>>  required:
>>    - compatible
>>    - reg
>> @@ -157,6 +169,15 @@ allOf:
>>      then:
>>        properties:
>>          realtek,driving-level-compensate: false
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            enum:
>> +              - realtek,rtl9607-usb2phy
>> +    then:
>> +      required:
>> +        - resets
> 
> If it is unclear, they might not have it so,
> 
> else: ... :false

Right, i suppose if RTD SoCs had them they would have been added here already so..
will make the resets false for other devices

> see example-schema.
> 
> Best regards,
> Krzysztof

Thanks,
Rustam