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.

AM3354: AM3354

Part Number: AM3354
Other Parts Discussed in Thread: TPS2051, AM3352, TPS65217

Thank you in advance for your collaboration

Contextualizing about the hardware... Dedicated SOM module based on the BBB but with the am3354. Kernel v5.15.43. Dedicated interface board for the application using various processor peripherals. The issue at hand is with my USBs, where USB0 was initially intended for expansion in a type A connector, and USB1 was provided on a board-to-board connector to accommodate a customized module with the Quectel eg915u 4G Modem.

USB0 

  

USB1 QUECTEL MODULE

  

USB1 INTERFACE BOARD

  

The USB2.0 connected to USB0 worked normally in my tests acting as a host, but my USB1 with the eg915 module did not.

  

I re-evaluated the circuit and found that controlling vbus was necessary for proper interaction of the module with the driver provided by the manufacturer. I made the necessary modifications by adding the vbus controller (TPS2051) and its connections with the USB1 pins, but still had no success with the Quectel module connected to USB1.

Still unsure about the sources provided for integration into the kernel by the 4G module manufacturer, I swapped the USBs with hardware wireups (yes, I connected everything related to USB0 to USB1, vbus, enable, OC, ID, N, P), forgetting the best practices for USBs, and to my surprise, the 4G module worked perfectly. I was able to use it normally in my application.

With this validation done on more than one hardware, I concluded that my vbus control is correct and therefore USB2.0 should work when connected to USB1 of the processor. However, I never managed to succeed with both USBs connected.

I still doubted whether the brief modifications made to the kernel sources could interfere with something, so I tested with and without modifications, but without success.

I believe it is no longer a hardware problem but a kernel configuration issue. With the oscilloscope, I made some measurements and the vbus of USB0 and USB1 rise normally.

 

I did some research and found nothing with the same usage. I tried some tests with the .dtb enabling only one device as a host and still without success. What works for USB0 is the one inserted in the first image below, similar to the BBB, even removing the interrupt controller USB0 still works. Inserting the interrupt controller into USB1, intc 19, still does not work.

