[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZUi9dgnvBT5f6wzo@hovoldconsulting.com>
Date: Mon, 6 Nov 2023 11:18:30 +0100
From: Johan Hovold <johan@...nel.org>
To: Stanley Chang[昌育德]
<stanley_chang@...ltek.com>
Cc: Stefan Eichenberger <eichest@...il.com>,
Johan Hovold <johan+linaro@...nel.org>,
Mathias Nyman <mathias.nyman@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
Maxime Ripard <mripard@...nel.org>
Subject: Re: [PATCH] USB: xhci-plat: fix legacy PHY double inity
On Mon, Nov 06, 2023 at 10:08:24AM +0000, Stanley Chang[昌育德] wrote:
> > On Mon, Nov 06, 2023 at 06:53:23AM +0000, Stanley Chang[昌育德] wrote:
> > > I test the Realtek phy driver at drivers/phy/Realtek/phy-rtk-usb2.c again.
> > > But I can't get the phy in xhci.
> >
> > > It is a dwc3 generic phy driver, and it is also a usb phy driver.
> >
> > That sounds broken (i.e. to be relying on both frameworks), but indeed that
> > seems to be the current state of the generic and legacy USB PHY
> > implementations.
> >
> > What a mess.
>
> > > Base on you modified, I can't run on callback
> > > rtk_phy->phy.notify_port_status = rtk_phy_notify_port_status;
> >
> > Which dwc3 driver are you using? Unless I'm missing something this would not
> > be an issue unless you are doing something crazy like describing the same PHY
> > twice in the devicetree (i.e. both as a generic and legacy PHY).
>
> I use drivers/usb/dwc3/core.c and drivers/usb/dwc3/dwc3-rtk.c
> I describe the PHY as generic and legacy PHY in device tree.
That's not right. You should just use the generic PHY binding for new
platforms.
> Our driver needs the API base on a08799cf17c2 ("usb: phy: add usb phy notify port status API").
> But generic PHY driver is not support this.
Yes, but you added that interface yourself, and that I think merging
that was a mistake.
We should not be building functionality on top of the legacy USB PHY
implementation which is stuck in some transitional limbo.
Apparently, your PHY drivers which were merged for 6.6 are the only
users of this interface, and there are no upstream devicetrees that use
these PHYs.
I think we should revert this mess before we dig ourselves into an even
deeper hole.
Johan
Powered by blists - more mailing lists