[PATCH v4 1/4] cmd: bind: Add unbind command with driver filter
Miquel Raynal
miquel.raynal at bootlin.com
Fri Aug 4 19:46:38 CEST 2023
Hi Marek,
marex at denx.de wrote on Fri, 4 Aug 2023 19:31:50 +0200:
> On 8/4/23 19:24, Miquel Raynal wrote:
>
> Hi,
>
> >>>>>>> exit not allowed from main input shell.
> >>>>>>> => unbind /ocp/usb at 47400000/usb at 47401000 usb_ether
> >>>>>>
> >>>>>> Does
> >>>>>> >>>> => unbind ethernet 0
> >>>>>>
> >>>>>> work ?
> >>>>>>
> >>>>>> If so, 1/4 in this series can be skipped altogether.
> >>>>>>
> >>>>>> You likely won't even need the rebinding of ti-musb-peripheral anymore.
> >>
> >> Did you test this yet ?
> >
> > Unfortunately it does not work. Indeed it would be much simpler than
> > using the node path. Any idea why?
>
> Since you provided literally zero information, no.
>
> Console log would be a good starting point.
Here it is, the unbind command itself does not complain has it seems to
catch the regular Ethernet controller (there is one in the SoC, but it
is not wired on the board). So the first time it does nothing, but the
second time it works as the USB gadget get dropped! And after the
second call, fastboot works without the bind call.
=> dm tree
misc 0 [ + ] ti-musb-wrapper | |-- usb at 47400000
usb 0 [ + ] ti-musb-peripheral | | |-- usb at 47401000
ethernet 1 [ + ] usb_ether | | | `-- usb_ether
bootdev 3 [ ] eth_bootdev | | | `-- usb_ether.bootdev
usb 0 [ ] ti-musb-host | | `-- usb at 47401800
ethernet 0 [ + ] eth_cpsw | |-- ethernet at 4a100000
bootdev 2 [ ] eth_bootdev | | `-- ethernet at 4a100000.bootdev
=> unbind ethernet 0
=> dm tree
misc 0 [ + ] ti-musb-wrapper | |-- usb at 47400000
usb 0 [ + ] ti-musb-peripheral | | |-- usb at 47401000
ethernet 0 [ + ] usb_ether | | | `-- usb_ether
bootdev 2 [ ] eth_bootdev | | | `-- usb_ether.bootdev
usb 0 [ ] ti-musb-host | | `-- usb at 47401800
=> unbind ethernet 0
=> dm tree
misc 0 [ + ] ti-musb-wrapper | |-- usb at 47400000
usb 0 [ ] ti-musb-peripheral | | |-- usb at 47401000
usb 0 [ ] ti-musb-host | | `-- usb at 47401800
So actually the unbind works, but was not targeting the right
controller, because it's listed as the second Ethernet controller on
this board. Hence this actually works:
=> unbind ethernet 1
=> fastboot usb 0
\o/
Thanks,
Miquèl
More information about the U-Boot
mailing list