Yes that is what I have been doing. I attached various kernel logs I captured via serial in my first post. I am new to kernel debugging so was not sure how to go about this. But with little help I think I got a solution.
Basically what I understood was the nodes f900000.dwc3-usb,f910000.dwc3-usb (parents of the usb controllers) were being deffered by power-controller because it was not getting initialized early enough.
[ 34.058034] platform f900000.dwc3-usb: error -EPROBE_DEFER: wait for supplier /bus@f0000/system-controller@44043000/power-controller
[ 34.076824] platform f900000.dwc3-usb: Added to deferred list
[ 34.093409] platform f910000.dwc3-usb: error -EPROBE_DEFER: wait for supplier /bus@f0000/system-controller@44043000/power-controller
[ 34.112192] platform f910000.dwc3-usb: Added to deferred list
Enabling debug logs with loglevel=8 initcall_debug mechanically delayed the boot and power-controller got enough time to initialize and thus the usb controllers were probed within time and we got usb networking working.
Same effect happened when I almost gave up on the idea and moved to initramfs + configfs based solution - I noticed that even with a bare init script having only a infinite while loop was making it work. So I tested with smaller usleep durations. The tests revealed that a delay between 0.125 seconds and 0.19 seconds is necessary for the power controller to initialize and the usb controller dependency to resolve correctly. For usleep(125000) it was failing but it was working for usleep(190000).
0.125s:
[ 1.599897] g_ncm gadget.0: HOST MAC 62:73:01:1c:aa:76
[ 1.605094] g_ncm gadget.0: MAC ca:48:19:6c:39:bc
[ 1.609847] g_ncm gadget.0: NCM Gadget
[ 1.613596] g_ncm gadget.0: g_ncm ready
[ 1.628151] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[ 1.633711] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 1
[ 1.641580] xhci-hcd xhci-hcd.3.auto: USB3 root hub has no ports
[ 1.647602] xhci-hcd xhci-hcd.3.auto: hcc params 0x0258fe6d hci version 0x110 quirks 0x0000808020000010
[ 1.657066] xhci-hcd xhci-hcd.3.auto: irq 290, io mem 0x31100000
[ 1.663929] hub 1-0:1.0: USB hub found
[ 1.667727] hub 1-0:1.0: 1 port detected
[ 1.674522] cpufreq: cpufreq_policy_online: CPU0: Running at unlisted initial frequency: 1400000 kHz, changing to: 1250000 kHz
[ 1.709274] leds-gpio leds: Led green:indicator renamed to green:indicator_1 due to name collision
[ 1.723273] clk: Disabling unused clocks
[ 1.726059] sdhci-am654 fa00000.mmc: Got CD GPIO
[ 1.740261] PM: genpd: Disabling unused power domains
[ 1.740769] mmc1: CQHCI version 5.10
[ 1.790820] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit
[ 1.800901] Freeing unused kernel memory: 3264K
[ 1.805605] Run /init as init process
[ 1.854192] mmc1: new UHS-I speed SDR104 SDHC card at address 59b4
[ 1.861971] mmcblk1: mmc1:59b4 USD00 29.5 GiB
[ 1.870016] mmcblk1: p1 p2
[ 1.936173] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
Corresponding host side:
[38410.307328] usb 1-1: new high-speed USB device number 64 using xhci_hcd
[38410.434252] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a1, bcdDevice= 6.18
[38410.434314] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[38410.434319] usb 1-1: Product: NCM Gadget
[38410.434323] usb 1-1: Manufacturer: Linux 6.18.37 with dwc3-gadget
[38415.992698] usb 1-1: can't set config #1, error -110
0.19s:
[ 1.602638] g_ncm gadget.0: HOST MAC ea:d0:93:c9:fd:c8
[ 1.607846] g_ncm gadget.0: MAC 26:a4:85:5e:24:f3
[ 1.612609] g_ncm gadget.0: NCM Gadget
[ 1.616360] g_ncm gadget.0: g_ncm ready
[ 1.630860] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
[ 1.636401] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 1
[ 1.644205] xhci-hcd xhci-hcd.3.auto: USB3 root hub has no ports
[ 1.650216] xhci-hcd xhci-hcd.3.auto: hcc params 0x0258fe6d hci version 0x110 quirks 0x0000808020000010
[ 1.659654] xhci-hcd xhci-hcd.3.auto: irq 290, io mem 0x31100000
[ 1.666556] hub 1-0:1.0: USB hub found
[ 1.670358] hub 1-0:1.0: 1 port detected
[ 1.677255] cpufreq: cpufreq_policy_online: CPU0: Running at unlisted initial frequency: 1400000 kHz, changing to: 1250000 kHz
[ 1.712032] leds-gpio leds: Led green:indicator renamed to green:indicator_1 due to name collision
[ 1.726065] clk: Disabling unused clocks
[ 1.728864] sdhci-am654 fa00000.mmc: Got CD GPIO
[ 1.738645] PM: genpd: Disabling unused power domains
[ 1.739149] mmc1: CQHCI version 5.10
[ 1.789156] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit
[ 1.799189] Freeing unused kernel memory: 3264K
[ 1.803917] Run /init as init process
[ 1.851810] mmc1: new UHS-I speed SDR104 SDHC card at address 59b4
[ 1.859760] mmcblk1: mmc1:59b4 USD00 29.5 GiB
[ 1.867175] mmcblk1: p1 p2
[ 1.999303] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
Corresponding host:
[37143.984499] usb 1-1: new high-speed USB device number 59 using xhci_hcd
[37144.111564] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a1, bcdDevice= 6.18
[37144.111580] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[37144.111585] usb 1-1: Product: NCM Gadget
[37144.111589] usb 1-1: Manufacturer: Linux 6.18.37 with dwc3-gadget
[37144.176246] cdc_ncm 1-1:1.0: MAC-Address: ea:d0:93:c9:fd:c8
[37144.177001] cdc_ncm 1-1:1.0 usb0: register 'cdc_ncm' at usb-0000:03:00.3-1, CDC NCM (NO ZLP), ea:d0:93:c9:fd:c8
[37144.219084] cdc_ncm 1-1:1.0 enp3s0f3u1: renamed from usb0
So, I settled with adding a rootdelay=1 in the kernel params with no initramfs and no configfs. I seem to get an interface, now I will try getting a NFS root and I should be done with this.
16: enp3s0f3u1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 4e:3e:e8:c5:35:22 brd ff:ff:ff:ff:ff:ff
altname enx4e3ee8c53522