USB modem not detected booting sysupgrade image but works booting initramfs-kernel from the same build

USB modem not detected booting sysupgrade image but works booting initramfs-kernel from the same build.

I'm not sure where to start to figure out why the USB modem is working perfectly with the initramfs-kernel image.

My router is a Proroute H820 which isn't officially supported by OpenWrt but it's evident that patches for OpenWrt have existed for quite some time by multiple people.

This issue occurs with 18.06.2+ builds containing patch 0032-USB-dwc2-add-device_reset.patch but 18.06.9 is fine (the 0032 patch was reverted)

It also occurs with with 19.07.8 and master.

The patches and dts for the builds I've tested are based on the 18.06-snapshot patches from:

https://dl.eko.one.pl/openwrt-18.06/patches/

When the USB modem is detected it shows up in the console:

[ 20.630181] qmi_wwan 1-1:1.8 wwan0: register 'qmi_wwan' at usb-101c0000.ehci-1, WWAN/QMI device, 16:63:cd:98:c2:0d

My temporary workaround is to power cycle via the USB gpio which results in the modem showing up about 10 seconds later but I'm hoping to be able to figure out what is different with the initramfs-kernel image so I can replicate it in the sysupgrade image.

initramfs-kernel uart log:

U-Boot 1.1.3 (Aug 16 2012 - 13:48:50)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
.raspi_read: from:30000 len:1000
.============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 256 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:Aug 16 2012  Time:13:48:50
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

 ##### The CPU freq = 360 MHZ ####
 estimate memory size =64 Mbytes

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                     4
You choosed 1
                                                                              0
raspi_read: from:50028 len:6
.

1: System Load Linux to SDRAM via TFTP.
 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.8.123) ==:192.168.1.1
        Input server IP (192.168.8.3) ==:192.168.1.101
        Input Linux Kernel filename (CELL_ROUTER_8M64M_V2.5.5_20161110) ==:openwrt-ramips-rt305x-proroute_h820-initramfs-kernel.bin

 netboot_common, argc= 3

 NetTxPacket = 0x83FE5FC0

 KSEG1ADDR(NetTxPacket) = 0xA3FE5FC0

 NetLoop,call eth_halt !

 NetLoop,call eth_init !
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 Header Payload scatter function is Disable !!

 ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
TFTP from server 192.168.1.101; our IP address is 192.168.1.1
Filename 'openwrt-ramips-rt305x-proroute_h820-initramfs-kernel.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80800000
Loading: Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REPLY, set server/gtwy eth addr (08:08:08:08:08:08)
Got it
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###########
done
Bytes transferred = 4046668 (3dbf4c hex)
NetBootFileXferSize= 003dbf4c
raspi_read: from:20000 len:20000
..Erasing SPI Flash...
raspi_erase: offs:20000 len:20000
..
Writing to SPI Flash...
raspi_write: to:20000 len:20000
..
done
Automatic boot of image at addr 0x80800000 ...
## Booting image at 80800000 ...
   Image Name:   Linux Kernel Image
   Created:      2021-10-24   9:01:35 UTC
   Image Type:   MIPS Linux Kernel Image (uncompressed)
   Data Size:    4046604 Bytes =  3.9 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...



OpenWrt kernel loader for MIPS based SoC
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80000000...

