Add USB CDC_NCM device driver and gadget driver to L2.6.35_11.09.01_ER BSP -blog archive

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add USB CDC_NCM device driver and gadget driver to L2.6.35_11.09.01_ER BSP -blog archive

10,772 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

    USB NCM driver was supported from Linux 3.0 kernel, attached patch "usb_cdc_ncm.patch" is a back porting for USB CDC NCM support from Linux 3.1.5 kernel.

    For LTIB BSP L2.6.35_11.09.01_ER, after applied the patch, we need config the kernel to select the USB NCM driver for both host and gadget.

    In my test, I used two iMX boards, one works as USB host, another works as the USB NCM gadget.

Original Attachment has been moved to: usb_cdc_ncm.patch.zip

Labels (2)
Tags (1)
9 Replies

4,283 Views
1130692457
Contributor I

hi , Qiang Li

Now I want to use PC as the HOST and i.mx6 as the device, but when I set it as follows, the driver appears on the i.mx6 board, but it cannot be recognized when using the OTG interface to connect。

%57LTK7}YQ97RI)E}$9]RG2.png

0 Kudos

4,283 Views
pfsang
Contributor IV

hi , Qiang Li

       if i want to support usb_cdc_ncm, should i support the following modules?

CONFIG_USB_USBNET, CONFIG_USB_NET_CDC_NCM, CONFIG_USB_GADGET

USB Gadget Drivers, CONFIG_USB_ETH, CONFIG_USB_G_NCM.

      and could I enable these driver as "M"?

      if i enable them as the build-in,  should I register them in board_mx6q_xxxx.c?

B&R

peter.cao

0 Kudos

4,283 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Yes, you can select them to support NCM, no modification was needed in board file.

0 Kudos

4,283 Views
tollerhecht
Contributor III

I am out of the office until 22.06.2014.

I will respond to your message when I return.

Note: This is an automated response to your message "Re:

- Add USB CDC_NCM device driver and gadget driver to L2.6.35_11.09.01_ER

BSP -blog archive" sent on 06/11/2014 5:28:09 AM.

This is the only notification you will receive while this person is away.

0 Kudos

4,283 Views
pfsang
Contributor IV

hi,  Qiang Li

    thank you for your reply.

    i configured CONFIG_USB_USBNET, CONFIG_USB_NET_CDC_NCM, CONFIG_USB_GADGET to "Y"

    and CONFIG_USB_ETH, CONFIG_USB_G_NCM to "M"

    so i just found the g_ether.ko, but didn't find the g_ncm.ko.

    do you have encountered the issue?

    if you are convenient,  could you give me your  ".config" and configuration of the usb ?

thanks

peter.cao

0 Kudos

4,283 Views
LoicDomaigne
Contributor I

Hi Qiang,

Thanks for your kind answer! 

I had overlooked the J3 connector. The setup worked fine ( i.MX53 with gadget driver and a host with the standard NCM driver ).

Cheers, Loïc

0 Kudos

4,283 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

I used a normal micro-B to standard-A cable, this cable is also used to connect the iMX board with PC.

On Freescale board, the OTG port is a micro-AB connector. I haven't tried it with one board, I think if your board has both the USB OTG port and USB host port, you can try it.

0 Kudos

4,283 Views
kajalsabhani
Contributor II

hello Qiang,

Can you tell me how you have setup for iMX board with PC for USB host and gadget?

which drivers are required for board and for PC?

and what is dmesg log on board and pc to verify proper connection is established between board and PC or not?

0 Kudos

4,283 Views
LoicDomaigne
Contributor I

Hi Qiang,

thanks for your patch!

I am too interested in the setup that you have described for testing purposes (two i.MX boards, one working as host and the other as device using the gadget). I have one question, though: what kind of USB cable are you using for connecting the two boards? An USB A/A male, right?

Do you see any possibility to use only one board, maybe with the help of dummy_hcd ?


TIA, Loïc