Factory image seems to stop in fast boot mode


#1

I received my HiKey960 (3 GBytes RAM) in late December and it boots properly into Android with Switch 1 closed, Switch 2 open, and Switch 3 open. I have installed the mezzanine board that provides the USB debug port (/dev/ttyUSB0 on my Debian system).

I have now successfully built the Android images and wanted to flash them onto the device. I removed power from the 960, closed Switch 3 (Switch 1 is also closed) and powered up the board. I then ran the flashing script which stalled at “< waiting for device >”. Since I cannot flash the device, I know it’s still running the factory images.

I rebooted the 960 while running a terminal program on /dev/ttyUSB0 and recorded the information at the bottom of this topic. From all I can tell, “USB bootloader is 4” is a shutdown mode.

Do I need to connect the USB OTG port to use fast boot mode?
If not, what am I doing wrong?

xloader chipid is: 0x36600110, start at 499ms.
Build Date: Jun 20 2017, 20:37:08
[clock_init] ++
hikey960 [hikey960_clk_init]
hi3660 [clk_setup]
[clock_init] –
storage type is UFS
ufs retry: 6 count v_tx:0 v_rx:0
ufs set v_tx:0 v_rx:0
Hikey960[5301] no need avs_init.
ddr ft:0xf20332a3,mode:1 target:4
UceLdOk
ch 0 gt_errfail, STATUS:0x00000060
ch 0 gdst_errfail, STATUS:0x00000040
ch 1 gt_errfail, STATUS:0x00000060
ch 1 gdst_errfail, STATUS:0x00000040
ch 2 gt_errfail, STATUS:0x00000060
ch 2 gdst_errfail, STATUS:0x00000040
ch 3 gt_errfail, STATUS:0x00000060
ch 3 gdst_errfail, STATUS:0x00000040
timeout
timeout
timeout
timeout
density: 0x0c0c0c0c,0x00000000,0x0c0c0c0c,0x00000000,0x0c0c0c0c,0x00000000,0x0c0c0c0c,0x00000000
ddr info 0x00000306
400M
685M
C1R,V0x00000030 e:113
1067M
C1R,V0x0000002b e:66
C2R,V0x0000002c e:66
C3R,V0x0000002d e:66
C0R,V0x0000002d e:66
C1R,V0x0000002c e:66
C2R,V0x0000002d e:66
C3R,V0x0000002e e:66
C0R,V0x0000002e e:66
C1R,V0x0000002d e:66
C2R,V0x0000002e e:66
C3R,V0x0000002f e:65
C0R,V0x0000002f e:65
C1R,V0x0000002e e:66
C2R,V0x0000002f e:65
C3R,V0x00000030 e:65
1244M
1866M
C1R,V0x00000014 e:66
C1R,V0x00000015 e:66
C2R,V0x00000015 e:193
C1R,V0x00000016 e:66
C2R,V0x00000016 e:66
C0R,V0x00000017 e:66
C1R,V0x00000017 e:66
C2R,V0x00000017 e:66
C3R,V0x00000017 e:66
iomcu_subsys_init
boot_c0 PROFILE 4
slave0 irq0:0x00000014
slave1 irq0:0x00000014
main: ******** Fastboot for Kirin *****************
main: ******** Build Date: Jun 2 2017, 17:34:24 **
main: ******** Fastboot start at 1861 ms **********
main: print soc_id computed in xloader phase, is below:
main: 00000000 main: 00000000 main: 00000000 main: 00000000 main:
main: 00000000 main: 00000000 main: 00000000 main: 00000000 main:
led_alwayson: can’t get dtb operators
bbox: bbox_register_module_ops success.
bfm: : >>>>>enter bfm_init
bfm: : [disable_boot_fail_system] boot_fail_system state is 0
clock: PLL Stat
clock: PLL2 ctrl0=0x04909604,ctrl1=0x02000000
clock: PLL2 acpu en_stat:0x00000008, acpu gt_stat:0x00040000
clock: PLL2 final en_stat:0x00100000, final gt_stat:0x00020000
clock: PLL3 ctrl0=0x04904005,ctrl1=0x07000000
clock: PLL3 acpu en_stat:0x00000000, acpu gt_stat:0x00000000
clock: PLL3 final en_stat:0x00200000, final gt_stat:0x00040000
clock: clock init OK
ufs: ufs start on platform[36600110]ufs: ufs current mode: 0x00000011
ufs: ufs current gear: 0x00000003
ufs: ufs mphy reg 0x4A = 0x00000000
ufs: bUD0BaseOffset: 0x00000010, bUDConfigPLength: 0x00000010
ufs: UFS device manufacturerid = 0x00000198
ufs: UFS device: T******
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02000001, mntnStageCode is 27
bfm: : <<<<<exit set_boot_stage.
storage: emmc_ops invalid
storage: storage type is UFS
bfm: : bfm system is disabled!
storage: emmc_init: BL2_STAGE_EMMC_OK is 33554435!
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02000003, mntnStageCode is 29
bfm: : <<<<>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02010001, mntnStageCode is 30
bfm: : <<<<<exit set_boot_stage.
ddr: current logic version is lpddr4 verison !!!
ddr: ddr size is 3072MB
bbox: register modid [0x81fff200]
bbox: register exception succeed.
bbox: register modid [0x81fff202]
bbox: register exception succeed.
bbox: register modid [0x81fff20b]
bbox: register exception succeed.
watchdog: Enable watchdog start
boardid: [BDID]boardid: 5301
gpio: hikey960_gpio_init: GPIO 46 202 206 ouput low, GPIO 219 pullup.
load_kernel: register_update_dt_ops for usb!
usb: [USBERR]random_serial: fastboot serial: 6940394143000000
secureboot: Enter secboot_init: set pll efuse flag!
secureboot: pll efuse flag has been succ set!bbox: register modid [0x81fff20a]
bbox: register exception succeed.
secureboot: SECBOOT_DEV_INFO_DADDR = 0x1d7fff00, SECBOOT_DEV_INFO_SIZE = 0x00000040!

