mbox series

[0/5] Fix onboard USB hub instability on RK3399 Puma SoM

Message ID 20250326-onboard_usb_dev-v1-0-a4b0a5d1b32c@thaumatec.com (mailing list archive)
Headers show
Series Fix onboard USB hub instability on RK3399 Puma SoM | expand

Message

Lukasz Czechowski March 26, 2025, 4:22 p.m. UTC
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,

Comments

Rob Herring March 26, 2025, 7:11 p.m. UTC | #1
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#