[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[    0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001964c (MIPS 24KEc)
[    0.000000] MIPS: machine is Proroute H820
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=0000ba60
[    0.000000] Readback ErrCtl register=0000ba60
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 56644K/65536K available (3732K kernel code, 167K rwdata, 516K rodata, 3640K init, 194K bss, 8892K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from 0x80452a3c with crng_init=0
[    0.000000] CPU Clock: 360MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 10618113593 ns
[    0.000017] sched_clock: 32 bits at 180MHz, resolution 5ns, wraps every 11930464253ns
[    0.015763] Calibrating delay loop... 239.10 BogoMIPS (lpj=478208)
[    0.059920] pid_max: default: 32768 minimum: 301
[    0.069439] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.083952] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.109196] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.128594] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.142148] pinctrl core: initialized pinctrl subsystem
[    0.155929] NET: Registered protocol family 16
[    0.235630] rt2880_gpio 10000600.gpio: registering 22 gpios
[    0.246836] rt2880_gpio 10000600.gpio: registering 22 irq handlers
[    0.261180] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.291945] clocksource: Switched to clocksource MIPS
[    0.304956] NET: Registered protocol family 2
[    0.314066] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.330200] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.346917] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.362146] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.376138] TCP: Hash tables configured (established 1024 bind 1024)
[    0.389167] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.402248] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.416733] NET: Registered protocol family 1
[    1.235952] random: fast init done
[    8.332646] rt-timer 10000100.timer: maximum frequency is 3662Hz
[    8.350712] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    8.378787] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    8.390407] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    8.448312] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    8.466536] gpio-export gpio_export: 1 gpio(s) exported
[    8.477556] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    8.497369] printk: console [ttyS0] disabled
[    8.506022] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    8.525777] printk: console [ttyS0] enabled
[    8.525777] printk: console [ttyS0] enabled
[    8.542360] printk: bootconsole [early0] disabled
[    8.542360] printk: bootconsole [early0] disabled
[    8.590227] spi spi0.0: force spi mode3
[    8.600052] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    8.610163] 5 fixed-partitions partitions found on MTD device spi0.0
[    8.622930] Creating 5 MTD partitions on "spi0.0":
[    8.632570] 0x000000000000-0x000000030000 : "u-boot"
[    8.645189] 0x000000030000-0x000000050000 : "u-boot-env"
[    8.658555] 0x000000050000-0x000000060000 : "factory"
[    8.671221] 0x000000060000-0x000000200000 : "user_fs"
[    8.683888] 0x000000200000-0x000000800000 : "firmware"
[    8.711565] 2 uimage-fw partitions found on MTD device firmware
[    8.723560] Creating 2 MTD partitions on "firmware":
[    8.733566] 0x000000000000-0x00000016ee5b : "kernel"
[    8.746177] 0x00000016ee5b-0x000000600000 : "rootfs"
[    8.758592] mtd: device 6 (rootfs) set to be root filesystem
[    8.776318] 1 squashfs-split partitions found on MTD device rootfs
[    8.788844] 0x0000003e1000-0x000000600000 : "rootfs_data"
[    8.803503] libphy: Fixed MDIO Bus: probed
[    8.822541] rt3050-esw 10110000.esw: link changed 0x00
[    8.837364] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    8.855216] rt2880_wdt 10000120.watchdog: Initialized
[    8.868860] NET: Registered protocol family 10
[    8.889417] Segment Routing with IPv6
[    8.897192] NET: Registered protocol family 17
[    8.906337] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    8.932293] 8021q: 802.1Q VLAN Support v1.8
[    8.981668] Freeing unused kernel memory: 3640K
[    8.990807] This architecture does not have kernel memory protection.
[    9.003704] Run /init as init process
[   10.613441] init: Console is alive
[   10.621239] init: - watchdog -
[   10.679622] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   10.719833] usbcore: registered new interface driver usbfs
[   10.731259] usbcore: registered new interface driver hub
[   10.742293] usbcore: registered new device driver usb
[   10.767765] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   10.783499] ehci-fsl: Freescale EHCI Host controller driver
[   10.799014] ehci-platform: EHCI generic platform driver
[   10.820382] phy phy-usbphy.0: remote usb device wakeup disabled
[   10.832282] phy phy-usbphy.0: UTMI 16bit 30MHz
[   10.841217] ehci-platform 101c0000.ehci: EHCI Host Controller
[   10.852872] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[   10.869055] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[   10.895993] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[   10.910990] hub 1-0:1.0: USB hub found
[   10.920196] hub 1-0:1.0: 1 port detected
[   10.946778] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   10.972680] init: - preinit -
[   11.510304] random: jshn: uninitialized urandom read (4 bytes read)
[   11.687353] random: jshn: uninitialized urandom read (4 bytes read)
[   12.090394] random: jshn: uninitialized urandom read (4 bytes read)
[   12.469907] rt3050-esw 10110000.esw: link changed 0x00
[   12.587068] urandom_read: 2 callbacks suppressed
[   12.587088] random: procd: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   14.142960] rt3050-esw 10110000.esw: link changed 0x01
[   16.996345] procd: - early -
[   17.002591] procd: - watchdog -
[   17.829039] procd: - watchdog -
[   17.837041] procd: - ubus -
[   17.861167] random: ubusd: uninitialized urandom read (4 bytes read)
[   17.894462] random: ubusd: uninitialized urandom read (4 bytes read)
[   17.908928] random: ubusd: uninitialized urandom read (4 bytes read)
[   17.934165] procd: - init -
Please press Enter to activate this console.
[   19.279616] kmodloader: loading kernel modules from /etc/modules.d/*
[   19.376660] usbcore: registered new interface driver cdc_wdm
[   19.405123] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   19.420411] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   19.538024] usbcore: registered new interface driver usbserial_generic
[   19.551571] usbserial: USB Serial support registered for generic
[   19.637720] xt_time: kernel timezone is -0000
[   19.858977] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   19.925245] PPP generic driver version 2.4.2
[   19.949617] NET: Registered protocol family 24
[   19.980888] usbcore: registered new interface driver qmi_wwan
[   20.028096] urngd: v1.0.2 started.
[   20.069377] usb 1-1: config 1 has an invalid interface number: 8 but max is 3
[   20.083810] usb 1-1: config 1 has no interface number 1
[   20.140112] usbcore: registered new interface driver qcserial
[   20.152086] usbserial: USB Serial support registered for Qualcomm USB modem
[   20.186318] qcserial 1-1:1.0: Qualcomm USB modem converter detected
[   20.200181] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB0
[   20.300484] qcserial 1-1:1.2: Qualcomm USB modem converter detected
[   20.314077] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB1
[   20.382200] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[   20.396793] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected
[   20.412420] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5350 detected
[   20.480669] qcserial 1-1:1.3: Qualcomm USB modem converter detected
[   20.494229] usb 1-1: Qualcomm USB modem converter now attached to ttyUSB2
[   20.572978] qmi_wwan 1-1:1.8: cdc-wdm0: USB WDM device
[   20.604549] kmodloader: done loading kernel modules from /etc/modules.d/*
[   20.630181] qmi_wwan 1-1:1.8 wwan0: register 'qmi_wwan' at usb-101c0000.ehci-1, WWAN/QMI device, 16:63:cd:98:c2:0d
[   21.075835] random: crng init done
[   21.082795] random: 1 urandom warning(s) missed due to ratelimiting
[  124.433681] rt3050-esw 10110000.esw: link changed 0x00
[  126.056334] rt3050-esw 10110000.esw: link changed 0x01
[  133.132886] br-lan: port 1(eth0.1) entered blocking state
[  133.143860] br-lan: port 1(eth0.1) entered disabled state
[  133.155524] device eth0.1 entered promiscuous mode
[  133.165251] device eth0 entered promiscuous mode
[  133.268440] br-lan: port 1(eth0.1) entered blocking state
[  133.279361] br-lan: port 1(eth0.1) entered forwarding state
[  134.113075] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



BusyBox v1.33.1 (2021-10-24 09:01:35 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 21.02.1, r16325-88151b8303
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 5.04
S:  Manufacturer=Linux 5.4.154 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=101c0000.ehci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1199 ProdID=68c0 Rev= 0.06
S:  Manufacturer=Sierra Wireless, Incorporated
S:  Product=MC7304
C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
E:  Ad=83(I) Atr=03(Int.) MxPS=  12 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
E:  Ad=85(I) Atr=03(Int.) MxPS=  12 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
root@OpenWrt:/# lsmod | grep usb
mii                     4736  1 usbnet
nls_base                4800  1 usbcore
usb_common              2576  2 ehci_platform,usbcore
usb_wwan                4224  1 qcserial
usbcore               125472  9 qcserial,usb_wwan,qmi_wwan,usbserial,usbnet,cdc_wdm,ehci_platform,ehci_fsl,ehci_hcd
usbnet                 15760  1 qmi_wwan
usbserial              17008  2 qcserial,usb_wwan

sysupgrade uart log:

U-Boot 1.1.3 (Aug 16 2012 - 13:48:50)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
.raspi_read: from:30000 len:1000
.============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 256 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:Aug 16 2012  Time:13:48:50
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

 ##### The CPU freq = 360 MHZ ####
 estimate memory size =64 Mbytes

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                     3
You choosed 2
                                                                              0
raspi_read: from:50028 len:6
.

2: System Load Linux Kernel then write to Flash via TFTP.
 Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.1.1) ==:192.168.1.1
        Input server IP (192.168.1.101) ==:192.168.1.101
        Input Linux Kernel filename (openwrt-ramips-rt305x-proroute_h820-initramfs-kernel.bin) ==:openwrt-ramips-rt305x-proroute_h820-squashfs-sysupgrade.bin

 netboot_common, argc= 3

 NetTxPacket = 0x83FE5FC0

 KSEG1ADDR(NetTxPacket) = 0xA3FE5FC0

 NetLoop,call eth_halt !

 NetLoop,call eth_init !
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 Header Payload scatter function is Disable !!

 ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
TFTP from server 192.168.1.101; our IP address is 192.168.1.1
Filename 'openwrt-ramips-rt305x-proroute_h820-squashfs-sysupgrade.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80100000
Loading: Got ARP REPLY, set server/gtwy eth addr (08:08:08:08:08:08)
Got it
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###############
done
Bytes transferred = 4068134 (3e1326 hex)
NetBootFileXferSize= 003e1326
raspi_erase_write: offs:200000, count:3e1326
raspi_erase: offs:200000 len:3e0000
..............................................................
raspi_write: to:200000 len:3e0000
..............................................................
raspi_read: from:200000 len:10000
.raspi_read: from:210000 len:10000
.raspi_read: from:220000 len:10000
.raspi_read: from:230000 len:10000
.raspi_read: from:240000 len:10000
.raspi_read: from:250000 len:10000
.raspi_read: from:260000 len:10000
.raspi_read: from:270000 len:10000
.raspi_read: from:280000 len:10000
.raspi_read: from:290000 len:10000
.raspi_read: from:2a0000 len:10000
.raspi_read: from:2b0000 len:10000
.raspi_read: from:2c0000 len:10000
.raspi_read: from:2d0000 len:10000
.raspi_read: from:2e0000 len:10000
.raspi_read: from:2f0000 len:10000
.raspi_read: from:300000 len:10000
.raspi_read: from:310000 len:10000
.raspi_read: from:320000 len:10000
.raspi_read: from:330000 len:10000
.raspi_read: from:340000 len:10000
.raspi_read: from:350000 len:10000
.raspi_read: from:360000 len:10000
.raspi_read: from:370000 len:10000
.raspi_read: from:380000 len:10000
.raspi_read: from:390000 len:10000
.raspi_read: from:3a0000 len:10000
.raspi_read: from:3b0000 len:10000
.raspi_read: from:3c0000 len:10000
.raspi_read: from:3d0000 len:10000
.raspi_read: from:3e0000 len:10000
.raspi_read: from:3f0000 len:10000
.raspi_read: from:400000 len:10000
.raspi_read: from:410000 len:10000
.raspi_read: from:420000 len:10000
.raspi_read: from:430000 len:10000
.raspi_read: from:440000 len:10000
.raspi_read: from:450000 len:10000
.raspi_read: from:460000 len:10000
.raspi_read: from:470000 len:10000
.raspi_read: from:480000 len:10000
.raspi_read: from:490000 len:10000
.raspi_read: from:4a0000 len:10000
.raspi_read: from:4b0000 len:10000
.raspi_read: from:4c0000 len:10000
.raspi_read: from:4d0000 len:10000
.raspi_read: from:4e0000 len:10000
.raspi_read: from:4f0000 len:10000
.raspi_read: from:500000 len:10000
.raspi_read: from:510000 len:10000
.raspi_read: from:520000 len:10000
.raspi_read: from:530000 len:10000
.raspi_read: from:540000 len:10000
.raspi_read: from:550000 len:10000
.raspi_read: from:560000 len:10000
.raspi_read: from:570000 len:10000
.raspi_read: from:580000 len:10000
.raspi_read: from:590000 len:10000
.raspi_read: from:5a0000 len:10000
.raspi_read: from:5b0000 len:10000
.raspi_read: from:5c0000 len:10000
.raspi_read: from:5d0000 len:10000
.raspi_read: from:5e0000 len:10000
.raspi_erase: offs:5e0000 len:10000
.
raspi_write: to:5e0000 len:10000
.
raspi_read: from:5e0000 len:10000
.Done!
## Booting image at bc200000 ...
raspi_read: from:200000 len:40
.   Image Name:   Linux Kernel Image
   Created:      2021-10-24   9:01:35 UTC
   Image Type:   MIPS Linux Kernel Image (uncompressed)
   Data Size:    1502747 Bytes =  1.4 MB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:200040 len:16ee1b
.......................   Verifying Checksum ... OK
OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...



OpenWrt kernel loader for MIPS based SoC
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80000000...

[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[    0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001964c (MIPS 24KEc)
[    0.000000] MIPS: machine is Proroute H820
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=0000ba60
[    0.000000] Readback ErrCtl register=0000ba60
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 59076K/65536K available (3732K kernel code, 167K rwdata, 516K rodata, 1208K init, 194K bss, 6460K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from 0x80452a3c with crng_init=0
[    0.000000] CPU Clock: 360MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 10618113593 ns
[    0.000017] sched_clock: 32 bits at 180MHz, resolution 5ns, wraps every 11930464253ns
[    0.015763] Calibrating delay loop... 239.10 BogoMIPS (lpj=478208)
[    0.059921] pid_max: default: 32768 minimum: 301
[    0.069439] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.083952] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.109198] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.128598] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.142150] pinctrl core: initialized pinctrl subsystem
[    0.155930] NET: Registered protocol family 16
[    0.235623] rt2880_gpio 10000600.gpio: registering 22 gpios
[    0.246829] rt2880_gpio 10000600.gpio: registering 22 irq handlers
[    0.261171] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.291926] clocksource: Switched to clocksource MIPS
[    0.304940] NET: Registered protocol family 2
[    0.314051] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.330186] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.346903] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.362134] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.376125] TCP: Hash tables configured (established 1024 bind 1024)
[    0.389153] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.402234] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.416720] NET: Registered protocol family 1
[    0.433003] rt-timer 10000100.timer: maximum frequency is 3662Hz
[    0.451144] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.479185] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.490806] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.547705] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.565865] gpio-export gpio_export: 1 gpio(s) exported
[    0.576883] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.596740] printk: console [ttyS0] disabled
[    0.605391] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.625150] printk: console [ttyS0] enabled
[    0.625150] printk: console [ttyS0] enabled
[    0.641733] printk: bootconsole [early0] disabled
[    0.641733] printk: bootconsole [early0] disabled
[    0.689049] spi spi0.0: force spi mode3
[    0.698707] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    0.708897] 5 fixed-partitions partitions found on MTD device spi0.0
[    0.721663] Creating 5 MTD partitions on "spi0.0":
[    0.731301] 0x000000000000-0x000000030000 : "u-boot"
[    0.743729] 0x000000030000-0x000000050000 : "u-boot-env"
[    0.757203] 0x000000050000-0x000000060000 : "factory"
[    0.770060] 0x000000060000-0x000000200000 : "user_fs"
[    0.782727] 0x000000200000-0x000000800000 : "firmware"
[    0.810189] 2 uimage-fw partitions found on MTD device firmware
[    0.822181] Creating 2 MTD partitions on "firmware":
[    0.832187] 0x000000000000-0x00000016ee5b : "kernel"
[    0.844844] 0x00000016ee5b-0x000000600000 : "rootfs"
[    0.857446] mtd: device 6 (rootfs) set to be root filesystem
[    0.874787] 1 squashfs-split partitions found on MTD device rootfs
[    0.887330] 0x0000003e1000-0x000000600000 : "rootfs_data"
[    0.902038] libphy: Fixed MDIO Bus: probed
[    0.921139] rt3050-esw 10110000.esw: link changed 0x00
[    0.936135] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.953936] rt2880_wdt 10000120.watchdog: Initialized
[    0.967352] NET: Registered protocol family 10
[    0.987751] Segment Routing with IPv6
[    0.995536] NET: Registered protocol family 17
[    1.004687] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.030642] 8021q: 802.1Q VLAN Support v1.8
[    1.055130] VFS: Mounted root (squashfs filesystem) readonly on device 31:6.
[    1.082105] Freeing unused kernel memory: 1208K
[    1.091234] This architecture does not have kernel memory protection.
[    1.104124] Run /sbin/init as init process
[    1.547978] random: fast init done
[    5.624797] init: Console is alive
[    5.632697] init: - watchdog -
[    8.286761] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    8.852437] usbcore: registered new interface driver usbfs
[    8.863808] usbcore: registered new interface driver hub
[    8.874820] usbcore: registered new device driver usb
[    8.900207] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.916507] ehci-fsl: Freescale EHCI Host controller driver
[    8.931031] ehci-platform: EHCI generic platform driver
[    8.952377] phy phy-usbphy.0: remote usb device wakeup disabled
[    8.964278] phy phy-usbphy.0: UTMI 16bit 30MHz
[    8.973214] ehci-platform 101c0000.ehci: EHCI Host Controller
[    8.984874] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    9.001064] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    9.027985] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    9.043001] hub 1-0:1.0: USB hub found
[    9.052048] hub 1-0:1.0: 1 port detected
[    9.078012] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    9.103686] init: - preinit -
[   11.772898] random: jshn: uninitialized urandom read (4 bytes read)
[   11.945802] random: jshn: uninitialized urandom read (4 bytes read)
[   12.339853] random: jshn: uninitialized urandom read (4 bytes read)
[   13.625999] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   14.423391] urandom_read: 2 callbacks suppressed
[   14.423410] random: procd: uninitialized urandom read (4 bytes read)
[   15.282888] rt3050-esw 10110000.esw: link changed 0x01
[   19.489440] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   19.519082] urandom-seed: Seed file not found (/etc/urandom.seed)
[   19.633015] procd: - early -
[   19.639276] procd: - watchdog -
[   21.365179] procd: - watchdog -
[   21.376932] procd: - ubus -
[   21.783791] random: ubusd: uninitialized urandom read (4 bytes read)
[   21.801234] random: ubusd: uninitialized urandom read (4 bytes read)
[   21.821272] random: ubusd: uninitialized urandom read (4 bytes read)
[   21.846055] procd: - init -
Please press Enter to activate this console.
[   24.460499] kmodloader: loading kernel modules from /etc/modules.d/*
[   25.301254] urngd: v1.0.2 started.
[   25.620699] usbcore: registered new interface driver cdc_wdm
[   25.649237] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   25.664522] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   25.757253] random: crng init done
[   25.764222] random: 1 urandom warning(s) missed due to ratelimiting
[   25.791015] usbcore: registered new interface driver usbserial_generic
[   25.804559] usbserial: USB Serial support registered for generic
[   25.881771] xt_time: kernel timezone is -0000
[   26.163256] PPP generic driver version 2.4.2
[   26.189723] NET: Registered protocol family 24
[   26.220596] usbcore: registered new interface driver qmi_wwan
[   26.354561] usbcore: registered new interface driver qcserial
[   26.366512] usbserial: USB Serial support registered for Qualcomm USB modem
[   26.472089] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[   26.486679] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5350, rev 0500 detected
[   26.502275] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5350 detected
[   26.628409] kmodloader: done loading kernel modules from /etc/modules.d/*
[   78.779750] rt3050-esw 10110000.esw: link changed 0x00
[   80.451564] rt3050-esw 10110000.esw: link changed 0x01
[   84.240104] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   84.280342] jffs2_build_filesystem(): unlocking the mtd device...
[   84.280359] done.
[   84.296661] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   93.663245] br-lan: port 1(eth0.1) entered blocking state
[   93.689174] br-lan: port 1(eth0.1) entered disabled state
[   93.700834] device eth0.1 entered promiscuous mode
[   93.710563] device eth0 entered promiscuous mode
[   93.942849] br-lan: port 1(eth0.1) entered blocking state
[   93.953764] br-lan: port 1(eth0.1) entered forwarding state
[   94.593425] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  113.917503] done.
[  113.921540] jffs2: notice: (1487) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[  114.247683] overlayfs: upper fs does not support tmpfile.



BusyBox v1.33.1 (2021-10-24 09:01:35 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 21.02.1, r16325-88151b8303
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 5.04
S:  Manufacturer=Linux 5.4.154 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=101c0000.ehci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms
root@OpenWrt:/# lsmod | grep usb
mii                     4736  1 usbnet
nls_base                4800  1 usbcore
usb_common              2576  2 ehci_platform,usbcore
usb_wwan                4224  1 qcserial
usbcore               125472  9 qcserial,usb_wwan,qmi_wwan,usbserial,usbnet,cdc_wdm,ehci_platform,ehci_fsl,ehci_hcd
usbnet                 15760  1 qmi_wwan
usbserial              17008  2 qcserial,usb_wwan

I was reading the MC7304 modem's AT comamnd reference and thought this might help:
AT!CUSTOM="FASTENUMEN",3

• “FASTENUMEN“—Enable/disable fast enumeration for warm/cold boot.
:
• 0 = Disable fast enumeration (Default)
• 1 = Enable fast enumeration for cold boot and disable for warm boot
• 2 = Enable fast enumeration for warm boot and disable for cold boot
• 3 = Enable fast enumeration for warm and cold boot

It fixed the problem! The modem is now being detected everytime when booting the sysupgrade image.

How to fix it:

Boot 21.02.1 sysupgrade image and find the modem isn't detected.

# power cycle usb
echo 0 > sys/class/gpio/usb/value
echo 1 > sys/class/gpio/usb/value

# wait about 10 seconds for the modem to be ready
minicom -D /dev/ttyUSB2

Enter the following in minicom:
AT!ENTERCND="A710"
AT!CUSTOM="FASTENUMEN",3
AT!RESET

# wait about 20 seconds for modem to reset and minicom to become functional again
Exit minicom and reboot router.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.