[PATCH 04/10] usb: dwc3-generic: Add STih407 support

Patrice CHOTARD patrice.chotard at foss.st.com
Wed Jan 15 14:07:43 CET 2025



On 1/14/25 15:53, Marek Vasut wrote:
> On 1/14/25 3:45 PM, Patrice Chotard wrote:
> 
>> +    /* glue init */
>> +    reg = readl(glue_base + CLKRST_CTRL);
>> +
>> +    reg |= AUX_CLK_EN | EXT_CFG_RESET_N | XHCI_REVISION;
>> +    reg &= ~SW_PIPEW_RESET_N;
>> +
>> +    writel(reg, glue_base + CLKRST_CTRL);
>> +
>> +    /* configure mux for vbus, powerpresent and bvalid signals */
>> +    reg = readl(glue_base + USB2_VBUS_MNGMNT_SEL1);
>> +
>> +    reg |= SEL_OVERRIDE_VBUSVALID(USB2_VBUS_UTMIOTG) |
>> +           SEL_OVERRIDE_POWERPRESENT(USB2_VBUS_UTMIOTG) |
>> +           SEL_OVERRIDE_BVALID(USB2_VBUS_UTMIOTG);
>> +
>> +    writel(reg, glue_base + USB2_VBUS_MNGMNT_SEL1);
> setbits_le32() , please fix globally.

Ok

> 
> Also, I am wondering if we're not overstuffing the dwc3-generic.c with too many disparate glue code shreds, and whether it isn't just about time to split the glue code parts out of it, into separate .c files. Thoughts ?

OK i will introduce a specific dwc3-sti.c glue wrapper. I just notice that dwc3-am62.c or dwc3-uniphier.c are typically what i have to do.
By the same occasion, it removes the need of patch 06/10 with REGMAP/SYSCON dependencies

Thanks
Patrice


More information about the U-Boot mailing list