[PATCH] rockchip: nanopi-r4s: Fix ehci usb error
Justin Klaassen
justin at tidylabs.app
Thu Apr 18 03:45:29 CEST 2024
The ehci_generic driver always failed with the error:
Bus usb at fe380000: ehci_generic usb at fe380000:
... Failed to get clocks (ret=-19)
Port not available.
Bus usb at fe3c0000: ehci_generic usb at fe3c0000:
... Failed to get clocks (ret=-19)
Port not available.
This error is resolved by enabling the CONFIG_PHY_ROCKCHIP_INNO_USB2
and CONFIG_PHY_ROCKCHIP_TYPEC driver options.
The CONFIG_DM_RESET option must also be enabled, otherwise the
ehci_generic driver will fail with the error:
Bus usb at fe380000: ehci_generic usb at fe380000:
... Failed to get resets (err=-524)
probe failed, error -524
Bus usb at fe3c0000: ehci_generic usb at fe3c0000:
... Failed to get resets (err=-524)
probe failed, error -524
Additionally the u2phy1_host device was previously disabled in the
nanopi-r4s device tree and must be enabled to avoid a crash in the
ehci_generic driver:
Bus usb at fe380000: USB EHCI 1.00
Bus usb at fe3c0000: "Synchronous Abort" handler, esr 0x96000010, far 0x0
With these changes the usb ports can now be initialized correctly by
both the ehci_generic and xhci_generic drivers:
Bus usb at fe380000: USB EHCI 1.00
Bus usb at fe3c0000: USB EHCI 1.00
Bus usb at fe800000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb at fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb at fe380000 for devices... 1 USB Device(s) found
scanning bus usb at fe3c0000 for devices... 1 USB Device(s) found
scanning bus usb at fe800000 for devices... 1 USB Device(s) found
scanning bus usb at fe900000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Signed-off-by: Justin Klaassen <justin at tidylabs.app>
Cc: Simon Glass <sjg at chromium.org>
Cc: Philipp Tomsich <philipp.tomsich at vrull.eu>
Cc: Kever Yang <kever.yang at rock-chips.com>
---
arch/arm/dts/rk3399-nanopi-r4s.dts | 2 +-
configs/nanopi-r4s-rk3399_defconfig | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/rk3399-nanopi-r4s.dts b/arch/arm/dts/rk3399-nanopi-r4s.dts
index cef4d18b599..a992a6ac5e9 100644
--- a/arch/arm/dts/rk3399-nanopi-r4s.dts
+++ b/arch/arm/dts/rk3399-nanopi-r4s.dts
@@ -117,7 +117,7 @@
};
&u2phy1_host {
- status = "disabled";
+ phy-supply = <&vdd_5v>;
};
&uart0 {
diff --git a/configs/nanopi-r4s-rk3399_defconfig b/configs/nanopi-r4s-rk3399_defconfig
index ea01d323541..d8c34dc48cb 100644
--- a/configs/nanopi-r4s-rk3399_defconfig
+++ b/configs/nanopi-r4s-rk3399_defconfig
@@ -5,6 +5,7 @@ CONFIG_ARCH_ROCKCHIP=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_OFFSET=0x3F8000
CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi-r4s"
+CONFIG_DM_RESET=y
CONFIG_ROCKCHIP_RK3399=y
CONFIG_TARGET_EVB_RK3399=y
CONFIG_DEBUG_UART_BASE=0xFF1A0000
@@ -36,6 +37,8 @@ CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ROCKCHIP=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_TYPEC=y
CONFIG_PMIC_RK8XX=y
CONFIG_REGULATOR_PWM=y
CONFIG_REGULATOR_RK8XX=y
--
2.43.0
More information about the U-Boot
mailing list