USB OTG Serial on i.MX6 Android kk4.4.3_2.0.0

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

USB OTG Serial on i.MX6 Android kk4.4.3_2.0.0

2,586 Views
mukelarvin
Contributor IV

Hi, I'm having some trouble getting the USB OTG port to appear as a usb serial port when connected to a PC.

- I.MX6DL custom board based on the SabreSD

- Android kk4.4.3_2.0.0 bsp

- USB OTG works for ADB with CONFIG_USB_G_ANDROID=y in my kernel config.

My understanding is that removing CONFIG_USB_G_ANDROID and setting CONFIG_USB_G_SERIAL=y should enable the serial mode. The device /dev/ttyGS0 appears in my device's file system but no computer sees the device when I plug in the usb otg port. What else should I be doing?

Device Tree Settings

Regulator

reg_usb_otg_vbus: usb_otg_vbus {

        compatible = "regulator-fixed";

        regulator-name = "usb_otg_vbus";

        regulator-min-microvolt = <5000000>;

        regulator-max-microvolt = <5000000>;

        gpio = <&gpio3 22 0>;

        enable-active-high;

};

USB OTG

&usbotg {

        vbus-supply = <&reg_usb_otg_vbus>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_usbotg_2>;

        disable-over-current;

        status = "okay";

};

Labels (2)
0 Kudos
Reply
3 Replies

1,339 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Are you trying to configure the USB OTG port to work as a CDC device?

I just tried it out with L3.14.52 and it worked I just had to modprobe g_serial

Best Regards,

Alejandro

0 Kudos
Reply

1,339 Views
mukelarvin
Contributor IV

Yeah I'd like it to be a CDC device. I'm trying to get the device to show up as a COM port on my windows PC.

I built the driver statically in the kernel and it appears to be getting loaded on boot:

root@sabresd_6dq:/ # ls -l /sys/module/g_serial

drwxr-xr-x root     root              1970-01-01 00:00 parameters

--w------- root     root         4096 1970-01-01 00:00 uevent

I think it is something to do with the USB port not being set up correctly. On my old 3.0.35 kernel I used to get messages for each USB port:

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1

fsl-ehci fsl-ehci.0: irq 75, io base 0x02184000

fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

add wake up source irq 72

fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2

fsl-ehci fsl-ehci.1: irq 72, io base 0x02184200

fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 1 port detected

On the new kernel only one is initialized:

ci_hdrc ci_hdrc.1: doesn't support gadget

ci_hdrc ci_hdrc.1: EHCI Host Controller

ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1

ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: EHCI Host Controller

usb usb1: Manufacturer: Linux 3.10.53-dirty ehci_hcd

usb usb1: SerialNumber: ci_hdrc.1

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

Although it is weird that the Android ADB driver will still work with no mention of the port during the boot log. Any ideas?

0 Kudos
Reply

1,339 Views
mukelarvin
Contributor IV

Here are the usb related items from the boot log:

usbcore: registered new interface driver asix

usbcore: registered new interface driver ax88179_178a

usbcore: registered new interface driver cdc_ether

usbcore: registered new interface driver net1080

usbcore: registered new interface driver cdc_subset

usbcore: registered new interface driver zaurus

usbcore: registered new interface driver cdc_ncm

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

usbcore: registered new interface driver cdc_acm

cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

usbcore: registered new interface driver usb-storage

usbcore: registered new interface driver usbserial

usbcore: registered new interface driver option

usbserial: USB Serial support registered for GSM modem (1-port)

ci_hdrc ci_hdrc.1: doesn't support gadget

ci_hdrc ci_hdrc.1: EHCI Host Controller

ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1

ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: EHCI Host Controller

usb usb1: Manufacturer: Linux 3.10.53-dirty ehci_hcd

usb usb1: SerialNumber: ci_hdrc.1

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

mousedev: PS/2 mouse device common for all mice

usbcore: registered new interface driver xpad

usbcore: registered new interface driver usb_acecad

usbcore: registered new interface driver aiptek

usbcore: registered new interface driver gtco

usbcore: registered new interface driver hanwang

usbcore: registered new interface driver kbtab

usbcore: registered new interface driver wacom

usbcore: registered new interface driver uvcvideo

USB Video Class driver (1.1.1)

...

hidraw: raw HID events driver (C) Jiri Kosina

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

...

usb_otg_vbus: disabling

0 Kudos
Reply