Re: [PATCH v5] usb: mtu3: support the upstream devicetree binding

"Carlo Caione" <[email protected]> Wed, 05 Aug 2026 12:37:01 +0200
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <[email protected]>
On Wed Aug 5, 2026 at 4:37 AM CEST, Marek Vasut wrote:
> On 8/4/26 12:05 PM, Carlo Caione wrote:
>
> [...]
>
>> +++ b/doc/device-tree-bindings/usb/mediatek,mtu3.txt
>
> You could easily swap in Linux 
> Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml and 
> Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml instead , 
> and drop the mtu3.txt . But please do replace the binding documents in a 
> separate patch.

Shouldn't we just drop both
doc/device-tree-bindings/usb/mediatek,mtk-xhci.txt and
doc/device-tree-bindings/usb/mediatek,mtu3.txt and automatically fall
back onto the corresponding ones in dts/upstream/Bindings/usb?

>> +++ b/drivers/usb/mtu3/Kconfig
>> @@ -22,6 +22,7 @@ choice
>>   config USB_MTU3_HOST
>>   	bool "Host only mode"
>>   	depends on USB_XHCI_HCD
>> +	select SPL_OF_TRANSLATE if SPL_USB_HOST
>
> Don't you need SPL variants of the MTU3 controller Kconfig symbols instead ?

Fair point, I'll add those to V6.

>>   	help
>>   	  Select this when you want to use MTU3 in host mode only,
>>   	  thereby the gadget feature will be regressed.
>
> [...]
>
>> +static int mtu3_bind_gadget(struct udevice *parent)
>> +{
>> +	struct udevice *dev;
>> +	int ret;
>> +
>> +	/* Node-less device: name it after the controller for diagnostics. */
>> +	ret = device_bind_driver(parent, "mtu3-peripheral",
>> +				 ofnode_get_name(dev_ofnode(parent)), &dev);
>> +	if (ret)
>> +		dev_err(parent, "failed to bind peripheral mode\n");
>
> Please also include the value of "ret" in printed error strings, it 
> helps identify the issue faster. Please fix this for all such cases in 
> this patch.

It makes sense.

Thanks!

--
Carlo Caione