OpenWrt support for Linksys MX8500

I'm trying to add support for Linksys MX8500 (IPQ8072A).

The problem is that NAND chip is not found during boot.
NAND chip is Fidelix FMND4G08S3J-ID.

OEM bootlog:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.60 (root@build-vm) (gcc version 5.2.0 (OpenWrt GCC 5.2.0 998fe11+r49254) ) #1 SMP Thu Oct 14 19:47:09 PDT 2021
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c0383d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Qualcomm Technologies, Inc. IPQ807x/AP-HK14
[    0.000000] Ignoring memory range 0x40000000 - 0x41000000
[    0.000000] Reserved memory: created DMA memory pool at 0x54800000, size 24 MiB
[    0.000000] Reserved memory: initialized node dma_pool0@54800000, compatible id shared-dma-pool
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] PERCPU: Embedded 12 pages/cpu @be7a8000 s19264 r8192 d21696 u49152
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 207904
[    0.000000] Kernel command line: console=ttyMSM0,115200n8 ubi.mtd=alt_rootfs root=ubi0:ubifs rootfstype=ubifs rootwait swiotlb=1 swiotlb=1 coherent_pool=2M
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 823444K/839680K available (5503K kernel code, 334K rwdata, 1840K rodata, 264K init, 362K bss, 16236K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xbf800000 - 0xff800000   (1024 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xbf000000   (1008 MB)
[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
[    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)
[    0.000000]       .text : 0x80208000 - 0x80933eac   (7344 kB)
[    0.000000]       .init : 0x80934000 - 0x80976000   ( 264 kB)
[    0.000000]       .data : 0x80976000 - 0x809c9bdc   ( 335 kB)
[    0.000000]        .bss : 0x809cc000 - 0x80a26990   ( 363 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] Architected cp15 timer(s) running at 19.20MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000005] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000016] Switching to timer-based delay loop, resolution 52ns
[    0.000731] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000743] pid_max: default: 32768 minimum: 301
[    0.000821] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000830] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001273] CPU: Testing write buffer coherency: ok
[    0.001470] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.001519] Setting up static identity map for 0x41208280 - 0x412082d8
[    0.005691] MSM Memory Dump base table set up
[    0.005714] MSM Memory Dump apps data table set up
[    0.006560] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.007075] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.007585] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.007633] Brought up 4 CPUs
[    0.007652] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.007657] CPU: All CPU(s) started in SVC mode.
[    0.029393] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.029703] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.029725] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.030103] pinctrl core: initialized pinctrl subsystem
[    0.031100] NET: Registered protocol family 16
[    0.032179] DMA: preallocated 2048 KiB pool for atomic coherent allocations
[    0.059838] cpuidle: using governor ladder
[    0.089856] cpuidle: using governor menu
[    0.090027] NET: Registered protocol family 42
[    0.091842] Soc version is not 1, changing clock offsets
[    0.099429] irq: no irq domain found for /soc/smp2p-wcss/slave-kernel !
[    0.101831] irq: no irq domain found for /soc/smp2p-wcss/slave-kernel !
[    0.117638] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.117647] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.119374] CPU: IPQ8072A, SoC Version: 2.0
[    0.120182] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    0.121120] spmi spmi-0: PMIC Arb Version-2 (0x20010000)
[    0.122748] IPC logging disabled
[    0.122754] IPC logging disabled
[    0.122758] IPC logging disabled
[    0.122762] IPC logging disabled
[    0.122767] IPC logging disabled
[    0.122996] sps:sps is ready.
[    0.151794] SCSI subsystem initialized
[    0.151971] pps_core: LinuxPPS API ver. 1 registered
[    0.151978] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.152005] PTP clock support registered
[    0.154099] Bluetooth: Core ver 2.21
[    0.154127] NET: Registered protocol family 31
[    0.154133] Bluetooth: HCI device and connection manager initialized
[    0.154144] Bluetooth: HCI socket layer initialized
[    0.154153] Bluetooth: L2CAP socket layer initialized
[    0.154179] Bluetooth: SCO socket layer initialized
[    0.154434] clocksource: Switched to clocksource arch_sys_counter
[    0.158352] NET: Registered protocol family 2
[    0.158788] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.158872] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.159013] TCP: Hash tables configured (established 8192 bind 8192)
[    0.159061] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.159096] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.159251] NET: Registered protocol family 1
[    0.160520] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.167908] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.171314] Key type asymmetric registered
[    0.171331] Asymmetric key parser 'x509' registered
[    0.171370] io scheduler noop registered
[    0.171384] io scheduler deadline registered (default)
[    0.173734] 20000000.pci supply vdda not found, using dummy regulator
[    0.173775] 20000000.pci supply vdda_phy not found, using dummy regulator
[    0.173812] 20000000.pci supply vdda_refclk not found, using dummy regulator
[    0.174409] PCI host bridge /soc/pci@20000000 ranges:
[    0.174476]    IO 0x20200000..0x2020ffff -> 0x20200000
[    0.174490]   MEM 0x20220000..0x2fffffff -> 0x20220000
[    0.425969] qcom-pcie 20000000.pci: link up
[    0.426132] qcom-pcie 20000000.pci: PCI host bridge to bus 0000:00
[    0.426146] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.426160] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x20200000-0x2020ffff])
[    0.426170] pci_bus 0000:00: root bus resource [mem 0x20220000-0x2fffffff]
[    0.426520] PCI: bus0: Fast back to back transfers disabled
[    0.426532] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.427491] PCI: bus1: Fast back to back transfers disabled
[    0.427550] pci 0000:00:00.0: BAR 8: assigned [mem 0x20400000-0x205fffff]
[    0.427564] pci 0000:00:00.0: BAR 9: assigned [mem 0x20600000-0x207fffff 64bit pref]
[    0.427575] pci 0000:00:00.0: BAR 0: assigned [mem 0x20220000-0x20220fff 64bit]
[    0.427591] pci 0000:00:00.0: BAR 7: assigned [io  0x1000-0x1fff]
[    0.427605] pci 0000:01:00.0: BAR 0: assigned [mem 0x20400000-0x205fffff 64bit]
[    0.427653] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.427664] pci 0000:00:00.0:   bridge window [io  0x1000-0x1fff]
[    0.427676] pci 0000:00:00.0:   bridge window [mem 0x20400000-0x205fffff]
[    0.427687] pci 0000:00:00.0:   bridge window [mem 0x20600000-0x207fffff 64bit pref]
[    0.427734] PCIe: RC0 enabled during bootup
[    0.427934] 10000000.pci supply vdda not found, using dummy regulator
[    0.427985] 10000000.pci supply vdda_phy not found, using dummy regulator
[    0.428016] 10000000.pci supply vdda_refclk not found, using dummy regulator
[    0.428528] PCI host bridge /soc/pci@10000000 ranges:
[    0.428549]    IO 0x10200000..0x1020ffff -> 0x10200000
[    0.428562]   MEM 0x10220000..0x1fffffff -> 0x10220000
[    1.576104] qcom-pcie 10000000.pci: phy link never came up
[    1.577661] qcom-pcie 10000000.pci: hostinit failed
[    1.577670] qcom-pcie 10000000.pci: cannot initialize host
[    1.577790] qcom-pcie: probe of 10000000.pci failed with error -110
[    1.582603] msm_rpm_log_probe: OK
[    1.582949] msm-dcc b3000.dcc: DCC XPU is not specified
[    1.583177] msm-dcc b3000.dcc: jiffies_64: 0xffff8b6e, cntvct_64: 0x8d23d26
[    1.583189] msm-dcc b3000.dcc: gcnt_hi: 0x00000000(0xbfa52004)
[    1.583200] msm-dcc b3000.dcc: gcnt_lo: 0x08d23ee7(0xbfa52000)
[    1.583835] TZ SMMU State: SMMU Stage2 Enabled
[    1.583884] TZ Log : Will warn on Access Violation, as paniconaccessviolation is not set
[    1.585668] msm_serial 78b3000.serial: msm_serial: detected port #0
[    1.585707] msm_serial 78b3000.serial: uartclk = 3686400
[    1.585742] 78b3000.serial: ttyMSM0 at MMIO 0x78b3000 (irq = 23, base_baud = 230400) is a MSM
[    1.585761] msm_serial: console setup on port #0
[    2.447634] console [ttyMSM0] enabled
[    2.452631] msm_serial 78b1000.serial: msm_serial: detected port #1
[    2.455918] msm_serial 78b1000.serial: uartclk = 19200000
[    2.461966] 78b1000.serial: ttyMSM1 at MMIO 0x78b1000 (irq = 24, base_baud = 1200000) is a MSM
[    2.467783] msm_serial 78b4000.serial: msm_serial: detected port #2
[    2.476049] msm_serial 78b4000.serial: uartclk = 19200000
[    2.482188] 78b4000.serial: ttyMSM2 at MMIO 0x78b4000 (irq = 25, base_baud = 1200000) is a MSM
[    2.488130] msm_serial: driver initialized
[    2.496588] msm_serial_hsl_init: driver initialized
[    2.501114] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    2.507169] QPIC controller hw version Major:1, Minor:5
[    2.512705] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xac
[    2.517347] nand: ONFI 10-Compliant Hynix H27S4G8F2EDA-BC
[    2.523923] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
[    2.529355] 30 ofpart partitions found on MTD device qcom_nand.0
[    2.536695] Creating 30 MTD partitions on "qcom_nand.0":
[    2.542940] 0x000000000000-0x000000100000 : "0:SBL1"
[    2.549979] 0x000000100000-0x000000200000 : "0:MIBIB"
[    2.554860] 0x000000200000-0x000000280000 : "0:BOOTCONFIG"
[    2.559348] 0x000000280000-0x000000300000 : "0:BOOTCONFIG1"
[    2.564698] 0x000000300000-0x000000600000 : "0:QSEE"
[    2.572401] 0x000000600000-0x000000900000 : "0:QSEE_1"
[    2.577618] 0x000000900000-0x000000980000 : "0:DEVCFG"
[    2.580280] 0x000000980000-0x000000a00000 : "0:DEVCFG_1"
[    2.585425] 0x000000a00000-0x000000a80000 : "0:APDP"
[    2.590903] 0x000000a80000-0x000000b00000 : "0:APDP_1"
[    2.595879] 0x000000b00000-0x000000b80000 : "0:RPM"
[    2.600827] 0x000000b80000-0x000000c00000 : "0:RPM_1"
[    2.605615] 0x000000c00000-0x000000c80000 : "0:CDT"
[    2.610738] 0x000000c80000-0x000000d00000 : "0:CDT_1"
[    2.615447] 0x000000d00000-0x000000d80000 : "0:APPSBLENV"
[    2.620647] 0x000000d80000-0x000000e80000 : "0:APPSBL"
[    2.626527] 0x000000e80000-0x000000f80000 : "0:APPSBL_1"
[    2.631549] 0x000000f80000-0x000001000000 : "0:ART"
[    2.636591] 0x000001000000-0x000001040000 : "u_env"
[    2.640956] 0x000001040000-0x000001060000 : "s_env"
[    2.645735] 0x000001060000-0x000001080000 : "devinfo"
[    2.650571] 0x000001080000-0x00000a680000 : "kernel"
[    2.791857] 0x000001680000-0x00000a680000 : "rootfs"
[    2.923470] mtd: device 22 (rootfs) set to be root filesystem
[    2.923501] 0x00000a680000-0x000013c80000 : "alt_kernel"
[    3.065118] 0x00000ac80000-0x000013c80000 : "alt_rootfs"
[    3.115229] random: nonblocking pool is initialized
[    3.196557] 0x000013c80000-0x000013e80000 : "sysdiag"
[    3.199156] 0x000013e80000-0x000013f80000 : "0:ETHPHYFW"
[    3.202225] 0x000013f80000-0x00001f100000 : "syscfg"
[    3.367824] 0x00001f100000-0x00001f600000 : "app_data"
[    3.373179] 0x00001f600000-0x000020000000 : "0:WIFIFW"
[    3.824342] qca-mdio 90000.mdio: Could not find phy-reset-gpio
[    3.824494] libphy: qca_mdio: probed
[    3.830696] qca-mdio 90000.mdio: qca-mdio driver was registered
[    3.832989] PPP generic driver version 2.4.2
[    3.838572] PPP BSD Compression module registered
[    3.842951] PPP Deflate Compression module registered
[    3.847574] NET: Registered protocol family 24
[    3.852584] PPTP driver version 0.8.5
[    3.857096] Unable to create IPC log context!
[    3.861052] Skip QCA8074V1 in V2 platform
[    3.865258] cnss[2]: INFO: Platform driver probed successfully. plat bdb08010 tgt 0xfffe
[    3.869170] cnss[27]: INFO: Platform driver probed successfully. plat bdb18010 tgt 0x1104
[    3.877500] i2c /dev entries driver
[    3.914942] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: dm-devel@redhat.com
[    3.914983] Bluetooth: HCI UART driver ver 2.3
[    3.922437] Bluetooth: HCI UART protocol H4 registered
[    3.926716] Bluetooth: HCI UART protocol BCSP registered
[    3.931812] Bluetooth: HCI UART protocol ATH3K registered
[    3.937740] sdhci: Secure Digital Host Controller Interface driver
[    3.942576] sdhci: Copyright(c) Pierre Ossman
[    3.948675] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.953368] leds-pca963x 0-0062: PCA963X_HW_BLINK ON
[    3.960520] leds-pca963x 0-0062: PCA963X LED initialize ok done
[    3.964345] qcom_ice_get_device_tree_data: No vdd-hba-supply regulator, assuming not needed
[    3.969470] ICE IRQ = 28
[    3.978407] 
[    3.978407] Version Rollback Feature Disabled
[    3.982959] qcom-q6v5-wcss-pil cd00000.qcom_q6v5_wcss: ssr registeration success qcom_q6v5_wcss
[    3.986275] remoteproc remoteproc0: cd00000.qcom_q6v5_wcss is available
[    3.995307] SPMI VADC - Min ch: 0 Max ch: 15
[    4.003249] u32 classifier
[    4.005870]     input device check on
[    4.008369]     Actions configured
[    4.012126] Netfilter messages via NETLINK v0.30.
[    4.015439] nfnl_acct: registering with nfnetlink.
[    4.020223] nf_conntrack version 0.5.0 (12866 buckets, 51464 max)
[    4.025326] ctnetlink v0.93: registering with nfnetlink.
[    4.031068] nf_conntrack_rtsp v0.7 loading
[    4.036829] gre: GRE over IPv4 demultiplexor driver
[    4.040325] ip_gre: GRE over IPv4 tunneling driver
[    4.046291] nf_nat_rtsp v0.7 loading
[    4.049989] ip_tables: (C) 2000-2006 Netfilter Core Team
[    4.054496] NET: Registered protocol family 10
[    4.059841] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    4.063435] sit: IPv6 over IPv4 tunneling driver
[    4.069842] NET: Registered protocol family 17
[    4.073426] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    4.077702] Bridge firewalling registered
[    4.090422] Ebtables v2.0 registered
[    4.094542] Bluetooth: RFCOMM TTY layer initialized
[    4.097966] Bluetooth: RFCOMM socket layer initialized
[    4.102588] Bluetooth: RFCOMM ver 1.11
[    4.107792] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.111499] Bluetooth: BNEP filters: protocol multicast
[    4.116987] Bluetooth: BNEP socket layer initialized
[    4.121943] l2tp_core: L2TP core driver, V2.0
[    4.127147] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    4.131382] l2tp_netlink: L2TP netlink interface
[    4.136108] 8021q: 802.1Q VLAN Support v1.8
[    4.141092] Registering SWP/SWPB emulation handler
[    4.145832] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    4.149805] pmd9655_s3: supplied by e-smps1-reg
[    4.157000] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    4.161332] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    4.167945] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    4.175607] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    4.183114] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    4.192248] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 712000 uV
[    4.199195] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 840000 uV
[    4.209177] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 912000 uV
[    4.218993] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop=1000000 uV
[    4.228868] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 724, quot_offset[ 7]=   0
[    4.238609] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 962, quot_offset[ 7]= 235
[    4.249457] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1081, quot_offset[ 7]= 115
[    4.260394] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1232, quot_offset[ 7]= 150
[    4.271450] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop
[    4.283141] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 800000 KHz
[    4.289166] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 1017600 KHz
[    4.296419] ubi0: attaching mtd24
[    5.036733] ubi0: scanning is finished
[    5.043421] ubi0: attached mtd24 (name "alt_rootfs", size 144 MiB)
[    5.043440] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    5.048490] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    5.055343] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    5.062196] ubi0: good PEBs: 1152, bad PEBs: 0, corrupted PEBs: 0
[    5.068970] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    5.075222] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1404302797

