Not able to enable USB serial gadget (ttyGS0) on lx2160a

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

Not able to enable USB serial gadget (ttyGS0) on lx2160a

Jump to solution
2,143 Views
csr202
Contributor II

 

We have a requirement to enable console access through USB-C interface.
I have updated device tree with dr_mode = "peripheral" and enabled USB Serial Gadget support in kernel configuration.


However, It shows the below error while loading the serial gadget driver.
[ 340.488679] udc-core: couldn't find an available UDC - added [g_serial] to list of pending drivers

$/proc/device-tree/soc/usb@3100000# cat dr_mode
peripheral

/sys/class/udc is empty

 

I've updated Device Tree as below.
/* USB */
&usb0 {
dr_mode = "peripheral";
maximum-speed = "super-speed";
status = "okay";
};

&usb1 {
status = "okay";
};

dmesg logs:
root@tigershark:/proc/device-tree/soc/usb@3100000# dmesg | grep dwc
[ 3.684912] dwc3 3100000.usb: Adding to iommu group 2
[ 3.690003] dwc3 3100000.usb: Failed to get clk 'ref': -2
[ 3.695417] dwc3 3100000.usb: Configuration mismatch. dr_mode forced to host
[ 3.702690] dwc3 3110000.usb: Adding to iommu group 3
[ 3.707762] dwc3 3110000.usb: Failed to get clk 'ref': -2

Update Kernel menuconfig to enable serial gadget and loaded below kernel modules.
modprobe libcomposite.ko
modprobe u_serial.ko
modprobe usb_f_acm.ko
modprobe usb_f_obex.ko
modprobe usb_f_serial.ko
modprobe g_serial.ko
[ 340.488679] udc-core: couldn't find an available UDC - added [g_serial] to list of pending drivers

 

0 Kudos
1 Solution
2,137 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please configure USB_DWC3_DUAL_ROLE=y in your Linux Kernel configuration file.

View solution in original post

2 Replies
2,138 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please configure USB_DWC3_DUAL_ROLE=y in your Linux Kernel configuration file.

2,113 Views
csr202
Contributor II

Thanks Yiping. I could enable USB serial gadget (ttyGS0) on lx2160a after enabling USB_DWC3_DUAL_ROLE=y in kernel configuration.

0 Kudos