Re: [PATCH v4 2/2] usb: dwc3: dwc3-generic-plat: Add Renesas R-Car Gen5 DWC3 xHCI USB controller glue
Marek Vasut <[email protected]>
| Newsgroups | org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb |
|---|---|
| Message-ID | <[email protected]> |
On 8/26/26 2:35 AM, Thinh Nguyen wrote:
Hello Thinh,
>> +static int dwc3_renesas_rcar_gen5_init(struct dwc3_generic *dwc3g)
>> +{
>> + struct device *dev = dwc3g->dev;
>> + struct platform_device *pdev = to_platform_device(dev);
>> + enum usb_device_speed speed = usb_get_maximum_speed(dev);
>> + bool usb2only = false;
>> + void __iomem *glue;
>> +
>> + /* Wireless USB is not supported */
>> + if (speed == USB_SPEED_WIRELESS)
>> + return dev_err_probe(dev, -EINVAL, "Wireless USB not supported\n");
>> +
>> + /* No USB 3 PHY in DT means this is surely USB 2 controller */
>> + if (device_property_match_string(dev, "phy-names", "usb3-phy") < 0)
>> + usb2only = true;
>> +
>> + /*
>> + * Controller can be limited to USB 2 via optional maximum-speed DT
>> + * property. If the DT property is not present, default to maximum
>> + * controller capabilities.
>> + */
>
> Minor nit: This comment does not give any new info than what's
> documented in the maximum-speed property, do we need to repeat it here?
>
>> + if (speed >= USB_SPEED_LOW && speed <= USB_SPEED_HIGH)
>> + usb2only = true;
>
> We don't support low speed or wireless, just check for speed <=
> USB_SPEED_HIGH should be sufficient. The rest looks fine.
I will fix that in V5 and submit it shortly, thanks !