OpenWrt bootlog:

Jumping to AARCH64 kernel via monitor
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.1.80 (*@*) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r0+25407-3209a200c9) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Thu Mar  7 17:29:05 2024
[    0.000000] Machine model: Linksys MX8500
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000040ffffff]
[    0.000000]   node   0: [mem 0x0000000041000000-0x000000004a3fffff]
[    0.000000]   node   0: [mem 0x000000004a400000-0x00000000510fffff]
[    0.000000]   node   0: [mem 0x0000000051100000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 18 pages/cpu s34152 r8192 d31384 u73728
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line: console=ttyMSM0,115200n8 ubi.mtd=rootfs root=ubi0:ubifs rootfstype=ubifs rootwait swiotlb=1 root=/dev/ubiblock0_0 rootfstype=squashfs ro
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 887492K/1048576K available (7808K kernel code, 880K rwdata, 2300K rodata, 1280K init, 277K bss, 161084K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv2m: range[mem 0x0b00a000-0x0b00affc], SPI[448:479]
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 and mmio timer(s) running at 19.20MHz (virt/virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000001] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000105] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000118] pid_max: default: 32768 minimum: 301
[    0.000600] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000615] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.002444] cblist_init_generic: Setting adjustable number of callback queues.
[    0.002453] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.002645] rcu: Hierarchical SRCU implementation.
[    0.002649] rcu: 	Max phase no-delay instances is 1000.
[    0.003481] smp: Bringing up secondary CPUs ...
[    0.004116] Detected VIPT I-cache on CPU1
[    0.004257] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.004915] Detected VIPT I-cache on CPU2
[    0.005017] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.005630] Detected VIPT I-cache on CPU3
[    0.005731] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.005798] smp: Brought up 1 node, 4 CPUs
[    0.005807] SMP: Total of 4 processors activated.
[    0.005811] CPU features: detected: 32-bit EL0 Support
[    0.005816] CPU features: detected: CRC32 instructions
[    0.005879] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.005885] CPU: All CPU(s) started at EL1
[    0.005888] alternatives: applying system-wide alternatives
[    0.017521] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.017547] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.017767] pinctrl core: initialized pinctrl subsystem
[    0.018930] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.019516] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.019556] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.019593] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.019978] thermal_sys: Registered thermal governor 'step_wise'
[    0.020188] cpuidle: using governor menu
[    0.020499] ASID allocator initialised with 65536 entries
[    0.047299] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    0.055830] SCSI subsystem initialized
[    0.056019] usbcore: registered new interface driver usbfs
[    0.056085] usbcore: registered new interface driver hub
[    0.056119] usbcore: registered new device driver usb
[    0.056575] qcom_scm: convention: smc arm 64
[    0.057927] clocksource: Switched to clocksource arch_sys_counter
[    0.059011] NET: Registered PF_INET protocol family
[    0.059154] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.060525] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.060548] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.060562] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.060649] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.060923] TCP: Hash tables configured (established 8192 bind 8192)
[    0.061021] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.061059] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.061272] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.061308] PCI: CLS 0 bytes, default 64
[    0.062880] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.067855] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.067867] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.071630] qcom-qmp-usb-phy 78000.phy: supply vdda-phy not found, using dummy regulator
[    0.071786] qcom-qmp-usb-phy 78000.phy: supply vdda-pll not found, using dummy regulator
[    0.072909] qcom-qusb2-phy 79000.phy: supply vdd not found, using dummy regulator
[    0.073060] qcom-qusb2-phy 79000.phy: supply vdda-pll not found, using dummy regulator
[    0.073129] qcom-qusb2-phy 79000.phy: supply vdda-phy-dpdm not found, using dummy regulator
[    0.073306] qcom-qusb2-phy 79000.phy: Registered Qcom-QUSB2 phy
[    0.075542] qcom-pcie 20000000.pci: host bridge /soc/pci@20000000 ranges:
[    0.075594] qcom-pcie 20000000.pci:       IO 0x0020200000..0x002020ffff -> 0x0000000000
[    0.075619] qcom-pcie 20000000.pci:      MEM 0x0020220000..0x002fffffff -> 0x0020220000
[    0.199485] qcom-pcie 20000000.pci: iATU unroll: enabled
[    0.199498] qcom-pcie 20000000.pci: iATU regions: 8 ob, 8 ib, align 4K, limit 1024G
[    0.299562] qcom-pcie 20000000.pci: PCIe Gen.3 x1 link up
[    0.299710] qcom-pcie 20000000.pci: PCI host bridge to bus 0000:00
[    0.299721] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.299732] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.299741] pci_bus 0000:00: root bus resource [mem 0x20220000-0x2fffffff]
[    0.299779] pci 0000:00:00.0: [17cb:1002] type 01 class 0x060400
[    0.299799] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x00000fff]
[    0.299870] pci 0000:00:00.0: PME# supported from D0 D3hot D3cold
[    0.303540] pci 0000:01:00.0: [17cb:1104] type 00 class 0x028000
[    0.303639] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.304156] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.304308] pci 0000:01:00.0: 7.876 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x1 link at 0000:00:00.0 (capable of 15.752 Gb/s with 8.0 GT/s PCIe x2 link)
[    0.304795] pci 0000:00:00.0: BAR 8: assigned [mem 0x20400000-0x205fffff]
[    0.304811] pci 0000:00:00.0: BAR 9: assigned [mem 0x20600000-0x207fffff 64bit pref]
[    0.304822] pci 0000:00:00.0: BAR 0: assigned [mem 0x20220000-0x20220fff]
[    0.304834] pci 0000:00:00.0: BAR 7: assigned [io  0x1000-0x1fff]
[    0.304847] pci 0000:01:00.0: BAR 0: assigned [mem 0x20400000-0x205fffff 64bit]
[    0.304899] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    0.304908] pci 0000:00:00.0:   bridge window [io  0x1000-0x1fff]
[    0.304918] pci 0000:00:00.0:   bridge window [mem 0x20400000-0x205fffff]
[    0.304927] pci 0000:00:00.0:   bridge window [mem 0x20600000-0x207fffff 64bit pref]
[    0.307150] pcieport 0000:00:00.0: PME: Signaling with IRQ 16
[    0.307449] pcieport 0000:00:00.0: AER: enabled with IRQ 16
[    0.309465] bam-dma-engine 704000.dma-controller: num-channels unspecified in dt
[    0.309481] bam-dma-engine 704000.dma-controller: num-ees unspecified in dt
[    0.313861] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.314513] msm_serial 78b3000.serial: msm_serial: detected port #0
[    0.314547] msm_serial 78b3000.serial: uartclk = 3686400
[    0.314666] 78b3000.serial: ttyMSM0 at MMIO 0x78b3000 (irq = 21, base_baud = 230400) is a MSM
[    0.314696] msm_serial: console setup on port #0
[    1.164778] printk: console [ttyMSM0] enabled
[    1.169952] msm_serial 78b4000.serial: msm_serial: detected port #1
[    1.173729] msm_serial 78b4000.serial: uartclk = 19200000
[    1.179894] 78b4000.serial: ttyMSM1 at MMIO 0x78b4000 (irq = 22, base_baud = 1200000) is a MSM
[    1.185763] msm_serial: driver initialized
[    1.198907] loop: module loaded
[    1.199686] ipq8074-pinctrl 1000000.pinctrl: pin GPIO_16 already requested by 78b4000.serial; cannot claim for 79b0000.nand-controller
[    1.200974] ipq8074-pinctrl 1000000.pinctrl: pin-16 (79b0000.nand-controller) status -22
[    1.213173] ipq8074-pinctrl 1000000.pinctrl: could not request pin 16 (GPIO_16) from group gpio16  on device 1000000.pinctrl
[    1.221386] qcom-nandc 79b0000.nand-controller: Error applying setting, reverse things back
[    1.233262] spmi spmi-0: PMIC arbiter version v2 (0x20010000)
[    1.264031] mdio_bus 90000.mdio-1: MDIO device at address 8 is missing.
[    1.264625] i2c_dev: i2c /dev entries driver
[    1.277209] sdhci: Secure Digital Host Controller Interface driver
[    1.277253] sdhci: Copyright(c) Pierre Ossman
[    1.282325] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.288646] remoteproc remoteproc0: releasing cd00000.q6v5_wcss
[    1.295511] NET: Registered PF_INET6 protocol family
[    1.299156] Segment Routing with IPv6
[    1.303329] In-situ OAM (IOAM) with IPv6
[    1.306916] NET: Registered PF_PACKET protocol family
[    1.310921] 8021q: 802.1Q VLAN Support v1.8
[    1.337507] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    1.337844] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    1.343802] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    1.350243] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    1.357895] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    1.365408] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    1.374547] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 712000 uV
[    1.381494] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 840000 uV
[    1.391476] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 912000 uV
[    1.401285] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop=1000000 uV
[    1.411147] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 724, quot_offset[ 7]=   0
[    1.420907] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 962, quot_offset[ 7]= 235
[    1.431757] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1081, quot_offset[ 7]= 115
[    1.442694] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1232, quot_offset[ 7]= 150
[    1.453861] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop
[    1.456923] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 800000 KHz, changing to: 1017600 KHz
[    1.473016] remoteproc remoteproc0: cd00000.q6v5_wcss is avail�[    1.488742] Waiting for root device /dev/ubiblock0_0...
[   31.847953] l11: disabling

