OpenWrt 18.06 boot failed on ipq4019

Hi ggsn

Have you been able to solve this issue? I'm getting exactly the same errors, my board only works if I stop u-boot and use bootipq manually.

Which IPQ4019 device? What bootargs are passed? What does the kernel need?

Vague questions will usually get vague answers at best.

For that matter, a word-for-word repetition by a “different” user who just joined is rather suspicious.

COMPEX WPJ419

U-Boot 2012.07 [Chaos Calmer 15.05.1,r35193] (Jul 09 2018 - 15:35:45)

smem ram ptable found: ver: 1 len: 3
DRAM:  256 MiB
machid : 0x8010001
NAND:  ID = 60606060
Vendor = 60
Device = 60
Not an ONFI device
ONFI probe failed
ID = 60606060
Vendor = 60
Device = 60
qpic_nand: unknown NAND device manufacturer: 60 device: 60
raise: Signal # 8 caught
U-Boot BUG at mtdcore.c:20!
SF: Detected MX25L25635E with page size 4 KiB, total 32 MiB
ipq_spi: page_size: 0x100, sector_size: 0x1000, size: 0x2000000
32 MiB
MMC:   qca_mmc: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
machid: 8010001
flash_type: 0
Hit any key to stop autoboot:  0 
SF: Detected MX25L25635E with page size 4 KiB, total 32 MiB
## Booting kernel from FIT Image at 84000000 ...
   Using 'config@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  ARM OpenWrt Linux-4.14.103
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x840000e4
     Data Size:    3086179 Bytes = 2.9 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   da511d52
     Hash algo:    sha1
     Hash value:   001779afbe1a5a4643e73771851b4542274d8271
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
   Using 'config@1' configuration
   Trying 'fdt@1' FDT blob subimage
     Description:  ARM OpenWrt compex_wpj419 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x842f1980
     Data Size:    34287 Bytes = 33.5 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   42033ec8
     Hash algo:    sha1
     Hash value:   f4e22414c0216f42d6aa5f1b1c4d9c2c76ad12b1
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x842f1980
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 86ff4000, end 86fff5ee ... OK
ipq: fdt fixup unable to find compatible node
Using machid 0x8010001 from environment

Starting kernel ...