Here is the system's dmesg with both USBs connected.

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.15.43 (vduarte@vduarte-VirtualBox) (arm-linux-gnueabihf-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #30 SMP Wed Apr 17 17:08:38 -03 2024
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Digicon Modulo Smart
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 64 MiB at 0x9b800000
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000080000000-0x000000009fdfffff]
[ 0.000000] Normal empty
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080000000-0x000000009fdfffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fdfffff]
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (sgx neon)
[ 0.000000] percpu: Embedded 16 pages/cpu s33996 r8192 d23348 u65536
[ 0.000000] pcpu-alloc: s33996 r8192 d23348 u65536 alloc=16*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129540
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=3977216 rng_core.default_quality=100 quiet
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 427652K/522240K available (13312K kernel code, 2187K rwdata, 5468K rodata, 2048K init, 389K bss, 29052K reserved, 65536K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] trace event string verifier disabled
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=1.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[ 0.000000] random: get_random_bytes called from start_kernel+0x4f8/0x6b8 with crng_init=0
[ 0.000000] TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
[ 0.000002] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000028] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.001181] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
[ 0.006467] Console: colour dummy device 80x30
[ 0.006519] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[ 0.006540] This ensures that you still see kernel messages. Please
[ 0.006551] update your kernel commandline.
[ 0.006605] Calibrating delay loop (skipped) preset value.. 795.44 BogoMIPS (lpj=3977216)
[ 0.006628] pid_max: default: 32768 minimum: 301
[ 0.006840] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.006864] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.007769] CPU: Testing write buffer coherency: ok
[ 0.007857] CPU0: Spectre v2: using BPIALL workaround
[ 0.008191] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[ 0.008924] Setting up static identity map for 0x80300000 - 0x803000ac
[ 0.011859] rcu: Hierarchical SRCU implementation.
[ 0.017979] EFI services will not be available.
[ 0.018202] smp: Bringing up secondary CPUs ...
[ 0.018216] smp: Brought up 1 node, 1 CPU
[ 0.018230] SMP: Total of 1 processors activated (795.44 BogoMIPS).
[ 0.018245] CPU: All CPU(s) started in SVC mode.
[ 0.018888] devtmpfs: initialized
[ 0.033455] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.033769] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.033804] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.039305] pinctrl core: initialized pinctrl subsystem
[ 0.041924] DMI not present or invalid.
[ 0.042526] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.046457] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[ 0.049628] thermal_sys: Registered thermal governor 'step_wise'
[ 0.049914] cpuidle: using governor menu
[ 0.069783] No ATAGs?
[ 0.069816] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.075522] Serial: AMBA PL011 UART driver
[ 0.095428] iommu: Default domain type: Translated
[ 0.095459] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.095921] vgaarb: loaded
[ 0.096779] SCSI subsystem initialized
[ 0.097107] libata version 3.00 loaded.
[ 0.097471] usbcore: registered new interface driver usbfs
[ 0.097537] usbcore: registered new interface driver hub
[ 0.097595] usbcore: registered new device driver usb
[ 0.098531] pps_core: LinuxPPS API ver. 1 registered
[ 0.098548] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.098575] PTP clock support registered
[ 0.098754] EDAC MC: Ver: 3.0.0
[ 0.102415] clocksource: Switched to clocksource dmtimer
[ 1.310284] NET: Registered PF_INET protocol family
[ 1.310543] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 1.311437] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 1.311502] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 1.311560] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 1.311636] TCP: Hash tables configured (established 4096 bind 4096)
[ 1.311765] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 1.311798] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 1.311953] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 1.313007] RPC: Registered named UNIX socket transport module.
[ 1.313031] RPC: Registered udp transport module.
[ 1.313040] RPC: Registered tcp transport module.
[ 1.313048] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.313065] PCI: CLS 0 bytes, default 64
[ 1.314771] Initialise system trusted keyrings
[ 1.315568] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[ 1.323905] NFS: Registering the id_resolver key type
[ 1.323975] Key type id_resolver registered
[ 1.323985] Key type id_legacy registered
[ 1.324097] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.324112] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 1.324162] ntfs: driver 2.1.32 [Flags: R/O].
[ 1.324770] Key type asymmetric registered
[ 1.324793] Asymmetric key parser 'x509' registered
[ 1.324910] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 1.324927] io scheduler mq-deadline registered
[ 1.324939] io scheduler kyber registered
[ 1.403438] Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled
[ 1.407520] SuperH (H)SCI(F) driver initialized
[ 1.408163] msm_serial: driver initialized
[ 1.408175] STMicroelectronics ASC driver initialized
[ 1.409680] STM32 USART driver initialized
[ 1.426248] brd: module loaded
[ 1.433762] loop: module loaded
[ 1.441225] CAN device driver interface
[ 1.441819] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
[ 1.442621] e1000e: Intel(R) PRO/1000 Network Driver
[ 1.442635] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 1.442741] igb: Intel(R) Gigabit Ethernet Network Driver
[ 1.442753] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 1.445359] PPP generic driver version 2.4.2
[ 1.445720] PPP BSD Compression module registered
[ 1.445736] PPP Deflate Compression module registered
[ 1.445759] PPP MPPE Compression module registered
[ 1.445770] NET: Registered PF_PPPOX protocol family
[ 1.445813] pegasus: Pegasus/Pegasus II USB Ethernet driver
[ 1.445907] usbcore: registered new interface driver pegasus
[ 1.445967] usbcore: registered new interface driver asix
[ 1.446014] usbcore: registered new interface driver ax88179_178a
[ 1.446055] usbcore: registered new interface driver cdc_ether
[ 1.446117] usbcore: registered new interface driver smsc75xx
[ 1.446173] usbcore: registered new interface driver smsc95xx
[ 1.446216] usbcore: registered new interface driver net1080
[ 1.446258] usbcore: registered new interface driver cdc_subset
[ 1.446296] usbcore: registered new interface driver zaurus
[ 1.446364] usbcore: registered new interface driver cdc_ncm
[ 1.448245] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.448267] ehci-pci: EHCI PCI platform driver
[ 1.448317] ehci-platform: EHCI generic platform driver
[ 1.448463] ehci-omap: OMAP-EHCI Host Controller driver
[ 1.448571] ehci-orion: EHCI orion driver
[ 1.448676] SPEAr-ehci: EHCI SPEAr driver
[ 1.448772] ehci-st: EHCI STMicroelectronics driver
[ 1.448872] ehci-atmel: EHCI Atmel driver
[ 1.448964] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.449011] ohci-pci: OHCI PCI platform driver
[ 1.449078] ohci-platform: OHCI generic platform driver
[ 1.449214] SPEAr-ohci: OHCI SPEAr driver
[ 1.449317] ohci-st: OHCI STMicroelectronics driver
[ 1.449415] ohci-atmel: OHCI Atmel driver
[ 1.450148] usbcore: registered new interface driver uas
[ 1.450240] usbcore: registered new interface driver usb-storage
[ 1.450355] usbcore: registered new interface driver usbserial_generic
[ 1.450394] usbserial: USB Serial support registered for generic
[ 1.450435] usbcore: registered new interface driver option
[ 1.450466] usbserial: USB Serial support registered for GSM modem (1-port)
[ 1.454540] i2c_dev: i2c /dev entries driver
[ 1.465122] cpuidle: enable-method property 'ti,am3352' found operations
[ 1.465780] sdhci: Secure Digital Host Controller Interface driver
[ 1.465795] sdhci: Copyright(c) Pierre Ossman
[ 1.467041] Synopsys Designware Multimedia Card Interface Driver
[ 1.468136] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.470224] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.472229] usbcore: registered new interface driver usbhid
[ 1.472256] usbhid: USB HID core driver
[ 1.477979] NET: Registered PF_INET6 protocol family
[ 1.479458] Segment Routing with IPv6
[ 1.479529] In-situ OAM (IOAM) with IPv6
[ 1.479632] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.480501] NET: Registered PF_PACKET protocol family
[ 1.480534] can: controller area network core
[ 1.480632] NET: Registered PF_CAN protocol family
[ 1.480645] can: raw protocol
[ 1.480657] can: broadcast manager protocol
[ 1.480672] can: netlink gateway - max_hops=1
[ 1.481350] Key type dns_resolver registered
[ 1.481726] ThumbEE CPU extension supported.
[ 1.481749] Registering SWP/SWPB emulation handler
[ 1.482217] omap_voltage_late_init: Voltage driver support not added
[ 1.484278] Loading compiled-in X.509 certificates
[ 1.543608] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[ 1.558697] ti-sysc: probe of 44e31000.target-module failed with error -16
[ 1.583891] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 25, base_baud = 3000000) is a 8250
[ 1.590563] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 26, base_baud = 3000000) is a 8250
[ 1.596064] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[ 1.601820] ti-sysc: probe of 48040000.target-module failed with error -16
[ 1.636456] OMAP GPIO hardware version 0.1
[ 1.668577] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
[ 1.696549] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 36, base_baud = 3000000) is a 8250
[ 1.703476] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 37, base_baud = 3000000) is a 8250
[ 1.741931] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[ 1.769129] omap_rng 48310000.rng: Random Number Generator ver. 20
[ 1.787000] random: fast init done
[ 1.787176] random: crng init done
[ 1.842414] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 1.844690] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.5 / v1.6
[ 1.845021] cpsw-switch 4a100000.switch: initialized cpsw ale version 1.4
[ 1.845040] cpsw-switch 4a100000.switch: ALE Table size 1024
[ 1.845157] cpsw-switch 4a100000.switch: cpts: overflow check period 500 (jiffies)
[ 1.845178] cpsw-switch 4a100000.switch: CPTS: ref_clk_freq:250000000 calc_mult:2147483648 calc_shift:29 error:0 nsec/sec
[ 1.845265] cpsw-switch 4a100000.switch: Detected MACID = 78:04:73:a1:6d:22
[ 1.846936] cpsw-switch 4a100000.switch: initialized (regs 0x4a100000, pool size 256) hw_ver:0019010C 1.12 (0)
[ 1.860036] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[ 1.860099] edma 49000000.dma: TI EDMA DMA engine driver
[ 1.873266] am335x-phy-driver 47401300.usb-phy: supply vcc not found, using dummy regulator
[ 1.873590] am335x-phy-driver 47401300.usb-phy: dummy supplies not allowed for exclusive requests
[ 1.883030] am335x-phy-driver 47401b00.usb-phy: supply vcc not found, using dummy regulator
[ 1.883370] am335x-phy-driver 47401b00.usb-phy: dummy supplies not allowed for exclusive requests
[ 1.917603] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 1.929202] l3-aon-clkctrl:0000:0: failed to disable
[ 1.933566] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 18, base_baud = 3000000) is a 8250
[ 1.970777] printk: console [ttyS0] enabled
[ 2.003763] tps65217-pmic: Failed to locate of_node [id: -1]
[ 2.022416] tps65217-bl: Failed to locate of_node [id: -1]
[ 2.034816] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[ 2.035646] at24 0-0050: supply vcc not found, using dummy regulator
[ 2.036754] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[ 2.037387] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 100 kHz
[ 2.053842] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
[ 2.084784] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[ 2.126366] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
[ 2.141662] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
[ 2.142137] Waiting for root device /dev/mmcblk1p1...
[ 2.258720] mmc1: new high speed MMC card at address 0001
[ 2.260857] mmcblk1: mmc1:0001 M62704 3.69 GiB
[ 2.266648] mmcblk1: p1
[ 2.268937] mmcblk1boot0: mmc1:0001 M62704 2.00 MiB
[ 2.274008] mmcblk1boot1: mmc1:0001 M62704 2.00 MiB
[ 2.278850] mmcblk1rpmb: mmc1:0001 M62704 512 KiB, chardev (236:0)
[ 2.293867] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
[ 2.294008] VFS: Mounted root (ext4 filesystem) readonly on device 179:1.
[ 2.299034] devtmpfs: mounted
[ 2.302769] Freeing unused kernel image (initmem) memory: 2048K
[ 2.313360] Run /sbin/init as init process
[ 2.313376] with arguments:
[ 2.313384] /sbin/init
[ 2.313390] with environment:
[ 2.313396] HOME=/
[ 2.313402] TERM=linux
[ 2.697216] systemd[1]: System time before build time, advancing clock.
[ 2.764055] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[ 2.764820] systemd[1]: Detected architecture arm.
[ 2.766332] systemd[1]: Set hostname to <modSmartCD200>.
[ 3.613618] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[ 3.613667] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[ 3.858484] systemd[1]: /lib/systemd/system/rc_battery_monitor.service:5: PIDFile= references path below legacy directory /var/run/, updating /var/run/rc_battery_monitor.pid → /run/rc_battery_monitor.pid; please update the unit file accordingly.
[ 3.931030] systemd[1]: Listening on Syslog Socket.
[ 3.933104] systemd[1]: Created slice User and Session Slice.
[ 3.934189] systemd[1]: Listening on udev Control Socket.
[ 3.934759] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ 4.963513] EXT4-fs (mmcblk1p1): re-mounted. Opts: errors=remount-ro. Quota mode: disabled.
[ 5.413396] systemd-journald[99]: Received request to flush runtime journal from PID 1
[ 13.253053] phy_am335x_control: exports duplicate symbol am335x_get_phy_control (owned by kernel)
[ 13.394911] phy_am335x_control: exports duplicate symbol am335x_get_phy_control (owned by kernel)
[ 13.441993] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[ 13.442057] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
[ 13.646045] hub 1-0:1.0: USB hub found
[ 13.656006] hub 1-0:1.0: 1 port detected
[ 13.672755] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 13.672817] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
[ 13.855762] hub 2-0:1.0: USB hub found
[ 13.856539] hub 2-0:1.0: 1 port detected
[ 15.011893] cpsw-switch 4a100000.switch: starting ndev. mode: dual_mac
[ 15.199009] Intel XWAY PHY11G (PEF 7071/PEF 7072) v1.5 / v1.6 4a101000.mdio:00: attached PHY driver (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[ 15.203551] cpsw-switch 4a100000.switch eth0: Link is Up - 100Mbps/Full - flow control off
[ 17.092552] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[ 17.274312] usb 1-1: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 32, changing to 9
[ 17.279950] cdc_ether 1-1:1.0 usb0: register 'cdc_ether' at usb-musb-hdrc.0-1, CDC Ethernet Device, 02:4b:b3:b9:eb:e5
[ 17.289409] option 1-1:1.2: GSM modem (1-port) converter detected
[ 17.293762] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 17.302961] option 1-1:1.3: GSM modem (1-port) converter detected
[ 17.348718] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 17.351958] option 1-1:1.4: GSM modem (1-port) converter detected
[ 17.354432] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 17.358148] option 1-1:1.5: GSM modem (1-port) converter detected
[ 17.374939] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 17.383555] option 1-1:1.6: GSM modem (1-port) converter detected
[ 17.391973] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
[ 17.403351] option 1-1:1.7: GSM modem (1-port) converter detected
[ 17.410791] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB5
[ 17.411635] option 1-1:1.8: GSM modem (1-port) converter detected
[ 17.426924] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB6
[ 17.568107] phy_am335x_control: exports duplicate symbol am335x_get_phy_control (owned by kernel)
[ 18.590118] rtc-isl1208 0-006f: registered as rtc0
[ 18.593638] rtc-isl1208 0-006f: setting system clock to 2024-04-18T14:07:30 UTC (1713449250)
[ 43.382705] usb 2-1: new high-speed USB device number 2 using musb-hdrc
[ 43.532718] usb 2-1: device descriptor read/64, error -71
[ 43.802705] usb 2-1: device descriptor read/64, error -71
[ 44.072701] usb 2-1: new high-speed USB device number 3 using musb-hdrc
[ 44.222723] usb 2-1: device descriptor read/64, error -71
[ 44.492720] usb 2-1: device descriptor read/64, error -71
[ 44.612787] usb usb2-port1: attempt power cycle
[ 44.832699] usb 2-1: new high-speed USB device number 4 using musb-hdrc
[ 45.422711] usb 2-1: new high-speed USB device number 5 using musb-hdrc
 

  • Hi Vinicius,

    Thanks for all the details. Let me summarize if my understanding is correct or not.

    Both AM335x USB ports are configured as host (dr_mode = "host" in kernel device tree).

    AM335x USB0 signals go to a type-A connector and it works without any issue.

    AM335x USB1 signals go to a connector which has a 4G module connected to it. But the modem enumeration failed in Linux.

    If blue-wires the modem from USB1 to USB0, the modem can be enumerated.

    Is this correct?

  • Thanks for the quick response.
    Yes, both devices were set to dr_mode="host".
    Yes, correct interpretation. The problem accompanies USB1.

  • Hi Vinicius,

    Thanks for confirming.

    Can you please use a scope to capture the USB1 signals of USB1_VBUS, USB1_DRVVBUS, and USB1_DP/DM during Linux boot? I'd like to see the timing of these signals, around the time when USB1_DRVVBUS goes high.

  • USB1_VBUS - RED

    USB1_DRVVBUS - YELLOW

    USB1_DP - GREN

    USB1_DM - BLUE

  • Here is a printout with the USB2.0 device (pendrive) disconnected.

  • Hi Vincius,

    In the first graph, I don't think it is relevant to the 4G modem enumeration failure, but do you know why USB1_VBUS is at about 3.3v before USB1_DRVVBUS goes from 0v to 3.3v? USB1_VBUS supposes to be 0v before USB1_DRVVBUS is turned on.

    In the second graph, two questions:

    1. you didn't mention pendrive in your first post. What is the context? Does the pendrive enumeration working fine on USB1? I thought your board USB1 uses special connector to the 4G modem, how can you connect a pendrive to USB1 connector?

    2. more importantly, are you sure this capture is about the pendrive disconnect? both USB1_VBUS and USB1_DRVVBUS go high, this seems to be device connect not disconnect.

  • Hi Bin Liu,

    First Graph

    Yes, I also found the behavior of USB1_VBUS strange; unlike this, USB0 goes to 0V during reboot. I will investigate and comment on this topic.

    Second Graph

    1 - Yes, initially the pendrive was connected to USB0 via a USB type A connector, and the 4G module was connected to USB1 via a board-to-board connector. However, since my priority was to make the 4G module work, I swapped the USBs (all pins) via hardware as a test for validation. Enumeration always works for USB0, never for USB1 regardless of the connected device.

    2 - It wouldn't be about disconnection, perhaps I expressed myself poorly; it would be about initialization without the pendrive connected to the USB1 bus. The signal is triggered on USB1_DRVVBUS for both graphs.

  • Hi Vinicius,

    Yes, I also found the behavior of USB1_VBUS strange; unlike this, USB0 goes to 0V during reboot. I will investigate and comment on this topic.

    You can run command 'devmem2 0x47401c60 b 0' without any USB device connected to USB1, this command set USB1_DRVVBUS low, then you can check if USB1_VBUS is still high, and why it is high.

    Enumeration always works for USB0, never for USB1 regardless of the connected device.

    You can also add "maximum-speed = full-speed;" in the &usb1 node in your kernel board device tree file. This limits USB1 to only enumerates up to full-speed, then you can see if the pendrive or the modem can be enumerated.

    t would be about initialization without the pendrive connected to the USB1 bus.

    Okay, I understood now - it is when nothing is connected to USB1.

  • Hi Bin Liu,

    Sorry for the delay, I had to do other work.

    Você pode executar o comando ' devmem2 0x47401c60 b 0 ' sem nenhum dispositivo USB conectado ao USB1, este comando define USB1_DRVVBUS como baixo, então você pode verificar se USB1_VBUS ainda está alto e por que está alto.

    I installed the devmem2 package that was not available on my system and tested it.

    root@modSmartCD200 ~ # devmem2 0x47401c60 b 0
    /dev/mem opened.
    Memory mapped at address 0xb6f8e000.
    Read at address 0x47401C60 (0xb6f8ec60): 0x5D
    Write at address 0x47401C60 (0xb6f8ec60): 0x00, readback 0x00

    root@modSmartCD200 ~ # devmem2 0x47401c60 b 1
    /dev/mem opened.
    Memory mapped at address 0xb6f80000.
    Read at address 0x47401C60 (0xb6f80c60): 0x88
    Write at address 0x47401C60 (0xb6f80c60): 0x01, readback 0x01

    I had the same result, which made me think that the TPS2051 controller's vbus circuit could be inserting that voltage.
    I removed the resistor R46 that couples the processor's VBUS to the TPS2051 and took the measurement. There was still voltage on VBUS. Disappointed

    Você também pode adicionar " velocidade máxima = velocidade total ;" no nó &usb1 no arquivo da árvore de dispositivos da placa kernel. Isso limita o USB1 a apenas enumerar até a velocidade máxima, então você pode ver se o pendrive ou o modem podem ser enumerados.

    How to do this?

  • How to do this?

    This is an example for AM335x GPEVM:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
    index 25c6ac9913d2..bcdd52357741 100644
    --- a/arch/arm/boot/dts/am335x-evm.dts
    +++ b/arch/arm/boot/dts/am335x-evm.dts
    @@ -413,6 +413,7 @@ tps: tps@2d {
    &usb1 {
    dr_mode = "host";
    + maximum-speed = "full-speed";
    };
    &i2c1 {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Bin Liu,

    This change solved my problem, thank you very much!
    sharing the prints as a record.
    I'm curious to know how increasing the speed helped USB identify the device?
  • Hi Vinicius,

    Glad to know full-speed works!

    I can think of two things why high-speed failed.

    1. The USB1_VBUS line is not at 0v before USB1_DRVVBUS goes high. I never saw this behavior before so I cannot tell if this is the root cause. But I highly recommend you examine your board to understand the reason and fix it.

    2. If #1 is fixed and high-speed enumeration still fails, likely your board USB1 port has signal integrity problem. I recommend you measure its Eye Diagram.

  • [ 43.532718] usb 2-1: device descriptor read/64, error -71

    By the way, this message is a common signature of USB signal integrity problem.

  • Hi Bin Liu,

    still on this topic

    I understood the reason for my problem with signal integrity. As mentioned here.

    I swapped the USBs with hardware wireups (yes, I connected everything related to USB0 to USB1, vbus, enable, OC, ID, N, P), forgetting the best practices for USBs

    I made the wire ups knowing that there could be problems with signal integrity, but it was an alternative to test the swap between the USB signals. It worked, as mentioned previously.

  • Now on other hardware without modifications I'm trying, but without success.

    Returning... In the first test in which we were successful, I swapped between the devices where the Queqtel eg915 module was connected to USB0 through a board-to-board connector. At USB1 I connected a pendrive via USB type A.

    In the new test I connect the pendrive to USB0 which is recognized normally, as expected, but the Quectel module to USB1 does not work.

    Below usb signals with trigger on USB1_DRVVBUS

  • Hi Vinicius,

    Sorry after a few week I have lost the context and now I don't have a full clear picture the issue any more, I need to review this thread again...

    In the new test I connect the pendrive to USB0 which is recognized normally, as expected, but the Quectel module to USB1 does not work.

    Do you mean the modem doesn't enumerate on USB1 even with maximum-speed = full-speed setting in device tree?

    Can you please share the enumeration console log?

  • Do you mean the modem doesn't enumerate on USB1 even with maximum-speed = full-speed setting in device tree?

    Correto.

    About the log, I don't know which one you ideally need, can you be more specific?

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@modSmartCD200 ~ # dmesg | grep usb
    [ 0.097636] usbcore: registered new interface driver usbfs
    [ 0.097703] usbcore: registered new interface driver hub
    [ 0.097770] usbcore: registered new device driver usb
    [ 1.446696] usbcore: registered new interface driver pegasus
    [ 1.446758] usbcore: registered new interface driver asix
    [ 1.446804] usbcore: registered new interface driver ax88179_178a
    [ 1.446845] usbcore: registered new interface driver cdc_ether
    [ 1.446908] usbcore: registered new interface driver smsc75xx
    [ 1.446965] usbcore: registered new interface driver smsc95xx
    [ 1.447008] usbcore: registered new interface driver net1080
    [ 1.447050] usbcore: registered new interface driver cdc_subset
    [ 1.447091] usbcore: registered new interface driver zaurus
    [ 1.447160] usbcore: registered new interface driver cdc_ncm
    [ 1.451002] usbcore: registered new interface driver uas
    [ 1.451085] usbcore: registered new interface driver usb-storage
    [ 1.451201] usbcore: registered new interface driver usbserial_generic
    [ 1.451239] usbserial: USB Serial support registered for generic
    [ 1.451280] usbcore: registered new interface driver option
    [ 1.451311] usbserial: USB Serial support registered for GSM modem (1-port)
    [ 1.473488] usbcore: registered new interface driver usbhid
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    In dmesg nothing appears when connecting or disconnecting the device, however I have a reset pin for this module controlled via a am3354 gpio, when I run it, USB_DM/DP leave 1>>0 and then immediately return to 1 as in the signal shared below.

    Below usb signals with trigger on USB1_DRVVBUS

  • Hi Vinicius,

    About the log, I don't know which one you ideally need, can you be more specific?

    I was asking the log for the USB1 enumeration failure on the 2nd board.

    Your log snippet seems showing no USB enumeration happened at all, while the log in your first very first post shows "usb 2-1" failure messages with error -71. Are the failures different on these two boards?

  • Are the failures different on these two boards?

    Yes, I would say that it is no longer an integrity problem, but I cannot see the USB device listed, for the system the device is not connected, it does not appear in any log.

  • In the scope screenshot you provided last Friday, it seems USB1_VBUS doesn't have the 3.3v prior USB1_DRVVBUS high problem anymore. What is the hardware difference between the two boards?

    Can you please remove 'maximum-speed=full-speed' from DTS to see if kernel log has anyUSB1 enumeration message?

  • A picture of the hardware to help you understand.

    it seems USB1_VBUS doesn't have the 3.3v prior USB1_DRVVBUS high problem anymore.

    Correct, I no longer have the problem with the voltage in USB1_VBUS.

    What is the hardware difference between the two boards?

    At the beginning of my project, only USB0 worked, USB1 never worked, so as part of the test I inverted all the signals from USB0 and USB1. I did this using jumpers, even though I knew that wouldn't be a good practice. We were successful in this topic with the maximum speed for USB1 with the device connected to the pendrive and the Queqtel module to USB0. Now on other hardware, new, without the USB swap modifications, I have this problem of failure to enumerate the device on USB1 where the Queqtel module is connected.

    So about the modification, the difference is in changing the devices connected to each USB.

    Can you please remove 'maximum-speed=full-speed' from DTS to see if kernel log has anyUSB1 enumeration message

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    &usb0 {
    dr_mode = "host";
    interrupts-extended = <&intc 18 &tps 0>;
    interrupt-names = "mc", "vbus";
    };
    &usb1 {
    dr_mode = "host";
    };
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@modSmartCD200 ~ # dmesg
    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 5.15.43 (vduarte@vduarte-VirtualBox) (arm-linux-gnueabihf-gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #40 SMP Mon May 13 08:26:35 -03 2024
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] OF: fdt: Machine model: Digicon Modulo Smart
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] cma: Reserved 64 MiB at 0x9b800000
    [ 0.000000] Zone ranges:
    [ 0.000000] DMA [mem 0x0000000080000000-0x000000009fdfffff]
    [ 0.000000] Normal empty
    [ 0.000000] HighMem empty
    [ 0.000000] Movable zone start for each node
    [ 0.000000] Early memory node ranges
    [ 0.000000] node 0: [mem 0x0000000080000000-0x000000009fdfffff]
    [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fdfffff]
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (sgx neon)
    [ 0.000000] percpu: Embedded 16 pages/cpu s33996 r8192 d23348 u65536
    [ 0.000000] pcpu-alloc: s33996 r8192 d23348 u65536 alloc=16*4096
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Thanks for the explanation, though I still don't fully understand why the first board has 3.3v on VBUS while the second board doesn't, but I think it is not important since the second board behaves correctly - VBUS should be 0v when DRVVBUS is low.

    On the second board after boot into Linux, what is the output of the following command?

    # grep -i 'power\|devctl' /sys/kernel/debug/usb/musb-hdrc.1/regdump

  • Fullscreen
    1
    2
    3
    root@modSmartCD200 ~ # grep -i 'power\|devctl' /sys/kernel/debug/usb/musb-hdrc.1/regdump
    Power : e0
    DevCtl : 19
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • The register dump indicates the USB controller is in the correct state (when no device is enumerated).

    Please then run the following two commands to see if the modem gets enumerated. These commands toggle USB1_DRVVBUS.

    # echo 0 > /sys/kernel/debug/usb/musb-hdrc.1/softconnect
    # echo 1 > /sys/kernel/debug/usb/musb-hdrc.1/softconnect

  • Please capture the USB1 signals on a scope in this test.

  • I executed the commands and USB1 is still not numbered and neither is the change in signals when switching between commands.

  • This is very strange, 'echo 0 > .../softconnect' should set USB1_DRVVBUS to low.

    Does command 'devmem2 0x47401c60 b 0' set USB1_DRVVBUS to low?

  • Does command 'devmem2 0x47401c60 b 0' set USB1_DRVVBUS to low?

    Yes, normally.

  • devmem2 0x47401c60 b 1

  • Okay, devmem2 commands can toggle USB1_DRVVBUS. Not sure why softconnect doesn't work on your board, but we can ignore it...

    The USB signals all look correct, except the DP/DM handshake doesn't happen. I don't know why.

    Can you remove the modem from USB1 port but connect a USB pendrive to see if it enumerates?

  • When you probe the USB signals, do you probe them on the main board or the SOM? Please ensure to probe DP line close to AM335x device, I am wonder if the board has routing error and AM335x doesn't see the DP signal.

  • Okay, devmem2 commands can toggle USB1_DRVVBUS. Not sure why softconnect doesn't work on your board, but we can ignore it...

    The USB signals all look correct, except the DP/DM handshake doesn't happen. I don't know why.

    So I think we've reached a good point, for me this is what's needed for the device to fully function.

    Can you remove the modem from USB1 port but connect a USB pendrive to see if it enumerates?

    It's not an easy task, since the pitch between pins of the boad-to-boad connector is small, but I can try with jumpers. Previously, with the USB signals switched, it worked. I will make the modification and bring results.

  • My probes are closer to the device, the closest I could get would be through roads currently, don't leave testpoints on the USB, I didn't think there would be so many problems. :(

  • Hi Vinicius,

    The USB controller register dump and USB signal probe do not show any problem, except the enumeration chirp handshake doesn't happen. Let me check with our USB hardware expert.

  • Not sure I understand the entire picture, so let's reset.

    Instrument DP/DM and VBUS. Run your test.

    In order:

    1) VBUS reaches 5V.

    2) Attached Device asserts DP high (in this case).

    3) Host issues RESET (DP and DM both driven low)

    4) During this RESET, attached Device will drive DM to ~800mV for 1ms minimum.

    5) Host sees this and begins driving K/J pairs on bus at ~800mV.

    Post your scope plots. Any deviation from above is a problem.

  • Hi, sorry for the delay, I requested more samples to be produced.

    Below measurements.

    Red - VBUS1
    Blue - DM
    Green - DP

  • Hi Vinicius,

    DK is out of office for the next few days. Please expect delayed response from him.