Does this NAND chip require added support?

OEM dts: https://gist.github.com/testuser7/77b28e55f4cdc93af68cc349b24ab8f5#file-mx8500-dts

This is probably the reason:

[    1.221386] qcom-nandc 79b0000.nand-controller: Error applying setting, reverse things back

The lines above the error you already found show the reason:

[    1.199686] ipq8074-pinctrl 1000000.pinctrl: pin GPIO_16 already requested by 78b4000.serial; cannot claim for 79b0000.nand-controller
[    1.200974] ipq8074-pinctrl 1000000.pinctrl: pin-16 (79b0000.nand-controller) status -22
[    1.213173] ipq8074-pinctrl 1000000.pinctrl: could not request pin 16 (GPIO_16) from group gpio16  on device 1000000.pinctrl
[    1.221386] qcom-nandc 79b0000.nand-controller: Error applying setting, reverse things back

There is a pin conflict, which must be fixed (either remove the reference, if not mandatory or find the correct pin)

Thank for finding this!

Should gpio16 be removed from here: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v6.1.81#n344 ?

In OEM dts all defined GPIOs are used except gpio16:

		qpic-nand@79b0000 {
			#address-cells = <0x01>;
			#size-cells = <0x00>;
			clock-names = "core\0aon";
			clocks = <0x0b 0xac 0x0b 0xab>;
			compatible = "qcom,ebi2-nandc-bam-v1.5.0";
			dma-names = "tx\0rx\0cmd";
			dmas = <0x27 0x00 0x27 0x01 0x27 0x02>;
			pinctrl-0 = <0x28>;
			pinctrl-names = "default";
			reg = <0x79b0000 0x10000>;
			status = "ok";

			nandcs@0 {
				#address-cells = <0x01>;
				#size-cells = <0x01>;
				compatible = "qcom,nandcs";
				nand-bus-width = <0x08>;
				nand-ecc-step-size = <0x200>;
				nand-ecc-strength = <0x04>;
				reg = <0x00>;
			};
		};
			qpic_pins {
				linux,phandle = <0x28>;
				phandle = <0x28>;

				data_0 {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad0";
					pins = "gpio15";
				};

				data_1 {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad1";
					pins = "gpio12";
				};

				data_2 {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad2";
					pins = "gpio13";
				};

				data_3 {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad3";
					pins = "gpio14";
				};

				data_4 {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad4";
					pins = "gpio5";
				};

				data_5 {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad5";
					pins = "gpio6";
				};

				data_6 {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad6";
					pins = "gpio7";
				};

				data_7 {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad7";
					pins = "gpio8";
				};

				qpic_pad {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad";
					pins = "gpio1\0gpio3\0gpio4\0gpio10\0gpio11\0gpio17";
				};
			};

I don't know, as I don't know the hardware.
I just referred to the error message, how this can be fixed is now your task, as you have all the code and the hardware.

Can you post the whole stock DTS?

After applying this patch NAND is detected:

--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
@@ -435,7 +435,7 @@
 				       "gpio5", "gpio6", "gpio7",
 				       "gpio8", "gpio10", "gpio11",
 				       "gpio12", "gpio13", "gpio14",
-				       "gpio15", "gpio16", "gpio17";
+				       "gpio15", "gpio17";
 				function = "qpic";
 				drive-strength = <8>;
 				bias-disable;
1 Like

Instead of doing that, you need to simply add new pinctrl group and override the pinctrl-default phandle

1 Like

I have problem with getting network start to work. After connect a cable I'm getting this:

[   34.566206] nss-dp 3a001400.dp3 lan3: PHY Link up speed: 1000
[   34.566267] br-lan: port 3(lan3) entered blocking state
[   34.570927] br-lan: port 3(lan3) entered forwarding state
[   34.576248] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   34.606118] Unable to handle kernel read from unreadable memory at virtual address 0000005a542f6404
[   34.606159] Mem abort info:
[   34.613961]   ESR = 0x0000000096000005
[   34.616753]   EC = 0x25: DABT (current EL), IL = 32 bits
[   34.620565]   SET = 0, FnV = 0
[   34.626036]   EA = 0, S1PTW = 0
[   34.628893]   FSC = 0x05: level 1 translation fault
[   34.631935] Data abort info:
[   34.636799]   ISV = 0, ISS = 0x00000005
[   34.639919]   CM = 0, WnR = 0
[   34.643477] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000052356000
[   34.646616] [0000005a542f6404] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[   34.653039] Internal error: Oops: 0000000096000005 [#1] SMP
[   34.661537] Modules linked in: pppoe ppp_async nft_fib_inet 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_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mac80211 cfg80211 slhc rfcomm qrtr_smd qrtr_mhi qrtr qmi_helpers nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mhi libcrc32c hidp hci_uart compat btusb btrtl btmtk btintel bnep bluetooth hid evdev input_core ecdh_generic ecc sha512_generic sha512_arm64 seqiv jitterentropy_rng drbg michael_mic kpp hmac cmac leds_pca963x leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom qca_nss_dp qca_ssdk gpio_button_hotplug ext4 mbcache jbd2 aquantia hwmon crc_ccitt crc32c_generic
[   34.723678] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 6.1.80 #0
[   34.745912] Hardware name: Linksys MX8500 (DT)
[   34.751552] pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   34.756071] pc : edma_napi+0x28c/0x48c [qca_nss_dp]
[   34.762925] lr : edma_napi+0x25c/0x48c [qca_nss_dp]
[   34.767786] sp : ffffffc0095e3e10
[   34.772644] x29: ffffffc0095e3e10 x28: ffffffc0095e3f50 x27: ffffffc0094a6000
[   34.776124] x26: ffffffc036a19000 x25: 00000000ffff9856 x24: ffffffc0095e3f40
[   34.783242] x23: ffffffc000875ce0 x22: ffffffc0095e3f3f x21: 0000000000000000
[   34.790360] x20: 0000000000000000 x19: 0000000000000001 x18: 0000000000000014
[   34.797479] x17: ffffffc036a19000 x16: ffffffc0095e0000 x15: 00000000c8ff738a
[   34.804596] x14: 00000000000000d1 x13: 0000000000000001 x12: 0000000000000003
[   34.811715] x11: 0000000000000001 x10: 00000000000008c0 x9 : ffffffc00966bd60
[   34.818833] x8 : 0000000000200000 x7 : 0000000000000000 x6 : ffffff803fdd7a68
[   34.825949] x5 : ffffffc036a19000 x4 : ffffffc000875e98 x3 : 0000000000000000
[   34.833067] x2 : 0000005a542f6374 x1 : ffffff8005ba4000 x0 : ffffffc000875e90
[   34.840188] Call trace:
[   34.847295]  edma_napi+0x28c/0x48c [qca_nss_dp]
[   34.849556]  __napi_poll+0x38/0x190
[   34.854068]  net_rx_action+0x160/0x320
[   34.857541]  _stext+0x10c/0x278
[   34.861357]  ____do_softirq+0x10/0x20
[   34.864397]  call_on_irq_stack+0x24/0x50
[   34.868218]  do_softirq_own_stack+0x1c/0x30
[   34.872211]  __irq_exit_rcu+0xac/0xe0
[   34.876117]  irq_exit_rcu+0x10/0x1c
[   34.879935]  el1_interrupt+0x38/0x5c
[   34.883235]  el1h_64_irq_handler+0x18/0x2c
[   34.887055]  el1h_64_irq+0x68/0x6c
[   34.890959]  arch_cpu_idle+0x18/0x2c
[   34.894346]  default_idle_call+0x30/0x74
[   34.898079]  do_idle+0x228/0x250
[   34.901984]  cpu_startup_entry+0x38/0x40
[   34.905197]  arch_show_interrupts+0x0/0x16c
[   34.909102]  __secondary_switched+0xb0/0xb4
[   34.913013] Code: 54000280 f9400001 b4ffff81 f941e022 (f9404843) 
[   34.917183] ---[ end trace 0000000000000000 ]---
[   34.923430] Kernel panic - not syncing: Oops: Fatal exception in interrupt
[   34.928121] SMP: stopping secondary CPUs
[   34.934802] Kernel Offset: disabled
[   34.938876] CPU features: 0x00000,00000000,0000400b
[   34.942092] Memory Limit: none
[   34.946950] Rebooting in 3 seconds..

Also qcn9024 is not working:

[  316.340184] ath11k_pci 0000:01:00.0: No reg rules available
[  316.340245] ath11k_pci 0000:01:00.0: failed to extract regulatory info from received event
[  316.344609] ------------[ cut here ]------------
[  316.352900] WARNING: CPU: 0 PID: 3181 at backports-6.6.15/drivers/net/wireless/ath/ath11k/wmi.c:7171 ath11k_wmi_tlv_parse_alloc+0x4b4/0x3040 [ath11k]
[  316.357691] Modules linked in: pppoe ppp_async nft_fib_inet 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_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mac80211 cfg80211 slhc rfcomm qrtr_smd qrtr_mhi qrtr qmi_helpers nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mhi libcrc32c hidp hci_uart compat btusb btrtl btmtk btintel bnep bluetooth hid evdev input_core ecdh_generic ecc sha512_generic sha512_arm64 seqiv jitterentropy_rng drbg michael_mic kpp hmac cmac leds_pca963x leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom qca_nss_dp qca_ssdk gpio_button_hotplug ext4 mbcache jbd2 aquantia hwmon crc_ccitt crc32c_generic
[  316.427368] CPU: 0 PID: 3181 Comm: iw Tainted: G        W          6.1.80 #0
[  316.449606] Hardware name: Linksys MX8500 (DT)
[  316.456633] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  316.460890] pc : ath11k_wmi_tlv_parse_alloc+0x4b4/0x3040 [ath11k]
[  316.467746] lr : ath11k_wmi_tlv_parse_alloc+0x4b0/0x3040 [ath11k]
[  316.473995] sp : ffffffc008003c00
[  316.480067] x29: ffffffc008003c00 x28: 0000000000000154 x27: 0000000000000000
[  316.483373] x26: 000000000000015c x25: 000000000000000b x24: ffffff8014caf6c0
[  316.490490] x23: 0000000000000000 x22: ffffff8004660000 x21: 0000000000000000
[  316.497609] x20: ffffff8014caf6d0 x19: ffffff8017660600 x18: 00000000000001ae
[  316.504726] x17: 206d6f7266206f66 x16: 6e692079726f7461 x15: ffffffc0094b7248
[  316.511845] x14: 000000000000050a x13: 00000000000001ae x12: 00000000ffffffea
[  316.518963] x11: 00000000ffffefff x10: ffffffc00950f248 x9 : ffffffc0094b71f0
[  316.526081] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000000001
[  316.533200] x5 : ffffff803fda1708 x4 : 0000000000000000 x3 : 0000000000000000
[  316.540317] x2 : 0000000000000000 x1 : ffffff8003fa6c00 x0 : 000000000000004e
[  316.547436] Call trace:
[  316.554543]  ath11k_wmi_tlv_parse_alloc+0x4b4/0x3040 [ath11k]
[  316.556807]  ath11k_wmi_tlv_parse_alloc+0x2240/0x3040 [ath11k]
[  316.562710]  ath11k_htc_rx_completion_handler+0x418/0x600 [ath11k]
[  316.568441]  ath11k_ce_per_engine_service+0x2a8/0x3b0 [ath11k]
[  316.574603]  ath11k_pcic_ext_irq_enable+0x198/0x284 [ath11k]
[  316.580418]  tasklet_action_common.constprop.0+0x144/0x180
[  316.586234]  tasklet_action+0x28/0x34
[  316.591524]  _stext+0x10c/0x278
[  316.595256]  ____do_softirq+0x10/0x20
[  316.598208]  call_on_irq_stack+0x24/0x50
[  316.602030]  do_softirq_own_stack+0x1c/0x30
[  316.606022]  __irq_exit_rcu+0xac/0xe0
[  316.609928]  irq_exit_rcu+0x10/0x1c
[  316.613746]  el0_interrupt+0x44/0xb0
[  316.617046]  __el0_irq_handler_common+0x18/0x24
[  316.620867]  el0t_64_irq_handler+0x10/0x20
[  316.625119]  el0t_64_irq+0x174/0x178
[  316.629286] ---[ end trace 0000000000000000 ]---

Current work: https://github.com/testuser7/openwrt/tree/mx8500

I checked several OEM dts files for different devices and nowhere is gpio16 used for the controller.

I sent a patch upstream adding an additional UART controller where this gpio is used: https://lore.kernel.org/all/20240229205426.232205-1-frut3k7@gmail.com/

GPIO16 can be used as NAND/QPIC pin as well, what is your board using for data[7] pin instead of GPIO16?

Why are you adding a default pinctrl for that UART?
Because, GPIO9 and GPIO16 are not the only pins that can be used for it, so to me it makes no
sense to add that as a default that others will then have to override since GPIO0 and GPIO2 can be used for that UART as well.
You should just add the UART node and then each board defines its pinctrl required for that UART.

Are you asking about qpic_pins configuration?


				data_7 {
					bias-disable;
					drive-strength = <0x08>;
					function = "qpic_pad7";
					pins = "gpio8";
				};

For UART5 we have already defined gpio23 and gpio24 so I just want to add gpios for UART6 the same way.

I get what you are trying to achieve, but I just find this method of adding default pinctrl groups an issue since there is multiple combinations that can be used

Can you point out any example where gpio16 is used?

It will only be used for LCD support AFAIK, as its NAND/LCDC data[8] so its bit 9 of the parallel QPIC interface, and ONFI NAND is only 8 or 16-bit with only 8-bit one being supported in our case so that pin is unused.

