[PATCH] rockchip: rk3328: Fix Synchronous Abort on usb start
Jonas Karlman
jonas at kwiboo.se
Sat May 24 19:43:09 CEST 2025
On 2025-05-24 18:02, Jonas Karlman wrote:
> Hi Alex,
>
> On 2025-05-24 16:20, Alex Shumsky wrote:
>> Remove incorrect assigned-clock-parents in rk3328-u-boot.dtsi.
>> This incorrect parent has become a problem since recent commit with parent
>> clock enablement.
>>
>> Currently assigned-clock-parents is not a CLK node, but rk3328-usb2phy.
>> It looks like a mistake in dts made a long time ago (~8 years ago).
>
> No, this is very much correct, u2phy is a clk provider as can be seen
> by the use of the '#clock-cells' prop so being able to use it as a
> parent clk is allowed and the device tree is correct.
>
>>
>> => usb start
>> starting USB...
>> Bus usb at ff580000: "Synchronous Abort" handler, esr 0x96000210, far 0x4
I have now tried to re-create this issue using latest master branch on a
rk3328 board, however I was only able to re-create a different issue.
On what board and U-Boot version/commit are you seeing this issue?
The issue I faced was due to only enable usb20_otg and not u2phy_otg,
something that could be fixed with following diff:
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 88b33de1b2a0..d6ce12b5e83d 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -538,7 +538,7 @@ U_BOOT_DRIVER(rockchip_usb2phy_clock) = {
U_BOOT_DRIVER(rockchip_usb2phy) = {
.name = "rockchip_usb2phy",
- .id = UCLASS_PHY,
+ .id = UCLASS_NOP,
.of_match = rockchip_usb2phy_ids,
.probe = rockchip_usb2phy_probe,
.bind = rockchip_usb2phy_bind,
Regards,
Jonas
>>
>> Linux dts source reference:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c60c0373a5e85d8bd0bb026cd5440576249d2299
>>
>> Fixes: ac30d90f3367 ("clk: Ensure the parent clocks are enabled while reparenting")
>> Signed-off-by: Alex Shumsky <alexthreed at gmail.com>
>> ---
>>
>> arch/arm/dts/rk3328-u-boot.dtsi | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/arm/dts/rk3328-u-boot.dtsi b/arch/arm/dts/rk3328-u-boot.dtsi
>> index b0e50a973a..39dcc2313b 100644
>> --- a/arch/arm/dts/rk3328-u-boot.dtsi
>> +++ b/arch/arm/dts/rk3328-u-boot.dtsi
>> @@ -150,6 +150,10 @@
>> bootph-all;
>> };
>>
>> +&u2phy {
>> + /delete-property/ assigned-clock-parents;
>> +};
>
> We should fix the driver code and not modify the device tree to fit the
> code.
>
> The u2phy ofnode is tied to multiple uclass drivers so is it possible
> that the parent clock lookup from commit ac30d90f3367 ("clk: Ensure the
> parent clocks are enabled while reparenting") is not getting the
> UCLASS_CLK driver?
>
> Regards,
> Jonas
>
>> +
>> #ifdef CONFIG_ROCKCHIP_SPI_IMAGE
>> &binman {
>> simple-bin-spi {
>
More information about the U-Boot
mailing list