AXP209 Olimex A20 board fails to boot sometimes after a kernel panic , reboot command or power cycle. Happens randomly

Hi, I have Olimex A20 micro board that is running openwrt , below are the details


U-Boot 2020.04-OpenWrt-r16554-1d4dea6d4f (Apr 16 2022 - 12:59:34 +0000) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-Olinuxino Micro
I2C:   ready
DRAM:  1 GiB
MMC:   mmc@1c0f000: 0, mmc@1c12000: 1
Loading Environment from FAT... MMC: no card present
DDC: timeout reading EDID
DDC: timeout reading EDID
DDC: timeout reading EDID
Setting up a 1024x768 vga console (overscan 0x0)
In:    serial
Out:   vga
Err:   vga
Net:   eth0: ethernet@1c50000
starting USB...
Bus usb@1c14000: USB EHCI 1.00
Bus usb@1c14400: USB OHCI 1.0
Bus usb@1c1c000: USB EHCI 1.00
Bus usb@1c1c400: USB OHCI 1.0
scanning bus usb@1c14000 for devices... 1 USB Device(s) found
scanning bus usb@1c14400 for devices... 1 USB Device(s) found
scanning bus usb@1c1c000 for devices... 1 USB Device(s) found
scanning bus usb@1c1c400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0

The board sometimes wont go into the boot process and will get hang. During this , the AXP wont even provide 3.3V or other voltages. I have a NXP JN5189 chip on board that also acts as a watchdog. but beacuse it gets power from the 3.3V of AXP209 and the AXP isnt providing it the watchdog mechanism fails.

In order to replicate this issue I can either try to create a kernel panic, issue reboot command , power cycle or press the reset button. It happens quite randomly after several attempts. On some boards it will happen often than others.

This is when I issue the below command and when it resulted in hang.

echo c > /proc/sysrq-trigger

The board will remain in this situation until i press the reset button or power cycle. The log just shows this signle line U-Boot SPL 2020.04-OpenWrt-r16554-1d4dea6d4f (Apr 16 2022 - 12:59:34 +0000) on debug console. and as I mentioned there is no 3,3V or other voltages.


[  607.125720] sysrq: Trigger a crash
[  607.129233] Kernel panic - not syncing: sysrq triggered crash
[  607.134991] CPU: 0 PID: 6546 Comm: ash Not tainted 5.4.188 #0
[  607.140734] Hardware name: Allwinner sun7i (A20) Family
[  607.145993] [<c022f1f4>] (unwind_backtrace) from [<c022bf00>] (show_stack+0x10/0x14)
[  607.153743] [<c022bf00>] (show_stack) from [<c085f7e8>] (dump_stack+0x94/0xa8)
[  607.160966] [<c085f7e8>] (dump_stack) from [<c023fa34>] (panic+0x10c/0x33c)
[  607.167929] [<c023fa34>] (panic) from [<c0591630>] (sysrq_handle_reboot+0x0/0x8)
[  607.175342] CPU1: stopping
[  607.178067] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.4.188 #0
[  607.184063] Hardware name: Allwinner sun7i (A20) Family
[  607.189299] [<c022f1f4>] (unwind_backtrace) from [<c022bf00>] (show_stack+0x10/0x14)
[  607.197038] [<c022bf00>] (show_stack) from [<c085f7e8>] (dump_stack+0x94/0xa8)
[  607.204254] [<c085f7e8>] (dump_stack) from [<c022dff4>] (handle_IPI+0x164/0x19c)
[  607.211648] [<c022dff4>] (handle_IPI) from [<c052fb44>] (gic_handle_irq+0x8c/0x90)
[  607.219215] [<c052fb44>] (gic_handle_irq) from [<c0201bf8>] (__irq_svc+0x58/0x74)
[  607.226686] Exception stack(0xef0a1f78 to 0xef0a1fc0)
[  607.231732] 1f60:                                                       00000000 000c1e7c
[  607.239901] 1f80: ef6de574 c0235380 ffffe000 c0e04e70 c0e04eb0 00000002 c0e0db60 c093e558
[  607.248070] 1fa0: 00000000 00000000 2ea84000 ef0a1fc8 c0229650 c0229654 60000013 ffffffff
[  607.256242] [<c0201bf8>] (__irq_svc) from [<c0229654>] (arch_cpu_idle+0x38/0x3c)
[  607.263636] [<c0229654>] (arch_cpu_idle) from [<c026a13c>] (do_idle+0x110/0x154)
[  607.271026] [<c026a13c>] (do_idle) from [<c026a400>] (cpu_startup_entry+0x18/0x1c)
[  607.278591] [<c026a400>] (cpu_startup_entry) from [<4020254c>] (0x4020254c)
[  607.285555] Rebooting in 3 seconds..

U-Boot SPL 2020.04-OpenWrt-r16554-1d4dea6d4f (Apr 16 2022 - 12:59:34 +0000)


When I press the reset button the board will boot

00: 
U-Boot SPL 2020.04-OpenWrt-r16554-1d4dea6d4f (Apr 16 2022 - 12:59:34 +0000)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1


U-Boot 2020.04-OpenWrt-r16554-1d4dea6d4f (Apr 16 2022 - 12:59:34 +0000) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-Olinuxino Micro
I2C:   ready
DRAM:  1 GiB
MMC:   mmc@1c0f000: 0, mmc@1c12000: 1
Loading Environment from FAT... MMC: no card present
01: DDC: timeout reading EDID
DDC: timeout reading EDID
DDC: timeout reading EDID
Setting up a 1024x768 vga console (overscan 0x0)
In:    serial
Out:   vga
Err:   vga
Net:   eth0: ethernet@1c50000
starting USB...
Bus usb@1c14000: USB EHCI 1.00
Bus usb@1c14400: USB OHCI 1.0
Bus usb@1c1c000: USB EHCI 1.00
Bus usb@1c1c400: USB OHCI 1.0
scanning bus usb@1c14000 for devices... 1 USB Device(s) found
scanning bus usb@1c14400 for devices... 1 USB Device(s) found
scanning bus usb@1c1c000 for devices... 1 USB Device(s) found
scanning bus usb@1c1c400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 
08: switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
377 bytes read in 1 ms (368.2 KiB/s)
## Executing script at 43100000
3266296 bytes read in 182 ms (17.1 MiB/s)
27302 bytes read in 4 ms (6.5 MiB/s)
## Booting kernel from Legacy Image at 42000000 ...
   Image Name:   ARM OpenWrt Linux-5.4.188
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3266232 Bytes = 3.1 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
EHCI failed to shut down host controller.
   Loading Kernel Image
   Using Device Tree in place at 43000000, end 43009aa5

Starting kernel ...

