On Tue Jul 21, 2026 at 1:47 AM CEST, David Lechner wrote:
> On 7/20/26 2:53 AM, Carlo Caione wrote:
>> - ssusb->mac_base = devfdt_remap_addr_name(child, "mac");
>> + mac_addr = dev_read_addr_name(child, "mac");
>> + if (mac_addr == FDT_ADDR_T_NONE) {
>> + dev_err(dev, "error mapping memory for mac\n");
>
> This looks like an error reading the address, not mapping the memory.
Yes, indeed, I'll fix it.
>>
>> - node = ofnode_by_compatible(dev_ofnode(parent), "mediatek,ssusb");
>> + node = ofnode_null();
>
> ofnode_for_each_subnode() initializes node, so I think setting it here
> is dead code.
Nicely spotted, thanks.
>> + ofnode_for_each_subnode(node, dev_ofnode(parent)) {
>> + if (ofnode_device_is_compatible(node, "mediatek,ssusb"))
>> + break;
>> + }
>> +
>> + /* Current bindings keep the gadget resources on the parent node. */
>> if (!ofnode_valid(node))
>> - return -ENODEV;
>> + node = dev_ofnode(parent);
>>
>> name = ofnode_get_name(node);
>> dr_mode = usb_get_dr_mode(node);
>>
>> ---
>> base-commit: 96c308b8d2a6a1496c0a7366db9a7becf42d2454
>> change-id: 20260717-ccaione-upstream-mtu3-spl-gadget-aa3d39cad06a
>>
>> Best regards,
>> --
>> Carlo Caione <[email protected]>
>>
>
> This would be a bit more clear to me if we change "current bindings"
> to "upstream bindings" everywhere (I think that is what you mean?) and
> add some comments in the code that "mediatek,ssusb" is a U-Boot-only
> thing.
I'll do.
> Also, can we remove the obsolete entries from the U-Boot devicetrees?
> arch/arm/dts/mt8183.dtsi already has "mac" in reg-names, so should be
> safe to remove ssusb child node. arch/arm/dts/mt8512.dtsi needs a bit
> more work.
Yes, for MT8512 we should first add that to the linux bindings side and
later apply the change here, so for now I'm going only to fix MT8183.
I'll try to push a patch to modify the linux bindings to address MT8512
as well.
> And we should be able to remove doc/device-tree-bindings/usb/mediatek,mtu3.txt
> since there are upstream bindings now.
That would be a followup patch when also the MT8512 is fixed.
thanks,
--
Carlo Caione