dtimage: number of dtb = 1
dtimage: =========uncompress_dtb_addr=[0x16f00000],====vrl_addr=[0x1b0e64e0]====
dtimage: [device_tree_get_dtb_entry:215] Verify Not Exist
dtimage: fdt_init success!
dtimage: -----can not find hisilicon,fastboot node by compatible
dtimage: -----can not find hisilicon,fastboot node by compatible
load_kernel: register_update_dt_ops for led!
dtimage: -----can not find hisilicon,fastboot node by compatible
vibrator: vibrator_delay: hisilicon,fastboot motor-vib_type failed!
dtimage: -----can not find hisilicon,fastboot node by compatible
vibrator: vibrator_off: hisilicon,fastboot motor-vib_type failed!
reboot_reason: scsysstat_value is 0x00000000
pmu: can not find fastboot,hisi-pmic-mntn node1
pmu: pmu_property_read_u32 fastboot,hisi-pmic-mntn, hisilicon,data-width, failed
pmu: pmu_mntn_record_dts_parse failed!
reboot_reason: enter [check_hardware_reset]
reboot_reason: Could not find path /sysctrl_reason
reboot_reason: get_sysctrl_reason_data is error
ddr: reset dmc_rint_0:00011160
ddr: reset dmc_rint_1:00001060
ddr: reset dmc_rint_2:00000100
ddr: reset dmc_rint_3:00010020
ddr: new dmc_rint_0:00000000
ddr: new dmc_rint_1:00000000
ddr: new dmc_rint_2:00000000
ddr: new dmc_rint_3:00000000
bbox: save_tempbuffer_to_loop_area():727:storage_read fail[-1]
reboot_reason: reboot_reason is coldboot
reboot_reason: clear_reset_source in!
reboot_reason: tmp =0x0effcc70
dtimage: -----can not find fastboot,charger node by compatible
power: get_chargerIC_type: getU32byCompatible fastboot,charger, hw_charger_type failed!
dtimage: -----can not find fastboot,coul node by compatible
power: get_coul_type: get coul_type failed!
power: get coul_type failed!
power: hi6421v500 register coulometer ops fail!
dtimage: -----can not find huawei,hisi_bci_battery node by compatible
no_module: [hi6523_get_config_info]: can’t get battery board type
dtimage: -----can not find fastboot,charger node by compatible
no_module: get hi6523 i2c reg num fail!
dtimage: -----can not find fastboot,charger node by compatible
no_module: [hi6523_start_charging_by_init_params]: get ichrg_pre_limit fail
dtimage: -----can not find huawei,hi6523_charger node by compatible
no_module: [hi6523_start_charging_by_init_params]: get reg fail
dtimage: -----can not find fastboot,buckboost node by compatible
max77813: get_buckboost_type: getU32byCompatible fastboot,buckboost, hw_buckboost_type failed!
max77813: get dts buckboost type fail!
cpu_buck: pmu type3 not registered
cpu_buck: Bad cpu buck info:1
bbox: Could not find path /rdr
bbox: Could not find status property.
mntn: tele_mntn_stat_point_init: can not bbox_ops !
dtimage: -----can not find hisilicon,fastboot node by compatible
mntn: [tele_mntn_m3_wdt_config]: getU32byCompatible(hisilicon,fastboot, lpm3-board-type) error!
mntn: mntn init
mntndump: enable_reserved_ddr_dts: Could not find path /reserved-memory/mntndump
mntndump: mntn_dump_init failed
mntndump: get_mntn_dump_addr:mid[2] is not init
mntn: kernel dump is not available
mntn: reboot_type is 16
mntn:
no need to dump_mem…
mntn: enter [registe_pstore_ramoops_dump]
mntndump: get_mntn_dump_addr:mid[5] is not init
mntn: no mdump_pstore info
mntn: M3_RDR_SYS_CONTEXT_BASE_ADDR is null
uart_cfg: [MNTN]:Could not find node.
uart_cfg: set_default_uart_cfg: uart_from_dts_read failed!
uart_cfg: module_idx 2, uart_no 6
uart_cfg: odule_idx 11, uart_no 15
uart_cfg: module_idx 2, uart_no 6
uart_cfg: getU32byCompatible(hisilicon,fastboot, uart-board-type) error!
uart_cfg: boardid: 5301 use uart port: 6
pasr: in pasr_init-43 …ddr: current logic version is lpddr4 verison !!!
ddr: current logic version is lpddr4 verison !!!
dtimage: -----can not find huawei,lcd_panel_type node by compatible
display: [display]get_detect_type: huawei,lcd_panel_type: get detect_type fail
display: lcd:no lcd detect_type
no_module: [LOGO] get_logo_buffer_from_dtsi: Could not find path /reserved-memory/logo-buffer.
no_module: [LOGO] logo_init: logo init failed!!! used the default fb addr.
display: [display]jdi_nt35696_panel_init: lcd type is not JDI_NT35696_5P5_LCD.
display: [display]jdi_otm2503b_panel_init: lcd type is not JDI_OTM2503B_5P5_LCD.
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02010002, mntnStageCode is 31
bfm: : <<<<<exit set_boot_stage.
dtimage: -----can not find huawei,lcd_panel_type node by compatible
display: [display]get_dts_value: can not get huawei,lcd_panel_type, bl_bus_id=4!
dtimage: -----can not find ti,lm36923 node by compatible
display: [display]get_dts_value: can not get ti,lm36923, support=0!
display: get lm36923_support failed!
Audio_codec: [audio]:Could not find “hisilicon,codec-controller” node.
load_teeos: can not find fb node fingerprint
load_teeos: failed to find fb node ese_config
display: [display]hisi_get_disp_info: hisifb_data is NULL pointer, return!
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02010003, mntnStageCode is 32
bfm: : <<<<<exit set_boot_stage.
preboot: GPIO_068_SEL connect GND enter fastboot mode.
watchdog: Disable watchdog start
bfm: : [disable_boot_fail_system] boot_fail_system state is 0
rescue: ^^^^^^^^^[rescue_init] ok !
usbloader: bootmode is 4


#2

Yes, you need to connect your host to the USB OTG type C port.
Then once connected you should see Hikey is detected/enumerated by your host (dmesg).


#3

Thank you very much for the quick reply. The Android page for building and flashing doesn’t make it clear that the OTG port (USB Type C connector) must be used (https://source.android.com/setup/devices).

Should the UART Mezzanine board be disconnected when flashing?
I have read that if the UART board is connected, a host should be connected so the boot process doesn’t slow down/freeze.


#4

You might consider reading through the device documentation:

Its also unclear how you even imagined that it would be possible to hook something up to a type A receptacle on the hikey960 and expect it to work as a device. A type A receptacle is specifically for a HOST. https://en.wikipedia.org/wiki/USB#Standard_connectors


#5

@doitright: I don’t think the OP mentioned using type A connectors but even if they did there are a couple of devices around that implement device mode using type A connectors. This is typically for magic firmware upgrade modes that do not strictly conform to USB standards when the mode is engaged (bubblegum-96 is the an example of this within the 96Boards family… hopefully now USB type C is common it will also be the last :wink: ).


#6

@doitright: I am the first to admit I am not familiar with current mechanisms for flashing Linux devices. In past decades, UARTs were often the only way to load code onto a base system. Flashing was then performed using the loaded code. The last Linux board I loaded used a dedicated Ethernet connection and TFTP. That is the perspective I come from.

As for “reading through the device documentation”, any links you consider best for this would be greatly appreciated. For me, the documentation is scattered and sometimes conflicting. I have reviewed the following:

Hardware User Manual:


Note that Step 2 of Starting the board for the fist time mentions connecting the Express-Uart board.

AOSP (mentioned previously):
https://source.android.com/setup/devices
Note that all 3 links under HiKey960 Additional resources are broken.

96Boards documentation Wiki:


Note that almost every link on this page is broken

Linaro documentation:


Note that following the links on this page don’t lead to much.

And, of course, this forum.


#7

Don’t hesitate to report documentation issue or broken link via github https://github.com/Linaro/documentation/issues. Problems with links is that they are not link but pointers…

This is actually optional, but really useful for debugging.


#8

So… one of the problems with maintaining the 96Boards documentation on github is that is often seems to have a better rank in search engines that the actual documentation.

Official documentation is here: https://www.96boards.org/documentation

I have also fixed up the broken links on the wiki.


#9

That doesn’t apply here. There is no flow control nor any other presense detect. The hikey960 will spew out info exactly the same info whether or not the adapter is connected and listening.


#10

Thank you all for the quick and helpful replies.

I suppose the topic of this thread should be changed to reflect something like “newbie trying to determine flashing requirements” :slight_smile: