From: Carlo Caione via U-Boot <u-boot@lists.u-boot-project.org>
To: "David Lechner" <dlechner@baylibre.com>,
"Carlo Caione" <ccaione@baylibre.com>,
"GSS_MTK_Uboot_upstream" <GSS_MTK_Uboot_upstream@mediatek.com>,
<u-boot@lists.denx.de>
Cc: "Ryder Lee" <ryder.lee@mediatek.com>,
"Weijie Gao" <weijie.gao@mediatek.com>,
"Chunfeng Yun" <chunfeng.yun@mediatek.com>,
"Igor Belwon" <igor.belwon@mentallysanemainliners.org>,
"Julien Stephan" <jstephan@baylibre.com>,
"Marek Vasut" <marex@denx.de>, "Tom Rini" <trini@konsulko.com>
Subject: Re: [PATCH v3] usb: mtu3: support the current devicetree binding
Date: Tue, 21 Jul 2026 09:25:11 +0200 [thread overview]
Message-ID: <DK42J9UXAY1K.1TP24RIPV2MRD@baylibre.com> (raw)
In-Reply-To: <ec3f60c9-4088-4767-a262-18453eb3c719@baylibre.com>
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 <ccaione@baylibre.com>
>>
>
> 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
prev parent reply other threads:[~2026-07-21 7:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 7:53 [PATCH v3] usb: mtu3: support the current devicetree binding Carlo Caione
2026-07-20 23:47 ` David Lechner via U-Boot
2026-07-21 7:25 ` Carlo Caione via U-Boot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DK42J9UXAY1K.1TP24RIPV2MRD@baylibre.com \
--to=u-boot@lists.u-boot-project.org \
--cc=GSS_MTK_Uboot_upstream@mediatek.com \
--cc=ccaione@baylibre.com \
--cc=chunfeng.yun@mediatek.com \
--cc=dlechner@baylibre.com \
--cc=igor.belwon@mentallysanemainliners.org \
--cc=jstephan@baylibre.com \
--cc=marex@denx.de \
--cc=ryder.lee@mediatek.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=weijie.gao@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox