Jump to content

Banana PI M2+ does not boot after power cycle


Wanninger

Recommended Posts

@Igor

 

I've also tested this build.

 

Your right, M2Plus is booting after power-on, but a few seconds after boot, the display crashes (some display resolution changes are done by the M2Plus), and then the M2Plus hangs.

 

See this:

U-Boot SPL 2017.01-rc2-armbian (Dec 25 2016 - 20:32:39)
DRAM: 1024 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-armbian (Dec 25 2016 - 20:32:39 +0100) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: Banana Pi BPI-M2-Plus
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment

HDMI connected: Setting up a 1920x1080 hdmi console (overscan 0x0)
hdmi enabled
Error: no valid bmp image at 66000000
In:    serial
Out:   vga
Err:   vga
Net:   No ethernet found.
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 2 USB Device(s) found
scanning bus 3 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0
6944 bytes read in 160 ms (42 KiB/s)
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
2092 bytes read in 197 ms (9.8 KiB/s)
## Executing script at 43100000
Booting from SD
123 bytes read in 136 ms (0 Bytes/s)
4480235 bytes read in 496 ms (8.6 MiB/s)
5047304 bytes read in 543 ms (8.9 MiB/s)
** File not found /boot/.next **
** File not found .next **
36464 bytes read in 286 ms (124 KiB/s)
## Loading init Ramdisk from Legacy Image at 43300000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4480171 Bytes = 4.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
Using machid 0x1029 from environment

Starting kernel ...

[sun8i_fixup]: From boot, get meminfo:
        Start:  0x40000000
        Size:   1024MB
ion_carveout reserve: 160m@0 256m@0 130m@1 200m@1
ion_reserve_select: ion chipid  [0x2004620!
ion_reserve_common: ion reserve: [0x50000000, 0x60000000]!


Link to comment
Share on other sites

@Wanninger

 

The same here. About the "display crashes", I think you are seeing some artifacts on screen... it is an issue on all H3 boards with 3.x kernel... we are investigating it here: https://github.com/igorpecovnik/lib/issues/579

 

Can you please confirm you are seeing this kind of artifact on your screen?

 

Based on my tests it is not related to the fact M2+ is not booting (because other H3 boards show the same strange screen and boot). There is something else... maybe on u-boot or fex.

Link to comment
Share on other sites

@lvmc

 

Yes, I can confirm exactly this kind of artifacts... - ...and there is something else, which prevents M2+ boot after power-cycle!

 

Two hints:

 

1. In my post #16, I wrote about a USB issue. Disabling USB system via "nousb" boot option, results in a wunderful booting M2+, except USB is no more usable.

 

2. I found an Armbian 5.0.7 Jessie Image with Kernel 4.0.6pr1, and this Image is also booting perfect. Unfortunately, this Image provides no HDMI output, only serial via UART.

 

-Wanninger

Link to comment
Share on other sites

I added two USB devices (keyboard and card reader) and I succeed in crashing uboot:

U-Boot 2017.01-rc2-armbian (Dec 25 2016 - 20:32:39 +0100) Allwinner Technology


CPU:   Allwinner H3 (SUN8I 1680)
Model: Banana Pi BPI-M2-Plus
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment


HDMI connected: Setting up a 3840x2160 hdmi console (overscan 0x0)
hdmi enabled
In:    serial
Out:   vga
Err:   vga
Net:   No ethernet found.
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... Device NOT ready
   Request Sense returned 02 3A 00
### ERROR ### Please RESET the board ###

Disable USB in uboot could solve this.

Link to comment
Share on other sites

@lvmc

 

1. I took this image: "Armbian_5.20_Bananapim2plus_Debian_jessie_3.4.112.7z" on a SD card

2. After boot has finished, open /boot/boot.cmd with your editor

3. Change this line "setenv bootargs "console=ttyS0,115200....." to "setenv bootargs "nousb console=ttyS0,115200....."

4. Save your changes and exit the editor

5. Run this command: "mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr"

6. Shutdown your M2+

7. Power off and then on, and you will have a well booting M2+, but with no USB access at all!

 

Have fun...

Link to comment
Share on other sites

@Wanninger,

 

The boot seems to be stable with "nousb" option on boot.scr

 

The instructions I sent you on last message, I think will disable USB_EHCI_HCD entirely.

Does this option supports to be a module?

 

Your idea is interesting, disable USB while board is booting and load it after boot... anyway we still have to find the root of it... at least it is now about USB stuff.

 

One more accent to this issue. Sometime ago, Sinovoip folks told me that they had to replace a capacitor on M2+ because a issue on microUSB / OTG. I really don't know what it is, but MAYBE it is also related. They changed it because when you had something connected to microUSB the board was not booting or was constantly rebooting too (maybe because the capacitor was limiting the start current).

 

That is the capacitor.

 

https://www.dropbox.com/home/Public?preview=1432443996-M2P+CAP+ADJ.jpg

Link to comment
Share on other sites


[    2.050938] NET: Registered protocol family 24

[    2.060628] Initializing USB Mass Storage driver...

[    2.070681] WRN:L2213(drivers/usb/sunxi_usb/hcd/hcd0/sunxi_hcd0.c):ERR: usb disabled

[    2.084263]  uinput result 0 , vmouse_init

[    2.084864] mousedev: PS/2 mouse device common for all mice

[    2.096110] sunxikbd_init failed.

[    2.105129] ls_fetch_sysconfig_para: type err  device_used = -1073057456.

[    2.117624] =========script_get_err============

[    2.127421] ltr_init: ls_fetch_sysconfig_para err.

[    2.128044] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0

Link to comment
Share on other sites

@Wanninger and @Igor, I found something different on Sinovoip/BSP and Armbian fex files. Could you please try/test:

 



[usbc0]
usb_used = 1
usb_port_type = 2
usb_detect_type = 1
usb_id_gpio = port:PL06<0><1><default><default>
usb_det_vbus_gpio = port:PL06<0><1><default><default>
usb_drv_vbus_gpio = port:PD11<1><0><default><0>
usb_host_init_state = 0
usb_restrict_gpio =
usb_restric_flag = 0
usb_restric_voltage = 3550000
usb_restric_capacity = 5
usb_regulator_io = "nocare"
usb_regulator_vol = 0
usb_not_suspend = 0

Link to comment
Share on other sites

Currently I'm most interested,  whether or not it is possible to disable USB in uboot only, e.g. via a bootparameter. I only want to test it temporarely, not to compile a new u-boot with usb disabled permanent.

 

@Igor

 

Yes/No - Yes/How?

Link to comment
Share on other sites

@lvmc

 

Thank you for the link - It helped me!

 

It makes no difference, whether u-boot usb is aktive, or not.

 

@Igor

 

Boot procedure always stops at the same point:

[    1.900353] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

Here is the full boot procedure:

U-Boot SPL 2016.09-armbian (Sep 15 2016 - 00:38:25)
DRAM: 1024 MiB
Trying to boot from MMC1


U-Boot 2016.09-armbian (Sep 15 2016 - 00:38:25 +0200) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi PC
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
In:    serial
Out:   serial
Err:   serial
Net:   phy interface0
eth0: ethernet@1c30000
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
USB4:   USB EHCI 1.00
USB5:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 4 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 2 USB Device(s) found
scanning bus 3 for devices... 1 USB Device(s) found
scanning bus 5 for devices... 1 USB Device(s) found
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
2886 bytes read in 172 ms (15.6 KiB/s)
## Executing script at 43100000
gpio: pin PL10 (gpio 298) value is 1
   Warning: value of pin is still 0
gpio: pin PG11 (gpio 203) value is 1
0 bytes read in 123 ms (0 Bytes/s)
** File not found /boot/.next **
** Unrecognized filesystem type **
** File not found .next **
38168 bytes read in 276 ms (134.8 KiB/s)
3114495 bytes read in 344 ms (8.6 MiB/s)
5025168 bytes read in 502 ms (9.5 MiB/s)
## Loading init Ramdisk from Legacy Image at 43300000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    3114431 Bytes = 3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
Using machid 0x1029 from environment

Starting kernel ...

[sun8i_fixup]: From boot, get meminfo:
        Start:  0x40000000
        Size:   1024MB
ion_carveout reserve: 160m@0 256m@0 130m@1 200m@1
ion_reserve_select: ion chipid  [0x2004620!
ion_reserve_common: ion reserve: [0x50000000, 0x60000000]!
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.4.112-sun8i (root@xenial) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) ) #14 SMP PREEMPT Wed Sep 14 20:29:31 CEST 2016
[    0.000000] cma: CMA: reserved 256 MiB at 50000000
[    0.000000] PERCPU: Embedded 8 pages/cpu @c1474000 s11968 r8192 d12608 u32768
[    0.000000] Kernel command line: console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 cgroup_enable=memory swapaccount=1 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 panic=10 consoleblank=0 enforcing=0 loglevel=7
[    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] allocated 2097152 bytes of page_cgroup
[    0.000000] Memory: 1024MB = 1024MB total
[    0.000000] Memory: 758704k/758704k available, 289872k reserved, 270336K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc095bce8   (9552 kB)
[    0.000000]       .init : 0xc095c000 - 0xc09aeec0   ( 332 kB)
[    0.000000]       .data : 0xc09b0000 - 0xc0a29750   ( 486 kB)
[    0.000000]        .bss : 0xc0a29f04 - 0xc0b5cf90   (1229 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Additional per-CPU info printed with stalls.
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [tty1] enabled
[    0.001021] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.001088] pid_max: default: 32768 minimum: 301
[    0.001448] Mount-cache hash table entries: 512
[    0.002439] Initializing cgroup subsys cpuacct
[    0.002478] Initializing cgroup subsys memory
[    0.002544] Initializing cgroup subsys devices
[    0.002574] Initializing cgroup subsys freezer
[    0.002603] Initializing cgroup subsys blkio
[    0.002644] Initializing cgroup subsys perf_event
[    0.002744] CPU: Testing write buffer coherency: ok
[    0.002810] ftrace: allocating 25740 entries in 76 pages
[    0.030298] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.030343] [sunxi_smp_prepare_cpus] enter
[    0.030392] Setting up static identity map for 0x40691938 - 0x40691990
[    0.031355] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.031485] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.040485] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.040605] Brought up 4 CPUs
[    0.040605] SMP: Total of 4 processors activated (19200.00 BogoMIPS).
[    0.040986] devtmpfs: initialized
[    0.051043] wakeup src cnt is : 2.
[    0.051136] sunxi pm init
[    0.051281] pinctrl core: initialized pinctrl subsystem
[    0.061298] NET: Registered protocol family 16
[    0.062247] DMA: preallocated 2048 KiB pool for atomic coherent allocations
[    0.062247] script_sysfs_init success
[    0.062487] gpiochip_add: registered GPIOs 0 to 383 on device: sunxi-pinctrl
[    0.062487] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.062487] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.062487] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.062487] script config pll_video to 297 Mhz
[    0.062487] script config pll_de to 864 Mhz
[    0.062487] script config pll_ve to 402 Mhz
[    0.070236] bio: create slab <bio-0> at 0
[    0.070334] [ARISC] :sunxi-arisc driver v1.04
[    0.091278] [ARISC] :arisc version: [v0.1.58]
[    0.177034] [ARISC] :sunxi-arisc driver v1.04 startup succeeded
[    0.178646] SCSI subsystem initialized
[    0.178646] usbcore: registered new interface driver usbfs
[    0.178646] usbcore: registered new interface driver hub
[    0.180043] usbcore: registered new device driver usb
[    0.180167] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.180194] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.180220] twi_chan_cfg()340 - [twi2] has no twi_regulator.
[    0.180510] Linux video capture interface: v2.00
[    0.180748] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.181504] cfg80211: Calling CRDA to update world regulatory domain
[    0.181581] Switching to clocksource arch_sys_counter
[    0.193986] FS-Cache: Loaded
[    0.194293] CacheFiles: Loaded
[    0.205295] NET: Registered protocol family 2
[    0.216537] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.217146] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.218930] TCP bind hash table entries: 65536 (order: 7, 786432 bytes)
[    0.220002] TCP: Hash tables configured (established 131072 bind 65536)
[    0.220061] TCP: reno registered
[    0.220086] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.220140] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.220509] NET: Registered protocol family 1
[    0.220935] RPC: Registered named UNIX socket transport module.
[    0.220967] RPC: Registered udp transport module.
[    0.220987] RPC: Registered tcp transport module.
[    0.221008] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.221216] Trying to unpack rootfs image as initramfs...
[    0.407805] Freeing initrd memory: 3040K
[    0.408375] hw perfevents: enabled with ARMv7 Cortex_A7 PMU driver, 5 counters available
[    0.408524] sunxi_reg_init enter
[    0.409451] audit: initializing netlink socket (disabled)
[    0.409520] type=2000 audit(0.400:1): initialized
[    0.411613] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.412537] NFS: Registering the id_resolver key type
[    0.412929] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.412963] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.413739] NTFS driver 2.1.30 [Flags: R/W].
[    0.414082] fuse init (API version 7.18)
[    0.414876] Btrfs loaded
[    0.414915] msgmni has been set to 1471
[    0.416349] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.416396] io scheduler noop registered
[    0.416416] io scheduler deadline registered
[    0.416498] io scheduler cfq registered (default)
[    0.416943] [DISP]disp_module_init
[    0.417267] cmdline,init_disp=
[    0.417311] cmdline,disp=
[    0.425104] [DISP] Fb_map_kernel_logo,line:932:Fb_map_kernel_logo failed!
[    0.441536] Console: switching to colour frame buffer device 160x45
[    0.458995] [DISP]disp_module_init finish
[    0.459341] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.459534] sw_uart_get_devinfo()1503 - uart1 has no uart_regulator.
[    0.459720] sw_uart_get_devinfo()1503 - uart2 has no uart_regulator.
[    0.459905] sw_uart_get_devinfo()1503 - uart3 has no uart_regulator.
[    0.460680] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.460864] sw_uart_pm()890 - uart0 clk is already enable
[    0.461029] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.561134] console [ttyS0] enabled
[    1.194303] uart1: ttyS1 at MMIO 0x1c28400 (irq = 33) is a SUNXI
[    1.360589] uart2: ttyS2 at MMIO 0x1c28800 (irq = 34) is a SUNXI
[    1.518711] uart3: ttyS3 at MMIO 0x1c28c00 (irq = 35) is a SUNXI
[    1.767978] brd: module loaded
[    1.780202] loop: module loaded
[    1.788664] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    1.800541] sunxi_spi_chan_cfg()1376 - [spi-1] has no spi_regulator.
[    1.812906] spi spi0: master is unqueued, this is deprecated
[    1.824248] tun: Universal TUN/TAP device driver, 1.6
[    1.834554] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    1.847430] PPP generic driver version 2.4.2
[    1.857203] PPP BSD Compression module registered
[    1.867293] PPP Deflate Compression module registered
[    1.880516] PPP MPPE Compression module registered
[    1.890665] NET: Registered protocol family 24
[    1.900353] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

Link to comment
Share on other sites

@all

 

...after these tests, I thought I give Igor's power hint a chance.

 

Because I do not have a PS with more then 5,3V/3A (which I'm currently using), I took a second one, and connected it to the OTG port.

 

The M2+ bootet wonderful after power cycle.

 

But the actual power consumption is not higher than before, with only one PS. During the whole boot, the current doesn't go higher than 0,7A/5,3V.

 

Now I connected only one PS, but only to OTG port, and made lots of power cycle.

Every single power cycle ended up in a complete boot. No hang or something else.

 

I stopped counting after 30 times...

 

@lvmc

 

You also tested something like that.

 

Can you pls confirm - or not -  that with image "Armbian_5.20_Bananapim2plus_Debian_jessie_3.4.112.7z" and power to OTG port only,

the power cycle boot procedure succeeds evertime?

 

Thank you

 

-Wanninger

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines