This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DRA756: DRA742 based on PSDK 3.02 USB device mode is not working

Part Number: DRA756


Tool/software: Linux

Hello!

HW : custom VAYU board.

I am in the process of porting SDK from GLSDK 7.04 to Processor-SDK 3.02.
Target board is based on DRA7X_EVM(VAYU 703761-1031), there is no much differences.

I have no problem with GLSKD 7.04.
But after applying Processor-SDK 3.02, USB1 device mode is not working.

When "ums 0 mmc1" command is used at u-boot, gadget driver and stoage of ther target is found on the host linux PC.
After kernel loading, I can use usb1 as device mode.

But I couldn't use device USB1 port without u-boot command.
When I tested with previous version kernel config and device tree(based on GLSDK 7.04 ) with same u-boot, it was OK.
(I tested host mode by changing device tree, it worked perfectly in host mode.)

I think definitely kernel config or device tree is something wrong.
I have checked clock, regulator supply etc.
But I cann't figure out what's wrong.
Is there any other suggestions or tips?

Thank you



Kernel config

CONFIG_USB_NET_DRIVERS=m
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8152=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_AX88179_178A=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_CDC_NCM=m
CONFIG_USB_NET_SMSC75XX=m
CONFIG_USB_NET_SMSC95XX=m
CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
CONFIG_USB_NET_ZAURUS=m
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT33XX=y
CONFIG_RT2800USB_RT35XX=y
CONFIG_RT2X00_LIB_USB=m
CONFIG_MFD_OMAP_USB_HOST=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
CONFIG_USB_HID=m
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=m
CONFIG_USB_DEFAULT_PERSIST=y
CONFIG_USB_OTG=y
CONFIG_USB_XHCI_HCD=m
CONFIG_USB_XHCI_PCI=m
CONFIG_USB_XHCI_PLATFORM=m
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_PCI=m
CONFIG_USB_EHCI_HCD_OMAP=m
CONFIG_USB_EHCI_HCD_PLATFORM=m
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_OHCI_HCD_PCI=m
CONFIG_USB_OHCI_HCD_PLATFORM=m
CONFIG_USB_R8A66597_HCD=m
CONFIG_USB_ACM=m
CONFIG_USB_STORAGE=m
CONFIG_USB_MUSB_HDRC=m
CONFIG_USB_MUSB_DUAL_ROLE=y
CONFIG_USB_MUSB_OMAP2PLUS=m
CONFIG_USB_MUSB_AM35X=m
CONFIG_USB_MUSB_DSPS=m
CONFIG_USB_MUSB_AM335X_CHILD=m
CONFIG_USB_TI_CPPI41_DMA=y
CONFIG_USB_DWC3=m
CONFIG_USB_DWC3_DUAL_ROLE=y
CONFIG_USB_DWC3_OMAP=m
CONFIG_USB_ISP1760=m
CONFIG_USB_ISP1760_HCD=y
CONFIG_USB_ISP1761_UDC=y
CONFIG_USB_ISP1760_DUAL_ROLE=y
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_TEST=m
CONFIG_USB_PHY=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_AM335X_CONTROL_USB=y
CONFIG_AM335X_PHY_USB=y
CONFIG_USB_GPIO_VBUS=y
CONFIG_USB_ISP1301=m
CONFIG_USB_GADGET=m
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=32
CONFIG_USB_LIBCOMPOSITE=m
CONFIG_USB_F_ACM=m
CONFIG_USB_F_SS_LB=m
CONFIG_USB_U_SERIAL=m
CONFIG_USB_U_ETHER=m
CONFIG_USB_F_SERIAL=m
CONFIG_USB_F_OBEX=m
CONFIG_USB_F_NCM=m
CONFIG_USB_F_ECM=m
CONFIG_USB_F_SUBSET=m
CONFIG_USB_F_RNDIS=m
CONFIG_USB_F_MASS_STORAGE=m
CONFIG_USB_F_FS=m
CONFIG_USB_F_UAC2=m
CONFIG_USB_F_UVC=m
CONFIG_USB_F_MIDI=m
CONFIG_USB_F_HID=m
CONFIG_USB_F_PRINTER=m
CONFIG_USB_ZERO=m
CONFIG_USB_AUDIO=m
CONFIG_USB_ETH=m
CONFIG_USB_ETH_RNDIS=y
CONFIG_USB_G_NCM=m
CONFIG_USB_GADGETFS=m
CONFIG_USB_FUNCTIONFS=m
CONFIG_USB_FUNCTIONFS_ETH=y
CONFIG_USB_FUNCTIONFS_RNDIS=y
CONFIG_USB_FUNCTIONFS_GENERIC=y
CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_G_SERIAL=m
CONFIG_USB_MIDI_GADGET=m
CONFIG_USB_G_PRINTER=m
CONFIG_USB_CDC_COMPOSITE=m
CONFIG_USB_G_ACM_MS=m
CONFIG_USB_G_MULTI=m
CONFIG_USB_G_MULTI_RNDIS=y
CONFIG_USB_G_MULTI_CDC=y
CONFIG_USB_G_HID=m
CONFIG_USB_G_DBGP=m
CONFIG_USB_G_DBGP_SERIAL=y
CONFIG_USB_G_WEBCAM=m
CONFIG_EXTCON_USB_GPIO=m
CONFIG_OMAP_USB2=y

devicee tree settings

/ {
    model = "TI DRA742";
...
    reserved_mem: reserved-memory {
...
    extcon_usb1: extcon_usb1 {
        compatible = "linux,extcon-usb-gpio";
        id-gpio = <&pcf_hdmi 1 GPIO_ACTIVE_HIGH>;
    };

    extcon_usb2: extcon_usb2 {
        compatible = "linux,extcon-usb-gpio";
        id-gpio = <&pcf_hdmi 2 GPIO_ACTIVE_HIGH>;
    };
....
};


&omap_dwc3_1 {
    extcon = <&extcon_usb1>;
};

&omap_dwc3_2 {
    extcon = <&extcon_usb2>;
};

&usb1 {
    dr_mode = "peripheral";
};

&usb2 {
    dr_mode = "host";
};


.....

&usb2_phy1 {
    phy-supply = <&ldousb_reg>;
};

&usb2_phy2 {
    phy-supply = <&ldousb_reg>;
};



// dra7.dtsi is same
...
		omap_dwc3_1: omap_dwc3_1@48880000 {
			compatible = "ti,dwc3";
			ti,hwmods = "usb_otg_ss1";
			reg = <0x48880000 0x10000>;
			interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
			#address-cells = <1>;
			#size-cells = <1>;
			utmi-mode = <2>;
			ranges;
			usb1: usb@48890000 {
				compatible = "snps,dwc3";
				reg = <0x48890000 0x17000>;
				interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
					     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
					     <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
				interrupt-names = "peripheral",
						  "host",
						  "otg";
				phys = <&usb2_phy1>, <&usb3_phy1>;
				phy-names = "usb2-phy", "usb3-phy";
				tx-fifo-resize;
				maximum-speed = "super-speed";
				dr_mode = "otg";
				snps,dis_u3_susphy_quirk;
				snps,dis_u2_susphy_quirk;
			};
		};
...

# dmesg|grep usb

[    9.159108] usbcore: registered new interface driver usbfs
[    9.170471] usbcore: registered new interface driver hub
[    9.187886] usbcore: registered new device driver usb
[    9.415516] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   76.592947] udc 48890000.usb: registering UDC driver [g_multi]
[   76.612671] usb0: HOST MAC c6:c7:28:0d:0d:83
[   76.617426] usb0: MAC 86:2f:b0:c3:8d:9e
[   76.679495] usb0: eth_open
[   76.679652] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[   76.694434] g_multi 48890000.usb: usb_gadget_udc_start

debugfs 48890000.usb information

# cat /mnt/48890000.usb/regdump
GSBUSCFG0 = 0x0000000e
GSBUSCFG1 = 0x00000f00
GTXTHRCFG = 0x00000000
GRXTHRCFG = 0x00000000
GCTL = 0x25802000
GEVTEN = 0x00000000
GSTS = 0x3e800002
GSNPSID = 0x5533202a
GGPIO = 0x00000000
GUID = 0x0004042d
GUCTL = 0x00008010
GBUSERRADDR0 = 0x00000000
GBUSERRADDR1 = 0x00000000
GPRTBIMAP0 = 0x00000000
GPRTBIMAP1 = 0x00000000
GHWPARAMS0 = 0x202040ca
GHWPARAMS1 = 0x01c0c93b
GHWPARAMS2 = 0x00000000
GHWPARAMS3 = 0x1042008d
GHWPARAMS4 = 0x48822004
GHWPARAMS5 = 0x04202088
GHWPARAMS6 = 0x0b000c20
GHWPARAMS7 = 0x03080780
GDBGFIFOSPACE = 0x00420000
GDBGLTSSM = 0x01090440
GPRTBIMAP_HS0 = 0x00000000
GPRTBIMAP_HS1 = 0x00000000
GPRTBIMAP_FS0 = 0x00000000
GPRTBIMAP_FS1 = 0x00000000
GUSB2PHYCFG(0) = 0x00002500
GUSB2PHYCFG(1) = 0x00000000
GUSB2PHYCFG(2) = 0x00000000
GUSB2PHYCFG(3) = 0x00000000
GUSB2PHYCFG(4) = 0x00000000
GUSB2PHYCFG(5) = 0x00000000
GUSB2PHYCFG(6) = 0x00000000
GUSB2PHYCFG(7) = 0x00000000
GUSB2PHYCFG(8) = 0x00000000
GUSB2PHYCFG(9) = 0x00000000
GUSB2PHYCFG(10) = 0x00000000
GUSB2PHYCFG(11) = 0x00000000
GUSB2PHYCFG(12) = 0x00000000
GUSB2PHYCFG(13) = 0x00000000
GUSB2PHYCFG(14) = 0x00000000
GUSB2PHYCFG(15) = 0x00000000
GUSB2I2CCTL(0) = 0x00000000
GUSB2I2CCTL(1) = 0x00000000
GUSB2I2CCTL(2) = 0x00000000
GUSB2I2CCTL(3) = 0x00000000
GUSB2I2CCTL(4) = 0x00000000
GUSB2I2CCTL(5) = 0x00000000
GUSB2I2CCTL(6) = 0x00000000
GUSB2I2CCTL(7) = 0x00000000
GUSB2I2CCTL(8) = 0x00000000
GUSB2I2CCTL(9) = 0x00000000
GUSB2I2CCTL(10) = 0x00000000
GUSB2I2CCTL(11) = 0x00000000
GUSB2I2CCTL(12) = 0x00000000
GUSB2I2CCTL(13) = 0x00000000
GUSB2I2CCTL(14) = 0x00000000
GUSB2I2CCTL(15) = 0x00000000
GUSB2PHYACC(0) = 0x00000000
GUSB2PHYACC(1) = 0x00000000
GUSB2PHYACC(2) = 0x00000000
GUSB2PHYACC(3) = 0x00000000
GUSB2PHYACC(4) = 0x00000000
GUSB2PHYACC(5) = 0x00000000
GUSB2PHYACC(6) = 0x00000000
GUSB2PHYACC(7) = 0x00000000
GUSB2PHYACC(8) = 0x00000000
GUSB2PHYACC(9) = 0x00000000
GUSB2PHYACC(10) = 0x00000000
GUSB2PHYACC(11) = 0x00000000
GUSB2PHYACC(12) = 0x00000000
GUSB2PHYACC(13) = 0x00000000
GUSB2PHYACC(14) = 0x00000000
GUSB2PHYACC(15) = 0x00000000
GUSB3PIPECTL(0) = 0x00040002
GUSB3PIPECTL(1) = 0x00000000
GUSB3PIPECTL(2) = 0x00000000
GUSB3PIPECTL(3) = 0x00000000
GUSB3PIPECTL(4) = 0x00000000
GUSB3PIPECTL(5) = 0x00000000
GUSB3PIPECTL(6) = 0x00000000
GUSB3PIPECTL(7) = 0x00000000
GUSB3PIPECTL(8) = 0x00000000
GUSB3PIPECTL(9) = 0x00000000
GUSB3PIPECTL(10) = 0x00000000
GUSB3PIPECTL(11) = 0x00000000
GUSB3PIPECTL(12) = 0x00000000
GUSB3PIPECTL(13) = 0x00000000
GUSB3PIPECTL(14) = 0x00000000
GUSB3PIPECTL(15) = 0x00000000
GTXFIFOSIZ(0) = 0x00000042
GTXFIFOSIZ(1) = 0x00420184
GTXFIFOSIZ(2) = 0x01c60184
GTXFIFOSIZ(3) = 0x034a0184
GTXFIFOSIZ(4) = 0x04ce0184
GTXFIFOSIZ(5) = 0x06520013
GTXFIFOSIZ(6) = 0x06650013
GTXFIFOSIZ(7) = 0x06780013
GTXFIFOSIZ(8) = 0x068b0013
GTXFIFOSIZ(9) = 0x069e0013
GTXFIFOSIZ(10) = 0x06b10013
GTXFIFOSIZ(11) = 0x06c40013
GTXFIFOSIZ(12) = 0x06d70013
GTXFIFOSIZ(13) = 0x06ea0013
GTXFIFOSIZ(14) = 0x06fd0013
GTXFIFOSIZ(15) = 0x07100013
GTXFIFOSIZ(16) = 0x00000000
GTXFIFOSIZ(17) = 0x00000000
GTXFIFOSIZ(18) = 0x00000000
GTXFIFOSIZ(19) = 0x00000000
GTXFIFOSIZ(20) = 0x00000000
GTXFIFOSIZ(21) = 0x00000000
GTXFIFOSIZ(22) = 0x00000000
GTXFIFOSIZ(23) = 0x00000000
GTXFIFOSIZ(24) = 0x00000000
GTXFIFOSIZ(25) = 0x00000000
GTXFIFOSIZ(26) = 0x00000000
GTXFIFOSIZ(27) = 0x00000000
GTXFIFOSIZ(28) = 0x00000000
GTXFIFOSIZ(29) = 0x00000000
GTXFIFOSIZ(30) = 0x00000000
GTXFIFOSIZ(31) = 0x00000000
GRXFIFOSIZ(0) = 0x071e0185
GRXFIFOSIZ(1) = 0x08a30000
GRXFIFOSIZ(2) = 0x08a30000
GRXFIFOSIZ(3) = 0x00000000
GRXFIFOSIZ(4) = 0x00000000
GRXFIFOSIZ(5) = 0x00000000
GRXFIFOSIZ(6) = 0x00000000
GRXFIFOSIZ(7) = 0x00000000
GRXFIFOSIZ(8) = 0x00000000
GRXFIFOSIZ(9) = 0x00000000
GRXFIFOSIZ(10) = 0x00000000
GRXFIFOSIZ(11) = 0x00000000
GRXFIFOSIZ(12) = 0x00000000
GRXFIFOSIZ(13) = 0x00000000
GRXFIFOSIZ(14) = 0x00000000
GRXFIFOSIZ(15) = 0x00000000
GRXFIFOSIZ(16) = 0x00000000
GRXFIFOSIZ(17) = 0x00000000
GRXFIFOSIZ(18) = 0x00000000
GRXFIFOSIZ(19) = 0x00000000
GRXFIFOSIZ(20) = 0x00000000
GRXFIFOSIZ(21) = 0x00000000
GRXFIFOSIZ(22) = 0x00000000
GRXFIFOSIZ(23) = 0x00000000
GRXFIFOSIZ(24) = 0x00000000
GRXFIFOSIZ(25) = 0x00000000
GRXFIFOSIZ(26) = 0x00000000
GRXFIFOSIZ(27) = 0x00000000
GRXFIFOSIZ(28) = 0x00000000
GRXFIFOSIZ(29) = 0x00000000
GRXFIFOSIZ(30) = 0x00000000
GRXFIFOSIZ(31) = 0x00000000
GEVNTADRLO(0) = 0xfbc44000
GEVNTADRHI(0) = 0x00000000
GEVNTSIZ(0) = 0x00001000
GEVNTCOUNT(0) = 0x00000000
GHWPARAMS8 = 0x0000071e
DCFG = 0x00080800
DCTL = 0x00000000
DEVTEN = 0x00000000
DSTS = 0x00d20001
DGCMDPAR = 0x00000000
DGCMD = 0x00000000
DALEPENA = 0x00000000
DEPCMDPAR2(0) = 0x00000000
DEPCMDPAR2(1) = 0x00000000
DEPCMDPAR2(2) = 0x00000000
DEPCMDPAR2(3) = 0x00000000
DEPCMDPAR2(4) = 0x00000000
DEPCMDPAR2(5) = 0x00000000
DEPCMDPAR2(6) = 0x00000000
DEPCMDPAR2(7) = 0x00000000
DEPCMDPAR2(8) = 0x00000000
DEPCMDPAR2(9) = 0x00000000
DEPCMDPAR2(10) = 0x00000000
DEPCMDPAR2(11) = 0x00000000
DEPCMDPAR2(12) = 0x00000000
DEPCMDPAR2(13) = 0x00000000
DEPCMDPAR2(14) = 0x00000000
DEPCMDPAR2(15) = 0x00000000
DEPCMDPAR2(16) = 0x00000000
DEPCMDPAR2(17) = 0x00000000
DEPCMDPAR2(18) = 0x00000000
DEPCMDPAR2(19) = 0x00000000
DEPCMDPAR2(20) = 0x00000000
DEPCMDPAR2(21) = 0x00000000
DEPCMDPAR2(22) = 0x00000000
DEPCMDPAR2(23) = 0x00000000
DEPCMDPAR2(24) = 0x00000000
DEPCMDPAR2(25) = 0x00000000
DEPCMDPAR2(26) = 0x00000000
DEPCMDPAR2(27) = 0x00000000
DEPCMDPAR2(28) = 0x00000000
DEPCMDPAR2(29) = 0x00000000
DEPCMDPAR2(30) = 0x00000000
DEPCMDPAR2(31) = 0x00000000
DEPCMDPAR1(0) = 0x00000000
DEPCMDPAR1(1) = 0x00000000
DEPCMDPAR1(2) = 0x00000000
DEPCMDPAR1(3) = 0x00000000
DEPCMDPAR1(4) = 0x00000000
DEPCMDPAR1(5) = 0x00000000
DEPCMDPAR1(6) = 0x00000000
DEPCMDPAR1(7) = 0x00000000
DEPCMDPAR1(8) = 0x00000000
DEPCMDPAR1(9) = 0x00000000
DEPCMDPAR1(10) = 0x00000000
DEPCMDPAR1(11) = 0x00000000
DEPCMDPAR1(12) = 0x00000000
DEPCMDPAR1(13) = 0x00000000
DEPCMDPAR1(14) = 0x00000000
DEPCMDPAR1(15) = 0x00000000
DEPCMDPAR1(16) = 0x00000000
DEPCMDPAR1(17) = 0x00000000
DEPCMDPAR1(18) = 0x00000000
DEPCMDPAR1(19) = 0x00000000
DEPCMDPAR1(20) = 0x00000000
DEPCMDPAR1(21) = 0x00000000
DEPCMDPAR1(22) = 0x00000000
DEPCMDPAR1(23) = 0x00000000
DEPCMDPAR1(24) = 0x00000000
DEPCMDPAR1(25) = 0x00000000
DEPCMDPAR1(26) = 0x00000000
DEPCMDPAR1(27) = 0x00000000
DEPCMDPAR1(28) = 0x00000000
DEPCMDPAR1(29) = 0x00000000
DEPCMDPAR1(30) = 0x00000000
DEPCMDPAR1(31) = 0x00000000
DEPCMDPAR0(0) = 0x00000000
DEPCMDPAR0(1) = 0x00000000
DEPCMDPAR0(2) = 0x00000000
DEPCMDPAR0(3) = 0x00000000
DEPCMDPAR0(4) = 0x00000000
DEPCMDPAR0(5) = 0x00000000
DEPCMDPAR0(6) = 0x00000000
DEPCMDPAR0(7) = 0x00000000
DEPCMDPAR0(8) = 0x00000000
DEPCMDPAR0(9) = 0x00000000
DEPCMDPAR0(10) = 0x00000000
DEPCMDPAR0(11) = 0x00000000
DEPCMDPAR0(12) = 0x00000000
DEPCMDPAR0(13) = 0x00000000
DEPCMDPAR0(14) = 0x00000000
DEPCMDPAR0(15) = 0x00000000
DEPCMDPAR0(16) = 0x00000000
DEPCMDPAR0(17) = 0x00000000
DEPCMDPAR0(18) = 0x00000000
DEPCMDPAR0(19) = 0x00000000
DEPCMDPAR0(20) = 0x00000000
DEPCMDPAR0(21) = 0x00000000
DEPCMDPAR0(22) = 0x00000000
DEPCMDPAR0(23) = 0x00000000
DEPCMDPAR0(24) = 0x00000000
DEPCMDPAR0(25) = 0x00000000
DEPCMDPAR0(26) = 0x00000000
DEPCMDPAR0(27) = 0x00000000
DEPCMDPAR0(28) = 0x00000000
DEPCMDPAR0(29) = 0x00000000
DEPCMDPAR0(30) = 0x00000000
DEPCMDPAR0(31) = 0x00000000
DEPCMD(0) = 0x00000000
DEPCMD(1) = 0x00000000
DEPCMD(2) = 0x00000000
DEPCMD(3) = 0x00000000
DEPCMD(4) = 0x00000000
DEPCMD(5) = 0x00000000
DEPCMD(6) = 0x00000000
DEPCMD(7) = 0x00000000
DEPCMD(8) = 0x00000000
DEPCMD(9) = 0x00000000
DEPCMD(10) = 0x00000000
DEPCMD(11) = 0x00000000
DEPCMD(12) = 0x00000000
DEPCMD(13) = 0x00000000
DEPCMD(14) = 0x00000000
DEPCMD(15) = 0x00000000
DEPCMD(16) = 0x00000000
DEPCMD(17) = 0x00000000
DEPCMD(18) = 0x00000000
DEPCMD(19) = 0x00000000
DEPCMD(20) = 0x00000000
DEPCMD(21) = 0x00000000
DEPCMD(22) = 0x00000000
DEPCMD(23) = 0x00000000
DEPCMD(24) = 0x00000000
DEPCMD(25) = 0x00000000
DEPCMD(26) = 0x00000000
DEPCMD(27) = 0x00000000
DEPCMD(28) = 0x00000000
DEPCMD(29) = 0x00000000
DEPCMD(30) = 0x00000000
DEPCMD(31) = 0x00000000
OCFG = 0x00000000
OCTL = 0x00000040
OEVT = 0x80000000
OEVTEN = 0x00000000
OSTS = 0x00000019


# cat /mnt/48890000.usb/mode   
device

log of modprobe g_multi

log of g_multi modprobe
/dev/mmcblk0 is eMMC.
[ 1320.513821] using random self ethernet address
[ 1320.519152] using random host ethernet address
[ 1320.524106] using random self ethernet address
[ 1320.529274] using random host ethernet address
[ 1320.537189] usb0: HOST MAC 0e:14:c0:11:dc:f2
[ 1320.541880] usb0: MAC c2:21:f7:06:34:84
[ 1320.552720] Mass Storage Function, version: 2009/09/11
[ 1320.559307] LUN: removable file: (no medium)
[ 1320.565966] LUN: file: /dev/mmcblk0
[ 1320.569491] Number of LUNs=1
[ 1320.580228] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[ 1320.590029] g_multi gadget: Multifunction Composite Gadget
[ 1320.600862] g_multi gadget: userspace failed to provide iSerialNumber
[ 1320.607916] g_multi gadget: g_multi ready

and then 48890000.usb regdump

and then 

# cat /mnt/48890000.usb/regdump
GSBUSCFG0 = 0x0000000e
GSBUSCFG1 = 0x00000f00
GTXTHRCFG = 0x00000000
GRXTHRCFG = 0x00000000
GCTL = 0x25802000
GEVTEN = 0x00000000
GSTS = 0x3e800002
GSNPSID = 0x5533202a
GGPIO = 0x00000000
GUID = 0x0004042d
GUCTL = 0x00008010
GBUSERRADDR0 = 0x00000000
GBUSERRADDR1 = 0x00000000
GPRTBIMAP0 = 0x00000000
GPRTBIMAP1 = 0x00000000
GHWPARAMS0 = 0x202040ca
GHWPARAMS1 = 0x01c0c93b
GHWPARAMS2 = 0x00000000
GHWPARAMS3 = 0x1042008d
GHWPARAMS4 = 0x48822004
GHWPARAMS5 = 0x04202088
GHWPARAMS6 = 0x0b000c20
GHWPARAMS7 = 0x03080780
GDBGFIFOSPACE = 0x00420000
GDBGLTSSM = 0x01090440
GPRTBIMAP_HS0 = 0x00000000
GPRTBIMAP_HS1 = 0x00000000
GPRTBIMAP_FS0 = 0x00000000
GPRTBIMAP_FS1 = 0x00000000
GUSB2PHYCFG(0) = 0x00002500
GUSB2PHYCFG(1) = 0x00000000
GUSB2PHYCFG(2) = 0x00000000
GUSB2PHYCFG(3) = 0x00000000
GUSB2PHYCFG(4) = 0x00000000
GUSB2PHYCFG(5) = 0x00000000
GUSB2PHYCFG(6) = 0x00000000
GUSB2PHYCFG(7) = 0x00000000
GUSB2PHYCFG(8) = 0x00000000
GUSB2PHYCFG(9) = 0x00000000
GUSB2PHYCFG(10) = 0x00000000
GUSB2PHYCFG(11) = 0x00000000
GUSB2PHYCFG(12) = 0x00000000
GUSB2PHYCFG(13) = 0x00000000
GUSB2PHYCFG(14) = 0x00000000
GUSB2PHYCFG(15) = 0x00000000
GUSB2I2CCTL(0) = 0x00000000
GUSB2I2CCTL(1) = 0x00000000
GUSB2I2CCTL(2) = 0x00000000
GUSB2I2CCTL(3) = 0x00000000
GUSB2I2CCTL(4) = 0x00000000
GUSB2I2CCTL(5) = 0x00000000
GUSB2I2CCTL(6) = 0x00000000
GUSB2I2CCTL(7) = 0x00000000
GUSB2I2CCTL(8) = 0x00000000
GUSB2I2CCTL(9) = 0x00000000
GUSB2I2CCTL(10) = 0x00000000
GUSB2I2CCTL(11) = 0x00000000
GUSB2I2CCTL(12) = 0x00000000
GUSB2I2CCTL(13) = 0x00000000
GUSB2I2CCTL(14) = 0x00000000
GUSB2I2CCTL(15) = 0x00000000
GUSB2PHYACC(0) = 0x00000000
GUSB2PHYACC(1) = 0x00000000
GUSB2PHYACC(2) = 0x00000000
GUSB2PHYACC(3) = 0x00000000
GUSB2PHYACC(4) = 0x00000000
GUSB2PHYACC(5) = 0x00000000
GUSB2PHYACC(6) = 0x00000000
GUSB2PHYACC(7) = 0x00000000
GUSB2PHYACC(8) = 0x00000000
GUSB2PHYACC(9) = 0x00000000
GUSB2PHYACC(10) = 0x00000000
GUSB2PHYACC(11) = 0x00000000
GUSB2PHYACC(12) = 0x00000000
GUSB2PHYACC(13) = 0x00000000
GUSB2PHYACC(14) = 0x00000000
GUSB2PHYACC(15) = 0x00000000
GUSB3PIPECTL(0) = 0x00040002
GUSB3PIPECTL(1) = 0x00000000
GUSB3PIPECTL(2) = 0x00000000
GUSB3PIPECTL(3) = 0x00000000
GUSB3PIPECTL(4) = 0x00000000
GUSB3PIPECTL(5) = 0x00000000
GUSB3PIPECTL(6) = 0x00000000
GUSB3PIPECTL(7) = 0x00000000
GUSB3PIPECTL(8) = 0x00000000
GUSB3PIPECTL(9) = 0x00000000
GUSB3PIPECTL(10) = 0x00000000
GUSB3PIPECTL(11) = 0x00000000
GUSB3PIPECTL(12) = 0x00000000
GUSB3PIPECTL(13) = 0x00000000
GUSB3PIPECTL(14) = 0x00000000
GUSB3PIPECTL(15) = 0x00000000
GTXFIFOSIZ(0) = 0x00000042
GTXFIFOSIZ(1) = 0x00420184
GTXFIFOSIZ(2) = 0x01c60184
GTXFIFOSIZ(3) = 0x034a0184
GTXFIFOSIZ(4) = 0x04ce0184
GTXFIFOSIZ(5) = 0x06520013
GTXFIFOSIZ(6) = 0x06650013
GTXFIFOSIZ(7) = 0x06780013
GTXFIFOSIZ(8) = 0x068b0013
GTXFIFOSIZ(9) = 0x069e0013
GTXFIFOSIZ(10) = 0x06b10013
GTXFIFOSIZ(11) = 0x06c40013
GTXFIFOSIZ(12) = 0x06d70013
GTXFIFOSIZ(13) = 0x06ea0013
GTXFIFOSIZ(14) = 0x06fd0013
GTXFIFOSIZ(15) = 0x07100013
GTXFIFOSIZ(16) = 0x00000000
GTXFIFOSIZ(17) = 0x00000000
GTXFIFOSIZ(18) = 0x00000000
GTXFIFOSIZ(19) = 0x00000000
GTXFIFOSIZ(20) = 0x00000000
GTXFIFOSIZ(21) = 0x00000000
GTXFIFOSIZ(22) = 0x00000000
GTXFIFOSIZ(23) = 0x00000000
GTXFIFOSIZ(24) = 0x00000000
GTXFIFOSIZ(25) = 0x00000000
GTXFIFOSIZ(26) = 0x00000000
GTXFIFOSIZ(27) = 0x00000000
GTXFIFOSIZ(28) = 0x00000000
GTXFIFOSIZ(29) = 0x00000000
GTXFIFOSIZ(30) = 0x00000000
GTXFIFOSIZ(31) = 0x00000000
GRXFIFOSIZ(0) = 0x071e0185
GRXFIFOSIZ(1) = 0x08a30000
GRXFIFOSIZ(2) = 0x08a30000
GRXFIFOSIZ(3) = 0x00000000
GRXFIFOSIZ(4) = 0x00000000
GRXFIFOSIZ(5) = 0x00000000
GRXFIFOSIZ(6) = 0x00000000
GRXFIFOSIZ(7) = 0x00000000
GRXFIFOSIZ(8) = 0x00000000
GRXFIFOSIZ(9) = 0x00000000
GRXFIFOSIZ(10) = 0x00000000
GRXFIFOSIZ(11) = 0x00000000
GRXFIFOSIZ(12) = 0x00000000
GRXFIFOSIZ(13) = 0x00000000
GRXFIFOSIZ(14) = 0x00000000
GRXFIFOSIZ(15) = 0x00000000
GRXFIFOSIZ(16) = 0x00000000
GRXFIFOSIZ(17) = 0x00000000
GRXFIFOSIZ(18) = 0x00000000
GRXFIFOSIZ(19) = 0x00000000
GRXFIFOSIZ(20) = 0x00000000
GRXFIFOSIZ(21) = 0x00000000
GRXFIFOSIZ(22) = 0x00000000
GRXFIFOSIZ(23) = 0x00000000
GRXFIFOSIZ(24) = 0x00000000
GRXFIFOSIZ(25) = 0x00000000
GRXFIFOSIZ(26) = 0x00000000
GRXFIFOSIZ(27) = 0x00000000
GRXFIFOSIZ(28) = 0x00000000
GRXFIFOSIZ(29) = 0x00000000
GRXFIFOSIZ(30) = 0x00000000
GRXFIFOSIZ(31) = 0x00000000
GEVNTADRLO(0) = 0xfbc44000
GEVNTADRHI(0) = 0x00000000
GEVNTSIZ(0) = 0x00001000
GEVNTCOUNT(0) = 0x00000000
GHWPARAMS8 = 0x0000071e
DCFG = 0x00080804
DCTL = 0x80000000
DEVTEN = 0x00001e1f
DSTS = 0x009240b4
DGCMDPAR = 0x00000000
DGCMD = 0x00000000
DALEPENA = 0x00000003
DEPCMDPAR2(0) = 0x00000000
DEPCMDPAR2(1) = 0x00000000
DEPCMDPAR2(2) = 0x00000000
DEPCMDPAR2(3) = 0x00000000
DEPCMDPAR2(4) = 0x00000000
DEPCMDPAR2(5) = 0x00000000
DEPCMDPAR2(6) = 0x00000000
DEPCMDPAR2(7) = 0x00000000
DEPCMDPAR2(8) = 0x00000000
DEPCMDPAR2(9) = 0x00000000
DEPCMDPAR2(10) = 0x00000000
DEPCMDPAR2(11) = 0x00000000
DEPCMDPAR2(12) = 0x00000000
DEPCMDPAR2(13) = 0x00000000
DEPCMDPAR2(14) = 0x00000000
DEPCMDPAR2(15) = 0x00000000
DEPCMDPAR2(16) = 0x00000000
DEPCMDPAR2(17) = 0x00000000
DEPCMDPAR2(18) = 0x00000000
DEPCMDPAR2(19) = 0x00000000
DEPCMDPAR2(20) = 0x00000000
DEPCMDPAR2(21) = 0x00000000
DEPCMDPAR2(22) = 0x00000000
DEPCMDPAR2(23) = 0x00000000
DEPCMDPAR2(24) = 0x00000000
DEPCMDPAR2(25) = 0x00000000
DEPCMDPAR2(26) = 0x00000000
DEPCMDPAR2(27) = 0x00000000
DEPCMDPAR2(28) = 0x00000000
DEPCMDPAR2(29) = 0x00000000
DEPCMDPAR2(30) = 0x00000000
DEPCMDPAR2(31) = 0x00000000
DEPCMDPAR1(0) = 0xfbc46000
DEPCMDPAR1(1) = 0x02000500
DEPCMDPAR1(2) = 0x00000000
DEPCMDPAR1(3) = 0x00000000
DEPCMDPAR1(4) = 0x00000000
DEPCMDPAR1(5) = 0x00000000
DEPCMDPAR1(6) = 0x00000000
DEPCMDPAR1(7) = 0x00000000
DEPCMDPAR1(8) = 0x00000000
DEPCMDPAR1(9) = 0x00000000
DEPCMDPAR1(10) = 0x00000000
DEPCMDPAR1(11) = 0x00000000
DEPCMDPAR1(12) = 0x00000000
DEPCMDPAR1(13) = 0x00000000
DEPCMDPAR1(14) = 0x00000000
DEPCMDPAR1(15) = 0x00000000
DEPCMDPAR1(16) = 0x00000000
DEPCMDPAR1(17) = 0x00000000
DEPCMDPAR1(18) = 0x00000000
DEPCMDPAR1(19) = 0x00000000
DEPCMDPAR1(20) = 0x00000000
DEPCMDPAR1(21) = 0x00000000
DEPCMDPAR1(22) = 0x00000000
DEPCMDPAR1(23) = 0x00000000
DEPCMDPAR1(24) = 0x00000000
DEPCMDPAR1(25) = 0x00000000
DEPCMDPAR1(26) = 0x00000000
DEPCMDPAR1(27) = 0x00000000
DEPCMDPAR1(28) = 0x00000000
DEPCMDPAR1(29) = 0x00000000
DEPCMDPAR1(30) = 0x00000000
DEPCMDPAR1(31) = 0x00000000
DEPCMDPAR0(0) = 0x00000000
DEPCMDPAR0(1) = 0x00001000
DEPCMDPAR0(2) = 0x00000001
DEPCMDPAR0(3) = 0x00000001
DEPCMDPAR0(4) = 0x00000001
DEPCMDPAR0(5) = 0x00000001
DEPCMDPAR0(6) = 0x00000001
DEPCMDPAR0(7) = 0x00000001
DEPCMDPAR0(8) = 0x00000001
DEPCMDPAR0(9) = 0x00000001
DEPCMDPAR0(10) = 0x00000001
DEPCMDPAR0(11) = 0x00000001
DEPCMDPAR0(12) = 0x00000001
DEPCMDPAR0(13) = 0x00000001
DEPCMDPAR0(14) = 0x00000001
DEPCMDPAR0(15) = 0x00000001
DEPCMDPAR0(16) = 0x00000001
DEPCMDPAR0(17) = 0x00000001
DEPCMDPAR0(18) = 0x00000001
DEPCMDPAR0(19) = 0x00000001
DEPCMDPAR0(20) = 0x00000001
DEPCMDPAR0(21) = 0x00000001
DEPCMDPAR0(22) = 0x00000001
DEPCMDPAR0(23) = 0x00000001
DEPCMDPAR0(24) = 0x00000001
DEPCMDPAR0(25) = 0x00000001
DEPCMDPAR0(26) = 0x00000001
DEPCMDPAR0(27) = 0x00000001
DEPCMDPAR0(28) = 0x00000001
DEPCMDPAR0(29) = 0x00000001
DEPCMDPAR0(30) = 0x00000001
DEPCMDPAR0(31) = 0x00000001
DEPCMD(0) = 0x00000006
DEPCMD(1) = 0x00000001
DEPCMD(2) = 0x00030002
DEPCMD(3) = 0x00040002
DEPCMD(4) = 0x00050002
DEPCMD(5) = 0x00060002
DEPCMD(6) = 0x00070002
DEPCMD(7) = 0x00080002
DEPCMD(8) = 0x00090002
DEPCMD(9) = 0x000a0002
DEPCMD(10) = 0x000b0002
DEPCMD(11) = 0x000c0002
DEPCMD(12) = 0x000d0002
DEPCMD(13) = 0x000e0002
DEPCMD(14) = 0x000f0002
DEPCMD(15) = 0x00100002
DEPCMD(16) = 0x00110002
DEPCMD(17) = 0x00120002
DEPCMD(18) = 0x00130002
DEPCMD(19) = 0x00140002
DEPCMD(20) = 0x00150002
DEPCMD(21) = 0x00160002
DEPCMD(22) = 0x00170002
DEPCMD(23) = 0x00180002
DEPCMD(24) = 0x00190002
DEPCMD(25) = 0x001a0002
DEPCMD(26) = 0x001b0002
DEPCMD(27) = 0x001c0002
DEPCMD(28) = 0x001d0002
DEPCMD(29) = 0x001e0002
DEPCMD(30) = 0x001f0002
DEPCMD(31) = 0x00200002
OCFG = 0x00000000
OCTL = 0x00000040
OEVT = 0x80000000
OEVTEN = 0x00000000
OSTS = 0x00002019


ifconfig result

ifconfig
eth0      Link encap:Ethernet  HWaddr A4:D5:78:7E:5E:EC  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a6d5:78ff:fe7e:5eec%132112/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1145 (1.1 KiB)  TX bytes:20649 (20.1 KiB)
          Interrupt:99 

eth1      Link encap:Ethernet  HWaddr A4:D5:78:7E:5E:ED  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1%132112/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:166 errors:0 dropped:0 overruns:0 frame:0
          TX packets:166 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:12736 (12.4 KiB)  TX bytes:12736 (12.4 KiB)

usb0      Link encap:Ethernet  HWaddr C2:21:F7:06:34:84  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

but, linux host pc can't detect linux gadget usb driver.

  • Hi Kim,

    What is the output of lsmod ? Have you made sure MASS STORAGE related gadget drivers are running ?

  • Hello!

    from target
    # lsusb
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation

    # lsusb -v


    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               3.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         3
      bMaxPacketSize0         9
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0003
      bcdDevice            4.04
      iManufacturer           3 Linux 4.4.45 xhci-hcd
      iProduct                2 xHCI Host Controller
      iSerial                 1 xhci-hcd.1.auto
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength           31
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0004  1x 4 bytes
            bInterval              12
            bMaxBurst               0
    Hub Descriptor:
      bLength              12
      bDescriptorType      42
      nNbrPorts             1
      wHubCharacteristic 0x0009
        Per-port power switching
        Per-port overcurrent protection
      bPwrOn2PwrGood       10 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      bHubDecLat          0.0 micro seconds
      wHubDelay             0 nano seconds
      DeviceRemovable    0x00
     Hub Port Status:
       Port 1: 0000.02a0 5Gbps power Rx.Detect
    Binary Object Store Descriptor:
      bLength                 5
      bDescriptorType        15
      wTotalLength           15
      bNumDeviceCaps          1
      SuperSpeed USB Device Capability:
        bLength                10
        bDescriptorType        16
        bDevCapabilityType      3
        bmAttributes         0x02
          Latency Tolerance Messages (LTM) Supported
        wSpeedsSupported   0x0008
          Device can operate at SuperSpeed (5Gbps)
        bFunctionalitySupport   3
          Lowest fully-functional device speed is SuperSpeed (5Gbps)
        bU1DevExitLat           0 micro seconds
        bU2DevExitLat           0 micro seconds
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0
      bDeviceProtocol         1 Single TT
      bMaxPacketSize0        64
      idVendor           0x1d6b Linux Foundation
      idProduct          0x0002
      bcdDevice            4.04
      iManufacturer           3 Linux 4.4.45 xhci-hcd
      iProduct                2 xHCI Host Controller
      iSerial                 1 xhci-hcd.1.auto
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength           25
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0
          bInterfaceProtocol      0 Full speed (or root) hub
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0004  1x 4 bytes
            bInterval              12
    Hub Descriptor:
      bLength               9
      bDescriptorType      41
      nNbrPorts             1
      wHubCharacteristic 0x0009
        Per-port power switching
        Per-port overcurrent protection
        TT think time 8 FS bits
      bPwrOn2PwrGood       10 * 2 milli seconds
      bHubContrCurrent      0 milli Ampere
      DeviceRemovable    0x00
      PortPwrCtrlMask    0xff
     Hub Port Status:
       Port 1: 0000.0100 power
    can't get device qualifier: Resource temporarily unavailable
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0001
      Self Powered

    Thanks

  • Hi,

    I meant lsmod and corrected it. What is the USB device you are trying to configure ? When you give the uboot command, do you connect the USB cable to PC ? What happens, when you connect the USB cable after linux kernel boots up(with uboot command given)
  • Hi,

    next lsmod (device mode is not working)
    # lsmod
    Module Size Used by
    rpmsg_rpc 19412 0
    xhci_plat_hcd 5119 0
    xhci_hcd 108888 1 xhci_plat_hcd
    usbcore 193663 2 xhci_plat_hcd,xhci_hcd
    dwc3 64014 0
    virtio_rpmsg_bus 12760 1 rpmsg_rpc
    xfrm_user 22972 2
    bluetooth 324846 2
    xfrm4_tunnel 2040 0
    ipcomp 2473 0
    xfrm_ipcomp 4567 1 ipcomp
    esp4 6465 0
    ah4 5665 0
    af_key 27307 0
    xfrm_algo 6970 5 ah4,esp4,af_key,xfrm_user,xfrm_ipcomp
    ecb 1909 0
    sha512_generic 9903 0
    sha512_arm 12079 0
    sha256_generic 9503 0
    hmac 2735 0
    md5 1897 0
    sha1_generic 2621 0
    ahci_platform 3218 0
    libahci_platform 8821 1 ahci_platform
    sha1_arm_neon 6261 0
    libahci 27699 2 libahci_platform,ahci_platform
    c_can_platform 6604 0
    c_can 9590 1 c_can_platform
    sha1_arm 3862 1 sha1_arm_neon
    libata 195684 3 libahci,libahci_platform,ahci_platform
    can_dev 12225 1 c_can
    scsi_mod 129013 1 libata
    omap_aes_driver 19230 0
    omap_sham 21089 0
    omap_wdt 4570 0
    dwc3_omap 4926 0
    rtc_omap 8272 0
    omap_des 11446 0
    omap_rng 4835 0
    rng_core 7691 1 omap_rng
    omap_remoteproc 12637 4
    remoteproc 27185 3 omap_remoteproc,virtio_rpmsg_bus,rpmsg_rpc
    virtio 7452 2 remoteproc,virtio_rpmsg_bus
    virtio_ring 12291 2 remoteproc,virtio_rpmsg_bus
    sch_fq_codel 8059 3


    What is the USB device you are trying to configure ?
    > I want to use USB port as ethernet and mass storage(to access the target eMMC device through usb from host linux pc).

    When you give the uboot command, do you connect the USB cable to PC ?
    > USB cable is already connected. I didn't pug and unplug.

    What happens, when you connect the USB cable after linux kernel boots up(with uboot command given)
    > After uboot command, I unplugged the cable. And then booting the kernel, I pluged cable.
    > There's no message from /proc/kmsg and dmesg.
    > But I run modprobe g_multi <option>, next message is displayed from dmesg.
    > And device mode is working.

    [ 109.650567] udc 48890000.usb: registering UDC driver [g_multi]
    [ 109.650651] using random self ethernet address
    [ 109.655148] using random host ethernet address
    [ 109.659929] using random self ethernet address
    [ 109.664509] using random host ethernet address
    [ 109.670128] usb0: HOST MAC 9e:a7:cb:d4:af:4c
    [ 109.674756] usb0: MAC 72:dc:f5:89:be:6b
    [ 109.682166] userial_init: registered 4 ttyGS* devices
    [ 109.683954] Mass Storage Function, version: 2009/09/11
    [ 109.692420] LUN: removable file: (no medium)
    [ 109.698850] lun0: open backing file: /dev/mmcblk0
    [ 109.698866] LUN: file: /dev/mmcblk0
    [ 109.702391] Number of LUNs=1
    [ 109.705303] g_multi gadget: adding config #1 'Multifunction with RNDIS'/bf3309d4
    [ 109.705346] rndis_register: configNr = 0
    [ 109.705357] g_multi gadget: adding 'rndis'/ed447540 to config 'Multifunction with RNDIS'/bf3309d4
    [ 109.705381] rndis_set_param_medium: 0 0
    [ 109.705391] g_multi gadget: RNDIS: super speed IN/ep1in OUT/ep1out NOTIFY/ep2in
    [ 109.705406] g_multi gadget: adding 'acm'/ed9f13c0 to config 'Multifunction with RNDIS'/bf3309d4
    [ 109.705434] g_multi gadget: acm ttyGS0: super speed IN/ep3in OUT/ep2out NOTIFY/ep4in
    [ 109.705451] g_multi gadget: adding 'Mass Storage Function'/ed9e8b80 to config 'Multifunction with RNDIS'/bf3309d4
    [ 109.706283] g_multi gadget: I/O thread pid: 1157
    [ 109.706306] g_multi gadget: cfg 1/bf3309d4 speeds: super high full
    [ 109.706315] g_multi gadget: interface 0 = rndis/ed447540
    [ 109.706326] g_multi gadget: interface 1 = rndis/ed447540
    [ 109.706334] g_multi gadget: interface 2 = acm/ed9f13c0
    [ 109.706341] g_multi gadget: interface 3 = acm/ed9f13c0
    [ 109.706349] g_multi gadget: interface 4 = Mass Storage Function/ed9e8b80
    [ 109.706360] g_multi gadget: adding config #2 'Multifunction with CDC ECM'/bf330a78
    [ 109.706374] g_multi gadget: adding 'cdc_ethernet'/edbe5f00 to config 'Multifunction with CDC ECM'/bf330a78
    [ 109.706390] g_multi gadget: CDC Ethernet: super speed IN/ep1in OUT/ep1out NOTIFY/ep2in
    [ 109.706400] g_multi gadget: adding 'acm'/edbe5a80 to config 'Multifunction with CDC ECM'/bf330a78
    [ 109.706416] g_multi gadget: acm ttyGS0: super speed IN/ep3in OUT/ep2out NOTIFY/ep4in
    [ 109.706429] g_multi gadget: adding 'Mass Storage Function'/ed594980 to config 'Multifunction with CDC ECM'/bf330a78
    [ 109.706440] g_multi gadget: cfg 2/bf330a78 speeds: super high full
    [ 109.706448] g_multi gadget: interface 0 = cdc_ethernet/edbe5f00
    [ 109.706455] g_multi gadget: interface 1 = cdc_ethernet/edbe5f00
    [ 109.706462] g_multi gadget: interface 2 = acm/edbe5a80
    [ 109.706469] g_multi gadget: interface 3 = acm/edbe5a80
    [ 109.706476] g_multi gadget: interface 4 = Mass Storage Function/ed594980
    [ 109.706486] g_multi gadget: Multifunction Composite Gadget
    [ 109.712142] g_multi gadget: userspace failed to provide iSerialNumber
    [ 109.720286] g_multi gadget: g_multi ready
    [ 109.724323] g_multi 48890000.usb: usb_gadget_udc_start
    [ 109.730048] usb0: eth_open
    [ 109.730911] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
    [ 109.829025] g_multi gadget: suspend
    [ 110.191157] g_multi gadget: high-speed config #2: Multifunction with CDC ECM
    [ 110.198252] g_multi gadget: init ecm
    [ 110.198261] g_multi gadget: notify connect false
    [ 110.198276] g_multi gadget: reset acm ttyGS0
    [ 110.198283] g_multi gadget: activate acm ttyGS0
    [ 110.198302] g_multi gadget: acm ttyGS0 serial state 0000
    [ 110.198319] g_multi gadget: set_config: interface 4 (Mass Storage Function) requested delayed status
    [ 110.198325] g_multi gadget: delayed_status count 1
    [ 110.198414] g_multi gadget: usb_composite_setup_continue
    [ 110.198423] g_multi gadget: usb_composite_setup_continue: Completing delayed status
    [ 110.199122] g_multi gadget: activate ecm
    [ 110.199149] usb0: qlen 10
    [ 110.199159] g_multi gadget: ecm_open
    [ 110.199173] usb0: eth_start
    [ 110.199247] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
    [ 110.205551] g_multi gadget: packet filter 0c
    [ 110.205559] g_multi gadget: ecm req21.43 v000c i0000 l0
    [ 110.206285] g_multi gadget: acm ttyGS0 req21.20 v0000 i0002 l7
    [ 110.211075] g_multi gadget: acm ttyGS0 req21.20 v0000 i0002 l7
    [ 110.211426] g_multi gadget: acm ttyGS0 req21.22 v0003 i0002 l0
    [ 110.211968] g_multi gadget: acm ttyGS0 req21.20 v0000 i0002 l7
    [ 110.212113] g_multi gadget: acm ttyGS0 req21.22 v0002 i0002 l0
    [ 110.212186] g_multi gadget: packet filter 0e
    [ 110.212194] g_multi gadget: ecm req21.43 v000e i0000 l0
    [ 110.231835] g_multi gadget: packet filter 0c
    [ 110.231844] g_multi gadget: ecm req21.43 v000c i0000 l0
    [ 110.232019] g_multi gadget: packet filter 0e
    [ 110.232027] g_multi gadget: ecm req21.43 v000e i0000 l0
    [ 110.281371] g_multi gadget: notify connect true
    [ 110.312452] g_multi gadget: acm ttyGS0 req21.22 v0003 i0002 l0
    [ 110.313361] g_multi gadget: notify speed 425984000
    [ 110.332604] NOHZ: local_softirq_pending 08
    [ 110.413610] NOHZ: local_softirq_pending 08
    [ 110.451957] NOHZ: local_softirq_pending 08
    [ 110.490104] NOHZ: local_softirq_pending 08
    [ 110.702732] NOHZ: local_softirq_pending 08
    [ 110.809636] NOHZ: local_softirq_pending 08
    [ 110.861636] NOHZ: local_softirq_pending 08
    [ 110.953401] NOHZ: local_softirq_pending 08
    [ 111.154037] NOHZ: local_softirq_pending 08
    [ 111.210577] g_multi gadget: sending command-failure status
    [ 111.211085] g_multi gadget: bulk-in set halt
    [ 111.211308] g_multi gadget: bulk-in set halt
    [ 111.316334] g_multi gadget: bulk-in set halt
    [ 111.332400] NOHZ: local_softirq_pending 08
    [ 111.425936] g_multi gadget: bulk-in set halt
    [ 111.537130] g_multi gadget: bulk-in set halt
    [ 111.537530] g_multi gadget: bulk-in set halt
    [ 111.809771] g_multi gadget: packet filter 0e
    [ 111.809785] g_multi gadget: ecm req21.43 v000e i0000 l0
    [ 119.452724] g_multi gadget: acm ttyGS0 req21.22 v0000 i0002 l0
    [ 119.454061] g_multi gadget: acm ttyGS0 req21.22 v0003 i0002 l0
    [ 119.454144] g_multi gadget: acm ttyGS0 req21.20 v0000 i0002 l7
    [ 125.452425] g_multi gadget: acm ttyGS0 req21.22 v0000 i0002 l0
  • sorry.
    modprobe g_multi is not executed.

    next is lsmod after modprobe
    # lsmod
    Module Size Used by
    usb_f_acm 6304 1
    u_serial 10956 1 usb_f_acm
    g_multi 6438 0
    usb_f_mass_storage 41736 2 g_multi
    usb_f_rndis 21378 2 g_multi
    usb_f_ncm 13267 0
    usb_f_ecm 8418 1
    u_ether 13854 4 usb_f_ecm,usb_f_ncm,usb_f_rndis,g_multi
    libcomposite 46256 6 usb_f_acm,usb_f_ecm,usb_f_ncm,usb_f_rndis,g_multi,usb_f_mass_storage
    configfs 25246 7 usb_f_acm,usb_f_ecm,usb_f_ncm,usb_f_rndis,libcomposite,usb_f_mass_storage
    rpmsg_rpc 19412 0
    xhci_plat_hcd 5119 0
    xhci_hcd 108888 1 xhci_plat_hcd
    usbcore 193663 2 xhci_plat_hcd,xhci_hcd
    dwc3 64014 0
    virtio_rpmsg_bus 12760 1 rpmsg_rpc
    xfrm_user 22972 2
    bluetooth 324846 2
    xfrm4_tunnel 2040 0
    ipcomp 2473 0
    xfrm_ipcomp 4567 1 ipcomp
    esp4 6465 0
    ah4 5665 0
    af_key 27307 0
    xfrm_algo 6970 5 ah4,esp4,af_key,xfrm_user,xfrm_ipcomp
    ecb 1909 0
    sha512_generic 9903 0
    sha512_arm 12079 0
    sha256_generic 9503 0
    hmac 2735 0
    md5 1897 0
    sha1_generic 2621 0
    sha1_arm_neon 6261 0
    sha1_arm 3862 1 sha1_arm_neon
    c_can_platform 6604 0
    ahci_platform 3218 0
    c_can 9590 1 c_can_platform
    libahci_platform 8821 1 ahci_platform
    can_dev 12225 1 c_can
    libahci 27699 2 libahci_platform,ahci_platform
    omap_aes_driver 19230 0
    omap_sham 21089 0
    omap_wdt 4570 0
    libata 195684 3 libahci,libahci_platform,ahci_platform
    scsi_mod 129013 1 libata
    dwc3_omap 4926 0
    rtc_omap 8272 0
    omap_des 11446 0
    omap_rng 4835 0
    rng_core 7691 1 omap_rng
    omap_remoteproc 12637 4
    remoteproc 27185 3 omap_remoteproc,virtio_rpmsg_bus,rpmsg_rpc
    virtio 7452 2 remoteproc,virtio_rpmsg_bus
    virtio_ring 12291 2 remoteproc,virtio_rpmsg_bus
    sch_fq_codel 8059 4
  • I believe, if you can automate the modprobe of g_multi from scripting, I think you will be able to get it detected.
  • Hi Dwarakesh R

    Hmm. I think you misunderstand. 

    The problem was not modprobe of gadget driver.

    Even though I executed the script of modprobe, device mode of USB1 was not working.

    My meaning is that only the log of lsmod is executed without modprobe of gadget driver.

    So I just added the log of lsmod command, after gadget driver execution.

    Device mode is not working after modprobe command without the uboot command. That is problem.

  • Oh ok got it. Were you able to observe any change in USB registers, between the working case and non working case(when uboot comand is given and not given). I suspect the FCLK of USB being not set the difference.
  • Hi~

    Dwarakesh R

    regdump : not working

    cat /mnt/48890000.usb/regdump
    GSBUSCFG0 = 0x0000000e
    GSBUSCFG1 = 0x00000f00
    GTXTHRCFG = 0x00000000
    GRXTHRCFG = 0x00000000
    GCTL = 0x25802000
    GEVTEN = 0x00000000
    GSTS = 0x3e800002
    GSNPSID = 0x5533202a
    GGPIO = 0x00000000
    GUID = 0x0004042d
    GUCTL = 0x00008010
    GBUSERRADDR0 = 0x00000000
    GBUSERRADDR1 = 0x00000000
    GPRTBIMAP0 = 0x00000000
    GPRTBIMAP1 = 0x00000000
    GHWPARAMS0 = 0x202040ca
    GHWPARAMS1 = 0x01c0c93b
    GHWPARAMS2 = 0x00000000
    GHWPARAMS3 = 0x1042008d
    GHWPARAMS4 = 0x48822004
    GHWPARAMS5 = 0x04202088
    GHWPARAMS6 = 0x0b000c20
    GHWPARAMS7 = 0x03080780
    GDBGFIFOSPACE = 0x00420000
    GDBGLTSSM = 0x01090440
    GPRTBIMAP_HS0 = 0x00000000
    GPRTBIMAP_HS1 = 0x00000000
    GPRTBIMAP_FS0 = 0x00000000
    GPRTBIMAP_FS1 = 0x00000000
    GUSB2PHYCFG(0) = 0x00002500
    GUSB2PHYCFG(1) = 0x00000000
    GUSB2PHYCFG(2) = 0x00000000
    GUSB2PHYCFG(3) = 0x00000000
    GUSB2PHYCFG(4) = 0x00000000
    GUSB2PHYCFG(5) = 0x00000000
    GUSB2PHYCFG(6) = 0x00000000
    GUSB2PHYCFG(7) = 0x00000000
    GUSB2PHYCFG(8) = 0x00000000
    GUSB2PHYCFG(9) = 0x00000000
    GUSB2PHYCFG(10) = 0x00000000
    GUSB2PHYCFG(11) = 0x00000000
    GUSB2PHYCFG(12) = 0x00000000
    GUSB2PHYCFG(13) = 0x00000000
    GUSB2PHYCFG(14) = 0x00000000
    GUSB2PHYCFG(15) = 0x00000000
    GUSB2I2CCTL(0) = 0x00000000
    GUSB2I2CCTL(1) = 0x00000000
    GUSB2I2CCTL(2) = 0x00000000
    GUSB2I2CCTL(3) = 0x00000000
    GUSB2I2CCTL(4) = 0x00000000
    GUSB2I2CCTL(5) = 0x00000000
    GUSB2I2CCTL(6) = 0x00000000
    GUSB2I2CCTL(7) = 0x00000000
    GUSB2I2CCTL(8) = 0x00000000
    GUSB2I2CCTL(9) = 0x00000000
    GUSB2I2CCTL(10) = 0x00000000
    GUSB2I2CCTL(11) = 0x00000000
    GUSB2I2CCTL(12) = 0x00000000
    GUSB2I2CCTL(13) = 0x00000000
    GUSB2I2CCTL(14) = 0x00000000
    GUSB2I2CCTL(15) = 0x00000000
    GUSB2PHYACC(0) = 0x00000000
    GUSB2PHYACC(1) = 0x00000000
    GUSB2PHYACC(2) = 0x00000000
    GUSB2PHYACC(3) = 0x00000000
    GUSB2PHYACC(4) = 0x00000000
    GUSB2PHYACC(5) = 0x00000000
    GUSB2PHYACC(6) = 0x00000000
    GUSB2PHYACC(7) = 0x00000000
    GUSB2PHYACC(8) = 0x00000000
    GUSB2PHYACC(9) = 0x00000000
    GUSB2PHYACC(10) = 0x00000000
    GUSB2PHYACC(11) = 0x00000000
    GUSB2PHYACC(12) = 0x00000000
    GUSB2PHYACC(13) = 0x00000000
    GUSB2PHYACC(14) = 0x00000000
    GUSB2PHYACC(15) = 0x00000000
    GUSB3PIPECTL(0) = 0x00040002
    GUSB3PIPECTL(1) = 0x00000000
    GUSB3PIPECTL(2) = 0x00000000
    GUSB3PIPECTL(3) = 0x00000000
    GUSB3PIPECTL(4) = 0x00000000
    GUSB3PIPECTL(5) = 0x00000000
    GUSB3PIPECTL(6) = 0x00000000
    GUSB3PIPECTL(7) = 0x00000000
    GUSB3PIPECTL(8) = 0x00000000
    GUSB3PIPECTL(9) = 0x00000000
    GUSB3PIPECTL(10) = 0x00000000
    GUSB3PIPECTL(11) = 0x00000000
    GUSB3PIPECTL(12) = 0x00000000
    GUSB3PIPECTL(13) = 0x00000000
    GUSB3PIPECTL(14) = 0x00000000
    GUSB3PIPECTL(15) = 0x00000000
    GTXFIFOSIZ(0) = 0x00000042
    GTXFIFOSIZ(1) = 0x00420184
    GTXFIFOSIZ(2) = 0x01c60184
    GTXFIFOSIZ(3) = 0x034a0184
    GTXFIFOSIZ(4) = 0x04ce0184
    GTXFIFOSIZ(5) = 0x06520013
    GTXFIFOSIZ(6) = 0x06650013
    GTXFIFOSIZ(7) = 0x06780013
    GTXFIFOSIZ(8) = 0x068b0013
    GTXFIFOSIZ(9) = 0x069e0013
    GTXFIFOSIZ(10) = 0x06b10013
    GTXFIFOSIZ(11) = 0x06c40013
    GTXFIFOSIZ(12) = 0x06d70013
    GTXFIFOSIZ(13) = 0x06ea0013
    GTXFIFOSIZ(14) = 0x06fd0013
    GTXFIFOSIZ(15) = 0x07100013
    GTXFIFOSIZ(16) = 0x00000000
    GTXFIFOSIZ(17) = 0x00000000
    GTXFIFOSIZ(18) = 0x00000000
    GTXFIFOSIZ(19) = 0x00000000
    GTXFIFOSIZ(20) = 0x00000000
    GTXFIFOSIZ(21) = 0x00000000
    GTXFIFOSIZ(22) = 0x00000000
    GTXFIFOSIZ(23) = 0x00000000
    GTXFIFOSIZ(24) = 0x00000000
    GTXFIFOSIZ(25) = 0x00000000
    GTXFIFOSIZ(26) = 0x00000000
    GTXFIFOSIZ(27) = 0x00000000
    GTXFIFOSIZ(28) = 0x00000000
    GTXFIFOSIZ(29) = 0x00000000
    GTXFIFOSIZ(30) = 0x00000000
    GTXFIFOSIZ(31) = 0x00000000
    GRXFIFOSIZ(0) = 0x071e0185
    GRXFIFOSIZ(1) = 0x08a30000
    GRXFIFOSIZ(2) = 0x08a30000
    GRXFIFOSIZ(3) = 0x00000000
    GRXFIFOSIZ(4) = 0x00000000
    GRXFIFOSIZ(5) = 0x00000000
    GRXFIFOSIZ(6) = 0x00000000
    GRXFIFOSIZ(7) = 0x00000000
    GRXFIFOSIZ(8) = 0x00000000
    GRXFIFOSIZ(9) = 0x00000000
    GRXFIFOSIZ(10) = 0x00000000
    GRXFIFOSIZ(11) = 0x00000000
    GRXFIFOSIZ(12) = 0x00000000
    GRXFIFOSIZ(13) = 0x00000000
    GRXFIFOSIZ(14) = 0x00000000
    GRXFIFOSIZ(15) = 0x00000000
    GRXFIFOSIZ(16) = 0x00000000
    GRXFIFOSIZ(17) = 0x00000000
    GRXFIFOSIZ(18) = 0x00000000
    GRXFIFOSIZ(19) = 0x00000000
    GRXFIFOSIZ(20) = 0x00000000
    GRXFIFOSIZ(21) = 0x00000000
    GRXFIFOSIZ(22) = 0x00000000
    GRXFIFOSIZ(23) = 0x00000000
    GRXFIFOSIZ(24) = 0x00000000
    GRXFIFOSIZ(25) = 0x00000000
    GRXFIFOSIZ(26) = 0x00000000
    GRXFIFOSIZ(27) = 0x00000000
    GRXFIFOSIZ(28) = 0x00000000
    GRXFIFOSIZ(29) = 0x00000000
    GRXFIFOSIZ(30) = 0x00000000
    GRXFIFOSIZ(31) = 0x00000000
    GEVNTADRLO(0) = 0xfbc44000
    GEVNTADRHI(0) = 0x00000000
    GEVNTSIZ(0) = 0x00001000
    GEVNTCOUNT(0) = 0x00000000
    GHWPARAMS8 = 0x0000071e
    DCFG = 0x00080804
    DCTL = 0x80000000
    DEVTEN = 0x00001e1f
    DSTS = 0x0093ca9c
    DGCMDPAR = 0x00000000
    DGCMD = 0x00000000
    DALEPENA = 0x00000003
    DEPCMDPAR2(0) = 0x00000000
    DEPCMDPAR2(1) = 0x00000000
    DEPCMDPAR2(2) = 0x00000000
    DEPCMDPAR2(3) = 0x00000000
    DEPCMDPAR2(4) = 0x00000000
    DEPCMDPAR2(5) = 0x00000000
    DEPCMDPAR2(6) = 0x00000000
    DEPCMDPAR2(7) = 0x00000000
    DEPCMDPAR2(8) = 0x00000000
    DEPCMDPAR2(9) = 0x00000000
    DEPCMDPAR2(10) = 0x00000000
    DEPCMDPAR2(11) = 0x00000000
    DEPCMDPAR2(12) = 0x00000000
    DEPCMDPAR2(13) = 0x00000000
    DEPCMDPAR2(14) = 0x00000000
    DEPCMDPAR2(15) = 0x00000000
    DEPCMDPAR2(16) = 0x00000000
    DEPCMDPAR2(17) = 0x00000000
    DEPCMDPAR2(18) = 0x00000000
    DEPCMDPAR2(19) = 0x00000000
    DEPCMDPAR2(20) = 0x00000000
    DEPCMDPAR2(21) = 0x00000000
    DEPCMDPAR2(22) = 0x00000000
    DEPCMDPAR2(23) = 0x00000000
    DEPCMDPAR2(24) = 0x00000000
    DEPCMDPAR2(25) = 0x00000000
    DEPCMDPAR2(26) = 0x00000000
    DEPCMDPAR2(27) = 0x00000000
    DEPCMDPAR2(28) = 0x00000000
    DEPCMDPAR2(29) = 0x00000000
    DEPCMDPAR2(30) = 0x00000000
    DEPCMDPAR2(31) = 0x00000000
    DEPCMDPAR1(0) = 0xfbc46000
    DEPCMDPAR1(1) = 0x02000500
    DEPCMDPAR1(2) = 0x00000000
    DEPCMDPAR1(3) = 0x00000000
    DEPCMDPAR1(4) = 0x00000000
    DEPCMDPAR1(5) = 0x00000000
    DEPCMDPAR1(6) = 0x00000000
    DEPCMDPAR1(7) = 0x00000000
    DEPCMDPAR1(8) = 0x00000000
    DEPCMDPAR1(9) = 0x00000000
    DEPCMDPAR1(10) = 0x00000000
    DEPCMDPAR1(11) = 0x00000000
    DEPCMDPAR1(12) = 0x00000000
    DEPCMDPAR1(13) = 0x00000000
    DEPCMDPAR1(14) = 0x00000000
    DEPCMDPAR1(15) = 0x00000000
    DEPCMDPAR1(16) = 0x00000000
    DEPCMDPAR1(17) = 0x00000000
    DEPCMDPAR1(18) = 0x00000000
    DEPCMDPAR1(19) = 0x00000000
    DEPCMDPAR1(20) = 0x00000000
    DEPCMDPAR1(21) = 0x00000000
    DEPCMDPAR1(22) = 0x00000000
    DEPCMDPAR1(23) = 0x00000000
    DEPCMDPAR1(24) = 0x00000000
    DEPCMDPAR1(25) = 0x00000000
    DEPCMDPAR1(26) = 0x00000000
    DEPCMDPAR1(27) = 0x00000000
    DEPCMDPAR1(28) = 0x00000000
    DEPCMDPAR1(29) = 0x00000000
    DEPCMDPAR1(30) = 0x00000000
    DEPCMDPAR1(31) = 0x00000000
    DEPCMDPAR0(0) = 0x00000000
    DEPCMDPAR0(1) = 0x00001000
    DEPCMDPAR0(2) = 0x00000001
    DEPCMDPAR0(3) = 0x00000001
    DEPCMDPAR0(4) = 0x00000001
    DEPCMDPAR0(5) = 0x00000001
    DEPCMDPAR0(6) = 0x00000001
    DEPCMDPAR0(7) = 0x00000001
    DEPCMDPAR0(8) = 0x00000001
    DEPCMDPAR0(9) = 0x00000001
    DEPCMDPAR0(10) = 0x00000001
    DEPCMDPAR0(11) = 0x00000001
    DEPCMDPAR0(12) = 0x00000001
    DEPCMDPAR0(13) = 0x00000001
    DEPCMDPAR0(14) = 0x00000001
    DEPCMDPAR0(15) = 0x00000001
    DEPCMDPAR0(16) = 0x00000001
    DEPCMDPAR0(17) = 0x00000001
    DEPCMDPAR0(18) = 0x00000001
    DEPCMDPAR0(19) = 0x00000001
    DEPCMDPAR0(20) = 0x00000001
    DEPCMDPAR0(21) = 0x00000001
    DEPCMDPAR0(22) = 0x00000001
    DEPCMDPAR0(23) = 0x00000001
    DEPCMDPAR0(24) = 0x00000001
    DEPCMDPAR0(25) = 0x00000001
    DEPCMDPAR0(26) = 0x00000001
    DEPCMDPAR0(27) = 0x00000001
    DEPCMDPAR0(28) = 0x00000001
    DEPCMDPAR0(29) = 0x00000001
    DEPCMDPAR0(30) = 0x00000001
    DEPCMDPAR0(31) = 0x00000001
    DEPCMD(0) = 0x00000006
    DEPCMD(1) = 0x00000001
    DEPCMD(2) = 0x00030002
    DEPCMD(3) = 0x00040002
    DEPCMD(4) = 0x00050002
    DEPCMD(5) = 0x00060002
    DEPCMD(6) = 0x00070002
    DEPCMD(7) = 0x00080002
    DEPCMD(8) = 0x00090002
    DEPCMD(9) = 0x000a0002
    DEPCMD(10) = 0x000b0002
    DEPCMD(11) = 0x000c0002
    DEPCMD(12) = 0x000d0002
    DEPCMD(13) = 0x000e0002
    DEPCMD(14) = 0x000f0002
    DEPCMD(15) = 0x00100002
    DEPCMD(16) = 0x00110002
    DEPCMD(17) = 0x00120002
    DEPCMD(18) = 0x00130002
    DEPCMD(19) = 0x00140002
    DEPCMD(20) = 0x00150002
    DEPCMD(21) = 0x00160002
    DEPCMD(22) = 0x00170002
    DEPCMD(23) = 0x00180002
    DEPCMD(24) = 0x00190002
    DEPCMD(25) = 0x001a0002
    DEPCMD(26) = 0x001b0002
    DEPCMD(27) = 0x001c0002
    DEPCMD(28) = 0x001d0002
    DEPCMD(29) = 0x001e0002
    DEPCMD(30) = 0x001f0002
    DEPCMD(31) = 0x00200002
    OCFG = 0x00000000
    OCTL = 0x00000040
    OEVT = 0x80000000
    OEVTEN = 0x00000000
    OSTS = 0x00002019
    

    regdump : working

    cat /mnt/48890000.usb/regdump
    GSBUSCFG0 = 0x0000000e
    GSBUSCFG1 = 0x00000f00
    GTXTHRCFG = 0x00000000
    GRXTHRCFG = 0x00000000
    GCTL = 0x25802000
    GEVTEN = 0x00000000
    GSTS = 0x3e800002
    GSNPSID = 0x5533202a
    GGPIO = 0x00000000
    GUID = 0x0004042d
    GUCTL = 0x00008010
    GBUSERRADDR0 = 0x00000000
    GBUSERRADDR1 = 0x00000000
    GPRTBIMAP0 = 0x00000000
    GPRTBIMAP1 = 0x00000000
    GHWPARAMS0 = 0x202040ca
    GHWPARAMS1 = 0x01c0c93b
    GHWPARAMS2 = 0x00000000
    GHWPARAMS3 = 0x1042008d
    GHWPARAMS4 = 0x48822004
    GHWPARAMS5 = 0x04202088
    GHWPARAMS6 = 0x0b000c20
    GHWPARAMS7 = 0x03080780
    GDBGFIFOSPACE = 0x00420000
    GDBGLTSSM = 0x01090440
    GPRTBIMAP_HS0 = 0x00000000
    GPRTBIMAP_HS1 = 0x00000000
    GPRTBIMAP_FS0 = 0x00000000
    GPRTBIMAP_FS1 = 0x00000000
    GUSB2PHYCFG(0) = 0x00002500
    GUSB2PHYCFG(1) = 0x00000000
    GUSB2PHYCFG(2) = 0x00000000
    GUSB2PHYCFG(3) = 0x00000000
    GUSB2PHYCFG(4) = 0x00000000
    GUSB2PHYCFG(5) = 0x00000000
    GUSB2PHYCFG(6) = 0x00000000
    GUSB2PHYCFG(7) = 0x00000000
    GUSB2PHYCFG(8) = 0x00000000
    GUSB2PHYCFG(9) = 0x00000000
    GUSB2PHYCFG(10) = 0x00000000
    GUSB2PHYCFG(11) = 0x00000000
    GUSB2PHYCFG(12) = 0x00000000
    GUSB2PHYCFG(13) = 0x00000000
    GUSB2PHYCFG(14) = 0x00000000
    GUSB2PHYCFG(15) = 0x00000000
    GUSB2I2CCTL(0) = 0x00000000
    GUSB2I2CCTL(1) = 0x00000000
    GUSB2I2CCTL(2) = 0x00000000
    GUSB2I2CCTL(3) = 0x00000000
    GUSB2I2CCTL(4) = 0x00000000
    GUSB2I2CCTL(5) = 0x00000000
    GUSB2I2CCTL(6) = 0x00000000
    GUSB2I2CCTL(7) = 0x00000000
    GUSB2I2CCTL(8) = 0x00000000
    GUSB2I2CCTL(9) = 0x00000000
    GUSB2I2CCTL(10) = 0x00000000
    GUSB2I2CCTL(11) = 0x00000000
    GUSB2I2CCTL(12) = 0x00000000
    GUSB2I2CCTL(13) = 0x00000000
    GUSB2I2CCTL(14) = 0x00000000
    GUSB2I2CCTL(15) = 0x00000000
    GUSB2PHYACC(0) = 0x00000000
    GUSB2PHYACC(1) = 0x00000000
    GUSB2PHYACC(2) = 0x00000000
    GUSB2PHYACC(3) = 0x00000000
    GUSB2PHYACC(4) = 0x00000000
    GUSB2PHYACC(5) = 0x00000000
    GUSB2PHYACC(6) = 0x00000000
    GUSB2PHYACC(7) = 0x00000000
    GUSB2PHYACC(8) = 0x00000000
    GUSB2PHYACC(9) = 0x00000000
    GUSB2PHYACC(10) = 0x00000000
    GUSB2PHYACC(11) = 0x00000000
    GUSB2PHYACC(12) = 0x00000000
    GUSB2PHYACC(13) = 0x00000000
    GUSB2PHYACC(14) = 0x00000000
    GUSB2PHYACC(15) = 0x00000000
    GUSB3PIPECTL(0) = 0x00040002
    GUSB3PIPECTL(1) = 0x00000000
    GUSB3PIPECTL(2) = 0x00000000
    GUSB3PIPECTL(3) = 0x00000000
    GUSB3PIPECTL(4) = 0x00000000
    GUSB3PIPECTL(5) = 0x00000000
    GUSB3PIPECTL(6) = 0x00000000
    GUSB3PIPECTL(7) = 0x00000000
    GUSB3PIPECTL(8) = 0x00000000
    GUSB3PIPECTL(9) = 0x00000000
    GUSB3PIPECTL(10) = 0x00000000
    GUSB3PIPECTL(11) = 0x00000000
    GUSB3PIPECTL(12) = 0x00000000
    GUSB3PIPECTL(13) = 0x00000000
    GUSB3PIPECTL(14) = 0x00000000
    GUSB3PIPECTL(15) = 0x00000000
    GTXFIFOSIZ(0) = 0x00000042
    GTXFIFOSIZ(1) = 0x00420184
    GTXFIFOSIZ(2) = 0x00420004
    GTXFIFOSIZ(3) = 0x004600c4
    GTXFIFOSIZ(4) = 0x010a0004
    GTXFIFOSIZ(5) = 0x010e00c4
    GTXFIFOSIZ(6) = 0x06650013
    GTXFIFOSIZ(7) = 0x06780013
    GTXFIFOSIZ(8) = 0x068b0013
    GTXFIFOSIZ(9) = 0x069e0013
    GTXFIFOSIZ(10) = 0x06b10013
    GTXFIFOSIZ(11) = 0x06c40013
    GTXFIFOSIZ(12) = 0x06d70013
    GTXFIFOSIZ(13) = 0x06ea0013
    GTXFIFOSIZ(14) = 0x06fd0013
    GTXFIFOSIZ(15) = 0x07100013
    GTXFIFOSIZ(16) = 0x00000000
    GTXFIFOSIZ(17) = 0x00000000
    GTXFIFOSIZ(18) = 0x00000000
    GTXFIFOSIZ(19) = 0x00000000
    GTXFIFOSIZ(20) = 0x00000000
    GTXFIFOSIZ(21) = 0x00000000
    GTXFIFOSIZ(22) = 0x00000000
    GTXFIFOSIZ(23) = 0x00000000
    GTXFIFOSIZ(24) = 0x00000000
    GTXFIFOSIZ(25) = 0x00000000
    GTXFIFOSIZ(26) = 0x00000000
    GTXFIFOSIZ(27) = 0x00000000
    GTXFIFOSIZ(28) = 0x00000000
    GTXFIFOSIZ(29) = 0x00000000
    GTXFIFOSIZ(30) = 0x00000000
    GTXFIFOSIZ(31) = 0x00000000
    GRXFIFOSIZ(0) = 0x071e0185
    GRXFIFOSIZ(1) = 0x08a30000
    GRXFIFOSIZ(2) = 0x08a30000
    GRXFIFOSIZ(3) = 0x00000000
    GRXFIFOSIZ(4) = 0x00000000
    GRXFIFOSIZ(5) = 0x00000000
    GRXFIFOSIZ(6) = 0x00000000
    GRXFIFOSIZ(7) = 0x00000000
    GRXFIFOSIZ(8) = 0x00000000
    GRXFIFOSIZ(9) = 0x00000000
    GRXFIFOSIZ(10) = 0x00000000
    GRXFIFOSIZ(11) = 0x00000000
    GRXFIFOSIZ(12) = 0x00000000
    GRXFIFOSIZ(13) = 0x00000000
    GRXFIFOSIZ(14) = 0x00000000
    GRXFIFOSIZ(15) = 0x00000000
    GRXFIFOSIZ(16) = 0x00000000
    GRXFIFOSIZ(17) = 0x00000000
    GRXFIFOSIZ(18) = 0x00000000
    GRXFIFOSIZ(19) = 0x00000000
    GRXFIFOSIZ(20) = 0x00000000
    GRXFIFOSIZ(21) = 0x00000000
    GRXFIFOSIZ(22) = 0x00000000
    GRXFIFOSIZ(23) = 0x00000000
    GRXFIFOSIZ(24) = 0x00000000
    GRXFIFOSIZ(25) = 0x00000000
    GRXFIFOSIZ(26) = 0x00000000
    GRXFIFOSIZ(27) = 0x00000000
    GRXFIFOSIZ(28) = 0x00000000
    GRXFIFOSIZ(29) = 0x00000000
    GRXFIFOSIZ(30) = 0x00000000
    GRXFIFOSIZ(31) = 0x00000000
    GEVNTADRLO(0) = 0xfbc44000
    GEVNTADRHI(0) = 0x00000000
    GEVNTSIZ(0) = 0x00001000
    GEVNTCOUNT(0) = 0x00000000
    GHWPARAMS8 = 0x0000071e
    DCFG = 0x0048088c
    DCTL = 0x8c000a00
    DEVTEN = 0x00001e1f
    DSTS = 0x0082f128
    DGCMDPAR = 0x00000000
    DGCMD = 0x00000000
    DALEPENA = 0x00000aff
    DEPCMDPAR2(0) = 0x00000000
    DEPCMDPAR2(1) = 0x00000000
    DEPCMDPAR2(2) = 0x00000000
    DEPCMDPAR2(3) = 0x00000000
    DEPCMDPAR2(4) = 0x00000000
    DEPCMDPAR2(5) = 0x00000000
    DEPCMDPAR2(6) = 0x00000000
    DEPCMDPAR2(7) = 0x00000000
    DEPCMDPAR2(8) = 0x00000000
    DEPCMDPAR2(9) = 0x00000000
    DEPCMDPAR2(10) = 0x00000000
    DEPCMDPAR2(11) = 0x00000000
    DEPCMDPAR2(12) = 0x00000000
    DEPCMDPAR2(13) = 0x00000000
    DEPCMDPAR2(14) = 0x00000000
    DEPCMDPAR2(15) = 0x00000000
    DEPCMDPAR2(16) = 0x00000000
    DEPCMDPAR2(17) = 0x00000000
    DEPCMDPAR2(18) = 0x00000000
    DEPCMDPAR2(19) = 0x00000000
    DEPCMDPAR2(20) = 0x00000000
    DEPCMDPAR2(21) = 0x00000000
    DEPCMDPAR2(22) = 0x00000000
    DEPCMDPAR2(23) = 0x00000000
    DEPCMDPAR2(24) = 0x00000000
    DEPCMDPAR2(25) = 0x00000000
    DEPCMDPAR2(26) = 0x00000000
    DEPCMDPAR2(27) = 0x00000000
    DEPCMDPAR2(28) = 0x00000000
    DEPCMDPAR2(29) = 0x00000000
    DEPCMDPAR2(30) = 0x00000000
    DEPCMDPAR2(31) = 0x00000000
    DEPCMDPAR1(0) = 0xfbc46000
    DEPCMDPAR1(1) = 0xfbc46000
    DEPCMDPAR1(2) = 0xfbc48090
    DEPCMDPAR1(3) = 0x00000000
    DEPCMDPAR1(4) = 0x08000700
    DEPCMDPAR1(5) = 0xfbc58000
    DEPCMDPAR1(6) = 0xfbc4a000
    DEPCMDPAR1(7) = 0x0e000700
    DEPCMDPAR1(8) = 0x00000000
    DEPCMDPAR1(9) = 0xfbc5a000
    DEPCMDPAR1(10) = 0x00000000
    DEPCMDPAR1(11) = 0xfbc5b000
    DEPCMDPAR1(12) = 0x00000000
    DEPCMDPAR1(13) = 0x00000000
    DEPCMDPAR1(14) = 0x00000000
    DEPCMDPAR1(15) = 0x00000000
    DEPCMDPAR1(16) = 0x00000000
    DEPCMDPAR1(17) = 0x00000000
    DEPCMDPAR1(18) = 0x00000000
    DEPCMDPAR1(19) = 0x00000000
    DEPCMDPAR1(20) = 0x00000000
    DEPCMDPAR1(21) = 0x00000000
    DEPCMDPAR1(22) = 0x00000000
    DEPCMDPAR1(23) = 0x00000000
    DEPCMDPAR1(24) = 0x00000000
    DEPCMDPAR1(25) = 0x00000000
    DEPCMDPAR1(26) = 0x00000000
    DEPCMDPAR1(27) = 0x00000000
    DEPCMDPAR1(28) = 0x00000000
    DEPCMDPAR1(29) = 0x00000000
    DEPCMDPAR1(30) = 0x00000000
    DEPCMDPAR1(31) = 0x00000000
    DEPCMDPAR0(0) = 0x00000000
    DEPCMDPAR0(1) = 0x00000000
    DEPCMDPAR0(2) = 0x00000000
    DEPCMDPAR0(3) = 0x00000000
    DEPCMDPAR0(4) = 0x00001004
    DEPCMDPAR0(5) = 0x00000000
    DEPCMDPAR0(6) = 0x00000000
    DEPCMDPAR0(7) = 0x00061004
    DEPCMDPAR0(8) = 0x00000001
    DEPCMDPAR0(9) = 0x00000000
    DEPCMDPAR0(10) = 0x00000001
    DEPCMDPAR0(11) = 0x00000000
    DEPCMDPAR0(12) = 0x00000001
    DEPCMDPAR0(13) = 0x00000001
    DEPCMDPAR0(14) = 0x00000001
    DEPCMDPAR0(15) = 0x00000001
    DEPCMDPAR0(16) = 0x00000001
    DEPCMDPAR0(17) = 0x00000001
    DEPCMDPAR0(18) = 0x00000001
    DEPCMDPAR0(19) = 0x00000001
    DEPCMDPAR0(20) = 0x00000001
    DEPCMDPAR0(21) = 0x00000001
    DEPCMDPAR0(22) = 0x00000001
    DEPCMDPAR0(23) = 0x00000001
    DEPCMDPAR0(24) = 0x00000001
    DEPCMDPAR0(25) = 0x00000001
    DEPCMDPAR0(26) = 0x00000001
    DEPCMDPAR0(27) = 0x00000001
    DEPCMDPAR0(28) = 0x00000001
    DEPCMDPAR0(29) = 0x00000001
    DEPCMDPAR0(30) = 0x00000001
    DEPCMDPAR0(31) = 0x00000001
    DEPCMD(0) = 0x00000006
    DEPCMD(1) = 0x00010006
    DEPCMD(2) = 0x00020006
    DEPCMD(3) = 0x00000007
    DEPCMD(4) = 0x00000001
    DEPCMD(5) = 0x00050006
    DEPCMD(6) = 0x00060006
    DEPCMD(7) = 0x00000001
    DEPCMD(8) = 0x00090002
    DEPCMD(9) = 0x00090006
    DEPCMD(10) = 0x000b0002
    DEPCMD(11) = 0x000b0006
    DEPCMD(12) = 0x000d0002
    DEPCMD(13) = 0x000e0002
    DEPCMD(14) = 0x000f0002
    DEPCMD(15) = 0x00100002
    DEPCMD(16) = 0x00110002
    DEPCMD(17) = 0x00120002
    DEPCMD(18) = 0x00130002
    DEPCMD(19) = 0x00140002
    DEPCMD(20) = 0x00150002
    DEPCMD(21) = 0x00160002
    DEPCMD(22) = 0x00170002
    DEPCMD(23) = 0x00180002
    DEPCMD(24) = 0x00190002
    DEPCMD(25) = 0x001a0002
    DEPCMD(26) = 0x001b0002
    DEPCMD(27) = 0x001c0002
    DEPCMD(28) = 0x001d0002
    DEPCMD(29) = 0x001e0002
    DEPCMD(30) = 0x001f0002
    DEPCMD(31) = 0x00200002
    OCFG = 0x00000000
    OCTL = 0x00000040
    OEVT = 0x80000000
    OEVTEN = 0x00000000
    OSTS = 0x0000201f

    diff not working(left) : working(right)