[PATCH v1 3/3] colibri-imx8x: configure usb hub to bypass mode
Francesco Dolcini
francesco at dolcini.it
Wed Dec 20 12:30:39 CET 2023
Hello Fabio,
On Wed, Dec 20, 2023 at 07:48:50AM -0300, Fabio Estevam wrote:
> On Wed, Dec 20, 2023 at 7:39 AM Andrejs Cainikovs
> <andrejs.cainikovs at gmail.com> wrote:
>
> > diff --git a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi
> > index a6af4e5e2b7..6ab6b1f9ee6 100644
> > --- a/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi
> > +++ b/arch/arm/dts/fsl-imx8qxp-colibri-u-boot.dtsi
> > @@ -84,6 +84,21 @@
> > bootph-some-ram;
> > };
> >
> > +&gpio_expander_43 {
> > + usb-bypass-n-hog {
> > + gpio-hog;
> > + gpios = <5 GPIO_ACTIVE_LOW>;
> > + line-name = "usb-bypass-n";
> > + output-high;
> > + };
> > + usb-reset-n-hog {
> > + gpio-hog;
> > + gpios = <4 GPIO_ACTIVE_LOW>;
> > + line-name = "usb-reset-n";
> > + output-low;
> > + };
> > +};
>
> Patch looks good from a U-Boot perspective, but just want to
> understand why the imx8qxp/imx8qm boards
> in U-Boot use devicetrees based on downstream NXP instead of the
> mainline kernel dts?
>
> Shouldn't this 'hub out of reset' be added in mainline Linux first and
> then just sync the dts in U-Boot?
Valid point.
In general re-using the DTS for the kernel would not work.
The bypass and reset signals are part of the USB HUB node [1], and we
would need to add such a driver to U-Boot to be able to properly
implement it (despite the recent plans to make SPL a full blown
bootloader and U-Boot proper the operating system and kick out Linux I
would not go into that direction ;-)
Given that I believe that overriding the Linux DTS to use these 2
signals are simple GPIO HOG for U-Boot is the correct approach.
Francesco
[1] Linux: Documentation/devicetree/bindings/usb/smsc,usb3503.yaml
More information about the U-Boot
mailing list