Could the alias sdhc1 = &sdhc_1;
be causing the SDHCI not to be probed? @itorK copied it from the original DTS but it seems unnecessary
There is no need for that, it shouldn't break it but remove it.
Also, can you run cat /sys/kernel/debug/devices_deferred
The 0:art partition is not part of the mmc but of the spi-nor:
From the stock bootlog
[ 3.300534] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[ 3.303341] m25p80 spi32766.0: found w25q64dw, expected n25q128a11
[ 3.309068] m25p80 spi32766.0: w25q64dw (8192 Kbytes)
[ 3.315116] 22 ofpart partitions found on MTD device spi32766.0
[ 3.320116] Creating 22 MTD partitions on "spi32766.0":
[ 3.325890] 0x000000000000-0x000000050000 : "0:SBL1"
[ 3.331737] 0x000000050000-0x000000060000 : "0:MIBIB"
[ 3.336929] 0x000000060000-0x000000080000 : "0:BOOTCONFIG"
[ 3.341824] 0x000000080000-0x0000000a0000 : "0:BOOTCONFIG1"
[ 3.347232] 0x0000000a0000-0x000000220000 : "0:QSEE"
[ 3.352670] 0x000000220000-0x0000003a0000 : "0:QSEE_1"
[ 3.357905] 0x0000003a0000-0x0000003b0000 : "0:DEVCFG"
[ 3.362816] 0x0000003b0000-0x0000003c0000 : "0:DEVCFG_1"
[ 3.367968] 0x0000003c0000-0x0000003d0000 : "0:APDP"
[ 3.373409] 0x0000003d0000-0x0000003e0000 : "0:APDP_1"
[ 3.378381] 0x0000003e0000-0x000000420000 : "0:RPM"
[ 3.383341] 0x000000420000-0x000000460000 : "0:RPM_1"
[ 3.388115] 0x000000460000-0x000000470000 : "0:CDT"
[ 3.393333] 0x000000470000-0x000000480000 : "0:CDT_1"
[ 3.398007] 0x000000480000-0x000000540000 : "0:APPSBL"
[ 3.403182] 0x000000540000-0x000000600000 : "0:APPSBL_1"
[ 3.408245] 0x000000600000-0x000000610000 : "0:APPSBLENV"
[ 3.413700] 0x000000610000-0x000000650000 : "0:ART"
[ 3.419004] 0x000000650000-0x0000006d0000 : "0:ETHPHYFW"
[ 3.423685] 0x0000006d0000-0x0000006e0000 : "0:CRT"
[ 3.429259] 0x0000006e0000-0x0000006f0000 : "DUAL_FLAG"
[ 3.433888] 0x0000006f0000-0x000000800000 : "RESERVED"
You need to add the spi-nor dts node, should be the same as for the QNAP.
Thanks @kirdes, now i see proper mtd partitions, but atk11 has next problem:
[ 8.380994] ath11k c000000.wifi: No regulatory rules available in the event info
[ 8.385673] ath11k c000000.wifi: failed to extract regulatory info from received event
[ 8.393076] ------------[ cut here ]------------
[ 8.400771] WARNING: CPU: 0 PID: 0 at ath11k_hal_rx_sw_mon_ring_buf_paddr_get+0x3284/0x4ae0 [ath11k]
[ 8.405553] Modules linked in: pppoe ppp_async nft_fib_inet nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet ath11k_pci ath11k_ahb ath11k pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_counter nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mac80211 cfg80211 slhc qrtr_smd qrtr_mhi qrtr qmi_helpers ns nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mhi libcrc32c hwmon crc_ccitt compat seqiv jitterentropy_rng drbg michael_mic hmac cmac leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom qca_nss_dp qca_ssdk gpio_button_hotplug ext4 mbcac[ 8.502858] lr : ath11k_hal_rx_sw_mon_ring_buf_paddr_get+0x327c/0x4ae0 [ath11k]
[ 8.510151] sp : ffffffc008003c30
[ 8.517434] x29: ffffffc008003c30 x28: ffffffc000cda968 x27: ffffff8006000000
[ 8.520914] x26: ffffffc000d22c40 x25: 0000000000000014 x24: ffffff8006fe3440
[ 8.528033] x23: 0000000000000000 x22: ffffff80045b8000 x21: ffffff8004962b80
[ 8.535150] x20: ffffff8006000000 x19: ffffff8004a3c500 x18: 00000000000001bd
[ 8.542267] x17: 65636572206d6f72 x16: 66206f666e692079 x15: ffffffc009f579c8
[ 8.549387] x14: 0000000000000537 x13: 00000000000001bd x12: ffffffc008003828
[ 8.556504] x11: ffffffc009faf9c8 x10: 00000000fffff000 x9 : ffffffc009faf9c8
[ 8.563623] x8 : 0000000000000000 x7 : ffffffc009f579c8 x6 : 00000000ffffefff
[ 8.570740] x5 : ffffffc009faf9c8 x4 : 00000000ffffefff x3 : 0000000000000000
[ 8.577859] x2 : 0000000000000000 x1 : ffffffc009f4e040 x0 : 000000000000004a
[ 8.584976] Call trace:
[ 8.592086] ath11k_hal_rx_sw_mon_ring_buf_paddr_get+0x3284/0x4ae0 [ath11k]
[ 8.594350] ath11k_htc_rx_completion_handler+0x480/0x600 [ath11k]
[ 8.601293] ath11k_ce_per_engine_service+0x2e8/0x400 [ath11k]
[ 8.607542] 0xffffffc000d22c40
[ 8.613354] tasklet_action_common.constprop.0+0x144/0x180
[ 8.616397] tasklet_action+0x28/0x34
[ 8.621949] _stext+0x124/0x29c
[ 8.625680] irq_exit+0xbc/0x100
[ 8.628632] handle_domain_irq+0x64/0x90
[ 8.632106] gic_handle_irq+0x74/0xa0
[ 8.636011] call_on_irq_stack+0x28/0x54
[ 8.639572] do_interrupt_handler+0x54/0x60
[ 8.643564] el1_interrupt+0x30/0x50
[ 8.647470] el1h_64_irq_handler+0x18/0x24
[ 8.651290] el1h_64_irq+0x78/0x7c
[ 8.655194] arch_cpu_idle+0x18/0x2c
[ 8.658581] default_idle_call+0x20/0x70
[ 8.662313] do_idle+0x214/0x240
[ 8.666219] cpu_startup_entry+0x28/0x60
[ 8.669431] rest_init+0xc8/0xe0
[ 8.673336] arch_call_rest_init+0x10/0x1c
[ 8.676550] start_kernel+0x6a8/0x6cc
[ 8.680456] __primary_switched+0xa0/0xa8
[ 8.684189] ---[ end trace 1a244024128e0b16 ]---
[ 8.722760] ath11k c000000.wifi: failed to receive default regd during init
That means that there is no regulatory info in the BDF, until QCA finally releases external regulatory publicly its gonna be an issue
This is part of boot original software:
[ 10.396491] procd: - init -
Please press Enter to activate this console.
WIFI FW mount is successful
[ 11.700333] cfg80211: World regulatory domain updated:
[ 11.700357] cfg80211: DFS Master region: unset
[ 11.704451] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 11.708966] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 11.718811] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 11.719785] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[ 11.721049] Initializing XFRM netlink socket
[ 11.721450] NET: Registered protocol family 15
[ 11.745169] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 11.749414] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 11.757334] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 11.767072] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 11.776512] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 11.784586] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
Looks like regulatory is configured by cfg80211 module
Anything you see in the QSDK FW is highly modified, what they did here is pretty much removed the limits on world regulatory, that is not something that anybody sane would do.
For those who want mighty fights with QSDK, i've added short instruction how to get full u-boot access, :
I guess the ZynPass application we use in the Zyxel P2812 modem is valid for this device, isn't it?
I don't know i haven't P2812, but personally i would prefer source code, so for me bash script is better solution.
I thought the working QSDK openwrt firmware mentioned above was developed by me...
The lp5569 driver could be simply ported to openwrt from the vendor's GPL source-code and working.
I will pr this commit to my open-source lede project github soon.
The vendor code is specific to the device though which isn't exactly upstream OpenWrt/Linux friendly because Zyxel hardcoded their programs instead of loading them in from user space.
I found that it's not a QSDK problem,
Board file dosen't have regulatory rules, so ath11k driver must loaded it from external file.
Unfortunetly ath11k driver is littly bit buggy and even you set your parameter as below ( as in commit https://github.com/robimarko/openwrt/commit/299aa324d2f962782b75128139616d02a5bb5301)
.supports_regdb = true,
than error still exists, because of 'if' bug in qmi.c file(always run ath11k_qmi_load_bdf_qmi with false parameter ignoring supports_regdb parameter) as below :
static int ath11k_qmi_event_load_bdf(struct ath11k_qmi *qmi)
...
if (ab->hw_params.supports_regdb)
ath11k_qmi_load_bdf_qmi(ab, true);
ret = ath11k_qmi_load_bdf_qmi(ab, false);
if (ret < 0) {
ath11k_warn(ab, "failed to load board data file: %d\n", ret);
return ret;
}
I wonder if someone test it,
funny thing is that this bug exists in offically linux kernel mainline
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/ath/ath11k/wmi.c?h=v6.1-rc3
When i fixed this problem in my repository and put regdb.bin file in /lib/ath11k/IPQ8074/hw2.0, finally got:
[ 7.935320] remoteproc remoteproc0: remote processor cd00000.q6v5_wcss is now up
[ 7.937489] ath11k c000000.wifi: qmi ignore invalid mem req type 3
[ 7.942336] ath11k c000000.wifi: chip_id 0x0 chip_family 0x0 board_id 0xff soc_id 0xffffffff
[ 7.947789] ath11k c000000.wifi: fw_version 0x250a04a5 fw_build_timestamp 2021-12-20 07:09 fw_build_id WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
[ 7.969321] ath11k c000000.wifi: KP: loading external regdb file
[ 7.974355] ath11k c000000.wifi: KP fetch regdb file: regdb.bin from IPQ8074/hw2.0
[ 7.974656] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 7.980656] ath11k c000000.wifi: fetched regdb
Then, i set regulatory:
iw reg set PL
We have 3 wlan interfaces: 2,4 GHZ, 5 Ghz and 6 Ghz, so interfaces up:
ifconfig wlan0 up
ifconfig wlan1 up
ifconfig wlan2 up
And also connect test to unathenticated hotspot
iw wlan1 connect testAP
Et voila, we are in:
[ 3424.280639] wlan1: authenticate with xx:xx:xx:xx:xx:xx
[ 3424.280720] wlan1: 80 MHz not supported, disabling VHT
[ 3424.436146] wlan1: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
[ 3424.444620] wlan1: authenticated
[ 3424.450606] wlan1: associate with xx:xx:xx:xx:xx:xx (try 1/3)
[ 3424.482605] wlan1: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x1421 status=0 aid=1)
[ 3424.483992] wlan1: associated
[ 3424.489450] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
So for now we can cool our beers
Which regd.bin are you using?
BTW the NBG7815 doesn't have a 6Ghz radio but two 5 Ghz radios (2x QCN5054)
compiled regulatory.bin from wireless-regdb package,
You're right, 2x5 GHZ not 6 GHZ
Yeah, if you got the failed to receive regulatory event then BDF has no regulatory data embedded and they are using CNSS to load the external binary via QMI.
Nice catch on the logic bug, however funnily enough ath11k will load the regdb.bin fine if present since the same function gets called twice, but I think that was crashing FW 2.5.
Wait, so you loaded the upstream wireless-regdb binary and that worked?
Their end formats looks very differently
Yes, it's working
root@OpenWrt:/# iw reg get
global
country 00: DFS-UNSET
(755 - 928 @ 2), (N/A, 20), (N/A), PASSIVE-SCAN
(2402 - 2472 @ 40), (N/A, 20), (N/A)
(2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, PASSIVE-SCAN
(2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, PASSIVE-SCAN
(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN
(5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, PASSIVE-SCAN
(5735 - 5835 @ 80), (N/A, 20), (N/A), PASSIVE-SCAN
(57240 - 63720 @ 2160), (N/A, 0), (N/A)
root@OpenWrt:/# iw reg set CH
root@OpenWrt:/# iw reg get
global
country CH: DFS-ETSI
(2400 - 2483 @ 40), (N/A, 20), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
(5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
(5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
(5725 - 5875 @ 80), (N/A, 13), (N/A)
(57000 - 66000 @ 2160), (N/A, 40), (N/A)
root@OpenWrt:/# iw reg set DE
root@OpenWrt:/# iw reg get
global
country DE: DFS-ETSI
(2400 - 2483 @ 40), (N/A, 20), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
(5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
(5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
(5725 - 5875 @ 80), (N/A, 13), (N/A)
(5945 - 6425 @ 160), (N/A, 23), (N/A), NO-OUTDOOR
(57000 - 66000 @ 2160), (N/A, 40), (N/A)
root@OpenWrt:/# iw reg set PL
root@OpenWrt:/# iw reg get
global
country PL: DFS-ETSI
(2400 - 2483 @ 40), (N/A, 20), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
(5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
(5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
(5725 - 5875 @ 80), (N/A, 13), (N/A)
(5945 - 6425 @ 160), (N/A, 23), (N/A), NO-OUTDOOR
(57000 - 66000 @ 2160), (N/A, 40), (N/A)
root@OpenWrt:/#
root@OpenWrt:/# iw reg set US
root@OpenWrt:/# iw reg get
global
country US: DFS-FCC
(902 - 904 @ 2), (N/A, 30), (N/A)
(904 - 920 @ 16), (N/A, 30), (N/A)
(920 - 928 @ 8), (N/A, 30), (N/A)
(2400 - 2472 @ 40), (N/A, 30), (N/A)
(5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
(5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
(5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
(5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
(5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
(57240 - 71000 @ 2160), (N/A, 40), (N/A)
Oh, thats a great discovery, if that is the case it would sort out a lot of our issues.
Was it regulatory.bin
or regulatory.db
?
I never though it could work cause the format is so wildly different, it has the same format as BDF-s do and requires special tooling, nothing like the upstream wireless regulatory
it is regulatory.bin
Great, now this is really intriguing me to try 2.7 FW with the upstream regulatory and if that works it really unlocks the bugfixed FW.