* [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
@ 2026-06-09 15:41 ` Jonas Karlman
0 siblings, 0 replies; 15+ messages in thread
From: Jonas Karlman @ 2026-06-09 15:41 UTC (permalink / raw)
To: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman
Cc: Diederik de Haas, devicetree, linux-rockchip, linux-usb,
linux-arm-kernel, linux-kernel, Jonas Karlman
The Rockchip RK3568 EHCI/OHCI controller depends on clk_usbphy1_480m
being enabled, or the system may freeze when registers are accessed.
Add Rockchip RK3568 EHCI and OHCI compatibles with a similar four-clock
constraint as RK3588.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
Existing DTs for RK3568 use the plain generic-ehci/ohci compatible,
next patch make use of these new compatibles and adds the missing
clk_usbphy1_480m clock references.
---
.../devicetree/bindings/usb/generic-ehci.yaml | 10 ++++++++++
.../devicetree/bindings/usb/generic-ohci.yaml | 5 ++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
index 55a5aa7d7a54..c49a1bbc8cfd 100644
--- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
+++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
@@ -52,6 +52,7 @@ properties:
- ibm,476gtr-ehci
- nxp,lpc1850-ehci
- qca,ar7100-ehci
+ - rockchip,rk3568-ehci
- rockchip,rk3588-ehci
- snps,hsdk-v1.0-ehci
- socionext,uniphier-ehci
@@ -186,6 +187,15 @@ allOf:
required:
- clocks
- clock-names
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3568-ehci
+ then:
+ properties:
+ clocks:
+ minItems: 4
unevaluatedProperties: false
diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
index d42f448fa204..5f1b4d2bff89 100644
--- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
+++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
@@ -47,6 +47,7 @@ properties:
- hpe,gxp-ohci
- ibm,476gtr-ohci
- ingenic,jz4740-ohci
+ - rockchip,rk3568-ohci
- rockchip,rk3588-ohci
- snps,hsdk-v1.0-ohci
- const: generic-ohci
@@ -198,7 +199,9 @@ allOf:
properties:
compatible:
contains:
- const: rockchip,rk3588-ohci
+ enum:
+ - rockchip,rk3568-ohci
+ - rockchip,rk3588-ohci
then:
properties:
clocks:
--
2.54.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
2026-06-09 15:41 ` Jonas Karlman
(?)
@ 2026-06-09 15:49 ` sashiko-bot
-1 siblings, 0 replies; 15+ messages in thread
From: sashiko-bot @ 2026-06-09 15:49 UTC (permalink / raw)
To: Jonas Karlman; +Cc: robh, devicetree, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The conditional blocks enforcing the four-clock constraint for the Rockchip RK3568 compatibles do not add the `clocks` property to the `required` list.
--
commit 8a014eea3faedb9781ac7a8ab3c2e305d28df2a3
Author: Jonas Karlman <jonas@kwiboo.se>
dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
This commit adds Rockchip RK3568 compatible strings for the EHCI and OHCI
controllers. It introduces a four-clock constraint to ensure the required
clocks are enabled to prevent system freezes.
> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> index 55a5aa7d7a54e..c49a1bbc8cfdb 100644
> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
[ ... ]
> @@ -186,6 +187,15 @@ allOf:
> required:
> - clocks
> - clock-names
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: rockchip,rk3568-ehci
> + then:
> + properties:
> + clocks:
> + minItems: 4
[Severity: Medium]
Should the clocks property be added to the required list in this block?
Since property constraints like minItems are only evaluated if the property
is actually present in the device tree node, a node that completely omits
the clocks property will silently pass validation without enforcing the
four-clock constraint.
Given the commit message mentions these clocks are required to prevent
system freezes, it seems important to enforce their presence by adding
a required list here.
> diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> index d42f448fa2044..5f1b4d2bff891 100644
> --- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
[ ... ]
> @@ -198,7 +199,9 @@ allOf:
> properties:
> compatible:
> contains:
> - const: rockchip,rk3588-ohci
> + enum:
> + - rockchip,rk3568-ohci
> + - rockchip,rk3588-ohci
> then:
> properties:
> clocks:
> minItems: 4
[Severity: Medium]
Similarly here, should clocks be explicitly required for the OHCI
controllers?
Without adding it to the required list, device trees missing the clocks
property entirely will bypass this constraint and pass schema validation.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260609154124.445182-1-jonas@kwiboo.se?part=1
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
2026-06-09 15:41 ` Jonas Karlman
@ 2026-06-09 15:56 ` Conor Dooley
-1 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2026-06-09 15:56 UTC (permalink / raw)
To: Jonas Karlman
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, Diederik de Haas, devicetree, linux-rockchip,
linux-usb, linux-arm-kernel, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 640 bytes --]
On Tue, Jun 09, 2026 at 03:41:22PM +0000, Jonas Karlman wrote:
> The Rockchip RK3568 EHCI/OHCI controller depends on clk_usbphy1_480m
> being enabled, or the system may freeze when registers are accessed.
>
> Add Rockchip RK3568 EHCI and OHCI compatibles with a similar four-clock
> constraint as RK3588.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> Existing DTs for RK3568 use the plain generic-ehci/ohci compatible,
> next patch make use of these new compatibles and adds the missing
> clk_usbphy1_480m clock references.
Reasonable complaint here from Sashiko.
pw-bot: changes-requested
Cheers,
Conor.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 170 bytes --]
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
@ 2026-06-09 15:56 ` Conor Dooley
0 siblings, 0 replies; 15+ messages in thread
From: Conor Dooley @ 2026-06-09 15:56 UTC (permalink / raw)
To: Jonas Karlman
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, Diederik de Haas, devicetree, linux-rockchip,
linux-usb, linux-arm-kernel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
On Tue, Jun 09, 2026 at 03:41:22PM +0000, Jonas Karlman wrote:
> The Rockchip RK3568 EHCI/OHCI controller depends on clk_usbphy1_480m
> being enabled, or the system may freeze when registers are accessed.
>
> Add Rockchip RK3568 EHCI and OHCI compatibles with a similar four-clock
> constraint as RK3588.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> Existing DTs for RK3568 use the plain generic-ehci/ohci compatible,
> next patch make use of these new compatibles and adds the missing
> clk_usbphy1_480m clock references.
Reasonable complaint here from Sashiko.
pw-bot: changes-requested
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
2026-06-09 15:41 ` Jonas Karlman
@ 2026-06-09 16:32 ` Diederik de Haas
-1 siblings, 0 replies; 15+ messages in thread
From: Diederik de Haas @ 2026-06-09 16:32 UTC (permalink / raw)
To: Jonas Karlman, Heiko Stuebner, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Greg Kroah-Hartman
Cc: Diederik de Haas, devicetree, linux-rockchip, linux-usb,
linux-arm-kernel, linux-kernel
Hi Jonas,
On Tue Jun 9, 2026 at 5:41 PM CEST, Jonas Karlman wrote:
> The Rockchip RK3568 EHCI/OHCI controller depends on clk_usbphy1_480m
> being enabled, or the system may freeze when registers are accessed.
>
> Add Rockchip RK3568 EHCI and OHCI compatibles with a similar four-clock
> constraint as RK3588.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> Existing DTs for RK3568 use the plain generic-ehci/ohci compatible,
> next patch make use of these new compatibles and adds the missing
> clk_usbphy1_480m clock references.
> ---
> .../devicetree/bindings/usb/generic-ehci.yaml | 10 ++++++++++
> .../devicetree/bindings/usb/generic-ohci.yaml | 5 ++++-
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> index 55a5aa7d7a54..c49a1bbc8cfd 100644
> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> @@ -52,6 +52,7 @@ properties:
> - ibm,476gtr-ehci
> - nxp,lpc1850-ehci
> - qca,ar7100-ehci
> + - rockchip,rk3568-ehci
> - rockchip,rk3588-ehci
> - snps,hsdk-v1.0-ehci
> - socionext,uniphier-ehci
> @@ -186,6 +187,15 @@ allOf:
> required:
> - clocks
> - clock-names
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: rockchip,rk3568-ehci
> + then:
> + properties:
> + clocks:
> + minItems: 4
I think that the constraint for rk3588 is this:
- minItems: 1
- maxItems: 4
Like ~ every other compatible; there's no 'branch' for rk3588-ehci.
That's different from what you add for rk3568. Is that deliberate?
Because from the commit message I assumed they should be the same.
> unevaluatedProperties: false
>
> diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> index d42f448fa204..5f1b4d2bff89 100644
> --- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> @@ -47,6 +47,7 @@ properties:
> - hpe,gxp-ohci
> - ibm,476gtr-ohci
> - ingenic,jz4740-ohci
> + - rockchip,rk3568-ohci
> - rockchip,rk3588-ohci
> - snps,hsdk-v1.0-ohci
> - const: generic-ohci
> @@ -198,7 +199,9 @@ allOf:
> properties:
> compatible:
> contains:
> - const: rockchip,rk3588-ohci
> + enum:
> + - rockchip,rk3568-ohci
> + - rockchip,rk3588-ohci
Here they clearly do have the same constraint.
Cheers,
Diederik
> then:
> properties:
> clocks:
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
@ 2026-06-09 16:32 ` Diederik de Haas
0 siblings, 0 replies; 15+ messages in thread
From: Diederik de Haas @ 2026-06-09 16:32 UTC (permalink / raw)
To: Jonas Karlman, Heiko Stuebner, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Greg Kroah-Hartman
Cc: Diederik de Haas, devicetree, linux-rockchip, linux-usb,
linux-arm-kernel, linux-kernel
Hi Jonas,
On Tue Jun 9, 2026 at 5:41 PM CEST, Jonas Karlman wrote:
> The Rockchip RK3568 EHCI/OHCI controller depends on clk_usbphy1_480m
> being enabled, or the system may freeze when registers are accessed.
>
> Add Rockchip RK3568 EHCI and OHCI compatibles with a similar four-clock
> constraint as RK3588.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> Existing DTs for RK3568 use the plain generic-ehci/ohci compatible,
> next patch make use of these new compatibles and adds the missing
> clk_usbphy1_480m clock references.
> ---
> .../devicetree/bindings/usb/generic-ehci.yaml | 10 ++++++++++
> .../devicetree/bindings/usb/generic-ohci.yaml | 5 ++++-
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> index 55a5aa7d7a54..c49a1bbc8cfd 100644
> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> @@ -52,6 +52,7 @@ properties:
> - ibm,476gtr-ehci
> - nxp,lpc1850-ehci
> - qca,ar7100-ehci
> + - rockchip,rk3568-ehci
> - rockchip,rk3588-ehci
> - snps,hsdk-v1.0-ehci
> - socionext,uniphier-ehci
> @@ -186,6 +187,15 @@ allOf:
> required:
> - clocks
> - clock-names
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: rockchip,rk3568-ehci
> + then:
> + properties:
> + clocks:
> + minItems: 4
I think that the constraint for rk3588 is this:
- minItems: 1
- maxItems: 4
Like ~ every other compatible; there's no 'branch' for rk3588-ehci.
That's different from what you add for rk3568. Is that deliberate?
Because from the commit message I assumed they should be the same.
> unevaluatedProperties: false
>
> diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> index d42f448fa204..5f1b4d2bff89 100644
> --- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
> @@ -47,6 +47,7 @@ properties:
> - hpe,gxp-ohci
> - ibm,476gtr-ohci
> - ingenic,jz4740-ohci
> + - rockchip,rk3568-ohci
> - rockchip,rk3588-ohci
> - snps,hsdk-v1.0-ohci
> - const: generic-ohci
> @@ -198,7 +199,9 @@ allOf:
> properties:
> compatible:
> contains:
> - const: rockchip,rk3588-ohci
> + enum:
> + - rockchip,rk3568-ohci
> + - rockchip,rk3588-ohci
Here they clearly do have the same constraint.
Cheers,
Diederik
> then:
> properties:
> clocks:
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
2026-06-09 16:32 ` Diederik de Haas
@ 2026-06-09 18:06 ` Jonas Karlman
-1 siblings, 0 replies; 15+ messages in thread
From: Jonas Karlman @ 2026-06-09 18:06 UTC (permalink / raw)
To: Diederik de Haas
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, devicetree@vger.kernel.org,
linux-rockchip@lists.infradead.org, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Hi Diederik,
On 6/9/2026 6:32 PM, Diederik de Haas wrote:
> Hi Jonas,
>
> On Tue Jun 9, 2026 at 5:41 PM CEST, Jonas Karlman wrote:
>> The Rockchip RK3568 EHCI/OHCI controller depends on clk_usbphy1_480m
>> being enabled, or the system may freeze when registers are accessed.
>>
>> Add Rockchip RK3568 EHCI and OHCI compatibles with a similar four-clock
>> constraint as RK3588.
>>
>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>> ---
>> Existing DTs for RK3568 use the plain generic-ehci/ohci compatible,
>> next patch make use of these new compatibles and adds the missing
>> clk_usbphy1_480m clock references.
>> ---
>> .../devicetree/bindings/usb/generic-ehci.yaml | 10 ++++++++++
>> .../devicetree/bindings/usb/generic-ohci.yaml | 5 ++++-
>> 2 files changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>> index 55a5aa7d7a54..c49a1bbc8cfd 100644
>> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>> @@ -52,6 +52,7 @@ properties:
>> - ibm,476gtr-ehci
>> - nxp,lpc1850-ehci
>> - qca,ar7100-ehci
>> + - rockchip,rk3568-ehci
>> - rockchip,rk3588-ehci
>> - snps,hsdk-v1.0-ehci
>> - socionext,uniphier-ehci
>> @@ -186,6 +187,15 @@ allOf:
>> required:
>> - clocks
>> - clock-names
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: rockchip,rk3568-ehci
>> + then:
>> + properties:
>> + clocks:
>> + minItems: 4
>
> I think that the constraint for rk3588 is this:
> - minItems: 1
> - maxItems: 4
>
> Like ~ every other compatible; there's no 'branch' for rk3588-ehci.
>
> That's different from what you add for rk3568. Is that deliberate?
> Because from the commit message I assumed they should be the same.
It was deliberate, the intention is to use min/maxItems: 4 for rk3568
for both EHCI and OHCI. I left out anything related to k3588 to keep
existing behavior and avoid any possible breakage, and why I used
'similar' and not 'same' in the commit message ;-)
Did a check and the rk3588 variant also uses 4 clocks so I will add same
constraint for the rk3588 variant and address Sashiko's concern in v2.
Regards,
Jonas
>
>> unevaluatedProperties: false
>>
>> diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>> index d42f448fa204..5f1b4d2bff89 100644
>> --- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>> +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>> @@ -47,6 +47,7 @@ properties:
>> - hpe,gxp-ohci
>> - ibm,476gtr-ohci
>> - ingenic,jz4740-ohci
>> + - rockchip,rk3568-ohci
>> - rockchip,rk3588-ohci
>> - snps,hsdk-v1.0-ohci
>> - const: generic-ohci
>> @@ -198,7 +199,9 @@ allOf:
>> properties:
>> compatible:
>> contains:
>> - const: rockchip,rk3588-ohci
>> + enum:
>> + - rockchip,rk3568-ohci
>> + - rockchip,rk3588-ohci
>
> Here they clearly do have the same constraint.
>
> Cheers,
> Diederik
>
>> then:
>> properties:
>> clocks:
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
@ 2026-06-09 18:06 ` Jonas Karlman
0 siblings, 0 replies; 15+ messages in thread
From: Jonas Karlman @ 2026-06-09 18:06 UTC (permalink / raw)
To: Diederik de Haas
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, devicetree@vger.kernel.org,
linux-rockchip@lists.infradead.org, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Hi Diederik,
On 6/9/2026 6:32 PM, Diederik de Haas wrote:
> Hi Jonas,
>
> On Tue Jun 9, 2026 at 5:41 PM CEST, Jonas Karlman wrote:
>> The Rockchip RK3568 EHCI/OHCI controller depends on clk_usbphy1_480m
>> being enabled, or the system may freeze when registers are accessed.
>>
>> Add Rockchip RK3568 EHCI and OHCI compatibles with a similar four-clock
>> constraint as RK3588.
>>
>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>> ---
>> Existing DTs for RK3568 use the plain generic-ehci/ohci compatible,
>> next patch make use of these new compatibles and adds the missing
>> clk_usbphy1_480m clock references.
>> ---
>> .../devicetree/bindings/usb/generic-ehci.yaml | 10 ++++++++++
>> .../devicetree/bindings/usb/generic-ohci.yaml | 5 ++++-
>> 2 files changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>> index 55a5aa7d7a54..c49a1bbc8cfd 100644
>> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>> @@ -52,6 +52,7 @@ properties:
>> - ibm,476gtr-ehci
>> - nxp,lpc1850-ehci
>> - qca,ar7100-ehci
>> + - rockchip,rk3568-ehci
>> - rockchip,rk3588-ehci
>> - snps,hsdk-v1.0-ehci
>> - socionext,uniphier-ehci
>> @@ -186,6 +187,15 @@ allOf:
>> required:
>> - clocks
>> - clock-names
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: rockchip,rk3568-ehci
>> + then:
>> + properties:
>> + clocks:
>> + minItems: 4
>
> I think that the constraint for rk3588 is this:
> - minItems: 1
> - maxItems: 4
>
> Like ~ every other compatible; there's no 'branch' for rk3588-ehci.
>
> That's different from what you add for rk3568. Is that deliberate?
> Because from the commit message I assumed they should be the same.
It was deliberate, the intention is to use min/maxItems: 4 for rk3568
for both EHCI and OHCI. I left out anything related to k3588 to keep
existing behavior and avoid any possible breakage, and why I used
'similar' and not 'same' in the commit message ;-)
Did a check and the rk3588 variant also uses 4 clocks so I will add same
constraint for the rk3588 variant and address Sashiko's concern in v2.
Regards,
Jonas
>
>> unevaluatedProperties: false
>>
>> diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>> index d42f448fa204..5f1b4d2bff89 100644
>> --- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>> +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>> @@ -47,6 +47,7 @@ properties:
>> - hpe,gxp-ohci
>> - ibm,476gtr-ohci
>> - ingenic,jz4740-ohci
>> + - rockchip,rk3568-ohci
>> - rockchip,rk3588-ohci
>> - snps,hsdk-v1.0-ohci
>> - const: generic-ohci
>> @@ -198,7 +199,9 @@ allOf:
>> properties:
>> compatible:
>> contains:
>> - const: rockchip,rk3588-ohci
>> + enum:
>> + - rockchip,rk3568-ohci
>> + - rockchip,rk3588-ohci
>
> Here they clearly do have the same constraint.
>
> Cheers,
> Diederik
>
>> then:
>> properties:
>> clocks:
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
2026-06-09 18:06 ` Jonas Karlman
@ 2026-06-09 19:51 ` Diederik de Haas
-1 siblings, 0 replies; 15+ messages in thread
From: Diederik de Haas @ 2026-06-09 19:51 UTC (permalink / raw)
To: Jonas Karlman, Diederik de Haas
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, devicetree@vger.kernel.org,
linux-rockchip@lists.infradead.org, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Hi Jonas,
On Tue Jun 9, 2026 at 8:06 PM CEST, Jonas Karlman wrote:
> Hi Diederik,
>
> On 6/9/2026 6:32 PM, Diederik de Haas wrote:
>> Hi Jonas,
>>
>> On Tue Jun 9, 2026 at 5:41 PM CEST, Jonas Karlman wrote:
>>> The Rockchip RK3568 EHCI/OHCI controller depends on clk_usbphy1_480m
>>> being enabled, or the system may freeze when registers are accessed.
>>>
>>> Add Rockchip RK3568 EHCI and OHCI compatibles with a similar four-clock
>>> constraint as RK3588.
>>>
>>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>>> ---
>>> Existing DTs for RK3568 use the plain generic-ehci/ohci compatible,
>>> next patch make use of these new compatibles and adds the missing
>>> clk_usbphy1_480m clock references.
>>> ---
>>> .../devicetree/bindings/usb/generic-ehci.yaml | 10 ++++++++++
>>> .../devicetree/bindings/usb/generic-ohci.yaml | 5 ++++-
>>> 2 files changed, 14 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>>> index 55a5aa7d7a54..c49a1bbc8cfd 100644
>>> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>>> @@ -52,6 +52,7 @@ properties:
>>> - ibm,476gtr-ehci
>>> - nxp,lpc1850-ehci
>>> - qca,ar7100-ehci
>>> + - rockchip,rk3568-ehci
>>> - rockchip,rk3588-ehci
>>> - snps,hsdk-v1.0-ehci
>>> - socionext,uniphier-ehci
>>> @@ -186,6 +187,15 @@ allOf:
>>> required:
>>> - clocks
>>> - clock-names
>>> + - if:
>>> + properties:
>>> + compatible:
>>> + contains:
>>> + const: rockchip,rk3568-ehci
>>> + then:
>>> + properties:
>>> + clocks:
>>> + minItems: 4
>>
>> I think that the constraint for rk3588 is this:
>> - minItems: 1
>> - maxItems: 4
>>
>> Like ~ every other compatible; there's no 'branch' for rk3588-ehci.
>>
>> That's different from what you add for rk3568. Is that deliberate?
>> Because from the commit message I assumed they should be the same.
>
> It was deliberate, the intention is to use min/maxItems: 4 for rk3568
Thanks :-)
> for both EHCI and OHCI. I left out anything related to k3588 to keep
> existing behavior and avoid any possible breakage, and why I used
> 'similar' and not 'same' in the commit message ;-)
>
> Did a check and the rk3588 variant also uses 4 clocks so I will add same
> constraint for the rk3588 variant and address Sashiko's concern in v2.
FWIW: I would be absolutely fine if you restrict this patch set to just RK3568.
For the same reason you mentioned. All I wanted to know if it was deliberate
and you confirmed that :-)
Cheers,
Diederik
> Regards,
> Jonas
>
>>
>>> unevaluatedProperties: false
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>>> index d42f448fa204..5f1b4d2bff89 100644
>>> --- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>>> @@ -47,6 +47,7 @@ properties:
>>> - hpe,gxp-ohci
>>> - ibm,476gtr-ohci
>>> - ingenic,jz4740-ohci
>>> + - rockchip,rk3568-ohci
>>> - rockchip,rk3588-ohci
>>> - snps,hsdk-v1.0-ohci
>>> - const: generic-ohci
>>> @@ -198,7 +199,9 @@ allOf:
>>> properties:
>>> compatible:
>>> contains:
>>> - const: rockchip,rk3588-ohci
>>> + enum:
>>> + - rockchip,rk3568-ohci
>>> + - rockchip,rk3588-ohci
>>
>> Here they clearly do have the same constraint.
>>
>> Cheers,
>> Diederik
>>
>>> then:
>>> properties:
>>> clocks:
>>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: Add Rockchip RK3568 compatible for EHCI and OHCI
@ 2026-06-09 19:51 ` Diederik de Haas
0 siblings, 0 replies; 15+ messages in thread
From: Diederik de Haas @ 2026-06-09 19:51 UTC (permalink / raw)
To: Jonas Karlman, Diederik de Haas
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, devicetree@vger.kernel.org,
linux-rockchip@lists.infradead.org, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Hi Jonas,
On Tue Jun 9, 2026 at 8:06 PM CEST, Jonas Karlman wrote:
> Hi Diederik,
>
> On 6/9/2026 6:32 PM, Diederik de Haas wrote:
>> Hi Jonas,
>>
>> On Tue Jun 9, 2026 at 5:41 PM CEST, Jonas Karlman wrote:
>>> The Rockchip RK3568 EHCI/OHCI controller depends on clk_usbphy1_480m
>>> being enabled, or the system may freeze when registers are accessed.
>>>
>>> Add Rockchip RK3568 EHCI and OHCI compatibles with a similar four-clock
>>> constraint as RK3588.
>>>
>>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>>> ---
>>> Existing DTs for RK3568 use the plain generic-ehci/ohci compatible,
>>> next patch make use of these new compatibles and adds the missing
>>> clk_usbphy1_480m clock references.
>>> ---
>>> .../devicetree/bindings/usb/generic-ehci.yaml | 10 ++++++++++
>>> .../devicetree/bindings/usb/generic-ohci.yaml | 5 ++++-
>>> 2 files changed, 14 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>>> index 55a5aa7d7a54..c49a1bbc8cfd 100644
>>> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>>> @@ -52,6 +52,7 @@ properties:
>>> - ibm,476gtr-ehci
>>> - nxp,lpc1850-ehci
>>> - qca,ar7100-ehci
>>> + - rockchip,rk3568-ehci
>>> - rockchip,rk3588-ehci
>>> - snps,hsdk-v1.0-ehci
>>> - socionext,uniphier-ehci
>>> @@ -186,6 +187,15 @@ allOf:
>>> required:
>>> - clocks
>>> - clock-names
>>> + - if:
>>> + properties:
>>> + compatible:
>>> + contains:
>>> + const: rockchip,rk3568-ehci
>>> + then:
>>> + properties:
>>> + clocks:
>>> + minItems: 4
>>
>> I think that the constraint for rk3588 is this:
>> - minItems: 1
>> - maxItems: 4
>>
>> Like ~ every other compatible; there's no 'branch' for rk3588-ehci.
>>
>> That's different from what you add for rk3568. Is that deliberate?
>> Because from the commit message I assumed they should be the same.
>
> It was deliberate, the intention is to use min/maxItems: 4 for rk3568
Thanks :-)
> for both EHCI and OHCI. I left out anything related to k3588 to keep
> existing behavior and avoid any possible breakage, and why I used
> 'similar' and not 'same' in the commit message ;-)
>
> Did a check and the rk3588 variant also uses 4 clocks so I will add same
> constraint for the rk3588 variant and address Sashiko's concern in v2.
FWIW: I would be absolutely fine if you restrict this patch set to just RK3568.
For the same reason you mentioned. All I wanted to know if it was deliberate
and you confirmed that :-)
Cheers,
Diederik
> Regards,
> Jonas
>
>>
>>> unevaluatedProperties: false
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>>> index d42f448fa204..5f1b4d2bff89 100644
>>> --- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
>>> @@ -47,6 +47,7 @@ properties:
>>> - hpe,gxp-ohci
>>> - ibm,476gtr-ohci
>>> - ingenic,jz4740-ohci
>>> + - rockchip,rk3568-ohci
>>> - rockchip,rk3588-ohci
>>> - snps,hsdk-v1.0-ohci
>>> - const: generic-ohci
>>> @@ -198,7 +199,9 @@ allOf:
>>> properties:
>>> compatible:
>>> contains:
>>> - const: rockchip,rk3588-ohci
>>> + enum:
>>> + - rockchip,rk3568-ohci
>>> + - rockchip,rk3588-ohci
>>
>> Here they clearly do have the same constraint.
>>
>> Cheers,
>> Diederik
>>
>>> then:
>>> properties:
>>> clocks:
>>
^ permalink raw reply [flat|nested] 15+ messages in thread