ARM: socfpga: gen5: release reset before using USB as device with ums

Marek Vasut marex at denx.de
Mon Feb 28 16:22:55 CET 2022


On 2/28/22 16:18, Wolfgang Grandegger wrote:

Hi,

[...]

>>> diff --git a/arch/arm/mach-socfpga/board.c
>>> b/arch/arm/mach-socfpga/board.c
>>> index 7267163222..a2eed73fe9 100644
>>> --- a/arch/arm/mach-socfpga/board.c
>>> +++ b/arch/arm/mach-socfpga/board.c
>>> @@ -83,6 +83,14 @@ int board_usb_init(int index, enum usb_init_type init)
>>>        /* Patch the address from OF into the controller pdata. */
>>>        socfpga_otg_data.regs_otg = addr;
>>>    +#ifdef CONFIG_TARGET_SOCFPGA_GEN5
>>> +    /* First release reset of the USB port */
>>> +    if (addr == SOCFPGA_USB0_ADDRESS)
>>> +        socfpga_per_reset(SOCFPGA_RESET(USB0), 0);
>>> +    else if (addr == SOCFPGA_USB1_ADDRESS)
>>> +        socfpga_per_reset(SOCFPGA_RESET(USB1), 0);
>>> +#endif
>>
>> Is this really needed at all ?
> 
> Yes, it's needed, otherwise "ums 0 mmc 0" does not work. It was working
> some time ago but commit 430b42f76a4e50ffef7cc2b3c195ff645a438433 did
> remove the ad-hoc reset code. I realize the issue an on Aries MCVEVP
> board, but I'm quite sure that it's present on all Cyclone5 boards.

Can you investigate why the reset-socfpga.c does not release the USB 
from reset instead ? That would be the right approach.


More information about the U-Boot mailing list