[FS#239] OLIMEX A13 SOM fails to boot

LEDE Bugs lede-bugs at lists.infradead.org
Fri Oct 21 06:55:07 PDT 2016


A new Flyspray task has been opened.  Details are below. 

User who did this - Mario Fischer (fischermario) 

Attached to Project - LEDE Project
Summary - OLIMEX A13 SOM fails to boot
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - High
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - The A13 SOM is booting without issues on OpenWRT 15.05.1, but fails to boot on the current lede trunk.

Short version: uboot upgrade happened between OpenWRT 15.05.1 and current lede trunk. Some patches were just carried over and at the moment the A13 SOM defconfig in uboot-sunxi is incorrect. As a result uboot loads a module for a power-regulator IC (AXP209) that is not present on the A13 SOM, then fails to set the correct frequency and confuses the kernel.

I have attached a patch to correct the behavior and prevent uboot-sunxi from building the unnecessary module.


Long version...

First a look a the bootlog:

U-Boot SPL 2016.03 (Oct 20 2016 - 06:46:26)
DRAM: 256 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC1


U-Boot 2016.03 (Oct 20 2016 - 06:46:26 +0000) Allwinner Technology

CPU:   Allwinner A13 (SUN5I)
Model: Olimex A13-Olinuxino
I2C:   ready
DRAM:  256 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
377 bytes read in 17 ms (21.5 KiB/s)
## Executing script at 43100000
reading uImage
2143600 bytes read in 212 ms (9.6 MiB/s)
reading dtb
18096 bytes read in 27 ms (654.3 KiB/s)
## Booting kernel from Legacy Image at 42000000 ...
   Image Name:   ARM OpenWrt Linux-4.4.25
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2143536 Bytes = 2 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Kernel Image ... OK
   Using Device Tree in place at 43000000, end 430076af

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.25 (mario at mario-laptop) (gcc version 5.4.0 (LEDE GCC 5.4.0 r1949) ) #0 SMP PREEMPT Thu Oct 20 06:46:26 2016
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Olimex A13-Olinuxino
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] PERCPU: Embedded 12 pages/cpu @cfddd000 s17984 r8192 d22976 u49152
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 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: 253120K/262144K available (4254K kernel code, 201K rwdata, 1612K rodata, 268K init, 257K bss, 9024K 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 : 0xc0008000 - 0xc05c2d10   (5868 kB)
[    0.000000]       .init : 0xc05c3000 - 0xc0606000   ( 268 kB)
[    0.000000]       .data : 0xc0606000 - 0xc063849c   ( 202 kB)
[    0.000000]        .bss : 0xc063b000 - 0xc067b564   ( 258 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000031] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000081] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000401] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000751] Console: colour dummy device 80x30
[    0.000803] Calibrating delay loop... 380.92 BogoMIPS (lpj=1904640)
[    0.060090] pid_max: default: 32768 minimum: 301
[    0.060318] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060346] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.061316] CPU: Testing write buffer coherency: ok
[    0.061834] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.061991] Setting up static identity map for 0x40008280 - 0x400082d8
[    0.110554] Brought up 1 CPUs
[    0.110585] SMP: Total of 1 processors activated (380.92 BogoMIPS).
[    0.110602] CPU: All CPU(s) started in SVC mode.
[    0.123216] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.124178] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.124508] pinctrl core: initialized pinctrl subsystem
[    0.126485] NET: Registered protocol family 16
[    0.127365] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.240826] reg-fixed-voltage usb0-vbus: could not find pctldev for node /soc at 01c00000/pinctrl at 01c20800/usb0_vbus_pin at 0, deferring probe
[    0.240928] reg-fixed-voltage usb1-vbus: could not find pctldev for node /soc at 01c00000/pinctrl at 01c20800/usb1_vbus_pin at 0, deferring probe
[    0.243672] SCSI subsystem initialized
[    0.244596] usbcore: registered new interface driver usbfs
[    0.244768] usbcore: registered new interface driver hub
[    0.248419] usbcore: registered new device driver usb
[    0.249426] pps_core: LinuxPPS API ver. 1 registered
[    0.249450] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti 
[    0.249637] PTP clock support registered
[    0.251505] Advanced Linux Sound Architecture Driver Initialized.
[    0.256158] clocksource: Switched to clocksource timer
[    0.294418] NET: Registered protocol family 2
[    0.296804] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.296883] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.296969] TCP: Hash tables configured (established 2048 bind 2048)
[    0.297083] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.297134] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.297497] NET: Registered protocol family 1
[    0.301002] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.301109] audit: initializing netlink subsys (disabled)
[    0.301233] audit: type=2000 audit(0.290:1): initialized
[    0.301326] No memory allocated for crashlog
[    0.340785] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.342830] io scheduler noop registered
[    0.342867] io scheduler deadline registered
[    0.342961] io scheduler cfq registered (default)
[    0.343704] sun4i-usb-phy 1c13400.phy: could not find pctldev for node /soc at 01c00000/pinctrl at 01c20800/usb0_id_detect_pin at 0, deferring probe
[    0.348235] sun5i-a13-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.627113] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.637104] console [ttyS0] disabled
[    0.657674] 1c28400.serial: ttyS0 at MMIO 0x1c28400 (irq = 26, base_baud = 1500000) is a U6_16550A
[    1.162185] console [ttyS0] enabled
[    1.173568] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.180602] ehci-platform: EHCI generic platform driver
[    1.186682] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.192923] ohci-platform: OHCI generic platform driver
[    1.199684] usbcore: registered new interface driver usb-storage
[    1.207199] mousedev: PS/2 mouse device common for all mice
[    1.214468] input: 1c22800.lradc as /devices/platform/soc at 01c00000/1c22800.lradc/input/input0
[    1.225681] i2c /dev entries driver
[    1.232420] axp20x 0-0034: AXP20x variant AXP209 found
[    3.235888] i2c i2c-0: mv64xxx: I2C bus locked, block: 1, time_left: 0
[    3.242450] axp20x 0-0034: Failed to set masks in 0x40: -110
[    3.248171] axp20x 0-0034: failed to add irq chip: -110
[    3.253612] axp20x: probe of 0-0034 failed with error -110
[    3.263982] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    3.274764] sunxi-mmc 1c0f000.mmc: No vqmmc regulator found
[    3.281822] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    3.326266] sunxi-mmc 1c0f000.mmc: base:0xd08a0000 irq:19
[    3.338946] NET: Registered protocol family 10
[    3.360717] NET: Registered protocol family 17
[    3.365291] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    3.378134] can: controller area network core (rev 20120528 abi 9)
[    3.384522] NET: Registered protocol family 29
[    3.389508] 8021q: 802.1Q VLAN Support v1.8
[    3.395191] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 384000 KHz
[    3.403528] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 432000 KHz

Uboot is not initializing the A13 SOM correctly and therefore reporting a wrong initial frequency of the SoC to the kernel. The kernel hanging at the last line is just a result of that. The reason behind uboot being unable to correctly initialize the SoC is the axp209 module. It silently fails during probing without an error message. The defconfig of the A13 SOM needs to be corrected in order to prevent the axp209 module from being included during the uboot-sunxi building stage.

The patch also removes some entries from CONFIG_SYS_EXTRA_OPTIONS and translates them into regular options (CONFIG_SYS_EXTRA_OPTIONS will soon be deprecated).

One or more files have been attached.

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=239



More information about the lede-bugs mailing list