public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Roger Quadros <rogerq@kernel.org>
Cc: Nishanth Menon <nm@ti.com>,
	robertcnelson@gmail.com, marex@denx.de, n-francis@ti.com,
	praneeth@ti.com, s-vadapalli@ti.com, r-gunasekaran@ti.com,
	srk@ti.com, vigneshr@ti.com, u-boot@lists.denx.de
Subject: Re: [PATCH 4/5] arm: dts: k3-j721e-beagleboneai64: Fix USB operation
Date: Mon, 22 Jan 2024 11:00:34 -0500	[thread overview]
Message-ID: <20240122160034.GL3652023@bill-the-cat> (raw)
In-Reply-To: <a9214eef-c398-434b-88c5-6de41df508bc@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3209 bytes --]

On Mon, Jan 22, 2024 at 01:39:06PM +0200, Roger Quadros wrote:
> 
> 
> On 20/01/2024 18:50, Tom Rini wrote:
> > On Mon, Jan 15, 2024 at 01:40:00PM +0200, Roger Quadros wrote:
> >>
> >>
> >> On 12/01/2024 15:21, Tom Rini wrote:
> >>> On Fri, Jan 12, 2024 at 07:14:50AM -0600, Nishanth Menon wrote:
> >>>> On 15:06-20240112, Roger Quadros wrote:
> >>>>>
> >>>>>
> >>>>> On 12/01/2024 15:02, Nishanth Menon wrote:
> >>>>>> On 14:49-20240112, Roger Quadros wrote:
> >>>>>>> Without correct SERDES MUX and Lane control settings
> >>>>>>> USB0 will be broken. Set the MUX and Lane control devices
> >>>>>>> to be auto probed so they are configured correctly.
> >>>>>>>
> >>>>>>> Signed-off-by: Roger Quadros <rogerq@kernel.org>
> >>>>>>> ---
> >>>>>>>  arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi | 2 ++
> >>>>>>>  1 file changed, 2 insertions(+)
> >>>>>>>
> >>>>>>> diff --git a/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi b/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
> >>>>>>> index f83caf7998..017a5a722e 100644
> >>>>>>> --- a/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
> >>>>>>> +++ b/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
> >>>>>>> @@ -165,6 +165,7 @@
> >>>>>>>  
> >>>>>>>  &serdes_ln_ctrl {
> >>>>>>>  	bootph-all;
> >>>>>>> +	u-boot,mux-autoprobe;
> >>>>>>>  };
> >>>>>>>  
> >>>>>>>  &serdes2_usb_link {
> >>>>>>> @@ -173,6 +174,7 @@
> >>>>>>>  
> >>>>>>>  &usb_serdes_mux {
> >>>>>>>  	bootph-all;
> >>>>>>> +	u-boot,mux-autoprobe;
> >>>>>>>  };
> >>>>>>>  
> >>>>>>>  &serdes_wiz2 {
> >>>
> >>> OK, so both of these are compatible = "mmio-mux", is the problem they
> >>> aren't probed in time or something else?
> >>>
> >>
> >> That's correct. They aren't probed ever. But that is because there are no
> >> explicit consumers for them. Since this is a platform wide configuration,
> >> we have been relying on the "idle-states" property and that they are auto-probed.
> > 
> > OK.  Could we borrow the "wrap" logic that drivers/led/led_gpio.c for
> > example does to get the probe to happen inside drivers/mux/mmio.c
> > instead? I feel like there might have been assumptions about grander
> > needs back when the framework for muxers was done that has not panned
> > out since.
> > 
> 
> We only need the MUX driver to probe if the MUX node contains the "idle-states"
> property.
> 
> So maybe the MUX UCLASS code should be checking for that instead of/along with
> the custom u-boot,mux-autoprobe property?
> 
> How does this look?
> 
> diff --git a/drivers/mux/mux-uclass.c b/drivers/mux/mux-uclass.c
> index c98576ceb8..8833888ded 100644
> --- a/drivers/mux/mux-uclass.c
> +++ b/drivers/mux/mux-uclass.c
> @@ -318,7 +318,8 @@ int dm_mux_init(void)
>  		return ret;
>  	}
>  	uclass_foreach_dev(dev, uc) {
> -		if (dev_read_bool(dev, "u-boot,mux-autoprobe")) {
> +		if (dev_read_bool(dev, "u-boot,mux-autoprobe") ||
> +		    dev_read_bool(dev, "idle-states")) {
>  			ret = device_probe(dev);
>  			if (ret)
>  				log_debug("unable to probe device %s\n",

I would just drop "u-boot,mux-autoprobe" as TI platforms are the only
users of this uclass and mmio driver, iirc.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2024-01-22 16:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12 12:49 [PATCH 0/5] k3-j721e: beagleboneai: Fix USB Roger Quadros
2024-01-12 12:49 ` [PATCH 1/5] board: ti: j721e: Drop SERDES PHY init from board file Roger Quadros
2024-01-12 12:49 ` [PATCH 2/5] usb: cdns3: avoid error messages if phys don't exist Roger Quadros
2024-01-12 12:49 ` [PATCH 3/5] arm: dts: k3-j721e: Fix USB0 operation Roger Quadros
2024-01-12 12:49 ` [PATCH 4/5] arm: dts: k3-j721e-beagleboneai64: Fix USB operation Roger Quadros
2024-01-12 13:02   ` Nishanth Menon
2024-01-12 13:06     ` Roger Quadros
2024-01-12 13:14       ` Nishanth Menon
2024-01-12 13:21         ` Tom Rini
2024-01-15 11:40           ` Roger Quadros
2024-01-20 16:50             ` Tom Rini
2024-01-22 11:39               ` Roger Quadros
2024-01-22 16:00                 ` Tom Rini [this message]
2024-01-12 12:49 ` [PATCH 5/5] configs/j721e_beagleboneai64_a72_defconfig: Enable Sierra PHY Roger Quadros
2024-01-20 21:04 ` [PATCH 0/5] k3-j721e: beagleboneai: Fix USB Tom Rini

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=20240122160034.GL3652023@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=marex@denx.de \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=praneeth@ti.com \
    --cc=r-gunasekaran@ti.com \
    --cc=robertcnelson@gmail.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=srk@ti.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.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