public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Siddharth Vadapalli <s-vadapalli@ti.com>
Cc: Roger Quadros <rogerq@kernel.org>,
	Siddharth Vadapalli <s-vadapalli@ti.com>,
	trini@konsulko.com, marex@denx.de, bmeng.cn@gmail.com,
	jonas@kwiboo.se, u-boot@lists.denx.de, srk@ti.com
Subject: Re: [PATCH] usb: xhci-dwc3: Bail out if "dr_mode" is "peripheral"
Date: Thu, 16 Jan 2025 11:28:24 +0100	[thread overview]
Message-ID: <87v7uf6ojb.fsf@baylibre.com> (raw)
In-Reply-To: <mjtlqk7ddt7mjxu62vl3fpizhu5djemaodlpuprh2dp2kfukwh@y4vyhmxfbdxm>

On jeu., janv. 16, 2025 at 15:48, Siddharth Vadapalli <s-vadapalli@ti.com> wrote:

> On Thu, Jan 16, 2025 at 10:36:45AM +0100, Mattijs Korpershoek wrote:
>> Hi Siddharth,
>
> Hello Mattijs,
>
>> 
>> On lun., déc. 09, 2024 at 15:20, Roger Quadros <rogerq@kernel.org> wrote:
>> 
>> > Hi Siddharth,
>> >
>> > On 06/12/2024 13:04, Siddharth Vadapalli wrote:
>
> [...]
>
>> >> diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
>> >> index e3e0ceff43e..7b1311503fe 100644
>> >> --- a/drivers/usb/host/xhci-dwc3.c
>> >> +++ b/drivers/usb/host/xhci-dwc3.c
>> >> @@ -208,6 +208,9 @@ static int xhci_dwc3_probe(struct udevice *dev)
>> >>  	writel(reg, &dwc3_reg->g_usb2phycfg[0]);
>> >>  
>> >>  	dr_mode = usb_get_dr_mode(dev_ofnode(dev));
>> >> +	if (dr_mode == USB_DR_MODE_PERIPHERAL)
>> >> +		return -ENODEV;
>> >> +
>> >>  	if (dr_mode == USB_DR_MODE_OTG &&
>> >>  	    dev_read_bool(dev, "usb-role-switch")) {
>> >>  		dr_mode = usb_get_role_switch_default_mode(dev_ofnode(dev));
>> >
>> > Although this proposal was suggested in [1] and later clarified in
>> > [2] I will summarize the discussion here.
>> >
>> > This patch fix is not sufficient for all cases as the xhci-dwc3.c
>> > driver will still be probed if dr_mode is OTG or HOST along with
>> > other platform drivers if enabled in config.
>> >
>> > The only current solution is not not enable CONFIG_USB_XHCI_DWC3
>> > together with another platform driver config (e.g. CONFIG_USB_DWC3_GENERIC)
>> > if snps,dwc3 should not be managed by xhci-dwc3.c.
>> 
>> Given Roger's explanation, should we simply drop this, or is any other
>> action expected from the U-Boot maintainers?
>
> This patch could be dropped. Roger's suggestion is to fix this issue by
> updating the platform configs wherein CONFIG_USB_XHCI_DWC3 should be
> disabled on platforms that have "dr_mode" set to "peripheral".

Thank you for confirming.

I've marked as "Handled elsewhere" on patchwork:
https://patchwork.ozlabs.org/project/uboot/patch/20241206110424.897283-1-s-vadapalli@ti.com/

>
> Regards,
> Siddharth.

      reply	other threads:[~2025-01-16 10:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 11:04 [PATCH] usb: xhci-dwc3: Bail out if "dr_mode" is "peripheral" Siddharth Vadapalli
2024-12-09 13:20 ` Roger Quadros
2025-01-16  9:36   ` Mattijs Korpershoek
2025-01-16 10:18     ` Siddharth Vadapalli
2025-01-16 10:28       ` Mattijs Korpershoek [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=87v7uf6ojb.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=bmeng.cn@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=marex@denx.de \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=srk@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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