[U-Boot] i.MX6DL USB OTG Gadget ether with DM_USB and DM_ETH?

Bernhard Messerklinger bernhard.messerklinger at br-automation.com
Tue Jul 18 10:28:57 UTC 2017


Hi,

I am trying to use the usb otg port of our custom board as usb_ether 
interface.
Everything works fine without device model enabled. But since everything 
new should
be done with DM I tried to use usb_ether with CONFIG_DM_ETH and 
CONFIG_DM_USB.

The usb_ether driver searches for an UCLASS_USB_DEV_GENERIC, but the only 
way to
get such a device is to init usb. whenever I init the usb OTG port gets 
detected as hub.
I looked at the u-boot usb stack code and did not think its possible to 
use usb gadget driver 
with DM enabled at this time.

Can somebody who is more familiar with the u-boot usb stack confirm this?
Or is it just my fault?

Devicetree entry:
&usbotg {
        disable-over-current;
        dr_mode = "peripheral";
        status = "okay";
};

Defconfig:
CONFIG_DM_ETH=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_CI_UDC=y
CONFIG_USB_GADGET_DUALSPEED=y

Config Include:
/* USB Configs */
#define CONFIG_USB_EHCI_MX6
#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET        /* For OTG port */
#define CONFIG_MXC_USB_PORTSC           (PORT_PTS_UTMI | PORT_PTS_PTW)
#define CONFIG_MXC_USB_FLAGS            0

/* USB Ethernet Configs */
#define CONFIG_USBD_HS
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETH_CDC
#define CONFIG_USBNET_DEV_ADDR          "de:ad:be:ef:00:01"
#define CONFIG_USBNET_HOST_ADDR         "de:ad:be:ef:00:02"

Thanks!
Bernhard Messerklinger



More information about the U-Boot mailing list