You can probably convince upstream that it should be dropped from the default NAND pinctrl configuration as its unused and only needed for LCD

Thanks for checking this. Can I use your comment in a commit?

I have problem with getting ARQ114C to work.
Without configuring this additional port everything is working:

&mdio {
	status = "okay";

	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";
	reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;

	ethernet-phy-package@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "qcom,qca8075-package";
		reg = <0>;

		qcom,package-mode = "qsgmii";

		qca8075_0: ethernet-phy@0 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <0>;
		};

		qca8075_1: ethernet-phy@1 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <1>;
		};

		qca8075_2: ethernet-phy@2 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <2>;
		};

		qca8075_3: ethernet-phy@3 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <3>;
		};
	};
};

&switch {
	status = "okay";

	switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3)>; /* lan port bitmap */
	switch_wan_bmp = <ESS_PORT4>; /* wan port bitmap */
	switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/

	qcom,port_phyinfo {
		port@1 {
			port_id = <1>;
			phy_address = <0>;
		};
		port@2 {
			port_id = <2>;
			phy_address = <1>;
		};
		port@3 {
			port_id = <3>;
			phy_address = <2>;
		};
		port@4 {
			port_id = <4>;
			phy_address = <3>;
		};
	};
};

&dp1 {
	status = "okay";
	phy-mode = "qsgmii";
	phy-handle = <&qca8075_0>;
	label = "lan1";
};