11: [    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.188 (dost@rdWs) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16554-1d4dea6d4f)) #0 SMP Sat Apr 16 12:59:34 2022
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=30c5387d
[    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: Olimex A20-Olinuxino Micro
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] OF: reserved mem: node default-pool compatible matching fail
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 15 pages/cpu s30924 r8192 d22324 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 259648
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1022292K/1045504K available (6642K kernel code, 426K rwdata, 1812K rodata, 2048K init, 244K bss, 23212K reserved, 0K cma-reserved, 259072K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x2fc/0x4ac with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000021] Switching to timer-based delay loop, resolution 41ns
[    0.000458] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000787] clocksource: hstimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.001002] Console: colour dummy device 80x30
[    0.001064] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001080] pid_max: default: 32768 minimum: 301
[    0.001284] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001303] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002320] CPU: Testing write buffer coherency: ok
[    0.002856] /cpus/cpu@0 missing clock-frequency property
[    0.002880] /cpus/cpu@1 missing clock-frequency property
[    0.002894] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003568] Setting up static identity map for 0x40200000 - 0x40200060
[    0.003732] rcu: Hierarchical SRCU implementation.
[    0.004466] smp: Bringing up secondary CPUs ...
[    0.015311] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.015488] smp: Brought up 1 node, 2 CPUs
[    0.015507] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.015515] CPU: All CPU(s) started in HYP mode.
[    0.015520] CPU: Virtualization extensions available.
[    0.022363] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
[    0.022691] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.022722] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.022977] pinctrl core: initialized pinctrl subsystem
[    0.024334] NET: Registered protocol family 16
[    0.024895] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.026538] No ATAGs?
[    0.061349] SCSI subsystem initialized
[    0.062258] usbcore: registered new interface driver usbfs
[    0.062359] usbcore: registered new interface driver hub
[    0.062474] usbcore: registered new device driver usb
[    0.062682] pps_core: LinuxPPS API ver. 1 registered
[    0.062697] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.062733] PTP clock support registered
[    0.063262] Advanced Linux Sound Architecture Driver Initialized.
[    0.065608] clocksource: Switched to clocksource arch_sys_counter
[    0.066773] simple-framebuffer 7fd00000.framebuffer: framebuffer at 0x7fd00000, 0x300000 bytes, mapped to 0x(ptrval)
[    0.066799] simple-framebuffer 7fd00000.framebuffer: format=x8r8g8b8, mode=1024x768x32, linelength=4096
[    0.081075] Console: switching to colour frame buffer device 128x48
[    0.093911] simple-framebuffer 7fd00000.framebuffer: fb0: simplefb registered!
[    0.101363] thermal_sys: Registered thermal governor 'step_wise'
[    0.101989] NET: Registered protocol family 2
[    0.102309] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.103419] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.103479] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.103562] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.103693] TCP: Hash tables configured (established 8192 bind 8192)
[    0.103878] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.103962] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.104307] NET: Registered protocol family 1
[    0.107458] kvm [1]: vgic interrupt IRQ16
[    0.107564] kvm [1]: Hyp mode initialized successfully
[    0.109266] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.116205] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.116443] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.120660] bounce: pool size: 64 pages
[    0.124287] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.128775] sun4i-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.143800] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.146016] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.146629] printk: console [ttyS0] disabled
[    0.166897] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 51, base_baud = 1500000) is a U6_16550A
[    0.756860] printk: console [ttyS0] enabled
[    0.761619] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[    0.791956] 1c28c00.serial: ttyS3 at MMIO 0x1c28c00 (irq = 52, base_baud = 1500000) is a U6_16550A
[    0.801402] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pi not found, using dummy regulator
[    0.831717] 1c29800.serial: ttyS1 at MMIO 0x1c29800 (irq = 53, base_baud = 1500000) is a U6_16550A
[    0.863586] 1c29c00.serial: ttyS2 at MMIO 0x1c29c00 (irq = 54, base_baud = 1500000) is a U6_16550A
[    0.880094] loop: module loaded
[    0.885673] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[    0.899149] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    0.909111] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[    0.915474] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[    0.921595] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[    0.927386] sun7i-dwmac 1c50000.ethernet: no reset control found
[    0.933421] sun7i-dwmac 1c50000.ethernet: no regulator found
[    0.939421] sun7i-dwmac 1c50000.ethernet: Version ID not available
[    0.945651] sun7i-dwmac 1c50000.ethernet: 	DWMAC1000
[    0.950618] sun7i-dwmac 1c50000.ethernet: No HW DMA feature register supported
[    0.957876] sun7i-dwmac 1c50000.ethernet: TX Checksum insertion supported
[    0.964666] sun7i-dwmac 1c50000.ethernet: Normal descriptors
[    0.970339] sun7i-dwmac 1c50000.ethernet: Ring mode enabled
[    0.979545] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.986152] ehci-platform: EHCI generic platform driver
[    0.991999] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.998287] ohci-platform: OHCI generic platform driver
[    1.004250] usbcore: registered new interface driver usb-storage
[    1.010677] mousedev: PS/2 mouse device common for all mice
[    1.017067] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.026258] i2c /dev entries driver
[    1.031007] axp20x-i2c 0-0034: AXP20x variant AXP209 found
[    1.042899] axp20x-gpio axp20x-gpio: DMA mask not set
[    1.049761] axp20x-gpio axp20x-gpio: AXP209 pinctrl and GPIO driver loaded
[    1.065245] input: axp20x-pek as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input1
[    1.075662] ldo1: supplied by regulator-dummy
[    1.080904] avcc: supplied by regulator-dummy
[    1.086727] ldo3: supplied by regulator-dummy
[    1.091441] ldo4: supplied by regulator-dummy
[    1.096628] ldo5: supplied by regulator-dummy
[    1.101548] vdd-cpu: supplied by regulator-dummy
[    1.107058] vdd-int-dll: supplied by regulator-dummy
[    1.113728] axp20x-i2c 0-0034: AXP20X driver loaded
[    1.121206] axp20x-usb-power-supply axp20x-usb-power-supply: DMA mask not set
[    1.130515] random: fast init done
[    1.149726] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.161744] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.172346] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-ph not found, using dummy regulator
[    1.182144] sunxi-mmc 1c0f000.mmc: Got CD GPIO
12: [    1.212366] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.220698] sunxi-mmc 1c12000.mmc: Got CD GPIO
[    1.249043] sunxi-mmc 1c12000.mmc: initialized, max. request size: 16384 KB
[    1.257642] sun4i-ss 1c15000.crypto-engine: Die ID 0
[    1.267645] NET: Registered protocol family 10
[    1.273673] Segment Routing with IPv6
[    1.277486] NET: Registered protocol family 17
[    1.281992] can: controller area network core (rev 20170425 abi 9)
[    1.288260] NET: Registered protocol family 29
[    1.292705] 8021q: 802.1Q VLAN Support v1.8
[    1.297022] Registering SWP/SWPB emulation handler
[    1.319321] ehci-platform 1c14000.usb: EHCI Host Controller
[    1.324939] ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1
[    1.332912] ehci-platform 1c14000.usb: irq 34, io mem 0x01c14000
[    1.348109] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.362025] mmc0: new high speed SDHC card at address aaaa
[    1.368650] mmcblk0: mmc0:aaaa SL16G 14.8 GiB 
[    1.373933] ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
[    1.380642]  mmcblk0: p1 p2
[    1.384519] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    1.392835] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.400075] usb usb1: Product: EHCI Host Controller
[    1.404950] usb usb1: Manufacturer: Linux 5.4.188 ehci_hcd
[    1.410439] usb usb1: SerialNumber: 1c14000.usb
[    1.415649] hub 1-0:1.0: USB hub found
[    1.419487] hub 1-0:1.0: 1 port detected
[    1.424562] ehci-platform 1c1c000.usb: EHCI Host Controller
[    1.430224] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2
[    1.438166] ehci-platform 1c1c000.usb: irq 40, io mem 0x01c1c000
[    1.465538] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[    1.471864] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    1.480149] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.487378] usb usb2: Product: EHCI Host Controller
[    1.492252] usb usb2: Manufacturer: Linux 5.4.188 ehci_hcd
[    1.497741] usb usb2: SerialNumber: 1c1c000.usb
[    1.502856] hub 2-0:1.0: USB hub found
[    1.506709] hub 2-0:1.0: 1 port detected
[    1.511688] ohci-platform 1c14400.usb: Generic Platform OHCI controller
[    1.518371] ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 3
[    1.526332] ohci-platform 1c14400.usb: irq 35, io mem 0x01c14400
[    1.599751] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.04
[    1.608039] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.615254] usb usb3: Product: Generic Platform OHCI controller
[    1.621180] usb usb3: Manufacturer: Linux 5.4.188 ohci_hcd
[    1.626668] usb usb3: SerialNumber: 1c14400.usb
[    1.631808] hub 3-0:1.0: USB hub found
[    1.635666] hub 3-0:1.0: 1 port detected
[    1.640691] ohci-platform 1c1c400.usb: Generic Platform OHCI controller
[    1.647372] ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 4
[    1.655335] ohci-platform 1c1c400.usb: irq 41, io mem 0x01c1c400
[    1.729754] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.04
[    1.738050] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.745265] usb usb4: Product: Generic Platform OHCI controller
[    1.751193] usb usb4: Manufacturer: Linux 5.4.188 ohci_hcd
[    1.756683] usb usb4: SerialNumber: 1c1c400.usb
[    1.761819] hub 4-0:1.0: USB hub found
[    1.765687] hub 4-0:1.0: 1 port detected
[    1.770236] hctosys: unable to open rtc device (rtc0)
[    1.775885] ALSA device list:
[    1.778859]   No soundcards found.
[    1.790663] VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
[    1.800114] Freeing unused kernel memory: 2048K
[    1.835756] Run /sbin/init as init process
[    2.103707] init: Console is alive
[    2.107529] init: - watchdog -
13: [    2.328732] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.405003] JFS: nTxBlock = 8002, nTxLock = 64021
[    2.426707] ahci-sunxi 1c18000.sata: 1c18000.sata supply ahci not found, using dummy regulator
[    2.435434] ahci-sunxi 1c18000.sata: 1c18000.sata supply phy not found, using dummy regulator
[    2.495801] ahci-sunxi 1c18000.sata: PHY power up failed.
[    2.501452] ahci-sunxi: probe of 1c18000.sata failed with error -5
[    2.508433] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.526298] init: - preinit -
[    3.119002] random: jshn: uninitialized urandom read (4 bytes read)
[    3.162396] random: jshn: uninitialized urandom read (4 bytes read)
[    3.185678] random: jshn: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
18: [    7.393473] urandom_read: 2 callbacks suppressed
[    7.393484] random: procd: uninitialized urandom read (4 bytes read)
[    7.789444] F2FS-fs (loop0): Mounted with checkpoint version = 8f6051e
[    7.802361] mount_root: switching to f2fs overlay
[    7.861311] urandom-seed: Seeding with /etc/urandom.seed
[    7.954663] procd: - early -
[    7.957775] procd: - watchdog -
19: [    8.542883] procd: - watchdog -
[    8.599381] procd: - ubus -
[    8.690794] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.697909] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.706505] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.714367] procd: - init -
Please press Enter to activate this console.
21: [   10.684160] urngd: v1.0.2 started.
[   10.742466] crng init done
[   10.745200] random: 1 urandom warning(s) missed due to ratelimiting
[   11.150014] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.227970] sunxi-rtc 1c20d00.rtc: registered as rtc0
[   11.238443] debugfs: Directory '1c22c00.codec' with parent 'sun4i-codec' already present!
[   11.247945] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[   11.272183] PPP generic driver version 2.4.2
[   11.278280] NET: Registered protocol family 24
[   11.287504] usbcore: registered new interface driver snd-usb-audio
[   11.297814] kmodloader: done loading kernel modules from /etc/modules.d/*
24: [   13.987098] sun7i-dwmac 1c50000.ethernet eth0: PHY [stmmac-0:01] driver [RTL8201CP Ethernet]
[   13.996823] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
[   14.004176] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
[   14.011713] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
[   14.019459] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
[   14.026086] sun7i-dwmac 1c50000.ethernet eth0: configuring for phy/mii link mode
26: [   15.981596] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[   16.095933] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   16.104515] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
39: [   28.860897] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
42: [   31.845604] vcc5v0: disabling
[   31.848614] ldo3: disabling
[   31.851780] ldo4: disabling
[   31.854912] ahci-5v: disabling
[   31.858159] usb0-vbus: disabling

bump! still having this issue even after building 22.03.3 stable . built the image fromsource code and am facing this issue.

If I press the restart button it will boot , but when the board reboots by the reboot command or because of kernel panic etc then the serial console just prints a single line

BusyBox v1.35.0 (2023-01-03 00:24:21 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.3, r20028-43d71ad93e
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# reboot
root@OpenWrt:/# [  178.871408] reboot: Restarting system

U-Boot SPL 2020.04-OpenWrt-r20028-43d71ad93e (Jan 03 2023 - 00:24:21 +0000)
DR

I noted something the I tried the stuck at reboot is very less but still there when I burned the ext4 image instead of the squashfs

Can anyone suggest which is better?

The issue is solved by patching uboot defconfig for the Olimex A20 Micro board.

It happens because of the issue that is fixed in this patch

https://lists.denx.de/pipermail/u-boot/2017-March/282789.html

When powering up an AXP209, the default value for LDO3 output is enabled. This
works fine. However if for whatever reason, LDO3 is disabled, for example by OS
during reboot and u-boot enables LDO3 again, the PMIC shutsdown (without
setting an interrupt) causing the board to hang. This behavior has been seen
from Linux as well, u-boot disables LDO3 as a default value, the kernel enables
it per its DTS, the kernel hangs as the PMIC gets shut down.

The root cause is that some boards have to high capacitance on the LDO3 output
port causing inrush currents exceeding the maximum of the AXP209.

The fix is to turn on the LDO3 at the lowest possible voltage and then set the
final voltage.

If the capacitance is really big (due to a connected device for example) the
AXP209 also features VRC, or Voltage Rate Control, which allows the voltage
ramp up to be even slower.

But the defconfig for A20 Micro board is not patched for this patch , only Lime2 is patched

  sunxi: board: Print error after power initialization fails
  sunxi: pmic_bus: Decrease boot time by not writing duplicate data
  power: axp209: Use BIT() macro
  power: axp209: Define the chip version mask
  power: axp209: Reduce magic values by adding defines for LDO[234]
  power: axp209: Add support for voltage rate control on LDO3
  power: axp209: Limit inrush current for broken boards
  arm: sunxi: Enable inrush quirk on Olimex OLinuXino-A20-Lime2

 arch/arm/mach-sunxi/pmic_bus.c        |  6 ++++
 board/sunxi/board.c                   | 14 ++++----
 configs/A20-OLinuXino-Lime2_defconfig |  1 +
 drivers/power/Kconfig                 | 42 ++++++++++++++++++++++
 drivers/power/axp209.c                | 61 ++++++++++++++++++++++++++------
 include/axp209.h                      | 66 ++++++++++++++++++++++++++---------
 6 files changed, 158 insertions(+), 32 deletions(-)

To fix it I had to add an aditional patch in openwrt/packages/boot/uboot/patches directory

diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig
index edc3249..d5cfcb9 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -17,6 +17,8 @@ CONFIG_SCSI_AHCI=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_SUN7I_GMAC=y
+CONFIG_AXP_ALDO3_VOLT_SLOPE_08=y
+CONFIG_AXP_ALDO3_INRUSH_QUIRK=y
 CONFIG_SUN7I_GMAC_FORCE_TXERR=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800

and run make command again to build the uboot. This silved the issue

2 Likes

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