Failed mounting rootfs on HiKey960 board with Hynix UFS flash


#1

We have two types of HiKey960 boards, one with Samsung flash and another with Hynix flash. On board with Samsung flash, everything worked normally, both Linaro image and my own built image can boot without problem. But on newer board with Hynix flash, the linux kernel failed mounting root fs, and there are some “ufshcd” error messages printed on console:

[ 35.977642] ufshcd-hi3660 ff3b0000.ufs: ufshcd_issue_tm_cmd: task management cmd 0x08 timed-out
[ 35.986602] ufshcd-hi3660 ff3b0000.ufs: ufshcd_eh_device_reset_handler: failed with err -110
[ 36.106284] ufshcd-hi3660 ff3b0000.ufs: dme-link-startup: error code 1
[ 36.288832] ufshcd-hi3660 ff3b0000.ufs: ufshcd_read_desc_param: Failed reading descriptor. desc_id 0 param_offset 0 buff_len 31 ret 0
[ 36.301212] ufshcd-hi3660 ff3b0000.ufs: ufs_get_device_info: Failed reading Device Desc. err = -22
[ 36.310420] ufshcd-hi3660 ff3b0000.ufs: ufs_advertise_fixup_device: Failed getting device info. err = -22
[ 36.322185] ufs final power mode: gear = 3, lane = 2, pwr = 1, rate = 2
[ 36.328946] ufshcd-hi3660 ff3b0000.ufs: set TX_EQUALIZER 3.5db
[ 36.337630] ufshcd-hi3660 ff3b0000.ufs: check TX_EQUALIZER DB value lane0 = 0x1
[ 36.345114] ufshcd-hi3660 ff3b0000.ufs: check TX_EQUALIZER DB value lane1 = 0x1
[ 46.613656] ufshcd-hi3660 ff3b0000.ufs: ufshcd_task_req_compl: failed, ocs = 0xf
[ 46.621450] ufshcd-hi3660 ff3b0000.ufs: ufshcd_abort: failed with err 15

I’m not sure if the failure was caused by the Hynix flash, has somebody ever met similar UFS issue?


Filesystem not available
#2

I found the firmware tools has support Hynix flash, see blew patch information.

linux kernel may also need adding support for Hynix flash device!

commit 6769f8658ba2c286fe209c34365535e1f42bd0c5
Author: Guodong Xu guodong.xu@linaro.org
Date: Thu Mar 15 16:08:27 2018 +0800

xloader: hynix ufs init fail bug fixed

This patch provides support to Hynix UFS device, which is used on
HiKey960 boards manufactured after 2018 April.

Not updating binary in time will block booting of these new
HiKey960 boards.

Signed-off-by: Kaihua Zhong <zhongkaihua@huawei.com>
Signed-off-by: Guodong Xu <guodong.xu@linaro.org>

Who can help to confirm this issue?


#3

+ @guodong, Guodong might know well for this.


#4

I try the 4.4 kernel, the board can startup, but the default 4.9 kernel can not boot!
Who can help to find the root cause and fix this problem on 4.9 kernel ?