[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.103 (guoqiang@guoqiang-GE60-2PG) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7704-9ee8c8d)) #0 SMP Mon Feb 25 16:34:25 2019
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Compex WPJ419
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: get_random_bytes called from start_kernel+0x88/0x3c0 with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu @cfda1000 s29324 r8192 d23924 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64512
[    0.000000] Kernel command line: rootfsname=rootfs rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 249872K/260096K available (4242K kernel code, 138K rwdata, 1188K rodata, 1024K init, 230K bss, 10224K 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 : 0xd0800000 - 0xff800000   ( 752 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc0724ae8   (5235 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a22ac0   ( 139 kB)
[    0.000000]        .bss : 0xc0a24000 - 0xc0a5d858   ( 231 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 48.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb11fd3bfb, max_idle_ns: 440795203732 ns
[    0.000009] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns
[    0.000023] Switching to timer-based delay loop, resolution 20ns
[    0.000421] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[    0.000441] pid_max: default: 32768 minimum: 301
[    0.000577] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000594] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001179] CPU: Testing write buffer coherency: ok
[    0.001825] Setting up static identity map for 0x80300000 - 0x80300060
[    0.001960] Hierarchical SRCU implementation.
[    0.002588] smp: Bringing up secondary CPUs ...
[    0.005212] smp: Brought up 1 node, 4 CPUs
[    0.005230] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[    0.005239] CPU: All CPU(s) started in SVC mode.
[    0.014213] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.014363] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.014391] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.014563] pinctrl core: initialized pinctrl subsystem
[    0.015408] NET: Registered protocol family 16
[    0.015684] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.016742] cpuidle: using governor ladder
[    0.016787] cpuidle: using governor menu
[    0.034117] msm_bus_fabric_init_driver
[    0.034381] msm_bus_device 580000.ad-hoc-bus: Util-fact is missing, default to 100
[    0.034398] msm_bus_device 580000.ad-hoc-bus: Vrail-comp is missing, default to 100
[    0.034417] msm_bus_device 580000.ad-hoc-bus: Failed to get bus clk for bus4096 ctx1
[    0.034456] msm_bus_device 580000.ad-hoc-bus: Util-fact is missing, default to 100
[    0.034469] msm_bus_device 580000.ad-hoc-bus: Vrail-comp is missing, default to 100
[    0.034484] msm_bus_device 580000.ad-hoc-bus: Failed to get bus clk for bus1024 ctx1
[    0.091891] usbcore: registered new interface driver usbfs
[    0.091957] usbcore: registered new interface driver hub
[    0.092047] usbcore: registered new device driver usb
[    0.092100] pps_core: LinuxPPS API ver. 1 registered
[    0.092111] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.092135] PTP clock support registered
[    0.093082] clocksource: Switched to clocksource arch_sys_counter
[    0.093902] NET: Registered protocol family 2
[    0.094498] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.094543] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.094594] TCP: Hash tables configured (established 2048 bind 2048)
[    0.094702] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.094736] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.094932] NET: Registered protocol family 1
[    0.095915] No memory allocated for crashlog
[    0.096088] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    0.099374] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.099388] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.104654] io scheduler noop registered
[    0.104673] io scheduler deadline registered (default)
[    0.106690] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[    0.106709] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[    0.107982] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[    0.108071] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[    0.108144] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[    0.108218] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[    0.108451] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.109006] msm_serial 78af000.serial: msm_serial: detected port #0
[    0.109052] msm_serial 78af000.serial: uartclk = 1843200
[    0.109100] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 26, base_baud = 115200) is a MSM
[    0.109125] msm_serial: console setup on port #0
[    0.667131] console [ttyMSM0] enabled
[    0.672051] msm_serial 78b0000.serial: msm_serial: detected port #1
[    0.675410] msm_serial 78b0000.serial: uartclk = 1843200
[    0.681461] 78b0000.serial: ttyMSM1 at MMIO 0x78b0000 (irq = 27, base_baud = 115200) is a MSM
[    0.687255] msm_serial: driver initialized
[    0.699519] loop: module loaded
[    0.700956] nand: No NAND device found
[    0.703151] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.707435] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
[    0.713535] 9 fixed-partitions partitions found on MTD device spi0.0
[    0.718403] Creating 9 MTD partitions on "spi0.0":
[    0.724850] 0x000000000000-0x000000040000 : "0:SBL1"
[    0.730075] 0x000000040000-0x000000060000 : "0:MIBIB"
[    0.735170] 0x000000060000-0x0000000c0000 : "0:QSEE"
[    0.740032] 0x0000000c0000-0x0000000d0000 : "0:CDT"
[    0.745116] 0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
[    0.749682] 0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
[    0.755288] 0x0000000f0000-0x000000170000 : "0:APPSBL"
[    0.760631] 0x000000170000-0x000000180000 : "0:ART"
[    0.765689] 0x000000180000-0x000002000000 : "firmware"
[    0.770714] 2 fit-fw partitions found on MTD device firmware
[    0.775120] 0x000000180000-0x000000460000 : "kernel"
[    0.781573] 0x00000045917c-0x000002000000 : "rootfs"
[    0.786400] mtd: device 10 (rootfs) set to be root filesystem
[    0.790957] 1 squashfs-split partitions found on MTD device rootfs
[    0.796465] 0x0000006b0000-0x000002000000 : "rootfs_data"
[    0.803775] libphy: ipq40xx_mdio: probed
[    0.811614] Unable to handle kernel NULL pointer dereference at virtual address 000000a4
[    0.811984] pgd = c0204000
[    0.820071] [000000a4] *pgd=00000000
[    0.822571] Internal error: Oops: 5 [#1] SMP ARM
[    0.826298] Modules linked in:
[    0.830901] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.14.103 #0
[    0.833766] Hardware name: Generic DT based system
[    0.839930] task: cf830000 task.stack: cf82e000
[    0.844620] PC is at ar40xx_probe+0x318/0x738
[    0.849044] LR is at ar40xx_probe+0x2fc/0x738
[    0.853555] pc : [<c05b4f68>]    lr : [<c05b4f4c>]    psr: 60000013
[    0.857900] sp : cf82fdf8  ip : cfdc8324  fp : 00000000
[    0.863974] r10: cf98b400  r9 : c032b1e4  r8 : 00000000
[    0.869182] r7 : c0a593f4  r6 : cf98b410  r5 : cfde8294  r4 : cfbf0010
[    0.874394] r3 : cfbf01e4  r2 : 00000000  r1 : 00000000  r0 : cfbf0010
[    0.880994] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    0.887502] Control: 10c5387d  Table: 8020406a  DAC: 00000051
[    0.894706] Process swapper/0 (pid: 1, stack limit = 0xcf82e210)
[    0.900434] Stack: (0xcf82fdf8 to 0xcf830000)
[    0.906510] fde0:                                                       00000000 00001d36
[    0.910773] fe00: cf9c2a80 cfbf01e4 cf9c2a80 00000004 00098000 000987ff cfde8640 00000200
[    0.918932] fe20: 00000000 00000000 00000000 00000000 0c000000 0c07ffff cfde82ec 00000200
[    0.927095] fe40: 00000000 00000000 00000000 00000000 c0a19d14 cf98b410 c0a19d14 c0a5876c
[    0.935252] fe60: 00000000 00000000 c0a19d14 00000000 00000000 c05568f8 c0a58768 cf98b410
[    0.943414] fe80: c0a5876c c0555338 cf98b410 c0a19d14 cf98b444 00000000 00000007 00000059
[    0.951572] fea0: c0936f40 c0555524 00000000 c0a19d14 c0555498 c0553ac4 cf817558 cf931fb4
[    0.959734] fec0: c0a19d14 cf9b5380 c0a16e08 c0554a48 c080e994 c0916770 c0a19d14 c0a19d14
[    0.967892] fee0: 00000000 c0916780 ffffe000 c0555c68 c0a03c08 00000000 c0916780 c03019f0
[    0.976053] ff00: cfffce52 cfffce4b 00000000 c084d600 cfffce40 c084d690 0000005a c084d690
[    0.984212] ff20: cfffce52 c0331044 c084cf9c c0804980 00000006 00000006 c07ddde8 00000000
[    0.992372] ff40: c07e6bf4 c07dde5c cfffce52 c9571fbb 00000000 c0a24000 c0a24000 c092c834
[    1.000530] ff60: c092c83c 00000007 00000059 c0936f40 00000000 c0900dc4 00000006 00000006
[    1.008690] ff80: 00000000 c0900598 00000000 c071f0fc 00000000 00000000 00000000 00000000
[    1.016849] ffa0: 00000000 c071f104 00000000 c0307768 00000000 00000000 00000000 00000000
[    1.025007] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.033167] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    1.041342] [<c05b4f68>] (ar40xx_probe) from [<c05568f8>] (platform_drv_probe+0x34/0x70)
[    1.049494] [<c05568f8>] (platform_drv_probe) from [<c0555338>] (really_probe+0x114/0x274)
[    1.057652] [<c0555338>] (really_probe) from [<c0555524>] (__driver_attach+0x8c/0xb0)
[    1.065722] [<c0555524>] (__driver_attach) from [<c0553ac4>] (bus_for_each_dev+0x4c/0xa0)
[    1.073623] [<c0553ac4>] (bus_for_each_dev) from [<c0554a48>] (bus_add_driver+0xe8/0x200)
[    1.081781] [<c0554a48>] (bus_add_driver) from [<c0555c68>] (driver_register+0xa8/0xe4)
[    1.089942] [<c0555c68>] (driver_register) from [<c03019f0>] (do_one_initcall+0xc0/0x184)
[    1.097755] [<c03019f0>] (do_one_initcall) from [<c0900dc4>] (kernel_init_freeable+0x13c/0x1d0)
[    1.106090] [<c0900dc4>] (kernel_init_freeable) from [<c071f104>] (kernel_init+0x8/0x114)
[    1.114597] [<c071f104>] (kernel_init) from [<c0307768>] (ret_from_fork+0x14/0x2c)
[    1.122926] Code: e58431f4 e3a01000 e1a00004 e58d300c (e59230a4) 
[    1.130544] ---[ end trace ebba5450fa0da73b ]---
[    1.136557] Kernel panic - not syncing: Fatal exception
[    1.141239] CPU1: stopping
[    1.146181] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.14.103 #0
[    1.148959] Hardware name: Generic DT based system
[    1.156180] [<c030e458>] (unwind_backtrace) from [<c030a968>] (show_stack+0x10/0x14)
[    1.161042] [<c030a968>] (show_stack) from [<c070c068>] (dump_stack+0x88/0x9c)
[    1.168935] [<c070c068>] (dump_stack) from [<c030d740>] (handle_IPI+0xe4/0x18c)
[    1.175963] [<c030d740>] (handle_IPI) from [<c030143c>] (gic_handle_irq+0x8c/0x90)
[    1.183169] [<c030143c>] (gic_handle_irq) from [<c030b4cc>] (__irq_svc+0x6c/0x90)
[    1.190803] Exception stack(0xcf85bf80 to 0xcf85bfc8)
[    1.198356] bf80: 00000001 00000000 00000000 c0313940 ffffe000 c0a03c74 c0a03c28 00000000
[    1.203394] bfa0: 00000000 410fc075 00000000 00000000 cf85bfc8 cf85bfd0 c0308048 c030804c
[    1.211550] bfc0: 60000013 ffffffff
[    1.219707] [<c030b4cc>] (__irq_svc) from [<c030804c>] (arch_cpu_idle+0x34/0x38)
[    1.223014] [<c030804c>] (arch_cpu_idle) from [<c0349580>] (do_idle+0xdc/0x1a0)
[    1.230652] [<c0349580>] (do_idle) from [<c03498a0>] (cpu_startup_entry+0x18/0x1c)
[    1.237683] [<c03498a0>] (cpu_startup_entry) from [<8030170c>] (0x8030170c)
[    1.245317] CPU3: stopping
[    1.252168] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G      D         4.14.103 #0
[    1.254947] Hardware name: Generic DT based system
[    1.262163] [<c030e458>] (unwind_backtrace) from [<c030a968>] (show_stack+0x10/0x14)
[    1.267028] [<c030a968>] (show_stack) from [<c070c068>] (dump_stack+0x88/0x9c)
[    1.274921] [<c070c068>] (dump_stack) from [<c030d740>] (handle_IPI+0xe4/0x18c)
[    1.281950] [<c030d740>] (handle_IPI) from [<c030143c>] (gic_handle_irq+0x8c/0x90)
[    1.289156] [<c030143c>] (gic_handle_irq) from [<c030b4cc>] (__irq_svc+0x6c/0x90)
[    1.296788] Exception stack(0xcf85ff80 to 0xcf85ffc8)
[    1.304346] ff80: 00000001 00000000 00000000 c0313940 ffffe000 c0a03c74 c0a03c28 00000000
[    1.309386] ffa0: 00000000 410fc075 00000000 00000000 cf85ffc8 cf85ffd0 c0308048 c030804c
[    1.317537] ffc0: 60000013 ffffffff
[    1.325696] [<c030b4cc>] (__irq_svc) from [<c030804c>] (arch_cpu_idle+0x34/0x38)
[    1.329004] [<c030804c>] (arch_cpu_idle) from [<c0349580>] (do_idle+0xdc/0x1a0)
[    1.336640] [<c0349580>] (do_idle) from [<c03498a0>] (cpu_startup_entry+0x18/0x1c)
[    1.343670] [<c03498a0>] (cpu_startup_entry) from [<8030170c>] (0x8030170c)
[    1.351304] CPU0: stopping
[    1.358158] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D         4.14.103 #0
[    1.360938] Hardware name: Generic DT based system
[    1.368153] [<c030e458>] (unwind_backtrace) from [<c030a968>] (show_stack+0x10/0x14)
[    1.373017] [<c030a968>] (show_stack) from [<c070c068>] (dump_stack+0x88/0x9c)
[    1.380913] [<c070c068>] (dump_stack) from [<c030d740>] (handle_IPI+0xe4/0x18c)
[    1.387942] [<c030d740>] (handle_IPI) from [<c030143c>] (gic_handle_irq+0x8c/0x90)
[    1.395146] [<c030143c>] (gic_handle_irq) from [<c030b4cc>] (__irq_svc+0x6c/0x90)
[    1.402780] Exception stack(0xc0a01f48 to 0xc0a01f90)
[    1.410332] 1f40:                   00000001 00000000 00000000 c0313940 ffffe000 c0a03c74
[    1.415375] 1f60: c0a03c28 00000000 00000000 c092ca28 cfffce00 00000000 c0a01f90 c0a01f98
[    1.423530] 1f80: c0308048 c030804c 60000013 ffffffff
[    1.431689] [<c030b4cc>] (__irq_svc) from [<c030804c>] (arch_cpu_idle+0x34/0x38)
[    1.436729] [<c030804c>] (arch_cpu_idle) from [<c0349580>] (do_idle+0xdc/0x1a0)
[    1.444193] [<c0349580>] (do_idle) from [<c03498a0>] (cpu_startup_entry+0x18/0x1c)
[    1.451226] [<c03498a0>] (cpu_startup_entry) from [<c0900c7c>] (start_kernel+0x3b4/0x3c0)
[    1.458863] [<c0900c7c>] (start_kernel) from [<8020807c>] (0x8020807c)
[    1.467107] Rebooting in 1 seconds..
[    3.473680] Reboot failed -- System halted

Where did you get the firmware? Can you please try this one: https://megaupload.nz/B4m66cw8b1/openwrt-ipq40xx-compex_wpj419-squashfs-sysupgrade_bin

solve this issue? me too .

I have same issue on compex wpj428. Is there some fix pending or should I dig in? Thanks.

Are you (all) using Compex-supplied firmware or OpenWrt itself?

If Compex-supplied, then they would be the ones to ask. Very often OEM firmware uses bits and pieces (or huge swaths) of the OpenWrt OS, but then combines it with one or more of vendor kernels, proprietary drivers, vendor tool chains, ...

Looks like a problem with the DTS or one of the drivers from the boot log. Perhaps I'm missing it, but I don't see the "419" in https://openwrt.org/toh/compex/start

At least on master there is target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts, which may provide insight into what I would hope is a running version of OpenWrt on a Compex / IPQ40xx platform.

The bug is probably because the bootloader does not reset the PHY during normal boot process.
You may need the PHY reset patch in my post and specify the reset pin in DTS.
@jeff

2 Likes

I'm using Compex wpj428 and hit same issue. I can took kernel patch but I'm not sure which phy-reset-gpio should be used for my board (as don't have schematics). Ideas? Thanks.

Hi, FYI
on WPJ419 the phy-reset-gpio is GPIO#47 and on WPJ428 is GPIO#59

1 Like

@Oni thanks I'll give a try and report back.

Note that if you're using 4.14 kernel, you must replace patches-4.19 with patches-4.14 in the patch

Yes. I'll try to refresh patches on top of latest master and then post for review + test on device. One other issue I'm facing is thta when usb modem is plugged to M2 connector is not recognized (while when connected via extender board to USb then it works). I assume M2 usb is not working or something like that but that's different story :).

I've tried to reuse existing patch and apply to 4.14 kernel. Basically I took only patch with add support for phy-reset-gpio + add change in dts for compex 428 but issue is still present. Anything else should be fixed or taken from patch (patch add support for other boards also so I drop that + some other stuff which is IMO not relevant). Commit can be found here

Also I was poking it yesterday and fixed crash issue with following hack:

diff --git a/drivers/net/phy/ar40xx.c b/drivers/net/phy/ar40xx.c
index e408e8f..c31cd80 100644
--- a/drivers/net/phy/ar40xx.c
+++ b/drivers/net/phy/ar40xx.c
@@ -2020,8 +2020,11 @@ static int ar40xx_probe(struct platform_device *pdev)
 
        /* register switch */
        swdev = &priv->dev;
-
-       swdev->alias = dev_name(&priv->mii_bus->dev);
+       if (priv->mii_bus != NULL) {
+               swdev->alias = dev_name(&priv->mii_bus->dev);
+       } else {
+               swdev->alias = "alias";
+       }
 
        swdev->cpu_port = AR40XX_PORT_CPU;
        swdev->name = "QCA AR40xx";

IMO looks like mii_bus driver not yet probed and priv->mii_bus->dev is NULL and thus crash. AMybe proper fix would be to return -EPROBE_DEFFER but I'm unsure. Any ideas?

I don't think the Ethernet can work using this modification, it just a work around to pass over Kernel Panic.

Yes I know but ethernet works. I was able to connect to device without issue and avoid crash.

No you're right. Interface is up but I cannot get dhcp. So any ideas why original patch won't work? Maybe it's pin number wrong? Thx.

I found that Compex has their own repository here, I think you should try it.
https://github.com/compex-systems/lede

@oldme thanks a lot. Looks like that in this repo they have phy fix already included. I'll overtook and post patch. Thank again.