&dp2 {
	status = "okay";
	phy-mode = "qsgmii";
	phy-handle = <&qca8075_1>;
	label = "lan2";
};

&dp3 {
	status = "okay";
	phy-mode = "qsgmii";
	phy-handle = <&qca8075_2>;
	label = "lan3";
};

&dp4 {
	status = "okay";
	phy-mode = "qsgmii";
	phy-handle = <&qca8075_3>;
	label = "wan";
};

Is switch_mac_mode2 = <MAC_MODE_USXGMII> correct according to the OEM dts: https://gist.github.com/testuser7/77b28e55f4cdc93af68cc349b24ab8f5#file-mx8500-dts-L844 ?

Sure, feel free to use my comment and CC me in the email.

USXGMII should work as the MAC link.
What is the issue you are having?

I'm getting crash and reboot after connect cable to the QCA8075: OpenWrt support for Linksys MX8500 - #9 by lytr

&mdio {
	status = "okay";

	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";
	reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;

	ethernet-phy-package@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "qcom,qca8075-package";
		reg = <0>;

		qcom,package-mode = "qsgmii";

		qca8075_0: ethernet-phy@0 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <0>;
		};

		qca8075_1: ethernet-phy@1 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <1>;
		};

		qca8075_2: ethernet-phy@2 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <2>;
		};

		qca8075_3: ethernet-phy@3 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = <3>;
		};
	};

	aqr114c: ethernet-phy@8 {
		compatible ="ethernet-phy-ieee802.3-c45";
		reg = <8>;
		reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;

		nvmem-cells = <&aqr_fw>;
		nvmem-cell-names = "firmware";
	};
};

&switch {
	status = "okay";

	switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
	switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
	switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
	switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/

	qcom,port_phyinfo {
		port@1 {
			port_id = <1>;
			phy_address = <0>;
		};
		port@2 {
			port_id = <2>;
			phy_address = <1>;
		};
		port@3 {
			port_id = <3>;
			phy_address = <2>;
		};
		port@4 {
			port_id = <4>;
			phy_address = <3>;
		};
		port@6 {
			port_id = <6>;
			phy_address = <8>;
			compatible = "ethernet-phy-ieee802.3-c45";
			ethernet-phy-ieee802.3-c45;
		};
	};
};

&dp1 {
	status = "okay";
	phy-mode = "qsgmii";
	phy-handle = <&qca8075_0>;
	label = "lan1";
};

&dp2 {
	status = "okay";
	phy-mode = "qsgmii";
	phy-handle = <&qca8075_1>;
	label = "lan2";
};

&dp3 {
	status = "okay";
	phy-mode = "qsgmii";
	phy-handle = <&qca8075_2>;
	label = "lan3";
};

&dp4 {
	status = "okay";
	phy-mode = "qsgmii";
	phy-handle = <&qca8075_3>;
	label = "lan4";
};

&dp6_syn {
	status = "okay";
	qcom,mactype = <1>;
	phy-mode = "usxgmii";
	phy-handle = <&aqr114c>;
	label = "wan";
};

There is also log:

[  250.806837] hsl_phy_phydev_get[805]:ERROR:phy_addr 8 phydev is NULL

Check with the mdio tool before attaching it whether that AQR is even live, because it could be left in reset

From u-boot:

IPQ807x# mii info
PHY 0x00: OUI = 0x1374, Model = 0x0B, Rev = 0x01,  10baseT, HDX
PHY 0x01: OUI = 0x1374, Model = 0x0B, Rev = 0x01,  10baseT, HDX
PHY 0x02: OUI = 0x1374, Model = 0x0B, Rev = 0x01,  10baseT, HDX
PHY 0x03: OUI = 0x1374, Model = 0x0B, Rev = 0x01,  10baseT, HDX
PHY 0x04: OUI = 0x1374, Model = 0x0B, Rev = 0x01,  10baseT, HDX
PHY 0x05: OUI = 0x1A082, Model = 0x00, Rev = 0x05,  10baseT, HDX
PHY 0x08: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX

Maybe I assigned the port incorrectly (port_id 6 instead of 5)?

[    2.499041] ssdk_phy_driver_init[371]:INFO:dev_id = 0, phy_adress = 8, phy_id = 0xffffffff phytype doesn't match
[    3.462383] GMAC1(ffffff8003d4e900) Invalid MAC@ - using 4a:63:02:3f:2d:b3
[    3.658425] GMAC2(ffffff8005c07900) Invalid MAC@ - using 52:b7:f2:dc:39:6a
[    3.738102] GMAC3(ffffff8005c04900) Invalid MAC@ - using c6:ff:bd:dc:35:1d
[    3.818199] GMAC4(ffffff8003260900) Invalid MAC@ - using 92:24:49:c0:25:4b
[    3.898112] GMAC6(ffffff8003265900) Invalid MAC@ - using 72:87:98:e1:70:02
[    3.898184] nss-dp 3a007000.dp6-syn wan (uninitialized): failed to connect to phy device
[    3.903918] nss-dp: probe of 3a007000.dp6-syn failed with error -14