So some interesting findings! @123serge123's analog phy dts change in post 2 above allows OpenWrt to bring up the USB in pepe2k bootloaders that don't perform any USB setup! Mainline u-boot still leads to no joy:
- pepe2k ap143 (no USB code) + standard qca953x.dtsi --> no usb (bootlog)
- pepe2k ap143 (no USB code) + qca953x.dtsi with @123serge123 analog reset --> usb works! (bootlog)
- mainline u-boot ap143 + standard qca953x --> no usb (bootlog)
- mainline u-boot ap143 + qca953x.dtsi with @123serge123 analog reset -->
device descriptor read/64, error -71
(bootlog)
Some bootlog diffs from the scenarios above:
1 --> 2
--- a/210119-p2kap143-outside.log
+++ b/210119-p2kap143-analog-outside.log
@@ -120,10 +120,17 @@
[] hub 1-0:1.0: 1 port detected
[] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[] init: - preinit -
+[] usb 1-1: new high-speed USB device number 2 using ehci-platform
+[] hub 1-1:1.0: USB hub found
+[] hub 1-1:1.0: 4 ports detected
+[] random: procd: uninitialized urandom read (4 bytes read)
+[] usb 1-1.3: new full-speed USB device number 3 using ehci-platform
+[] usb 1-1.3: new high-speed USB device number 4 using ehci-platform
[] random: jshn: uninitialized urandom read (4 bytes read)
[] random: jshn: uninitialized urandom read (4 bytes read)
+[] urandom_read: 3 callbacks suppressed
+[] random: jshn: uninitialized urandom read (4 bytes read)
[] random: jshn: uninitialized urandom read (4 bytes read)
-[] urandom_read: 6 callbacks suppressed
[] random: jshn: uninitialized urandom read (4 bytes read)
[] eth0: link up (1000Mbps/Full duplex)
[] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
@@ -134,7 +141,7 @@ Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[] done.
[] jffs2_build_filesystem(): erasing all blocks after the end marker...
[] done.
-[] jffs2: notice: (563) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
+[] jffs2: notice: (574) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[] mount_root: overlay filesystem has not been fully initialized yet
[] mount_root: switching to jffs2 overlay
[] overlayfs: upper fs does not support tmpfile.
@@ -148,4 +155,22 @@ Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
Failed to connect to ubus
[] procd: - init -
Please press Enter to activate this console.
-[] kmodloader: loading kernel modules from /etc/modules.d/*
\ No newline at end of file
+[] kmodloader: loading kernel modules from /etc/modules.d/*
+[] urngd: v1.0.2 started.
+[] Mirror/redirect action on
+[] u32 classifier
+[] input device check on
+[] Actions configured
+[] usbcore: registered new interface driver cdc_wdm
+[] Loading modules backported from Linux version v5.8-0-gbcf876870b95
+[] Backport generated by backports.git v5.8-1-0-g79400d9e
+[] xt_time: kernel timezone is -0000
+[] random: crng init done
+[] random: 1 urandom warning(s) missed due to ratelimiting
+[] PPP generic driver version 2.4.2
+[] NET: Registered protocol family 24
+[] qmi_wwan 1-1.3:1.4: cdc-wdm0: USB WDM device
+[] qmi_wwan 1-1.3:1.4 wwan0: register 'qmi_wwan' at usb-1b000000.usb-1.3, WWAN/QMI device, 76:5f:af:30:dc:a5
+[] usbcore: registered new interface driver qmi_wwan
+[] ieee80211 phy0: Atheros AR9531 Rev:2 mem=0xb8100000, irq=13
+[] kmodloader: done loading kernel modules from /etc/modules.d/*
3 --> 4, odd that reported CPU speed varies between boots on mainline u-boot!
--- a/210119-main143.log
+++ b/210119-main143-analog.log
@@ -23,10 +23,10 @@
[] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[] NR_IRQS: 51
[] random: get_random_bytes called from start_kernel+0x32c/0x518 with crng_init=0
-[] CPU clock: 657.031 MHz
-[] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5817867708 ns
-[] sched_clock: 32 bits at 328MHz, resolution 3ns, wraps every 6536930302ns
-[] Calibrating delay loop... 436.22 BogoMIPS (lpj=872448)
+[] CPU clock: 658.593 MHz
+[] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5804064938 ns
+[] sched_clock: 32 bits at 329MHz, resolution 3ns, wraps every 6521420798ns
+[] Calibrating delay loop... 438.78 BogoMIPS (lpj=877568)
[] pid_max: default: 32768 minimum: 301
[] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
@@ -120,15 +120,27 @@
[] hub 1-0:1.0: 1 port detected
[] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[] init: - preinit -
+[] usb 1-1: new high-speed USB device number 2 using ehci-platform
+[] usb 1-1: device descriptor read/64, error -71
+[] usb 1-1: device descriptor read/64, error -71
+[] usb 1-1: new high-speed USB device number 3 using ehci-platform
[] random: jshn: uninitialized urandom read (4 bytes read)
[] random: jshn: uninitialized urandom read (4 bytes read)
+[] usb 1-1: device descriptor read/64, error -71
[] random: jshn: uninitialized urandom read (4 bytes read)
+[] usb 1-1: device descriptor read/64, error -71
+[] usb usb1-port1: attempt power cycle
[] urandom_read: 6 callbacks suppressed
[] random: jshn: uninitialized urandom read (4 bytes read)
+[] usb 1-1: new high-speed USB device number 4 using ehci-platform
+[] usb 1-1: device not accepting address 4, error -71
[] eth0: link up (1000Mbps/Full duplex)
[] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
+[] usb 1-1: new high-speed USB device number 5 using ehci-platform
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
+[] usb 1-1: device not accepting address 5, error -71
+[] usb usb1-port1: unable to enumerate USB device
[] jffs2_scan_eraseblock(): End of filesystem marker found at 0x10000
[] jffs2_build_filesystem(): unlocking the mtd device...
[] done.
@@ -158,8 +170,8 @@ Please press Enter to activate this console.
[] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[] Backport generated by backports.git v5.8-1-0-g79400d9e
[] xt_time: kernel timezone is -0000
-[] PPP generic driver version 2.4.2
[] random: crng init done
+[] PPP generic driver version 2.4.2
[] NET: Registered protocol family 24
[] usbcore: registered new interface driver qmi_wwan
[] ieee80211 phy0: Atheros AR9531 Rev:2 mem=0xb8100000, irq=13
and finally, 2 --> 4
--- a/210119-p2kap143-analog.log
+++ b/210119-main143-analog.log
@@ -16,17 +16,17 @@
[] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
-[] Writing ErrCtl register=00000000
-[] Readback ErrCtl register=00000000
+[] Writing ErrCtl register=00000004
+[] Readback ErrCtl register=00000004
[] mem auto-init: stack:off, heap alloc:off, heap free:off
[] Memory: 122196K/131072K available (4819K kernel code, 193K rwdata, 1112K rodata, 1228K init, 196K bss, 8876K reserved, 0K cma-reserved)
[] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[] NR_IRQS: 51
[] random: get_random_bytes called from start_kernel+0x32c/0x518 with crng_init=0
-[] CPU clock: 650.000 MHz
-[] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5880801374 ns
-[] sched_clock: 32 bits at 325MHz, resolution 3ns, wraps every 6607641598ns
-[] Calibrating delay loop... 431.10 BogoMIPS (lpj=862208)
+[] CPU clock: 658.593 MHz
+[] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5804064938 ns
+[] sched_clock: 32 bits at 329MHz, resolution 3ns, wraps every 6521420798ns
+[] Calibrating delay loop... 438.78 BogoMIPS (lpj=877568)
[] pid_max: default: 32768 minimum: 301
[] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
@@ -121,27 +121,32 @@
[] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[] init: - preinit -
[] usb 1-1: new high-speed USB device number 2 using ehci-platform
-[] random: procd: uninitialized urandom read (4 bytes read)
-[] hub 1-1:1.0: USB hub found
-[] hub 1-1:1.0: 4 ports detected
-[] usb 1-1.3: new full-speed USB device number 3 using ehci-platform
+[] usb 1-1: device descriptor read/64, error -71
+[] usb 1-1: device descriptor read/64, error -71
+[] usb 1-1: new high-speed USB device number 3 using ehci-platform
[] random: jshn: uninitialized urandom read (4 bytes read)
[] random: jshn: uninitialized urandom read (4 bytes read)
-[] usb 1-1.3: new high-speed USB device number 4 using ehci-platform
-[] urandom_read: 3 callbacks suppressed
-[] random: jshn: uninitialized urandom read (4 bytes read)
+[] usb 1-1: device descriptor read/64, error -71
[] random: jshn: uninitialized urandom read (4 bytes read)
+[] usb 1-1: device descriptor read/64, error -71
+[] usb usb1-port1: attempt power cycle
+[] urandom_read: 6 callbacks suppressed
[] random: jshn: uninitialized urandom read (4 bytes read)
+[] usb 1-1: new high-speed USB device number 4 using ehci-platform
+[] usb 1-1: device not accepting address 4, error -71
[] eth0: link up (1000Mbps/Full duplex)
[] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
+[] usb 1-1: new high-speed USB device number 5 using ehci-platform
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
+[] usb 1-1: device not accepting address 5, error -71
+[] usb usb1-port1: unable to enumerate USB device
[] jffs2_scan_eraseblock(): End of filesystem marker found at 0x10000
[] jffs2_build_filesystem(): unlocking the mtd device...
[] done.
[] jffs2_build_filesystem(): erasing all blocks after the end marker...
[] done.
-[] jffs2: notice: (574) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
+[] jffs2: notice: (563) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[] mount_root: overlay filesystem has not been fully initialized yet
[] mount_root: switching to jffs2 overlay
[] overlayfs: upper fs does not support tmpfile.
@@ -156,21 +161,18 @@ Failed to connect to ubus
[] procd: - init -
Please press Enter to activate this console.
[] kmodloader: loading kernel modules from /etc/modules.d/*
-[] urngd: v1.0.2 started.
[] Mirror/redirect action on
[] u32 classifier
[] input device check on
[] Actions configured
+[] urngd: v1.0.2 started.
[] usbcore: registered new interface driver cdc_wdm
[] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[] Backport generated by backports.git v5.8-1-0-g79400d9e
[] xt_time: kernel timezone is -0000
[] random: crng init done
-[] random: 1 urandom warning(s) missed due to ratelimiting
[] PPP generic driver version 2.4.2
[] NET: Registered protocol family 24
-[] qmi_wwan 1-1.3:1.4: cdc-wdm0: USB WDM device
-[] qmi_wwan 1-1.3:1.4 wwan0: register 'qmi_wwan' at usb-1b000000.usb-1.3, WWAN/QMI device, 22:50:c4:0b:84:69
[] usbcore: registered new interface driver qmi_wwan
[] ieee80211 phy0: Atheros AR9531 Rev:2 mem=0xb8100000, irq=13
[] kmodloader: done loading kernel modules from /etc/modules.d/*
For reference, AP143 mainline u-boot (commit). Pepe2k AP143 (commit) - of course many QCA9531 boards for pepe2k)
But it's notable that each time I boot under mainline u-boot I get a different reported CPU clock speed:
[ 0.000000] CPU clock: 658.203 MHz
...
[ 0.000000] CPU clock: 657.031 MHz
...
[ 0.000000] CPU clock: 656.640 MHz
...
[ 0.000000] CPU clock: 674.218 MHz
@123serge123 Re your suggestion about crystal, I saw the following node in qca953x.dtsi:
extosc: ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-output-names = "ref";
clock-frequency = <25000000>;
};
this i suppose fixes frequency at 25MHz. i tried changing the value above to 40000000 and my uart connection turned to meaningless data during boot. (Unlike @toolchains I'm hesitant to make my own edits to u-boot in case of a brick!)