* [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM
@ 2025-03-26 16:22 Lukasz Czechowski
2025-03-26 16:22 ` [PATCH 1/5] usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs Lukasz Czechowski
` (5 more replies)
0 siblings, 6 replies; 15+ messages in thread
From: Lukasz Czechowski @ 2025-03-26 16:22 UTC (permalink / raw)
To: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger
Cc: linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, Lukasz Czechowski, quentin.schulz, stable
The RK3399 Puma SoM contains the internal Cypress CYUSB3304 USB
hub, that shows instability due to improper reset pin configuration.
Currently reset pin is modeled as a vcc5v0_host regulator, that
might result in too short reset pulse duration.
Starting with the v6.6, the Onboard USB hub driver (later renamed
to Onboard USB dev) contains support for Cypress HX3 hub family.
It can be now used to correctly model the RK3399 Puma SoM hardware.
The first commits in this series fix the onboard USB dev driver to
support all HX3 hub variants, including the CYUSB3304 found in
the RK3399 Puma SoM.
This allows to introduce fix for internal USB hub instability on
RK3399 Puma, by replacing the vcc5v0_host regulator with
cy3304_reset, used inside the hub node.
Please be aware that the patch that fixes USB hub instability in
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi can me merged only
after updating the Onboard USB dev driver, otherwise the hub
will not work.
Two last commits in the series disable unrouted USB controllers
and PHYs on RK3399 Puma SOM and Haikou carrier board, with no
intended functional changes.
Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
---
Lukasz Czechowski (3):
usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs
dt-bindings: usb: cypress,hx3: Add support for all variants
arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma
Quentin Schulz (2):
arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma
arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou
.../devicetree/bindings/usb/cypress,hx3.yaml | 6 +++
.../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 8 ----
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 43 ++++++++++------------
drivers/usb/misc/onboard_usb_dev.c | 10 ++++-
drivers/usb/misc/onboard_usb_dev.h | 6 +++
5 files changed, 39 insertions(+), 34 deletions(-)
---
base-commit: 1e26c5e28ca5821a824e90dd359556f5e9e7b89f
change-id: 20250326-onboard_usb_dev-a7c063a8a515
Best regards,
--
Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/5] usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs
2025-03-26 16:22 [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Lukasz Czechowski
@ 2025-03-26 16:22 ` Lukasz Czechowski
2025-03-28 8:19 ` Krzysztof Kozlowski
2025-03-26 16:22 ` [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants Lukasz Czechowski
` (4 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Lukasz Czechowski @ 2025-03-26 16:22 UTC (permalink / raw)
To: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger
Cc: linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, Lukasz Czechowski, quentin.schulz, stable
The Cypress HX3 USB3.0 hubs use different PID values depending
on the product variant. The comment in compatibles table is
misleading, as the currently used PIDs (0x6504 and 0x6506 for
USB 3.0 and USB 2.0, respectively) are defaults for the CYUSB331x,
while CYUSB330x and CYUSB332x variants use different values.
Based on the datasheet [1], update the compatible usb devices table
to handle different types of the hub.
The change also includes vendor mode PIDs, which are used by the
hub in I2C Master boot mode, if connected EEPROM contains invalid
signature or is blank. This allows to correctly boot the hub even
if the EEPROM will have broken content.
Number of vcc supplies and timing requirements are the same for all
HX variants, so reuse existing onboard_hub_pdata.
[1] https://www.infineon.com/dgdl/Infineon-HX3_USB_3_0_Hub_Consumer_Industrial-DataSheet-v22_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0ecb53f644b8
Table 9. PID Values
Fixes: b43cd82a1a40 ("usb: misc: onboard-hub: add support for Cypress HX3 USB 3.0 family")
Cc: stable@vger.kernel.org
Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
---
drivers/usb/misc/onboard_usb_dev.c | 10 ++++++++--
drivers/usb/misc/onboard_usb_dev.h | 6 ++++++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c
index 75ac3c6aa92d..f5372dfa241a 100644
--- a/drivers/usb/misc/onboard_usb_dev.c
+++ b/drivers/usb/misc/onboard_usb_dev.c
@@ -569,8 +569,14 @@ static void onboard_dev_usbdev_disconnect(struct usb_device *udev)
}
static const struct usb_device_id onboard_dev_id_table[] = {
- { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6504) }, /* CYUSB33{0,1,2}x/CYUSB230x 3.0 HUB */
- { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6506) }, /* CYUSB33{0,1,2}x/CYUSB230x 2.0 HUB */
+ { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6500) }, /* CYUSB330x 3.0 HUB */
+ { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6502) }, /* CYUSB330x 2.0 HUB */
+ { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6503) }, /* CYUSB33{0,1}x 2.0 HUB, Vendor Mode */
+ { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6504) }, /* CYUSB331x 3.0 HUB */
+ { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6506) }, /* CYUSB331x 2.0 HUB */
+ { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6507) }, /* CYUSB332x 2.0 HUB, Vendor Mode */
+ { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6508) }, /* CYUSB332x 3.0 HUB */
+ { USB_DEVICE(VENDOR_ID_CYPRESS, 0x650a) }, /* CYUSB332x 2.0 HUB */
{ USB_DEVICE(VENDOR_ID_CYPRESS, 0x6570) }, /* CY7C6563x 2.0 HUB */
{ USB_DEVICE(VENDOR_ID_GENESYS, 0x0608) }, /* Genesys Logic GL850G USB 2.0 HUB */
{ USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 HUB */
diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h
index 317b3eb99c02..17696f7c5e43 100644
--- a/drivers/usb/misc/onboard_usb_dev.h
+++ b/drivers/usb/misc/onboard_usb_dev.h
@@ -104,8 +104,14 @@ static const struct of_device_id onboard_dev_match[] = {
{ .compatible = "usb451,8027", .data = &ti_tusb8020b_data, },
{ .compatible = "usb451,8140", .data = &ti_tusb8041_data, },
{ .compatible = "usb451,8142", .data = &ti_tusb8041_data, },
+ { .compatible = "usb4b4,6500", .data = &cypress_hx3_data, },
+ { .compatible = "usb4b4,6502", .data = &cypress_hx3_data, },
+ { .compatible = "usb4b4,6503", .data = &cypress_hx3_data, },
{ .compatible = "usb4b4,6504", .data = &cypress_hx3_data, },
{ .compatible = "usb4b4,6506", .data = &cypress_hx3_data, },
+ { .compatible = "usb4b4,6507", .data = &cypress_hx3_data, },
+ { .compatible = "usb4b4,6508", .data = &cypress_hx3_data, },
+ { .compatible = "usb4b4,650a", .data = &cypress_hx3_data, },
{ .compatible = "usb4b4,6570", .data = &cypress_hx2vl_data, },
{ .compatible = "usb5e3,608", .data = &genesys_gl850g_data, },
{ .compatible = "usb5e3,610", .data = &genesys_gl852g_data, },
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants
2025-03-26 16:22 [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Lukasz Czechowski
2025-03-26 16:22 ` [PATCH 1/5] usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs Lukasz Czechowski
@ 2025-03-26 16:22 ` Lukasz Czechowski
2025-03-26 17:58 ` Conor Dooley
2025-03-26 16:22 ` [PATCH 3/5] arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma Lukasz Czechowski
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Lukasz Czechowski @ 2025-03-26 16:22 UTC (permalink / raw)
To: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger
Cc: linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, Lukasz Czechowski, quentin.schulz, stable
The Cypress HX3 hubs use different default PID value depending
on the variant. Update compatibles list.
Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family")
Cc: stable@vger.kernel.org # 6.6
Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table and onboard_dev_match in drivers/usb/misc/onboard_usb_dev.{c,h} driver
Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
---
Documentation/devicetree/bindings/usb/cypress,hx3.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
index 1033b7a4b8f9..f0b93002bd02 100644
--- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
+++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
@@ -15,8 +15,14 @@ allOf:
properties:
compatible:
enum:
+ - usb4b4,6500
+ - usb4b4,6502
+ - usb4b4,6503
- usb4b4,6504
- usb4b4,6506
+ - usb4b4,6507
+ - usb4b4,6508
+ - usb4b4,650a
reg: true
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/5] arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma
2025-03-26 16:22 [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Lukasz Czechowski
2025-03-26 16:22 ` [PATCH 1/5] usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs Lukasz Czechowski
2025-03-26 16:22 ` [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants Lukasz Czechowski
@ 2025-03-26 16:22 ` Lukasz Czechowski
2025-03-26 16:22 ` [PATCH 4/5] arm64: dts: rockchip: disable unrouted USB controllers and PHY " Lukasz Czechowski
` (2 subsequent siblings)
5 siblings, 0 replies; 15+ messages in thread
From: Lukasz Czechowski @ 2025-03-26 16:22 UTC (permalink / raw)
To: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger
Cc: linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, Lukasz Czechowski, quentin.schulz, stable
Currently, the onboard Cypress CYUSB3304 USB hub is not defined in
the device tree, and hub reset pin is provided as vcc5v0_host
regulator to usb phy. This causes instability issues, as a result
of improper reset duration.
The fixed regulator device requests the GPIO during probe in its
inactive state (except if regulator-boot-on property is set, in
which case it is requested in the active state). Considering gpio
is GPIO_ACTIVE_LOW for Puma, it means it’s driving it high. Then
the regulator gets enabled (because regulator-always-on property),
which drives it to its active state, meaning driving it low.
The Cypress CYUSB3304 USB hub actually requires the reset to be
asserted for at least 5 ms, which we cannot guarantee right now
since there's no delay in the current config, meaning the hub may
sometimes work or not. We could add delay as offered by
fixed-regulator but let's rather fix this by using the proper way
to model onboard USB hubs.
Define hub_2_0 and hub_3_0 nodes, as the onboard Cypress hub
consist of two 'logical' hubs, for USB2.0 and USB3.0.
Use the 'reset-gpios' property of hub to assign reset pin instead
of using regulator. Rename the vcc5v0_host regulator to
cy3304_reset to be more meaningful.
The vdd-supply and vdd2-supply properties in hub nodes were
skipped, because hub power supplies are always enabled based
on HW design.
Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM")
Cc: stable@vger.kernel.org # 6.6
Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table and onboard_dev_match in drivers/usb/misc/onboard_usb_dev.{c,h} driver
Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
---
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 33 ++++++++++++++++-----------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 995b30a7aae0..3a9049372e12 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -60,16 +60,6 @@ vcc3v3_sys: regulator-vcc3v3-sys {
vin-supply = <&vcc5v0_sys>;
};
- vcc5v0_host: regulator-vcc5v0-host {
- compatible = "regulator-fixed";
- gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&vcc5v0_host_en>;
- regulator-name = "vcc5v0_host";
- regulator-always-on;
- vin-supply = <&vcc5v0_sys>;
- };
-
vcc5v0_sys: regulator-vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
@@ -521,8 +511,8 @@ pmic_int_l: pmic-int-l {
};
};
- usb2 {
- vcc5v0_host_en: vcc5v0-host-en {
+ usb {
+ cy3304_reset: cy3304-reset {
rockchip,pins =
<4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
};
@@ -591,7 +581,6 @@ u2phy1_otg: otg-port {
};
u2phy1_host: host-port {
- phy-supply = <&vcc5v0_host>;
status = "okay";
};
};
@@ -603,6 +592,24 @@ &usbdrd3_1 {
&usbdrd_dwc3_1 {
status = "okay";
dr_mode = "host";
+ pinctrl-names = "default";
+ pinctrl-0 = <&cy3304_reset>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hub_2_0: hub@1 {
+ compatible = "usb4b4,6502";
+ reg = <1>;
+ peer-hub = <&hub_3_0>;
+ reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
+ };
+
+ hub_3_0: hub@2 {
+ compatible = "usb4b4,6500";
+ reg = <2>;
+ peer-hub = <&hub_2_0>;
+ reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
+ };
};
&usb_host1_ehci {
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/5] arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma
2025-03-26 16:22 [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Lukasz Czechowski
` (2 preceding siblings ...)
2025-03-26 16:22 ` [PATCH 3/5] arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma Lukasz Czechowski
@ 2025-03-26 16:22 ` Lukasz Czechowski
2025-03-26 16:23 ` [PATCH 5/5] arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou Lukasz Czechowski
2025-03-26 19:11 ` [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Rob Herring (Arm)
5 siblings, 0 replies; 15+ messages in thread
From: Lukasz Czechowski @ 2025-03-26 16:22 UTC (permalink / raw)
To: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger
Cc: linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, Lukasz Czechowski, quentin.schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
The u2phy1_host port is the part of the USB PHY1 (namely the
HOST1_DP/DM lanes) which routes directly to the USB2.0 HOST
controller[1]. The other lanes of the PHY are routed to the USB3.0 OTG
controller (dwc3), which we do use.
The HOST1_DP/DM lanes aren't routed on RK3399 Puma so let's simply
disable the USB2.0 controllers and associated part in USB2.0 PHY.
No intended functional change.
[1] https://rockchip.fr/Rockchip%20RK3399%20TRM%20V1.3%20Part2.pdf
Chapter 2 USB2.0 PHY
Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
---
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 3a9049372e12..d0d867374b3f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -579,10 +579,6 @@ &u2phy1 {
u2phy1_otg: otg-port {
status = "okay";
};
-
- u2phy1_host: host-port {
- status = "okay";
- };
};
&usbdrd3_1 {
@@ -611,11 +607,3 @@ hub_3_0: hub@2 {
reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
};
};
-
-&usb_host1_ehci {
- status = "okay";
-};
-
-&usb_host1_ohci {
- status = "okay";
-};
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/5] arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou
2025-03-26 16:22 [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Lukasz Czechowski
` (3 preceding siblings ...)
2025-03-26 16:22 ` [PATCH 4/5] arm64: dts: rockchip: disable unrouted USB controllers and PHY " Lukasz Czechowski
@ 2025-03-26 16:23 ` Lukasz Czechowski
2025-03-26 19:11 ` [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Rob Herring (Arm)
5 siblings, 0 replies; 15+ messages in thread
From: Lukasz Czechowski @ 2025-03-26 16:23 UTC (permalink / raw)
To: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger
Cc: linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, Lukasz Czechowski, quentin.schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
The u2phy0_host port is the part of the USB PHY0 (namely the
HOST0_DP/DM lanes) which routes directly to the USB2.0 HOST
controller[1]. The other lanes of the PHY are routed to the USB3.0 OTG
controller (dwc3), which we do use.
The HOST0_DP/DM lanes aren't routed on RK3399 Puma so let's simply
disable the USB2.0 controllers.
USB3 OTG has been known to be unstable on RK3399 Puma Haikou for a
while, one of the recurring issues being that only USB2 is detected and
not USB3 in host mode. Reading the justification above and seeing that
we are keeping u2phy0_host in the Haikou carrierboard DTS probably may
have bothered you since it should be changed to u2phy0_otg. The issue is
that if it's switched to that, USB OTG on Haikou is entirely broken. I
have checked the routing in the Gerber file, the lanes are going to the
expected ball pins (that is, NOT HOST0_DP/DM).
u2phy0_host is for sure the wrong part of the PHY to use, but it's the
only one that works at the moment for that board so keep it until we
figure out what exactly is broken.
No intended functional change.
[1] https://rockchip.fr/Rockchip%20RK3399%20TRM%20V1.3%20Part2.pdf
Chapter 2 USB2.0 PHY
Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
---
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts
index 947bbd62a6b0..93cefacc7a01 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts
@@ -292,14 +292,6 @@ &uart2 {
status = "okay";
};
-&usb_host0_ehci {
- status = "okay";
-};
-
-&usb_host0_ohci {
- status = "okay";
-};
-
&vopb {
status = "okay";
};
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants
2025-03-26 16:22 ` [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants Lukasz Czechowski
@ 2025-03-26 17:58 ` Conor Dooley
2025-04-08 16:36 ` Łukasz Czechowski
2025-04-09 14:14 ` Rob Herring (Arm)
0 siblings, 2 replies; 15+ messages in thread
From: Conor Dooley @ 2025-03-26 17:58 UTC (permalink / raw)
To: Lukasz Czechowski
Cc: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger,
linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, quentin.schulz, stable
[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]
On Wed, Mar 26, 2025 at 05:22:57PM +0100, Lukasz Czechowski wrote:
> The Cypress HX3 hubs use different default PID value depending
> on the variant. Update compatibles list.
>
> Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family")
> Cc: stable@vger.kernel.org # 6.6
> Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table and onboard_dev_match in drivers/usb/misc/onboard_usb_dev.{c,h} driver
> Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
> ---
> Documentation/devicetree/bindings/usb/cypress,hx3.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> index 1033b7a4b8f9..f0b93002bd02 100644
> --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> @@ -15,8 +15,14 @@ allOf:
> properties:
> compatible:
> enum:
> + - usb4b4,6500
> + - usb4b4,6502
> + - usb4b4,6503
> - usb4b4,6504
> - usb4b4,6506
> + - usb4b4,6507
> + - usb4b4,6508
> + - usb4b4,650a
All these devices seem to have the same match data, why is a fallback
not suitable?
>
> reg: true
>
>
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM
2025-03-26 16:22 [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Lukasz Czechowski
` (4 preceding siblings ...)
2025-03-26 16:23 ` [PATCH 5/5] arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou Lukasz Czechowski
@ 2025-03-26 19:11 ` Rob Herring (Arm)
5 siblings, 0 replies; 15+ messages in thread
From: Rob Herring (Arm) @ 2025-03-26 19:11 UTC (permalink / raw)
To: Lukasz Czechowski
Cc: linux-rockchip, quentin.schulz, Conor Dooley, Krzysztof Kozlowski,
Benjamin Bara, Matthias Kaehlcke, Heiko Stuebner, Klaus Goger,
linux-arm-kernel, stable, linux-usb, linux-kernel, devicetree,
Greg Kroah-Hartman
On Wed, 26 Mar 2025 17:22:55 +0100, Lukasz Czechowski wrote:
> The RK3399 Puma SoM contains the internal Cypress CYUSB3304 USB
> hub, that shows instability due to improper reset pin configuration.
> Currently reset pin is modeled as a vcc5v0_host regulator, that
> might result in too short reset pulse duration.
> Starting with the v6.6, the Onboard USB hub driver (later renamed
> to Onboard USB dev) contains support for Cypress HX3 hub family.
> It can be now used to correctly model the RK3399 Puma SoM hardware.
>
> The first commits in this series fix the onboard USB dev driver to
> support all HX3 hub variants, including the CYUSB3304 found in
> the RK3399 Puma SoM.
> This allows to introduce fix for internal USB hub instability on
> RK3399 Puma, by replacing the vcc5v0_host regulator with
> cy3304_reset, used inside the hub node.
> Please be aware that the patch that fixes USB hub instability in
> arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi can me merged only
> after updating the Onboard USB dev driver, otherwise the hub
> will not work.
>
> Two last commits in the series disable unrouted USB controllers
> and PHYs on RK3399 Puma SOM and Haikou carrier board, with no
> intended functional changes.
>
> Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
> ---
> Lukasz Czechowski (3):
> usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs
> dt-bindings: usb: cypress,hx3: Add support for all variants
> arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma
>
> Quentin Schulz (2):
> arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma
> arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou
>
> .../devicetree/bindings/usb/cypress,hx3.yaml | 6 +++
> .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 8 ----
> arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 43 ++++++++++------------
> drivers/usb/misc/onboard_usb_dev.c | 10 ++++-
> drivers/usb/misc/onboard_usb_dev.h | 6 +++
> 5 files changed, 39 insertions(+), 34 deletions(-)
> ---
> base-commit: 1e26c5e28ca5821a824e90dd359556f5e9e7b89f
> change-id: 20250326-onboard_usb_dev-a7c063a8a515
>
> Best regards,
> --
> Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
>
>
>
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: base-commit 1e26c5e28ca5821a824e90dd359556f5e9e7b89f not known, ignoring
Base: attempting to guess base-commit...
Base: tags/next-20250326 (best guess, 2/5 blobs matched)
If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/rockchip/' for 20250326-onboard_usb_dev-v1-0-a4b0a5d1b32c@thaumatec.com:
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1: 'vdd-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1: 'vdd2-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2: 'vdd-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2: 'vdd2-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: pinctrl: gpios: {'bios-disable-override-hog-pin': {'rockchip,pins': [[3, 29, 0, 190]], 'phandle': 185}, 'q7-thermal-pin': {'rockchip,pins': [[0, 3, 0, 189]], 'phandle': 184}} is not of type 'array'
from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/5] usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs
2025-03-26 16:22 ` [PATCH 1/5] usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs Lukasz Czechowski
@ 2025-03-28 8:19 ` Krzysztof Kozlowski
0 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-28 8:19 UTC (permalink / raw)
To: Lukasz Czechowski
Cc: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger,
linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, quentin.schulz, stable
On Wed, Mar 26, 2025 at 05:22:56PM +0100, Lukasz Czechowski wrote:
> diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h
> index 317b3eb99c02..17696f7c5e43 100644
> --- a/drivers/usb/misc/onboard_usb_dev.h
> +++ b/drivers/usb/misc/onboard_usb_dev.h
> @@ -104,8 +104,14 @@ static const struct of_device_id onboard_dev_match[] = {
> { .compatible = "usb451,8027", .data = &ti_tusb8020b_data, },
> { .compatible = "usb451,8140", .data = &ti_tusb8041_data, },
> { .compatible = "usb451,8142", .data = &ti_tusb8041_data, },
> + { .compatible = "usb4b4,6500", .data = &cypress_hx3_data, },
> + { .compatible = "usb4b4,6502", .data = &cypress_hx3_data, },
> + { .compatible = "usb4b4,6503", .data = &cypress_hx3_data, },
> { .compatible = "usb4b4,6504", .data = &cypress_hx3_data, },
> { .compatible = "usb4b4,6506", .data = &cypress_hx3_data, },
> + { .compatible = "usb4b4,6507", .data = &cypress_hx3_data, },
> + { .compatible = "usb4b4,6508", .data = &cypress_hx3_data, },
Why are you adding so many entries? Same entry is a strong sign these
are compatible.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants
2025-03-26 17:58 ` Conor Dooley
@ 2025-04-08 16:36 ` Łukasz Czechowski
2025-04-09 16:18 ` Conor Dooley
2025-04-09 14:14 ` Rob Herring (Arm)
1 sibling, 1 reply; 15+ messages in thread
From: Łukasz Czechowski @ 2025-04-08 16:36 UTC (permalink / raw)
To: Conor Dooley
Cc: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger,
linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, quentin.schulz
Hello,
śr., 26 mar 2025 o 18:58 Conor Dooley <conor@kernel.org> napisał(a):
>
> On Wed, Mar 26, 2025 at 05:22:57PM +0100, Lukasz Czechowski wrote:
> > The Cypress HX3 hubs use different default PID value depending
> > on the variant. Update compatibles list.
> >
> > Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family")
> > Cc: stable@vger.kernel.org # 6.6
> > Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table and onboard_dev_match in drivers/usb/misc/onboard_usb_dev.{c,h} driver
> > Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
> > ---
> > Documentation/devicetree/bindings/usb/cypress,hx3.yaml | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > index 1033b7a4b8f9..f0b93002bd02 100644
> > --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > @@ -15,8 +15,14 @@ allOf:
> > properties:
> > compatible:
> > enum:
> > + - usb4b4,6500
> > + - usb4b4,6502
> > + - usb4b4,6503
> > - usb4b4,6504
> > - usb4b4,6506
> > + - usb4b4,6507
> > + - usb4b4,6508
> > + - usb4b4,650a
>
> All these devices seem to have the same match data, why is a fallback
> not suitable?
>
Thank you for the suggestion. Indeed the fallback compatible appears
to work fine in this case,
and I am able to avoid additional entries in onboard_dev_match table
as added in the first patch in this series.
However, after I've updated the cypress,hx3.yaml schema file and
rk3399-puma.dtsi file,
I get the following warnings, when running "make dtbs_check":
linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1:
compatible: ['usb4b4,6502', 'usb4b4,6506'] is too long
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2:
compatible: ['usb4b4,6500', 'usb4b4,6504'] is too long
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
Below is the diff of my changes:
diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
index f0b93002bd02..d6eac1213228 100644
--- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
+++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
@@ -14,15 +14,22 @@ allOf:
properties:
compatible:
- enum:
- - usb4b4,6500
- - usb4b4,6502
- - usb4b4,6503
- - usb4b4,6504
- - usb4b4,6506
- - usb4b4,6507
- - usb4b4,6508
- - usb4b4,650a
+ oneOf:
+ - enum:
+ - usb4b4,6504
+ - usb4b4,6506
+ - items:
+ - enum:
+ - usb4b4,6500
+ - usb4b4,6508
+ - const: usb4b4,6504
+ - items:
+ - enum:
+ - usb4b4,6502
+ - usb4b4,6503
+ - usb4b4,6507
+ - usb4b4,650a
+ - const: usb4b4,6506
reg: true
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index d0d867374b3f..7fac61f95fc6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -594,14 +594,14 @@ &usbdrd_dwc3_1 {
#size-cells = <0>;
hub_2_0: hub@1 {
- compatible = "usb4b4,6502";
+ compatible = "usb4b4,6502", "usb4b4,6506";
reg = <1>;
peer-hub = <&hub_3_0>;
reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
};
hub_3_0: hub@2 {
- compatible = "usb4b4,6500";
+ compatible = "usb4b4,6500", "usb4b4,6504";
reg = <2>;
peer-hub = <&hub_2_0>;
reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
Do you have any suggestions on how I can properly update the schema
files to avoid the above warnings?
> >
> > reg: true
> >
> >
> > --
> > 2.43.0
> >
Best regards,
Lukasz
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants
2025-03-26 17:58 ` Conor Dooley
2025-04-08 16:36 ` Łukasz Czechowski
@ 2025-04-09 14:14 ` Rob Herring (Arm)
1 sibling, 0 replies; 15+ messages in thread
From: Rob Herring (Arm) @ 2025-04-09 14:14 UTC (permalink / raw)
To: Conor Dooley
Cc: Conor Dooley, linux-arm-kernel, linux-rockchip, stable,
Lukasz Czechowski, quentin.schulz, Krzysztof Kozlowski,
Heiko Stuebner, Benjamin Bara, linux-usb, Klaus Goger, devicetree,
linux-kernel, Greg Kroah-Hartman, Matthias Kaehlcke
On Wed, 26 Mar 2025 17:58:11 +0000, Conor Dooley wrote:
> On Wed, Mar 26, 2025 at 05:22:57PM +0100, Lukasz Czechowski wrote:
> > The Cypress HX3 hubs use different default PID value depending
> > on the variant. Update compatibles list.
> >
> > Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family")
> > Cc: stable@vger.kernel.org # 6.6
> > Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table and onboard_dev_match in drivers/usb/misc/onboard_usb_dev.{c,h} driver
> > Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
> > ---
> > Documentation/devicetree/bindings/usb/cypress,hx3.yaml | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > index 1033b7a4b8f9..f0b93002bd02 100644
> > --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > @@ -15,8 +15,14 @@ allOf:
> > properties:
> > compatible:
> > enum:
> > + - usb4b4,6500
> > + - usb4b4,6502
> > + - usb4b4,6503
> > - usb4b4,6504
> > - usb4b4,6506
> > + - usb4b4,6507
> > + - usb4b4,6508
> > + - usb4b4,650a
>
> All these devices seem to have the same match data, why is a fallback
> not suitable?
>
> >
> > reg: true
> >
> >
> > --
> > 2.43.0
> >
>
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: using specified base-commit 1e26c5e28ca5821a824e90dd359556f5e9e7b89f
If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/rockchip/' for 20250326-fanatic-onion-5f6bf8ec97e3@spud:
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1 (usb4b4,6502): 'vdd-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1 (usb4b4,6502): 'vdd2-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2 (usb4b4,6500): 'vdd-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2 (usb4b4,6500): 'vdd2-supply' is a required property
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: pinctrl (rockchip,rk3399-pinctrl): gpios: {'bios-disable-override-hog-pin': {'rockchip,pins': [[3, 29, 0, 190]], 'phandle': 185}, 'q7-thermal-pin': {'rockchip,pins': [[0, 3, 0, 189]], 'phandle': 184}} is not of type 'array'
from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml#
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants
2025-04-08 16:36 ` Łukasz Czechowski
@ 2025-04-09 16:18 ` Conor Dooley
2025-04-09 16:26 ` Quentin Schulz
0 siblings, 1 reply; 15+ messages in thread
From: Conor Dooley @ 2025-04-09 16:18 UTC (permalink / raw)
To: Łukasz Czechowski
Cc: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger,
linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip, quentin.schulz
[-- Attachment #1: Type: text/plain, Size: 4606 bytes --]
On Tue, Apr 08, 2025 at 06:36:04PM +0200, Łukasz Czechowski wrote:
> Hello,
>
> śr., 26 mar 2025 o 18:58 Conor Dooley <conor@kernel.org> napisał(a):
> >
> > On Wed, Mar 26, 2025 at 05:22:57PM +0100, Lukasz Czechowski wrote:
> > > The Cypress HX3 hubs use different default PID value depending
> > > on the variant. Update compatibles list.
> > >
> > > Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family")
> > > Cc: stable@vger.kernel.org # 6.6
> > > Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table and onboard_dev_match in drivers/usb/misc/onboard_usb_dev.{c,h} driver
> > > Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
> > > ---
> > > Documentation/devicetree/bindings/usb/cypress,hx3.yaml | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > index 1033b7a4b8f9..f0b93002bd02 100644
> > > --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > @@ -15,8 +15,14 @@ allOf:
> > > properties:
> > > compatible:
> > > enum:
> > > + - usb4b4,6500
> > > + - usb4b4,6502
> > > + - usb4b4,6503
> > > - usb4b4,6504
> > > - usb4b4,6506
> > > + - usb4b4,6507
> > > + - usb4b4,6508
> > > + - usb4b4,650a
> >
> > All these devices seem to have the same match data, why is a fallback
> > not suitable?
> >
>
> Thank you for the suggestion. Indeed the fallback compatible appears
> to work fine in this case,
> and I am able to avoid additional entries in onboard_dev_match table
> as added in the first patch in this series.
>
> However, after I've updated the cypress,hx3.yaml schema file and
> rk3399-puma.dtsi file,
> I get the following warnings, when running "make dtbs_check":
>
> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1:
> compatible: ['usb4b4,6502', 'usb4b4,6506'] is too long
> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2:
> compatible: ['usb4b4,6500', 'usb4b4,6504'] is too long
> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
>
> Below is the diff of my changes:
>
> diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> index f0b93002bd02..d6eac1213228 100644
> --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> @@ -14,15 +14,22 @@ allOf:
>
> properties:
> compatible:
> - enum:
> - - usb4b4,6500
> - - usb4b4,6502
> - - usb4b4,6503
> - - usb4b4,6504
> - - usb4b4,6506
> - - usb4b4,6507
> - - usb4b4,6508
> - - usb4b4,650a
> + oneOf:
> + - enum:
> + - usb4b4,6504
> + - usb4b4,6506
> + - items:
> + - enum:
> + - usb4b4,6500
> + - usb4b4,6508
> + - const: usb4b4,6504
> + - items:
> + - enum:
> + - usb4b4,6502
> + - usb4b4,6503
> + - usb4b4,6507
> + - usb4b4,650a
> + - const: usb4b4,6506
>
> reg: true
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
> b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
> index d0d867374b3f..7fac61f95fc6 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
> @@ -594,14 +594,14 @@ &usbdrd_dwc3_1 {
> #size-cells = <0>;
>
> hub_2_0: hub@1 {
> - compatible = "usb4b4,6502";
> + compatible = "usb4b4,6502", "usb4b4,6506";
> reg = <1>;
> peer-hub = <&hub_3_0>;
> reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
> };
>
> hub_3_0: hub@2 {
> - compatible = "usb4b4,6500";
> + compatible = "usb4b4,6500", "usb4b4,6504";
> reg = <2>;
> peer-hub = <&hub_2_0>;
> reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
>
>
> Do you have any suggestions on how I can properly update the schema
> files to avoid the above warnings?
The diffs you have here look okay, not really sure what you're asking
for.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants
2025-04-09 16:18 ` Conor Dooley
@ 2025-04-09 16:26 ` Quentin Schulz
2025-04-09 21:27 ` Conor Dooley
0 siblings, 1 reply; 15+ messages in thread
From: Quentin Schulz @ 2025-04-09 16:26 UTC (permalink / raw)
To: Conor Dooley, Łukasz Czechowski
Cc: Matthias Kaehlcke, Greg Kroah-Hartman, Benjamin Bara, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Klaus Goger,
linux-usb, linux-kernel, devicetree, linux-arm-kernel,
linux-rockchip
Hi Conor,
On 4/9/25 6:18 PM, Conor Dooley wrote:
> On Tue, Apr 08, 2025 at 06:36:04PM +0200, Łukasz Czechowski wrote:
>> Hello,
>>
>> śr., 26 mar 2025 o 18:58 Conor Dooley <conor@kernel.org> napisał(a):
>>>
>>> On Wed, Mar 26, 2025 at 05:22:57PM +0100, Lukasz Czechowski wrote:
>>>> The Cypress HX3 hubs use different default PID value depending
>>>> on the variant. Update compatibles list.
>>>>
>>>> Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family")
>>>> Cc: stable@vger.kernel.org # 6.6
>>>> Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table and onboard_dev_match in drivers/usb/misc/onboard_usb_dev.{c,h} driver
>>>> Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
>>>> ---
>>>> Documentation/devicetree/bindings/usb/cypress,hx3.yaml | 6 ++++++
>>>> 1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>> index 1033b7a4b8f9..f0b93002bd02 100644
>>>> --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>> +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>> @@ -15,8 +15,14 @@ allOf:
>>>> properties:
>>>> compatible:
>>>> enum:
>>>> + - usb4b4,6500
>>>> + - usb4b4,6502
>>>> + - usb4b4,6503
>>>> - usb4b4,6504
>>>> - usb4b4,6506
>>>> + - usb4b4,6507
>>>> + - usb4b4,6508
>>>> + - usb4b4,650a
>>>
>>> All these devices seem to have the same match data, why is a fallback
>>> not suitable?
>>>
>>
>> Thank you for the suggestion. Indeed the fallback compatible appears
>> to work fine in this case,
>> and I am able to avoid additional entries in onboard_dev_match table
>> as added in the first patch in this series.
>>
>> However, after I've updated the cypress,hx3.yaml schema file and
>> rk3399-puma.dtsi file,
>> I get the following warnings, when running "make dtbs_check":
>>
>> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1:
>> compatible: ['usb4b4,6502', 'usb4b4,6506'] is too long
>> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
>> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2:
>> compatible: ['usb4b4,6500', 'usb4b4,6504'] is too long
>> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
>>
>> Below is the diff of my changes:
>>
>> diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>> b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>> index f0b93002bd02..d6eac1213228 100644
>> --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>> +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>> @@ -14,15 +14,22 @@ allOf:
>>
>> properties:
>> compatible:
>> - enum:
>> - - usb4b4,6500
>> - - usb4b4,6502
>> - - usb4b4,6503
>> - - usb4b4,6504
>> - - usb4b4,6506
>> - - usb4b4,6507
>> - - usb4b4,6508
>> - - usb4b4,650a
>> + oneOf:
>> + - enum:
>> + - usb4b4,6504
>> + - usb4b4,6506
>> + - items:
>> + - enum:
>> + - usb4b4,6500
>> + - usb4b4,6508
>> + - const: usb4b4,6504
>> + - items:
>> + - enum:
>> + - usb4b4,6502
>> + - usb4b4,6503
>> + - usb4b4,6507
>> + - usb4b4,650a
>> + - const: usb4b4,6506
>>
>> reg: true
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
>> b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
>> index d0d867374b3f..7fac61f95fc6 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
>> @@ -594,14 +594,14 @@ &usbdrd_dwc3_1 {
>> #size-cells = <0>;
>>
>> hub_2_0: hub@1 {
>> - compatible = "usb4b4,6502";
>> + compatible = "usb4b4,6502", "usb4b4,6506";
>> reg = <1>;
>> peer-hub = <&hub_3_0>;
>> reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
>> };
>>
>> hub_3_0: hub@2 {
>> - compatible = "usb4b4,6500";
>> + compatible = "usb4b4,6500", "usb4b4,6504";
>> reg = <2>;
>> peer-hub = <&hub_2_0>;
>> reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
>>
>>
>> Do you have any suggestions on how I can properly update the schema
>> files to avoid the above warnings?
>
> The diffs you have here look okay, not really sure what you're asking
> for.
It fails dtbs_check:
linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1:
compatible: ['usb4b4,6502', 'usb4b4,6506'] is too long
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2:
compatible: ['usb4b4,6500', 'usb4b4,6504'] is too long
from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
I'm not sure we're allowed to add new errors with dtbs_check (and would
like to avoid it in any case).
Cheers,
Quentin
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants
2025-04-09 16:26 ` Quentin Schulz
@ 2025-04-09 21:27 ` Conor Dooley
2025-04-10 9:37 ` Quentin Schulz
0 siblings, 1 reply; 15+ messages in thread
From: Conor Dooley @ 2025-04-09 21:27 UTC (permalink / raw)
To: Quentin Schulz
Cc: Łukasz Czechowski, Matthias Kaehlcke, Greg Kroah-Hartman,
Benjamin Bara, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Heiko Stuebner, Klaus Goger, linux-usb, linux-kernel, devicetree,
linux-arm-kernel, linux-rockchip
[-- Attachment #1: Type: text/plain, Size: 5900 bytes --]
On Wed, Apr 09, 2025 at 06:26:43PM +0200, Quentin Schulz wrote:
> Hi Conor,
>
> On 4/9/25 6:18 PM, Conor Dooley wrote:
> > On Tue, Apr 08, 2025 at 06:36:04PM +0200, Łukasz Czechowski wrote:
> > > Hello,
> > >
> > > śr., 26 mar 2025 o 18:58 Conor Dooley <conor@kernel.org> napisał(a):
> > > >
> > > > On Wed, Mar 26, 2025 at 05:22:57PM +0100, Lukasz Czechowski wrote:
> > > > > The Cypress HX3 hubs use different default PID value depending
> > > > > on the variant. Update compatibles list.
> > > > >
> > > > > Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family")
> > > > > Cc: stable@vger.kernel.org # 6.6
> > > > > Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table and onboard_dev_match in drivers/usb/misc/onboard_usb_dev.{c,h} driver
> > > > > Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
> > > > > ---
> > > > > Documentation/devicetree/bindings/usb/cypress,hx3.yaml | 6 ++++++
> > > > > 1 file changed, 6 insertions(+)
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > > > index 1033b7a4b8f9..f0b93002bd02 100644
> > > > > --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > > > +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > > > @@ -15,8 +15,14 @@ allOf:
> > > > > properties:
> > > > > compatible:
> > > > > enum:
> > > > > + - usb4b4,6500
> > > > > + - usb4b4,6502
> > > > > + - usb4b4,6503
> > > > > - usb4b4,6504
> > > > > - usb4b4,6506
> > > > > + - usb4b4,6507
> > > > > + - usb4b4,6508
> > > > > + - usb4b4,650a
> > > >
> > > > All these devices seem to have the same match data, why is a fallback
> > > > not suitable?
> > > >
> > >
> > > Thank you for the suggestion. Indeed the fallback compatible appears
> > > to work fine in this case,
> > > and I am able to avoid additional entries in onboard_dev_match table
> > > as added in the first patch in this series.
> > >
> > > However, after I've updated the cypress,hx3.yaml schema file and
> > > rk3399-puma.dtsi file,
> > > I get the following warnings, when running "make dtbs_check":
> > >
> > > linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1:
> > > compatible: ['usb4b4,6502', 'usb4b4,6506'] is too long
> > > from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
> > > linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2:
> > > compatible: ['usb4b4,6500', 'usb4b4,6504'] is too long
> > > from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
> > >
> > > Below is the diff of my changes:
> > >
> > > diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > index f0b93002bd02..d6eac1213228 100644
> > > --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
> > > @@ -14,15 +14,22 @@ allOf:
> > >
> > > properties:
> > > compatible:
> > > - enum:
> > > - - usb4b4,6500
> > > - - usb4b4,6502
> > > - - usb4b4,6503
> > > - - usb4b4,6504
> > > - - usb4b4,6506
> > > - - usb4b4,6507
> > > - - usb4b4,6508
> > > - - usb4b4,650a
> > > + oneOf:
> > > + - enum:
> > > + - usb4b4,6504
> > > + - usb4b4,6506
> > > + - items:
> > > + - enum:
> > > + - usb4b4,6500
> > > + - usb4b4,6508
> > > + - const: usb4b4,6504
> > > + - items:
> > > + - enum:
> > > + - usb4b4,6502
> > > + - usb4b4,6503
> > > + - usb4b4,6507
> > > + - usb4b4,650a
> > > + - const: usb4b4,6506
> > >
> > > reg: true
> > >
> > > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
> > > b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
> > > index d0d867374b3f..7fac61f95fc6 100644
> > > --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
> > > +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
> > > @@ -594,14 +594,14 @@ &usbdrd_dwc3_1 {
> > > #size-cells = <0>;
> > >
> > > hub_2_0: hub@1 {
> > > - compatible = "usb4b4,6502";
> > > + compatible = "usb4b4,6502", "usb4b4,6506";
> > > reg = <1>;
> > > peer-hub = <&hub_3_0>;
> > > reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
> > > };
> > >
> > > hub_3_0: hub@2 {
> > > - compatible = "usb4b4,6500";
> > > + compatible = "usb4b4,6500", "usb4b4,6504";
> > > reg = <2>;
> > > peer-hub = <&hub_2_0>;
> > > reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
> > >
> > >
> > > Do you have any suggestions on how I can properly update the schema
> > > files to avoid the above warnings?
> >
> > The diffs you have here look okay, not really sure what you're asking
> > for.
>
> It fails dtbs_check:
>
> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1:
> compatible: ['usb4b4,6502', 'usb4b4,6506'] is too long
> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2:
> compatible: ['usb4b4,6500', 'usb4b4,6504'] is too long
> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
>
> I'm not sure we're allowed to add new errors with dtbs_check (and would like
> to avoid it in any case).
Ah, the restriction I think comes from the usb-device binding. Maybe
just leave it as you had it?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants
2025-04-09 21:27 ` Conor Dooley
@ 2025-04-10 9:37 ` Quentin Schulz
0 siblings, 0 replies; 15+ messages in thread
From: Quentin Schulz @ 2025-04-10 9:37 UTC (permalink / raw)
To: Conor Dooley
Cc: Łukasz Czechowski, Matthias Kaehlcke, Greg Kroah-Hartman,
Benjamin Bara, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Heiko Stuebner, Klaus Goger, linux-usb, linux-kernel, devicetree,
linux-arm-kernel, linux-rockchip
Hi Conor, Krzysztof, Rob,
On 4/9/25 11:27 PM, Conor Dooley wrote:
> On Wed, Apr 09, 2025 at 06:26:43PM +0200, Quentin Schulz wrote:
>> Hi Conor,
>>
>> On 4/9/25 6:18 PM, Conor Dooley wrote:
>>> On Tue, Apr 08, 2025 at 06:36:04PM +0200, Łukasz Czechowski wrote:
>>>> Hello,
>>>>
>>>> śr., 26 mar 2025 o 18:58 Conor Dooley <conor@kernel.org> napisał(a):
>>>>>
>>>>> On Wed, Mar 26, 2025 at 05:22:57PM +0100, Lukasz Czechowski wrote:
>>>>>> The Cypress HX3 hubs use different default PID value depending
>>>>>> on the variant. Update compatibles list.
>>>>>>
>>>>>> Fixes: 1eca51f58a10 ("dt-bindings: usb: Add binding for Cypress HX3 USB 3.0 family")
>>>>>> Cc: stable@vger.kernel.org # 6.6
>>>>>> Cc: stable@vger.kernel.org # Backport of the patch in this series fixing product ID in onboard_dev_id_table and onboard_dev_match in drivers/usb/misc/onboard_usb_dev.{c,h} driver
>>>>>> Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>
>>>>>> ---
>>>>>> Documentation/devicetree/bindings/usb/cypress,hx3.yaml | 6 ++++++
>>>>>> 1 file changed, 6 insertions(+)
>>>>>>
>>>>>> diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>>>> index 1033b7a4b8f9..f0b93002bd02 100644
>>>>>> --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>>>> +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>>>> @@ -15,8 +15,14 @@ allOf:
>>>>>> properties:
>>>>>> compatible:
>>>>>> enum:
>>>>>> + - usb4b4,6500
>>>>>> + - usb4b4,6502
>>>>>> + - usb4b4,6503
>>>>>> - usb4b4,6504
>>>>>> - usb4b4,6506
>>>>>> + - usb4b4,6507
>>>>>> + - usb4b4,6508
>>>>>> + - usb4b4,650a
>>>>>
>>>>> All these devices seem to have the same match data, why is a fallback
>>>>> not suitable?
>>>>>
>>>>
>>>> Thank you for the suggestion. Indeed the fallback compatible appears
>>>> to work fine in this case,
>>>> and I am able to avoid additional entries in onboard_dev_match table
>>>> as added in the first patch in this series.
>>>>
>>>> However, after I've updated the cypress,hx3.yaml schema file and
>>>> rk3399-puma.dtsi file,
>>>> I get the following warnings, when running "make dtbs_check":
>>>>
>>>> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1:
>>>> compatible: ['usb4b4,6502', 'usb4b4,6506'] is too long
>>>> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
>>>> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2:
>>>> compatible: ['usb4b4,6500', 'usb4b4,6504'] is too long
>>>> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
>>>>
>>>> Below is the diff of my changes:
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>> b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>> index f0b93002bd02..d6eac1213228 100644
>>>> --- a/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>> +++ b/Documentation/devicetree/bindings/usb/cypress,hx3.yaml
>>>> @@ -14,15 +14,22 @@ allOf:
>>>>
>>>> properties:
>>>> compatible:
>>>> - enum:
>>>> - - usb4b4,6500
>>>> - - usb4b4,6502
>>>> - - usb4b4,6503
>>>> - - usb4b4,6504
>>>> - - usb4b4,6506
>>>> - - usb4b4,6507
>>>> - - usb4b4,6508
>>>> - - usb4b4,650a
>>>> + oneOf:
>>>> + - enum:
>>>> + - usb4b4,6504
>>>> + - usb4b4,6506
>>>> + - items:
>>>> + - enum:
>>>> + - usb4b4,6500
>>>> + - usb4b4,6508
>>>> + - const: usb4b4,6504
>>>> + - items:
>>>> + - enum:
>>>> + - usb4b4,6502
>>>> + - usb4b4,6503
>>>> + - usb4b4,6507
>>>> + - usb4b4,650a
>>>> + - const: usb4b4,6506
>>>>
>>>> reg: true
>>>>
>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
>>>> b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
>>>> index d0d867374b3f..7fac61f95fc6 100644
>>>> --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
>>>> @@ -594,14 +594,14 @@ &usbdrd_dwc3_1 {
>>>> #size-cells = <0>;
>>>>
>>>> hub_2_0: hub@1 {
>>>> - compatible = "usb4b4,6502";
>>>> + compatible = "usb4b4,6502", "usb4b4,6506";
>>>> reg = <1>;
>>>> peer-hub = <&hub_3_0>;
>>>> reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
>>>> };
>>>>
>>>> hub_3_0: hub@2 {
>>>> - compatible = "usb4b4,6500";
>>>> + compatible = "usb4b4,6500", "usb4b4,6504";
>>>> reg = <2>;
>>>> peer-hub = <&hub_2_0>;
>>>> reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
>>>>
>>>>
>>>> Do you have any suggestions on how I can properly update the schema
>>>> files to avoid the above warnings?
>>>
>>> The diffs you have here look okay, not really sure what you're asking
>>> for.
>>
>> It fails dtbs_check:
>>
>> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@1:
>> compatible: ['usb4b4,6502', 'usb4b4,6506'] is too long
>> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
>> linux/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dtb: hub@2:
>> compatible: ['usb4b4,6500', 'usb4b4,6504'] is too long
>> from schema $id: http://devicetree.org/schemas/usb/cypress,hx3.yaml#
>>
>> I'm not sure we're allowed to add new errors with dtbs_check (and would like
>> to avoid it in any case).
>
> Ah, the restriction I think comes from the usb-device binding. Maybe
> just leave it as you had it?
Thanks to some previous debugging done by Lukasz, I believe there's
something we can do to make everybody happy.
The issue is that the usb-device binding enforces a single pattern
string in the compatible property[1] but that isn't what usually is
expected by the dt-core[2].
I would suggest to patch the usb-device binding so that it can accept a
list of strings matching the given pattern.
This is the diff I'm suggesting:
"""
diff --git a/Documentation/devicetree/bindings/usb/usb-device.yaml
b/Documentation/devicetree/bindings/usb/usb-device.yaml
index c676956810331..42c2e8d6dc06d 100644
--- a/Documentation/devicetree/bindings/usb/usb-device.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-device.yaml
@@ -28,7 +28,9 @@ description: |
properties:
compatible:
- pattern: "^usb[0-9a-f]{1,4},[0-9a-f]{1,4}$"
+ items:
+ pattern: "^usb[0-9a-f]{1,4},[0-9a-f]{1,4}$"
+
description: Device nodes or combined nodes.
"usbVID,PID", where VID is the vendor id and PID the product id.
The textual representation of VID and PID shall be in lower case
"""
I believe this should be a reasonable change except if we really are
only expecting the real VID PID in the compatible.
What do you think?
Cheers,
Quentin
[1]
https://elixir.bootlin.com/linux/v6.13.7/source/Documentation/devicetree/bindings/usb/usb-device.yaml#L31
[2]
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/dt-core.yaml#L21-L25
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-04-10 11:16 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-26 16:22 [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Lukasz Czechowski
2025-03-26 16:22 ` [PATCH 1/5] usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs Lukasz Czechowski
2025-03-28 8:19 ` Krzysztof Kozlowski
2025-03-26 16:22 ` [PATCH 2/5] dt-bindings: usb: cypress,hx3: Add support for all variants Lukasz Czechowski
2025-03-26 17:58 ` Conor Dooley
2025-04-08 16:36 ` Łukasz Czechowski
2025-04-09 16:18 ` Conor Dooley
2025-04-09 16:26 ` Quentin Schulz
2025-04-09 21:27 ` Conor Dooley
2025-04-10 9:37 ` Quentin Schulz
2025-04-09 14:14 ` Rob Herring (Arm)
2025-03-26 16:22 ` [PATCH 3/5] arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma Lukasz Czechowski
2025-03-26 16:22 ` [PATCH 4/5] arm64: dts: rockchip: disable unrouted USB controllers and PHY " Lukasz Czechowski
2025-03-26 16:23 ` [PATCH 5/5] arm64: dts: rockchip: disable unrouted USB controllers and PHY on RK3399 Puma with Haikou Lukasz Czechowski
2025-03-26 19:11 ` [PATCH 0/5] Fix onboard USB hub instability on RK3399 Puma SoM Rob Herring (Arm)
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).