LS1021a USB3.0 Ethernet Over USB Issue

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

LS1021a USB3.0 Ethernet Over USB Issue

1,580 Views
jiye
Contributor V

I am trying to make my standalone USB3.0 OTG works as a device mode ( my device has a type C male connector) here is my device tree file:

pastedImage_14.png

But it still not working, I can see my usb0 interface:

pastedImage_15.png

[    0.030270] usbcore: registered new interface driver usbfs
[    0.030302] usbcore: registered new interface driver hub
[    0.030341] usbcore: registered new device driver usb
[    0.188193] usbcore: registered new interface driver pegasus
[    0.188229] usbcore: registered new interface driver asix
[    0.188253] usbcore: registered new interface driver ax88179_178a
[    0.188276] usbcore: registered new interface driver cdc_ether
[    0.188307] usbcore: registered new interface driver smsc75xx
[    0.188338] usbcore: registered new interface driver smsc95xx
[    0.188367] usbcore: registered new interface driver net1080
[    0.188391] usbcore: registered new interface driver cdc_subset
[    0.188418] usbcore: registered new interface driver zaurus
[    0.188458] usbcore: registered new interface driver cdc_ncm
[    0.188683] dwc3 3100000.usb3: Failed to get clk 'ref': -2
[    0.190364] usbcore: registered new interface driver usb-storage
[    0.221683] usbcore: registered new interface driver usbhid
[    0.221688] usbhid: USB HID core driver
[    1.924797] usb0: HOST MAC aa:99:03:25:2d:ca
[    1.924893] usb0: MAC 96:c7:a7:d8:8f:8e
[    3.308383] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
root@localhost:/sys/class/net/usb0# dmesg | grep usb0
[    1.924797] usb0: HOST MAC aa:99:03:25:2d:ca
[    1.924893] usb0: MAC 96:c7:a7:d8:8f:8e
[    3.308383] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready

Then I saw this from lsdk1906

pastedImage_1.png

Then I enable necessary modules from the uboot kconfig for the USB3.0 ethernet device mode 

then I tried to recompile the uboot using

flex-builder -c uboot -m ls1021atwr -b sd

and I saw

pastedImage_2.png

Please help

Labels (2)
0 Kudos
Reply
1 Reply

1,290 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Elias Bitbaker,

Please refer to the following Linux Kernel and dts configuration.

Linux Kernel:

pastedImage_1.png

pastedImage_2.png

In the dts file, please change property dr_mode's data from "host" to "peripheral", add property maximum-speed = "super-speed".

usb3: usb3@3100000 {
compatible = "snps,dwc3";
reg = <0x0 0x3100000 0x0 0x10000>;
interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
dr_mode = "peripheral";
snps,quirk-frame-length-adjustment = <0x20>;
snps,dis_rxdet_inp3_quirk;
usb3-lpm-capable;
snps,dis-u1u2-when-u3-quirk;
snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
snps,host-vbus-glitches;

maximum-speed = “super-speed”;
};

Execute below shell commands to insmod related ko files on RDB board.
root@ls1043a:/run/media/mmcblk0p1# insmod libcomposite.ko
root@ls1043a:/run/media/mmcblk0p1# insmod u_ether.ko
root@ls1043a:/run/media/mmcblk0p1# insmod usb_f_ecm.ko
root@ls1043a:/run/media/mmcblk0p1# insmod usb_f_ecm_subset.ko
root@ls1043a:/run/media/mmcblk0p1# insmod usb_f_rndis.ko
root@ls1043a:/run/media/mmcblk0p1# insmod g_ether.ko
[ 138.046732] using random self ethernet address
[ 138.051188] using random host ethernet address
[ 138.055884] usb0: HOST MAC 5e:4a:86:d0:dc:b6
[ 138.060219] usb0: MAC c2:53:e1:5b:d0:d9
[ 138.064100] using random self ethernet address
[ 138.068549] using random host ethernet address
[ 138.073041] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[ 138.079653] g_ether gadget: g_ether ready

Thanks,

Yiping

0 Kudos
Reply