Re: USB difficulties with an iMX6ULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Peter, thanks for your answers I really appreciate! 

I put my answers below.


On Fri, 2020-06-19 at 02:05 +0000, Peter Chen wrote:
>  
> > 
> > 1st problem - RNDIS
> > We try to use RNDIS on one of the USB ports the Colibri iMX6ULL has.
> > For this
> > purpose I'm using the usb_f_rndis.ko kernel module and setting
> > dr_mode of
> > &usbotg1 to "peripheral"
> > This works fine on iMX7 but does not on iMX6ULL. On the ULL board I
> > can see a
> > "ci_hdrc.0" in /sys/class/udc after boot. If I add now an USB GPIO
> > extcon to usbotg
> > this changes to "ci_hdrc.1" and everything works fine after boot,
> > but not after
> > unplugging USB and replugging.
> > To setup RNDIS I use the commands [1] I put at the end of this email
> > for reference.
> > 
> 
> If the board designs for USB part are the same between iMX7 version
> and iMX6ULL version,
> keep dts content are the same except for the USB PHY port (including
> the phandle for it),
> these two SoCs uses the different USB PHY.

Thanks for this hint! Then here may something be different or not quite
right yet (for our usecase).

I saw that in phy-mxs-usb.c there is no "mode" in struct mxs_phy like it
is on downstream code. I couldn't find how the code switches the PHY to
peripheral mode.

Should it even be possible with this phy to use dr_mode = "peripheral"?

> 
> If the RNDIS could work at the first time, it seems your configfs
> script should be OK.
> 
> > 2nd problem - constant resetting
> > When I compile a plain mainline kernel with "imx_v6_v7_defconfig"
> > and boot the
> > iMX6ULL with it I see that the USB is constantly resetting the hub
> > that is present on
> > the Colibri Evaluation carrier board.
> > 
> > [   49.654621] usb 1-1: reset high-speed USB device number 2 using
> > ci_hdrc
> > [   52.180781] usb 1-1: reset high-speed USB device number 2 using
> > ci_hdrc
> > [   54.699678] usb 1-1: reset high-speed USB device number 2 using
> > ci_hdrc
> > 
> 
> Try to add external power to the USB HUB avoid the board can't supply
> enough power.
> If not, try to disable runtime pm, and see if it works.
> 
>  59 static const struct ci_hdrc_imx_platform_flag imx6ul_usb_data = {
>  60         .flags = CI_HDRC_SUPPORTS_RUNTIME_PM |
>  61                 CI_HDRC_TURN_VBUS_EARLY_ON,
>  62 };
>  63 

The power is no problem. The usb-hub is soldered to the carrier-board, I
measured it and voltage is rock solid. We use an USB2514 chip.

Thanks for the hint, disabling CI_HDRC_SUPPORTS_RUNTIME_PM solves the
issue.

Philippe

> 
> > This looks to me like something is still not quite right for the
> > use- case of ULL. I
> > doubt that our hardware is the problem as we never have seen those
> > problems
> > downstream.
> 
> You mean your hardware should be NO problem as the downstream code
> runs OK?
> 
> Peter
> 
>  




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux