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/AM5748: USB-C device mode with g_ether not working

Part Number: AM5748
Other Parts Discussed in Thread: TUSB320,

Tool/software: Linux

Hi,

On IDK57x, when connecting a Win7/10 PC to Micro USB port, an RNDIS interface (Ethernet over USB) is detected. Then I start ethernet gadget ("modprobe g_ether, ifconfig usb0 <ip4 address>") and communication works.

On our custom AM5748HW-based HW we have 2 identical USB-C ports. Schematics, s reviewed by TI:

In Device tree I set dr_mode = "peripheral" (or "otg", same behaviour) for both USB1 and USB2 port

I set TUSB320 to UFP mode:

i2cset -y -m 0x30 12 0x61 0xa 0x10 (TUSB320 is at I2C bus 12, slave address is 0x61)

When I connect Win7/10 PC via USB-C cable (I tried a native USB-C port and also USB-A via converter cable), TUSB320 ATTACHED_STATE reports ATTACHED_SNK.

Cable direction is also properly determined.

The problem is that the PC does not detect any USB device in the "Device Manager" dialog under Universal serial bus devices or under Network adapters.

What could be the issue here?

To make sure USB-C is working I also set dr_mode to host, set TUSB320 MODE_SELECT to DFP and attached a keyboard (TUSB320 ATTACHED_STATE reports ATTACHED_SRC). Everything is working fine: Keyboard gets power and keystrokes and seen with "cat /dev/input/by-id/usb-NOVATEK_USB_Keyboard-event-kbd"

Best regards, Chris

  • Hi Chris,

    In peripheral mode, when loaded g_ether driver and connected your board to USB host, did you probe the USB D+ pin at the spot next to AM5748 to see the pin get pulled up? If not, it looks like a hw design issue.

    I am not familiar with USB-C external circuits design, so cannot comment on your schematics, but for AM5748 USB to work in peripheral mode, VBUS has to be fed to AM5748 from the USB receptacle. If you check the design on the IDK evm, VBUS signal from the USB2 port goes to the PMIC VBUS pin, then output from a PMIC gpio pin to a AM5748 GPIO pin. The AM5748 GPIO is defined in the kernel devicetree as an extcon vbus detect source.

  • Hi,

    yes, VBUS is missing and this is why it does not work. We are checking with our TI FAE to find a solution that is working with TUSB320 (we have two USB ports and PMIC would support only one VBUS detection). This chip has a VBUS detection circuit but for interfacing it to the USB driver we need FAE's support.

    If you want we can close the issue here or wait and later add the solution.

    Regards, Chris 

  • OK, thanks Chris.
  • Hi Chris,

    we have re-opened that thread for further disussion. Here is a comment from BU:

    1. the customer needs to probe D+ for pullup near AM57x. this D+ pullup has to be propagated to the usb host port to notify the device attach, without this D+ pullup the usb host will not know the device is attached. This is the first step of the debug process.

    2. vbus from the usb host port should be fed to AM57x for usb functions. This is not a workaround, but a requirement by the USB Spec. it may not affect the D+ pullup as I asked in factor #1 with the current Processor SDK kernel, but the Linux community might change the sw in future so that the D+ pullup also depends on VBUSVALID signal.

    Please answer to 1) as this is not clear from previous post if you did that test already. 2) is more for info from our USB expert.

    Regards,

    Frank

  • Test results from customer:

    1. First test: USB2 port set in “OTG” mode
    a. Boot AM5748 to Linux prompt and load usb gadget driver. Done
    b. D+ probed when USB-C cable was connected to PC. Result: No pullup detected
    i. Measured both near contact and closer to CPU (does not really matter since there is no circuitry in the signal patch and signals has been verified to work properly)
    2. Second test: USB2 port set in “host” mode
    a. Boot AM5748 to Linux prompt
    b. D+ probed when a full-speed device was attached (usb memory stick): Result: D+ pullup detected after a few seconds
    3. Third test: USB2 port set in “host” mode
    a. Boot AM5748 to Linux prompt
    b. D- probed when a low-speed device was attached (usb mouse): Result: D- pullup detected immediately

    Again, I have a hard time understanding how AM5748 can detect that the PC has connected and pullup D+ when it due to the reasons described below do not detect VBUS when PC is attached…
  • Frank,

    Frank Walzer said:
    b. D+ probed when USB-C cable was connected to PC. Result: No pullup detected

    D+ pullup is missing, so PC won't be able to detect AM5748 USB. The D+ pullup is controlled by Linux. Please do the following on the AM5748 board to provide some software information.

    - Provide the Linux boot log (dmesg log). Please attach the log and don't copy & paste to the post, the log is too long.

    - Run the following commands on the board and provide the output.

    # ls /sys/class/udc/
    # cat /sys/class/udc/*/uevent

    Frank Walzer said:
    Again, I have a hard time understanding how AM5748 can detect that the PC has connected and pullup D+ when it due to the reasons described below do not detect VBUS when PC is attached…

    In current Linux (as of kernel v4.19), D+ pullup does not depend on VBUS for AM5748.

  • Hi,

    Thanks for the information, please see the attached logs.

    BR Jimmy

    udc.log
    root@am57xx-evm:~# ls /sys/class/udc/
    48890000.usb  488d0000.usb
    root@am57xx-evm:~# cat /sys/class/udc/*/uevent
    USB_UDC_NAME=dwc3-gadget
    USB_UDC_NAME=dwc3-gadget
    root@am57xx-evm:~#
    
    

    8371.dmesg.log
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.14.79-rt47-g28d73230da (chchlee@ubuntu) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #6 SMP PREEMPT RT Tue Feb 5 07:21:14 CET 2019
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
    [    0.000000] CPU: div instructions available: patching division code
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] OF: fdt: Machine model: CPM
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
    [    0.000000] OF: reserved mem: initialized node ipu2-memory@95800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
    [    0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000009d000000, size 32 MiB
    [    0.000000] OF: reserved mem: initialized node ipu1-memory@9d000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000009f000000, size 8 MiB
    [    0.000000] OF: reserved mem: initialized node dsp2-memory@9f000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 24 MiB at 0x00000000fd400000
    [    0.000000] OMAP4: Map 0x00000000fed00000 to fe600000 for dram barrier
    [    0.000000] On node 0 totalpages: 421120
    [    0.000000] free_area_init_node: node 0, pgdat c1058280, node_mem_map d4624000
    [    0.000000]   DMA zone: 1152 pages used for memmap
    [    0.000000]   DMA zone: 0 pages reserved
    [    0.000000]   DMA zone: 131072 pages, LIFO batch:31
    [    0.000000]   HighMem zone: 290048 pages, LIFO batch:31
    [    0.000000] DRA762 ES1.0
    [    0.000000] percpu: Embedded 15 pages/cpu @dff33000 s32096 r8192 d21152 u61440
    [    0.000000] pcpu-alloc: s32096 r8192 d21152 u61440 alloc=15*4096
    [    0.000000] pcpu-alloc: [0] 0 [0] 1 
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 419968
    [    0.000000] Kernel command line: console=ttyO7,115200n8 root=PARTUUID=bc6fb88e-02 rw rootfstype=ext4 rootwait ti_prueth.pruss1_ethtype=0 ti_prueth.pruss2_ethtype=0 ti_prueth.pruss1_port0_mc_mask=FF:FF:FF:FF:FF:FF ti_prueth.pruss2_port0_mc_mask=FF:FF:FF:FF:FF:FF
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 1464660K/1684480K available (8192K kernel code, 359K rwdata, 2532K rodata, 2048K init, 289K bss, 31404K reserved, 188416K cma-reserved, 1135616K highmem)
    [    0.000000] Virtual kernel memory layout:
                       vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                       fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                       vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
                       lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
                       pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                       modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                         .text : 0xc0008000 - 0xc0a00000   (10208 kB)
                         .init : 0xc0e00000 - 0xc1000000   (2048 kB)
                         .data : 0xc1000000 - 0xc1059ee0   ( 360 kB)
                          .bss : 0xc105b000 - 0xc10a3490   ( 290 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000] 	RCU priority boosting: priority 1 delay 500 ms.
    [    0.000000] 	No expedited grace period (rcu_normal_after_boot).
    [    0.000000] 	Tasks RCU enabled.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] GIC: Using split EOI/Deactivate mode
    [    0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [    0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns
    [    0.000004] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
    [    0.000011] Switching to timer-based delay loop, resolution 162ns
    [    0.000336] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000339] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000805] Console: colour dummy device 80x30
    [    0.000923] WARNING: Your 'console=ttyO7' has been replaced by 'ttyS7'
    [    0.000925] This ensures that you still see kernel messages. Please
    [    0.000926] update your kernel commandline.
    [    0.000942] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [    0.000949] pid_max: default: 32768 minimum: 301
    [    0.001065] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.001071] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.001692] CPU: Testing write buffer coherency: ok
    [    0.001720] CPU0: Spectre v2: using ICIALLU workaround
    [    0.001955] /cpus/cpu@0 missing clock-frequency property
    [    0.001995] /cpus/cpu@1 missing clock-frequency property
    [    0.002006] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.039920] Setting up static identity map for 0x80200000 - 0x80200060
    [    0.079910] Hierarchical SRCU implementation.
    [    0.140415] EFI services will not be available.
    [    0.160043] smp: Bringing up secondary CPUs ...
    [    0.260402] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.260405] CPU1: Spectre v2: using ICIALLU workaround
    [    0.260517] smp: Brought up 1 node, 2 CPUs
    [    0.260533] SMP: Total of 2 processors activated (24.59 BogoMIPS).
    [    0.260542] CPU: All CPU(s) started in HYP mode.
    [    0.260549] CPU: Virtualization extensions available.
    [    0.261173] devtmpfs: initialized
    [    0.292877] random: get_random_u32 called from bucket_table_alloc+0x14c/0x288 with crng_init=0
    [    0.293243] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.293493] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.293512] futex hash table entries: 512 (order: 3, 32768 bytes)
    [    0.297534] pinctrl core: initialized pinctrl subsystem
    [    0.298343] DMI not present or invalid.
    [    0.298804] NET: Registered protocol family 16
    [    0.301569] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.302493] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.505161] gpio gpiochip0: (gpio): added GPIO chardev (254:0)
    [    0.505276] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio)
    [    0.505504] OMAP GPIO hardware version 0.1
    [    0.506473] gpio gpiochip1: (gpio): added GPIO chardev (254:1)
    [    0.506576] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio)
    [    0.507572] gpio gpiochip2: (gpio): added GPIO chardev (254:2)
    [    0.507674] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio)
    [    0.508690] gpio gpiochip3: (gpio): added GPIO chardev (254:3)
    [    0.508792] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio)
    [    0.509815] gpio gpiochip4: (gpio): added GPIO chardev (254:4)
    [    0.509916] gpiochip_setup_dev: registered GPIOs 128 to 159 on device: gpiochip4 (gpio)
    [    0.511007] gpio gpiochip5: (gpio): added GPIO chardev (254:5)
    [    0.511117] gpiochip_setup_dev: registered GPIOs 160 to 191 on device: gpiochip5 (gpio)
    [    0.512134] gpio gpiochip6: (gpio): added GPIO chardev (254:6)
    [    0.512236] gpiochip_setup_dev: registered GPIOs 192 to 223 on device: gpiochip6 (gpio)
    [    0.513271] gpio gpiochip7: (gpio): added GPIO chardev (254:7)
    [    0.513373] gpiochip_setup_dev: registered GPIOs 224 to 255 on device: gpiochip7 (gpio)
    [    0.531624] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    0.531641] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    0.531664] gpiochip_find_base: found new base at 510
    [    0.531855] gpio gpiochip8: (omap-gpmc): added GPIO chardev (254:8)
    [    0.531960] gpiochip_setup_dev: registered GPIOs 510 to 511 on device: gpiochip8 (omap-gpmc)
    [    0.542908] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.542920] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.543332] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [    0.543343] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [    0.544632] OMAP DMA hardware revision 0.0
    [    0.561448] edma 43300000.edma: memcpy is disabled
    [    0.567388] edma 43300000.edma: TI EDMA DMA engine driver
    [    0.580088] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
    [    0.580922] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator-vmain[0]'
    [    0.581277] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator-v3_3d[0]'
    [    0.581360] V3_3D: supplied by 5V0_LDO
    [    0.581763] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator-vtt[0]'
    [    0.581830] vtt_fixed: supplied by V3_3D
    [    0.585893] omap-iommu 40d01000.mmu: 40d01000.mmu registered
    [    0.586356] omap-iommu 40d02000.mmu: 40d02000.mmu registered
    [    0.586906] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.587461] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.588165] omap-iommu 41501000.mmu: 41501000.mmu registered
    [    0.588630] omap-iommu 41502000.mmu: 41502000.mmu registered
    [    0.590547] usbcore: registered new interface driver usbfs
    [    0.590631] usbcore: registered new interface driver hub
    [    0.590812] usbcore: registered new device driver usb
    [    0.592097] palmas 0-0058: Irq flag is 0x00000004
    [    0.623045] palmas 0-0058: Muxing GPIO 2b, PWM 0, LED 0
    [    0.624673] SMPS12: supplied by regulator-dummy
    [    0.626432] SMPS3: supplied by 5V0_LDO
    [    0.628118] SMPS45: supplied by regulator-dummy
    [    0.630000] SMPS6: supplied by 5V0_LDO
    [    0.631750] SMPS7: supplied by 5V0_LDO
    [    0.633473] SMPS8: supplied by 5V0_LDO
    [    0.634567] SMPS9: supplied by 5V0_LDO
    [    0.635370] LDO1: supplied by 5V0_LDO
    [    0.641597] LDO2: supplied by 5V0_LDO
    [    0.651478] LDO3: supplied by 5V0_LDO
    [    0.661483] LDO4: supplied by 5V0_LDO
    [    0.662296] LDO5: supplied by regulator-dummy
    [    0.663096] LDO6: supplied by regulator-dummy
    [    0.663912] LDO7: supplied by regulator-dummy
    [    0.664720] LDO8: supplied by regulator-dummy
    [    0.665544] LDO9: supplied by 5V0_LDO
    [    0.666479] LDOLN: supplied by 5V0_LDO
    [    0.671533] LDOUSB: supplied by 5V0_LDO
    [    0.683783] gpiochip_find_base: found new base at 502
    [    0.683983] gpio gpiochip9: (48070000.i2c:tps659038@58:tps659038_gpio): added GPIO chardev (254:9)
    [    0.684102] gpiochip_setup_dev: registered GPIOs 502 to 509 on device: gpiochip9 (48070000.i2c:tps659038@58:tps659038_gpio)
    [    0.684215] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    0.684874] omap_i2c 48072000.i2c: bus 1 rev0.12 at 100 kHz
    [    0.685656] omap_i2c 48060000.i2c: bus 2 rev0.12 at 400 kHz
    [    0.686428] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 100 kHz
    [    0.687033] omap_i2c 4807c000.i2c: bus 4 rev0.12 at 100 kHz
    [    0.687312] media: Linux media interface: v0.10
    [    0.687365] Linux video capture interface: v2.00
    [    0.687500] pps_core: LinuxPPS API ver. 1 registered
    [    0.687510] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.687535] PTP clock support registered
    [    0.687578] EDAC MC: Ver: 3.0.0
    [    0.687959] dmi: Firmware registration failed.
    [    0.688529] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
    [    0.688940] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
    [    0.690606] clocksource: Switched to clocksource arch_sys_counter
    [    0.703877] NET: Registered protocol family 2
    [    0.704716] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.704768] TCP bind hash table entries: 4096 (order: 4, 114688 bytes)
    [    0.704904] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.705031] UDP hash table entries: 256 (order: 2, 16384 bytes)
    [    0.705064] UDP-Lite hash table entries: 256 (order: 2, 16384 bytes)
    [    0.705322] NET: Registered protocol family 1
    [    0.705804] RPC: Registered named UNIX socket transport module.
    [    0.705816] RPC: Registered udp transport module.
    [    0.705825] RPC: Registered tcp transport module.
    [    0.705834] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.705847] PCI: CLS 0 bytes, default 64
    [    0.707276] hw perfevents: no interrupt-affinity property for /pmu, guessing.
    [    0.707607] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    0.709454] workingset: timestamp_bits=14 max_order=19 bucket_order=5
    [    0.717415] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.718287] NFS: Registering the id_resolver key type
    [    0.718320] Key type id_resolver registered
    [    0.718330] Key type id_legacy registered
    [    0.718408] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.720360] bounce: pool size: 64 pages
    [    0.720415] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    0.720428] io scheduler noop registered
    [    0.720439] io scheduler deadline registered
    [    0.720589] io scheduler cfq registered (default)
    [    0.720672] io scheduler mq-deadline registered
    [    0.720684] io scheduler kyber registered
    [    0.728884] pinctrl-single 4a003400.pinmux: 282 pins at pa fc003400 size 1128
    [    0.813751] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.818411] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 43, base_baud = 3000000) is a 8250
    [    0.820151] 48422000.serial: ttyS7 at MMIO 0x48422000 (irq = 44, base_baud = 3000000) is a 8250
    [    1.831465] console [ttyS7] enabled
    [    1.837645] omap_rng 48090000.rng: Random Number Generator ver. 20
    [    1.845138] DSS: OMAP DSS rev 6.1
    [    1.850113] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
    [    1.878634] brd: module loaded
    [    1.893710] loop: module loaded
    [    1.903364] m25p80 spi0.0: unrecognized JEDEC id bytes: 00, 00, 00
    [    1.910507] mdio_bus fixed-0: GPIO lookup for consumer reset
    [    1.910515] mdio_bus fixed-0: using lookup tables for GPIO lookup
    [    1.910523] mdio_bus fixed-0: lookup for GPIO reset failed
    [    1.910547] libphy: Fixed MDIO Bus: probed
    [    1.917721] of_get_named_gpiod_flags: parsed 'pps-sel0-gpios' property of node '/ptp_bc[0]' - status (0)
    [    1.917793] of_get_named_gpiod_flags: parsed 'pps-sel1-gpios' property of node '/ptp_bc[0]' - status (0)
    [    1.919328] mdio_bus 48485000.mdio: GPIO lookup for consumer reset
    [    1.919336] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
    [    1.919344] mdio_bus 48485000.mdio: lookup for GPIO reset failed
    [    1.970658] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    1.978352] davinci_mdio 48485000.mdio: detected phy mask fffffffd
    [    1.987354] libphy: 48485000.mdio: probed
    [    1.991389] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
    [    2.002067] cpsw 48484000.ethernet: Detected MACID = 00:00:23:2d:ea:84
    [    2.008715] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
    [    2.015102] cpsw 48484000.ethernet: ALE Table size 1024
    [    2.021908] i2c /dev entries driver
    [    2.026818] pca954x 2-0070: GPIO lookup for consumer reset
    [    2.026826] pca954x 2-0070: using device tree for GPIO lookup
    [    2.026836] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/i2c@48060000/mux@70[0]'
    [    2.026846] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/i2c@48060000/mux@70[0]'
    [    2.026852] pca954x 2-0070: using lookup tables for GPIO lookup
    [    2.026859] pca954x 2-0070: lookup for GPIO reset failed
    [    2.051215] i2c i2c-5: of_i2c: modalias failure on /ocp/i2c@48060000/mux@70/i2c@0/sfp@50
    [    2.059348] i2c i2c-5: Failed to create I2C device for /ocp/i2c@48060000/mux@70/i2c@0/sfp@50
    [    2.068526] at24 5-0051: 8192 byte 24c64 EEPROM, writable, 32 bytes/write
    [    2.075392] i2c i2c-5: of_i2c: modalias failure on /ocp/i2c@48060000/mux@70/i2c@0/crypto1@60
    [    2.083873] i2c i2c-5: Failed to create I2C device for /ocp/i2c@48060000/mux@70/i2c@0/crypto1@60
    [    2.096106] rtc-rv8803 5-0032: char device (253:2)
    [    2.096229] rtc-rv8803 5-0032: registered as rtc2
    [    2.102390] gpiochip_find_base: found new base at 486
    [    2.102575] gpio gpiochip10: (lp3943): added GPIO chardev (254:10)
    [    2.102690] gpiochip_setup_dev: registered GPIOs 486 to 501 on device: gpiochip10 (lp3943)
    [    2.102847] i2c i2c-2: Added multiplexed i2c bus 5
    [    2.108350] i2c i2c-2: Added multiplexed i2c bus 6
    [    2.113856] i2c i2c-2: Added multiplexed i2c bus 7
    [    2.119353] i2c i2c-2: Added multiplexed i2c bus 8
    [    2.124171] pca954x 2-0070: registered 4 multiplexed busses for I2C switch pca9546
    [    2.131957] pca954x 3-0072: GPIO lookup for consumer reset
    [    2.131964] pca954x 3-0072: using device tree for GPIO lookup
    [    2.131975] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/i2c@4807a000/mux@72[0]'
    [    2.131984] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/i2c@4807a000/mux@72[0]'
    [    2.131990] pca954x 3-0072: using lookup tables for GPIO lookup
    [    2.131997] pca954x 3-0072: lookup for GPIO reset failed
    [    2.161587] i2c i2c-3: Added multiplexed i2c bus 9
    [    2.167075] i2c i2c-3: Added multiplexed i2c bus 10
    [    2.172644] i2c i2c-3: Added multiplexed i2c bus 11
    [    2.179127] at24 12-0051: 8192 byte 24c64 EEPROM, writable, 32 bytes/write
    [    2.186079] i2c i2c-12: of_i2c: modalias failure on /ocp/i2c@4807a000/mux@72/i2c@3/tusb2@61
    [    2.194473] i2c i2c-12: Failed to create I2C device for /ocp/i2c@4807a000/mux@72/i2c@3/tusb2@61
    [    2.203217] i2c i2c-12: of_i2c: modalias failure on /ocp/i2c@4807a000/mux@72/i2c@3/crypto2@61
    [    2.211784] i2c i2c-12: Failed to create I2C device for /ocp/i2c@4807a000/mux@72/i2c@3/crypto2@61
    [    2.220773] i2c i2c-3: Added multiplexed i2c bus 12
    [    2.225675] pca954x 3-0072: registered 4 multiplexed busses for I2C switch pca9545
    [    2.234412] IR NEC protocol handler initialized
    [    2.238965] IR RC5(x/sz) protocol handler initialized
    [    2.244039] IR RC6 protocol handler initialized
    [    2.248589] IR JVC protocol handler initialized
    [    2.253140] IR Sony protocol handler initialized
    [    2.257777] IR SANYO protocol handler initialized
    [    2.262502] IR Sharp protocol handler initialized
    [    2.267227] IR MCE Keyboard/mouse protocol handler initialized
    [    2.273085] IR XMP protocol handler initialized
    [    2.281070] lm75 5-0048: hwmon0: sensor 'tmp75'
    [    2.286348] lm75 5-0049: hwmon1: sensor 'tmp75'
    [    2.291618] lm75 5-004b: hwmon2: sensor 'tmp75'
    [    2.303545] sdhci: Secure Digital Host Controller Interface driver
    [    2.309755] sdhci: Copyright(c) Pierre Ossman
    [    2.315014] sdhci-pltfm: SDHCI platform and OF driver helper
    [    2.322288] sdhci-omap 4809c000.mmc: GPIO lookup for consumer cd
    [    2.322295] sdhci-omap 4809c000.mmc: using device tree for GPIO lookup
    [    2.322327] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@4809c000[0]' - status (0)
    [    2.322346] sdhci-omap 4809c000.mmc: Got CD GPIO
    [    2.326990] sdhci-omap 4809c000.mmc: GPIO lookup for consumer wp
    [    2.326997] sdhci-omap 4809c000.mmc: using device tree for GPIO lookup
    [    2.327007] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@4809c000[0]'
    [    2.327015] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@4809c000[0]'
    [    2.327022] sdhci-omap 4809c000.mmc: using lookup tables for GPIO lookup
    [    2.327029] sdhci-omap 4809c000.mmc: lookup for GPIO wp failed
    [    2.328410] sdhci-omap 4809c000.mmc: no pinctrl state for ddr_1_8v mode
    [    2.335061] sdhci-omap 4809c000.mmc: no pinctrl state for hs200_1_8v mode
    [    2.400985] mmc0: SDHCI controller on 4809c000.mmc [4809c000.mmc] using ADMA
    [    2.410738] of_get_named_gpiod_flags: parsed 'gpios' property of node '/status_leds/led-green[0]' - status (0)
    [    2.410749] no flags found for gpios
    [    2.411174] of_get_named_gpiod_flags: parsed 'gpios' property of node '/status_leds/led-yellow[0]' - status (0)
    [    2.411185] no flags found for gpios
    [    2.411592] of_get_named_gpiod_flags: parsed 'gpios' property of node '/status_leds/led-red[0]' - status (0)
    [    2.411602] no flags found for gpios
    [    2.412375] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/ocp/i2c@4807a000/mux@72/i2c@2/LED_mux[0]'
    [    2.438910] lp5569x 11-0032: lp5569 Programmable led chip found
    [    2.454797] NET: Registered protocol family 10
    [    2.460385] Segment Routing with IPv6
    [    2.464156] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    2.470865] NET: Registered protocol family 17
    [    2.475793] Key type dns_resolver registered
    [    2.480316] omap_voltage_late_init: Voltage driver support not added
    [    2.486700] Power Management for TI OMAP4+ devices.
    [    2.491943] Registering SWP/SWPB emulation handler
    [    2.513845] mmc0: new high speed SDHC card at address aaaa
    [    2.519917] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
    [    2.529064]  mmcblk0: p1 p2
    [    2.537273] dmm 4e000000.dmm: workaround for errata i878 in use
    [    2.545728] dmm 4e000000.dmm: initialized all PAT entries
    [    2.552728] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    2.559373] [drm] No driver support for vblank timestamp query.
    [    2.566443] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on minor 0
    [    2.575191] mdio_bus 48485000.mdio: GPIO lookup for consumer reset
    [    2.575199] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
    [    2.575207] mdio_bus 48485000.mdio: lookup for GPIO reset failed
    [    2.630657] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    2.638351] davinci_mdio 48485000.mdio: detected phy mask fffffffd
    [    2.646802] libphy: 48485000.mdio: probed
    [    2.650835] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
    [    2.661539] cpsw 48484000.ethernet: Detected MACID = 00:00:23:2d:ea:84
    [    2.668190] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
    [    2.674576] cpsw 48484000.ethernet: ALE Table size 1024
    [    2.680456] of_get_named_gpiod_flags: parsed 'pps-enable-gpios' property of node '/ocp/ethernet@48484000[0]' - status (0)
    [    2.680518] of_get_named_gpiod_flags: can't parse 'ref-enable-gpios' property of node '/ocp/ethernet@48484000[0]'
    [    2.680563] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
    [    2.692520] rtc-rv8803 5-0032: setting system clock to 2019-05-07 06:59:06 UTC (1557212346)
    [    2.784616] EXT4-fs (mmcblk0p2): warning: mounting fs with errors, running e2fsck is recommended
    [    2.800539] EXT4-fs (mmcblk0p2): recovery complete
    [    2.807830] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    2.816017] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    2.831628] devtmpfs: mounted
    [    2.837608] Freeing unused kernel memory: 2048K
    [    3.248895] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN default-hierarchy=hybrid)
    [    3.270349] systemd[1]: Detected architecture arm.
    [    3.313530] systemd[1]: Set hostname to <am57xx-evm>.
    [    3.727152] random: systemd: uninitialized urandom read (16 bytes read)
    [    3.734155] systemd[1]: Listening on Journal Socket.
    [    3.770837] random: systemd: uninitialized urandom read (16 bytes read)
    [    3.777636] systemd[1]: Listening on Syslog Socket.
    [    3.810969] random: systemd: uninitialized urandom read (16 bytes read)
    [    3.817741] systemd[1]: Listening on Network Service Netlink Socket.
    [    3.864381] systemd[1]: Created slice System Slice.
    [    3.902983] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [    3.942534] systemd[1]: Created slice system-getty.slice.
    [    3.976328] systemd[1]: Mounting Kernel Debug File System...
    [    4.359506] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [    4.559885] usbcore: registered new interface driver usbserial
    [    4.577440] usbcore: registered new interface driver ftdi_sio
    [    4.585173] usbserial: USB Serial support registered for FTDI USB Serial Device
    [    5.171890] systemd-journald[123]: Received request to flush runtime journal from PID 1
    [    7.588812] omap-des 480a5000.des: OMAP DES hw accel rev: 2.2
    [    7.603017] omap-des 480a5000.des: will run requests pump with realtime priority
    [    8.217920] CAN device driver interface
    [    8.332144] c_can_platform 4ae3c000.can: c_can_platform device registered (regs=fce3c000, irq=90)
    [    8.422590] c_can_platform 48480000.can: c_can_platform device registered (regs=fa480000, irq=91)
    [    8.794353] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
    [    8.847588] vpe 489d0000.vpe: Device registered as /dev/video0
    [    9.821574] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    9.929107] omap-sham 4b101000.sham: hw accel on OMAP rev 4.3
    [   10.097413] omap-aes 4b500000.aes: OMAP AES hw accel rev: 3.3
    [   10.141076] omap-aes 4b500000.aes: will run requests pump with realtime priority
    [   10.335346] omap-aes 4b700000.aes: OMAP AES hw accel rev: 3.3
    [   10.351570] net eth0: initializing cpsw version 1.15 (0)
    [   10.363081] omap-aes 4b700000.aes: will run requests pump with realtime priority
    [   10.511974] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=POLL)
    [   10.590109] pruss 4b200000.pruss: creating PRU cores and other child platform devices
    [   10.645218] pps pps0: new PPS source ptp0
    [   10.649271] cpts ptp bc clkid 0
    [   10.676320] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   10.789494] mdio_bus 4b232400.mdio: GPIO lookup for consumer reset
    [   10.789505] mdio_bus 4b232400.mdio: using device tree for GPIO lookup
    [   10.789519] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/pruss_soc_bus@4b226004/pruss@0/mdio@32400[0]'
    [   10.789529] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/pruss_soc_bus@4b226004/pruss@0/mdio@32400[0]'
    [   10.789536] mdio_bus 4b232400.mdio: using lookup tables for GPIO lookup
    [   10.789545] mdio_bus 4b232400.mdio: lookup for GPIO reset failed
    [   10.840743] davinci_mdio 4b232400.mdio: davinci mdio revision 1.6, bus freq 1000000
    [   10.848444] libphy: 4b232400.mdio: probed
    [   10.943024] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [   11.099055] davinci_mdio 4b232400.mdio: phy[1]: device 4b232400.mdio:01, driver TI DP83822 10/100 Mbps PHY
    [   11.150696] davinci_mdio 4b232400.mdio: phy[2]: device 4b232400.mdio:02, driver TI DP83822 10/100 Mbps PHY
    [   11.235267] pruss 4b280000.pruss: creating PRU cores and other child platform devices
    [   11.351619] mdio_bus 4b2b2400.mdio: GPIO lookup for consumer reset
    [   11.351631] mdio_bus 4b2b2400.mdio: using device tree for GPIO lookup
    [   11.355571] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/pruss_soc_bus@4b2a6004/pruss@0/mdio@32400[0]'
    [   11.355584] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/pruss_soc_bus@4b2a6004/pruss@0/mdio@32400[0]'
    [   11.355593] mdio_bus 4b2b2400.mdio: using lookup tables for GPIO lookup
    [   11.355602] mdio_bus 4b2b2400.mdio: lookup for GPIO reset failed
    [   11.411041] davinci_mdio 4b2b2400.mdio: davinci mdio revision 1.6, bus freq 1000000
    [   11.418743] libphy: 4b2b2400.mdio: probed
    [   11.543195] davinci_mdio 4b2b2400.mdio: phy[3]: device 4b2b2400.mdio:03, driver TI DP83822 10/100 Mbps PHY
    [   11.572233] davinci_mdio 4b2b2400.mdio: phy[4]: device 4b2b2400.mdio:04, driver TI DP83822 10/100 Mbps PHY
    [   11.662765] remoteproc remoteproc0: 4b234000.pru is available
    [   11.668749] pru-rproc 4b234000.pru: PRU rproc node /ocp/pruss_soc_bus@4b226004/pruss@0/pru@34000 probed successfully
    [   11.767527] remoteproc remoteproc1: 4b238000.pru is available
    [   11.809392] pru-rproc 4b238000.pru: PRU rproc node /ocp/pruss_soc_bus@4b226004/pruss@0/pru@38000 probed successfully
    [   11.865145] remoteproc remoteproc2: 4b2b4000.pru is available
    [   11.905560] pru-rproc 4b2b4000.pru: PRU rproc node /ocp/pruss_soc_bus@4b2a6004/pruss@0/pru@34000 probed successfully
    [   11.980428] remoteproc remoteproc3: 4b2b8000.pru is available
    [   12.017488] pru-rproc 4b2b8000.pru: PRU rproc node /ocp/pruss_soc_bus@4b2a6004/pruss@0/pru@38000 probed successfully
    [   12.318163] prueth pruss2_eth: pruss_fw_drop_untagged_vlan 0
    [   12.349235] prueth pruss2_eth: pruss MC Mask (Port 0) ff:ff:ff:ff:ff:ff
    [   12.378847] prueth pruss2_eth: pruss MC Mask (Port 1) ff:ff:ff:ff:ff:ff
    [   12.600755] prueth pruss2_eth: TI PRU ethernet (type 0) driver initialized
    [   12.915708] prueth pruss1_eth: pruss_fw_drop_untagged_vlan 0
    [   12.921407] prueth pruss1_eth: pruss MC Mask (Port 0) ff:ff:ff:ff:ff:ff
    [   12.928055] prueth pruss1_eth: pruss MC Mask (Port 1) ff:ff:ff:ff:ff:ff
    [   13.166925] prueth pruss1_eth: TI PRU ethernet (type 0) driver initialized
    [   15.327757] dwc3 48890000.usb: changing max_speed on rev 5533202a
    [   15.880125] pps pps1: new PPS source ptp1
    [   15.884176] iep ptp bc clkid 1
    [   15.887292] remoteproc remoteproc2: powering up 4b2b4000.pru
    [   15.911087] remoteproc remoteproc2: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 5028
    [   15.942050] pruss 4b280000.pruss: configured system_events[63-0] = 0x00000600.00500000
    [   15.971054] pruss 4b280000.pruss: configured intr_channels = 0x00000095 host_intr = 0x00000115
    [   16.004604] remoteproc remoteproc2: remote processor 4b2b4000.pru is now up
    [   16.028597] net eth1: started
    [   16.037599] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [   16.092773] remoteproc remoteproc3: powering up 4b2b8000.pru
    [   16.115785] remoteproc remoteproc3: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 5060
    [   16.136177] pruss 4b280000.pruss: configured system_events[63-0] = 0x00600000.00a00000
    [   16.158149] pruss 4b280000.pruss: configured intr_channels = 0x0000012a host_intr = 0x0000022a
    [   16.177729] remoteproc remoteproc3: remote processor 4b2b8000.pru is now up
    [   16.204782] net eth2: started
    [   16.213242] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
    [   16.315578] pps pps2: new PPS source ptp2
    [   16.319635] iep ptp bc clkid 2
    [   16.329404] remoteproc remoteproc1: powering up 4b238000.pru
    [   16.337657] remoteproc remoteproc1: Booting fw image ti-pruss/am57xx-pru1-prueth-fw.elf, size 5060
    [   16.359409] pruss 4b200000.pruss: configured system_events[63-0] = 0x00600000.00a00000
    [   16.382459] pruss 4b200000.pruss: configured intr_channels = 0x0000012a host_intr = 0x0000022a
    [   16.411868] remoteproc remoteproc1: remote processor 4b238000.pru is now up
    [   16.428944] net eth4: started
    [   16.436115] IPv6: ADDRCONF(NETDEV_UP): eth4: link is not ready
    [   16.472783] remoteproc remoteproc0: powering up 4b234000.pru
    [   16.478589] remoteproc remoteproc0: Booting fw image ti-pruss/am57xx-pru0-prueth-fw.elf, size 5028
    [   16.498362] pruss 4b200000.pruss: configured system_events[63-0] = 0x00000600.00500000
    [   16.529137] pruss 4b200000.pruss: configured intr_channels = 0x00000095 host_intr = 0x00000115
    [   16.548995] remoteproc remoteproc0: remote processor 4b234000.pru is now up
    [   16.563558] net eth3: started
    [   16.573219] IPv6: ADDRCONF(NETDEV_UP): eth3: link is not ready
    [   17.989827] prueth pruss1_eth eth4: Link is Up - 100Mbps/Full - flow control rx/tx
    [   17.998888] IPv6: ADDRCONF(NETDEV_CHANGE): eth4: link becomes ready
    [   18.158017] prueth pruss1_eth eth3: Link is Up - 100Mbps/Full - flow control rx/tx
    [   18.167049] IPv6: ADDRCONF(NETDEV_CHANGE): eth3: link becomes ready
    [   24.089398] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   24.097433] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [   26.328473] cpsw 48484000.ethernet eth0: Link is Down
    [   37.769344] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   40.008331] cpsw 48484000.ethernet eth0: Link is Down
    [   47.289335] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   49.368334] cpsw 48484000.ethernet eth0: Link is Down
    [   51.449397] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   53.688416] cpsw 48484000.ethernet eth0: Link is Down
    [   55.769338] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   58.888349] cpsw 48484000.ethernet eth0: Link is Down
    [   76.569396] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   80.728429] cpsw 48484000.ethernet eth0: Link is Down
    [   82.809396] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   86.088475] cpsw 48484000.ethernet eth0: Link is Down
    [   93.369395] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   95.448326] cpsw 48484000.ethernet eth0: Link is Down
    [   97.529396] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [   99.608323] cpsw 48484000.ethernet eth0: Link is Down
    [  101.689397] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [  134.702853] NET: Registered protocol family 15
    [  134.883310] Initializing XFRM netlink socket
    

  • Hi Jimmy,

    Did you load the g_ether driver? Both logs show there is no usb gadget driver is loaded. The D+ pullup will be enabled only after a gadget driver is loaded to the corresponding usb controller.

    Please note that since you configured both usb ports in otg mode, you have to load two different gadget drivers, Linux doesn't allow to load the same gadget driver twice for two usb controllers.
  • Hi,

    We had the gadget loaded during the tests described above. For the logs we had missed to load the gadget, please see updated log-file attached.

    udc_2.log
    root@am57xx-evm:~# modprobe g_ether
    [   67.024534] using random self ethernet address
    [   67.029047] using random host ethernet address
    [   67.049100] usb0: HOST MAC 5e:8b:cd:8e:12:9b
    [   67.059817] usb0: MAC 1e:a6:23:f7:16:2b
    [   67.066188] using random self ethernet address
    [   67.079203] using random host ethernet address
    [   67.089735] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    [   67.101894] g_ether gadget: g_ether ready
    root@am57xx-evm:~#
    root@am57xx-evm:~# ls /sys/class/udc/
    48890000.usb  488d0000.usb
    root@am57xx-evm:~# cat /sys/class/udc/*/uevent
    DRIVER=g_ether
    USB_UDC_NAME=dwc3-gadget
    USB_UDC_DRIVER=g_ether
    USB_UDC_NAME=dwc3-gadget
    root@am57xx-evm:~#
    
    

    BR Jimmy

  • Jimmy,

    You only loaded one gadget driver - g_ether, which only enables USB1, but not USB2.
    As mentioned in my previous post, you need to load *two* different gadget drivers to make both otg port functional.
  • Hi,

    To clarify:
    - You did mean to load g_ether for USB1 and another (random?) gadget driver to USB2, right?

    Does that mean that we can't use both ports as RNDIS?
    Or will it work anyway as long a we load something on USB2?

    Regards,
    Peter (colleague to Jimmy)
  • Hi Peter,

    Based on the information in the initial post, you were checking the enumeration of USB2 on a Windows PC, so I meant to load another gadget driver to USB1 and load g_ether.ko to USB2.

    You cannot use both ports as RNDIS with the legacy gadget driver g_ether.ko, because Linux doesn't allow to load the same gadget driver twice. However, you can still achieve the goal with usb gadget configfs. This is a question for later, for now please check the USB2 D+ pullup I requested, to make progress on the USB2 enumeration issue you initial reported.
  • Hi,

    We have re-run the tests with two different gadgets loaded (see attached logfile) with similar results, not PU detected on D+ line when PC is connected (verified that VBUS signal goes high).Please advice on next step.

    BR Jimmy

    udc_3.log
    # cat /sys/class/udc/*/uevent
    DRIVER=g_serial
    USB_UDC_NAME=dwc3-gadget
    USB_UDC_DRIVER=g_serial
    DRIVER=g_ether
    USB_UDC_NAME=dwc3-gadget
    USB_UDC_DRIVER=g_ether
    
    

  • Jimmy,

    Is the D+ statically low to zero? or there are waves on D+ in hundreds of mV level?
    If not connect the USB2 port to the PC, does D+ go high after loaded the gadget driver?
    Please provide the usb register dump before and after loaded the gadget drivers.
    For USB1:
    # cat /sys/kernel/debug/48890000.usb/regdump
    For USB2:
    # cat /sys/kernel/debug/488d0000.usb/regdump
  • Hi,

    Yes the D+ is statically zero when gadget driver is loaded, it never goes to 1, if PC is not connected. Only visible action when PC is connected is that D- goes to zero from a fe 100 mV where it seems to be floating before connection.

    Logs:

    BR Jimmy

    regdump.txt
    root@am57xx-evm:~# modprobe g_serial
    [ 1979.629056] g_serial gadget: Gadget Serial v2.4
    [ 1979.640959] g_serial gadget: g_serial ready
    root@am57xx-evm:~# modprobe g_ether
    [ 1982.918701] using random self ethernet address
    [ 1982.924873] using random host ethernet address
    [ 1982.937544] usb0: HOST MAC 76:ec:c8:58:fc:d8
    [ 1982.943946] usb0: MAC 2a:ea:7b:47:7a:7e
    [ 1982.947829] using random self ethernet address
    [ 1982.957070] using random host ethernet address
    [ 1982.962994] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    [ 1982.969648] g_ether gadget: g_ether ready
    
    
    root@am57xx-evm:~# cat /sys/class/udc/*/uevent
    DRIVER=g_serial
    USB_UDC_NAME=dwc3-gadget
    USB_UDC_DRIVER=g_serial
    DRIVER=g_ether
    USB_UDC_NAME=dwc3-gadget
    USB_UDC_DRIVER=g_ether
    
    
    
    
    root@am57xx-evm:~# cat /sys/kernel/debug/48890000.usb/regdump
    GSBUSCFG0 = 0x0000000e
    GSBUSCFG1 = 0x00000f00
    GTXTHRCFG = 0x00000000
    GRXTHRCFG = 0x00000000
    GCTL = 0x25803000
    GEVTEN = 0x00000000
    GSTS = 0x3e800002
    GUCTL1 = 0x00000000
    GSNPSID = 0x5533202a
    GGPIO = 0x00000000
    GUID = 0x00040e4f
    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) = 0xfd443000
    GEVNTADRHI(0) = 0x00000000
    GEVNTSIZ(0) = 0x00001000
    GEVNTCOUNT(0) = 0x00000000
    GHWPARAMS8 = 0x0000071e
    DCFG = 0x000c0804
    DCTL = 0x80000000
    DEVTEN = 0x00001e1f
    DSTS = 0x0093d774
    DGCMDPAR = 0x00000000
    DGCMD = 0x00000000
    DALEPENA = 0x00000003
    DEPCMDPAR2(0) = 0x00000000
    DEPCMDPAR1(0) = 0xfd444000
    DEPCMDPAR0(0) = 0x00000000
    DEPCMD(0) = 0x00000006
    DEPCMDPAR2(1) = 0x00000000
    DEPCMDPAR1(1) = 0x02000500
    DEPCMDPAR0(1) = 0x00001000
    DEPCMD(1) = 0x00000001
    DEPCMDPAR2(2) = 0x00000000
    DEPCMDPAR1(2) = 0x00000000
    DEPCMDPAR0(2) = 0x00000001
    DEPCMD(2) = 0x00030002
    DEPCMDPAR2(3) = 0x00000000
    DEPCMDPAR1(3) = 0x00000000
    DEPCMDPAR0(3) = 0x00000001
    DEPCMD(3) = 0x00040002
    DEPCMDPAR2(4) = 0x00000000
    DEPCMDPAR1(4) = 0x00000000
    DEPCMDPAR0(4) = 0x00000001
    DEPCMD(4) = 0x00050002
    DEPCMDPAR2(5) = 0x00000000
    DEPCMDPAR1(5) = 0x00000000
    DEPCMDPAR0(5) = 0x00000001
    DEPCMD(5) = 0x00060002
    DEPCMDPAR2(6) = 0x00000000
    DEPCMDPAR1(6) = 0x00000000
    DEPCMDPAR0(6) = 0x00000001
    DEPCMD(6) = 0x00070002
    DEPCMDPAR2(7) = 0x00000000
    DEPCMDPAR1(7) = 0x00000000
    DEPCMDPAR0(7) = 0x00000001
    DEPCMD(7) = 0x00080002
    DEPCMDPAR2(8) = 0x00000000
    DEPCMDPAR1(8) = 0x00000000
    DEPCMDPAR0(8) = 0x00000001
    DEPCMD(8) = 0x00090002
    DEPCMDPAR2(9) = 0x00000000
    DEPCMDPAR1(9) = 0x00000000
    DEPCMDPAR0(9) = 0x00000001
    DEPCMD(9) = 0x000a0002
    DEPCMDPAR2(10) = 0x00000000
    DEPCMDPAR1(10) = 0x00000000
    DEPCMDPAR0(10) = 0x00000001
    DEPCMD(10) = 0x000b0002
    DEPCMDPAR2(11) = 0x00000000
    DEPCMDPAR1(11) = 0x00000000
    DEPCMDPAR0(11) = 0x00000001
    DEPCMD(11) = 0x000c0002
    DEPCMDPAR2(12) = 0x00000000
    DEPCMDPAR1(12) = 0x00000000
    DEPCMDPAR0(12) = 0x00000001
    DEPCMD(12) = 0x000d0002
    DEPCMDPAR2(13) = 0x00000000
    DEPCMDPAR1(13) = 0x00000000
    DEPCMDPAR0(13) = 0x00000001
    DEPCMD(13) = 0x000e0002
    DEPCMDPAR2(14) = 0x00000000
    DEPCMDPAR1(14) = 0x00000000
    DEPCMDPAR0(14) = 0x00000001
    DEPCMD(14) = 0x000f0002
    DEPCMDPAR2(15) = 0x00000000
    DEPCMDPAR1(15) = 0x00000000
    DEPCMDPAR0(15) = 0x00000001
    DEPCMD(15) = 0x00100002
    DEPCMDPAR2(16) = 0x00000000
    DEPCMDPAR1(16) = 0x00000000
    DEPCMDPAR0(16) = 0x00000001
    DEPCMD(16) = 0x00110002
    DEPCMDPAR2(17) = 0x00000000
    DEPCMDPAR1(17) = 0x00000000
    DEPCMDPAR0(17) = 0x00000001
    DEPCMD(17) = 0x00120002
    DEPCMDPAR2(18) = 0x00000000
    DEPCMDPAR1(18) = 0x00000000
    DEPCMDPAR0(18) = 0x00000001
    DEPCMD(18) = 0x00130002
    DEPCMDPAR2(19) = 0x00000000
    DEPCMDPAR1(19) = 0x00000000
    DEPCMDPAR0(19) = 0x00000001
    DEPCMD(19) = 0x00140002
    DEPCMDPAR2(20) = 0x00000000
    DEPCMDPAR1(20) = 0x00000000
    DEPCMDPAR0(20) = 0x00000001
    DEPCMD(20) = 0x00150002
    DEPCMDPAR2(21) = 0x00000000
    DEPCMDPAR1(21) = 0x00000000
    DEPCMDPAR0(21) = 0x00000001
    DEPCMD(21) = 0x00160002
    DEPCMDPAR2(22) = 0x00000000
    DEPCMDPAR1(22) = 0x00000000
    DEPCMDPAR0(22) = 0x00000001
    DEPCMD(22) = 0x00170002
    DEPCMDPAR2(23) = 0x00000000
    DEPCMDPAR1(23) = 0x00000000
    DEPCMDPAR0(23) = 0x00000001
    DEPCMD(23) = 0x00180002
    DEPCMDPAR2(24) = 0x00000000
    DEPCMDPAR1(24) = 0x00000000
    DEPCMDPAR0(24) = 0x00000001
    DEPCMD(24) = 0x00190002
    DEPCMDPAR2(25) = 0x00000000
    DEPCMDPAR1(25) = 0x00000000
    DEPCMDPAR0(25) = 0x00000001
    DEPCMD(25) = 0x001a0002
    DEPCMDPAR2(26) = 0x00000000
    DEPCMDPAR1(26) = 0x00000000
    DEPCMDPAR0(26) = 0x00000001
    DEPCMD(26) = 0x001b0002
    DEPCMDPAR2(27) = 0x00000000
    DEPCMDPAR1(27) = 0x00000000
    DEPCMDPAR0(27) = 0x00000001
    DEPCMD(27) = 0x001c0002
    DEPCMDPAR2(28) = 0x00000000
    DEPCMDPAR1(28) = 0x00000000
    DEPCMDPAR0(28) = 0x00000001
    DEPCMD(28) = 0x001d0002
    DEPCMDPAR2(29) = 0x00000000
    DEPCMDPAR1(29) = 0x00000000
    DEPCMDPAR0(29) = 0x00000001
    DEPCMD(29) = 0x001e0002
    DEPCMDPAR2(30) = 0x00000000
    DEPCMDPAR1(30) = 0x00000000
    DEPCMDPAR0(30) = 0x00000001
    DEPCMD(30) = 0x001f0002
    DEPCMDPAR2(31) = 0x00000000
    DEPCMDPAR1(31) = 0x00000000
    DEPCMDPAR0(31) = 0x00000001
    DEPCMD(31) = 0x00200002
    OCFG = 0x00000008
    OCTL = 0x00000040
    OEVT = 0x80000000
    OEVTEN = 0x0fff0f00
    OSTS = 0x00002819
    
    
    
    
    root@am57xx-evm:~# cat /sys/kernel/debug/488d0000.usb/regdump
    GSBUSCFG0 = 0x0000000e
    GSBUSCFG1 = 0x00000f00
    GTXTHRCFG = 0x00000000
    GRXTHRCFG = 0x00000000
    GCTL = 0x25803000
    GEVTEN = 0x00000000
    GSTS = 0x3e800002
    GUCTL1 = 0x00000000
    GSNPSID = 0x5533202a
    GGPIO = 0x00000000
    GUID = 0x00040e4f
    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) = 0xfd470000
    GEVNTADRHI(0) = 0x00000000
    GEVNTSIZ(0) = 0x00001000
    GEVNTCOUNT(0) = 0x00000000
    GHWPARAMS8 = 0x0000071e
    DCFG = 0x000c0800
    DCTL = 0x80000000
    DEVTEN = 0x00001e1f
    DSTS = 0x00920001
    DGCMDPAR = 0x00000000
    DGCMD = 0x00000000
    DALEPENA = 0x00000003
    DEPCMDPAR2(0) = 0x00000000
    DEPCMDPAR1(0) = 0xfd475000
    DEPCMDPAR0(0) = 0x00000000
    DEPCMD(0) = 0x00000006
    DEPCMDPAR2(1) = 0x00000000
    DEPCMDPAR1(1) = 0x02000500
    DEPCMDPAR0(1) = 0x00001000
    DEPCMD(1) = 0x00000001
    DEPCMDPAR2(2) = 0x00000000
    DEPCMDPAR1(2) = 0x00000000
    DEPCMDPAR0(2) = 0x00000001
    DEPCMD(2) = 0x00030002
    DEPCMDPAR2(3) = 0x00000000
    DEPCMDPAR1(3) = 0x00000000
    DEPCMDPAR0(3) = 0x00000001
    DEPCMD(3) = 0x00040002
    DEPCMDPAR2(4) = 0x00000000
    DEPCMDPAR1(4) = 0x00000000
    DEPCMDPAR0(4) = 0x00000001
    DEPCMD(4) = 0x00050002
    DEPCMDPAR2(5) = 0x00000000
    DEPCMDPAR1(5) = 0x00000000
    DEPCMDPAR0(5) = 0x00000001
    DEPCMD(5) = 0x00060002
    DEPCMDPAR2(6) = 0x00000000
    DEPCMDPAR1(6) = 0x00000000
    DEPCMDPAR0(6) = 0x00000001
    DEPCMD(6) = 0x00070002
    DEPCMDPAR2(7) = 0x00000000
    DEPCMDPAR1(7) = 0x00000000
    DEPCMDPAR0(7) = 0x00000001
    DEPCMD(7) = 0x00080002
    DEPCMDPAR2(8) = 0x00000000
    DEPCMDPAR1(8) = 0x00000000
    DEPCMDPAR0(8) = 0x00000001
    DEPCMD(8) = 0x00090002
    DEPCMDPAR2(9) = 0x00000000
    DEPCMDPAR1(9) = 0x00000000
    DEPCMDPAR0(9) = 0x00000001
    DEPCMD(9) = 0x000a0002
    DEPCMDPAR2(10) = 0x00000000
    DEPCMDPAR1(10) = 0x00000000
    DEPCMDPAR0(10) = 0x00000001
    DEPCMD(10) = 0x000b0002
    DEPCMDPAR2(11) = 0x00000000
    DEPCMDPAR1(11) = 0x00000000
    DEPCMDPAR0(11) = 0x00000001
    DEPCMD(11) = 0x000c0002
    DEPCMDPAR2(12) = 0x00000000
    DEPCMDPAR1(12) = 0x00000000
    DEPCMDPAR0(12) = 0x00000001
    DEPCMD(12) = 0x000d0002
    DEPCMDPAR2(13) = 0x00000000
    DEPCMDPAR1(13) = 0x00000000
    DEPCMDPAR0(13) = 0x00000001
    DEPCMD(13) = 0x000e0002
    DEPCMDPAR2(14) = 0x00000000
    DEPCMDPAR1(14) = 0x00000000
    DEPCMDPAR0(14) = 0x00000001
    DEPCMD(14) = 0x000f0002
    DEPCMDPAR2(15) = 0x00000000
    DEPCMDPAR1(15) = 0x00000000
    DEPCMDPAR0(15) = 0x00000001
    DEPCMD(15) = 0x00100002
    DEPCMDPAR2(16) = 0x00000000
    DEPCMDPAR1(16) = 0x00000000
    DEPCMDPAR0(16) = 0x00000001
    DEPCMD(16) = 0x00110002
    DEPCMDPAR2(17) = 0x00000000
    DEPCMDPAR1(17) = 0x00000000
    DEPCMDPAR0(17) = 0x00000001
    DEPCMD(17) = 0x00120002
    DEPCMDPAR2(18) = 0x00000000
    DEPCMDPAR1(18) = 0x00000000
    DEPCMDPAR0(18) = 0x00000001
    DEPCMD(18) = 0x00130002
    DEPCMDPAR2(19) = 0x00000000
    DEPCMDPAR1(19) = 0x00000000
    DEPCMDPAR0(19) = 0x00000001
    DEPCMD(19) = 0x00140002
    DEPCMDPAR2(20) = 0x00000000
    DEPCMDPAR1(20) = 0x00000000
    DEPCMDPAR0(20) = 0x00000001
    DEPCMD(20) = 0x00150002
    DEPCMDPAR2(21) = 0x00000000
    DEPCMDPAR1(21) = 0x00000000
    DEPCMDPAR0(21) = 0x00000001
    DEPCMD(21) = 0x00160002
    DEPCMDPAR2(22) = 0x00000000
    DEPCMDPAR1(22) = 0x00000000
    DEPCMDPAR0(22) = 0x00000001
    DEPCMD(22) = 0x00170002
    DEPCMDPAR2(23) = 0x00000000
    DEPCMDPAR1(23) = 0x00000000
    DEPCMDPAR0(23) = 0x00000001
    DEPCMD(23) = 0x00180002
    DEPCMDPAR2(24) = 0x00000000
    DEPCMDPAR1(24) = 0x00000000
    DEPCMDPAR0(24) = 0x00000001
    DEPCMD(24) = 0x00190002
    DEPCMDPAR2(25) = 0x00000000
    DEPCMDPAR1(25) = 0x00000000
    DEPCMDPAR0(25) = 0x00000001
    DEPCMD(25) = 0x001a0002
    DEPCMDPAR2(26) = 0x00000000
    DEPCMDPAR1(26) = 0x00000000
    DEPCMDPAR0(26) = 0x00000001
    DEPCMD(26) = 0x001b0002
    DEPCMDPAR2(27) = 0x00000000
    DEPCMDPAR1(27) = 0x00000000
    DEPCMDPAR0(27) = 0x00000001
    DEPCMD(27) = 0x001c0002
    DEPCMDPAR2(28) = 0x00000000
    DEPCMDPAR1(28) = 0x00000000
    DEPCMDPAR0(28) = 0x00000001
    DEPCMD(28) = 0x001d0002
    DEPCMDPAR2(29) = 0x00000000
    DEPCMDPAR1(29) = 0x00000000
    DEPCMDPAR0(29) = 0x00000001
    DEPCMD(29) = 0x001e0002
    DEPCMDPAR2(30) = 0x00000000
    DEPCMDPAR1(30) = 0x00000000
    DEPCMDPAR0(30) = 0x00000001
    DEPCMD(30) = 0x001f0002
    DEPCMDPAR2(31) = 0x00000000
    DEPCMDPAR1(31) = 0x00000000
    DEPCMDPAR0(31) = 0x00000001
    DEPCMD(31) = 0x00200002
    OCFG = 0x00000008
    OCTL = 0x00000040
    OEVT = 0x80000000
    OEVTEN = 0x0fff0f00
    OSTS = 0x00002819
    
    

  • Jimmy,

    The regdump shows some configuration difference from what I got on my evm. I am still trying to understand the difference.

    What is the kernel do you use? It is from the Processor SDK Linux v5.x package or somewhere else?

    Can you please change dr_mode to "peripheral" in dts and re-run the test?
    - measure D+ after loaded the gadget drivers but before connect to PC;
    - get regdump before and after connect to PC.
  • Jimmy,

    Please ignore the request I asked in my previous post. It appears that the kernel usb driver depends on the extcon setting in devicetree to control the usb controller. Since your board doesn't connect the VBUS signal to AM5748, I assume you didn't add extcon node in your board devicetree file. So please use the debug patch as below to bypass the extcon checking in the usb driver, and let me if now you observe the D+ pull when not connect to PC. If so then check if RNDIS can be enumerated when connect to PC.

    diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
    index 40832c94e839..af9182a6207e 100644
    --- a/drivers/usb/dwc3/dwc3-omap.c
    +++ b/drivers/usb/dwc3/dwc3-omap.c
    @@ -419,6 +419,9 @@ static int dwc3_omap_extcon_register(struct dwc3_omap *omap)
            struct device_node      *node = omap->dev->of_node;
            struct extcon_dev       *edev;
     
    +       dwc3_omap_set_mailbox(omap, OMAP_DWC3_VBUS_VALID);
    +       return 0;
    +
            if (of_property_read_bool(node, "extcon")) {
                    edev = extcon_get_edev_by_phandle(omap->dev, 0);
                    if (IS_ERR(edev)) {
    
  • Hi,

     

    Thanks for the driver patch. Now we are actually able to get the g_Ether gadget working. We can run it on one port at the time. So the basic issue is mitigated, but it leaves a number of questions from my side, both regarding SW and HW:

     

      1. What is the impact on functionality when VBUS-detect is not available? Or is it connected but not actually used by the driver in the TI SDK case?
      1. Will TI release a new driver version which does not require the VBUS GPIO (not only as a patch)?
      1. We have in the current HW version missed to connect the ID pin to an AM5748 GPIO (actually an output from TUSB320 circuit since we use USB-C interface), we will mitigate this for the next HW round, but for understanding I would like to ask in which cases this signal is used?
      1. Can you please point us in the right direction regarding which gadget to use (or how to configure the g_Ether gadget) when we want to run both USB ports as RNDIS.

     

    BR Jimmy

  • Jimmy,

    Great, finally we understood why g_ether gadget is not detected by the host.

    Jimmy Kjellsson said:
    What is the impact on functionality when VBUS-detect is not available? Or is it connected but not actually used by the driver in the TI SDK case?

    Depending on the usb use case, vbus detect might or might not needed. This is documented in the AM57x TRM and other collaterals. Basically vbus detect is needed if the usb port is used for device mode (dr_mode = 'peripheral' or dr_mode = 'otg' in dts). If the usb port is only used in host mode (dr_mode = 'host' in dts), vbus detect is not needed.

    Additionally besides the vbus detect, if the usb port is used for dual-role mode (dr_mode = 'otg'), id pin detect is also needed.

    All these requirements are defined by the USB Specs and the Linux drivers.

    Since your design uses type-C connector, I assume you want to use the usb port in dual-role mode, then you would need to have both vbus detect and id detect on your board.

    Jimmy Kjellsson said:
    Will TI release a new driver version which does not require the VBUS GPIO (not only as a patch)?

    No. That patch is for debugging purpose only to understand what causes the host is unable to detect the usb gadget. It shouldn't be used in production. It definitely will break the usb function if the AM5748 usb port will be used for dual-role mode. For device only mode, without vbus detect it violates the USB Spec, and the usb function might not work with all the USB hosts, because of some timing violation in USB protocol.

    Jimmy Kjellsson said:
    We have in the current HW version missed to connect the ID pin to an AM5748 GPIO (actually an output from TUSB320 circuit since we use USB-C interface), we will mitigate this for the next HW round, but for understanding I would like to ask in which cases this signal is used?

    Okay, this does sound you use dual-role mode, you would need both vbus detect and id detect. Please follow the USB2 port usb design on the AM57x IDK evm. the vbus detect is used to transition the usb controller to device mode, and the id detect is used to transition the controller to host mode.

    Jimmy Kjellsson said:
    Can you please point us in the right direction regarding which gadget to use (or how to configure the g_Ether gadget) when we want to run both USB ports as RNDIS.

    The kernel provides multiple usb network gadget functions, you would have to pick which one to use for your project. Then reference to the function in your usb configfs gadget setup. There are plenty of information on the Internet showing how to configure a usb configfs gadget. Basically, a bash script with a whole bunch of echo commands to the linux sysfs.

  • Jimmy,

    Regarding your last question about usb configfs, here is a training series about usb design on TI Sitara devices:

    https://training.ti.com/usb-system-design-sitara-linux

    and its module 6 (linked below) explains the usb configfs.

    https://training.ti.com/usb-system-design-sitara-linux-device-mode?cu=1135801

    Hopefully it is useful.

  • Hi,

    Thank you for the support!

    BR Jimmy
  • Jimmy,

    You are welcome! Please ensure your board re-design has the proper vbus detect and id detect paths for the usb dual-role function.

    Since we have understand the current problem now, I am closing this thread. If you have follow-up questions please reply below if the thread is not yet locked due to time-out. Or create a new thread if this thread it is locked or you have other questions. Thanks.