radxa / u-boot

U-Boot tree for pending commits
42 stars 85 forks source link

latest stable-5.10-rock5 u-boot hangs with mainline 6.2; no any output on UART #18

Closed warpme closed 1 year ago

warpme commented 1 year ago

Hi,

Im adding support for rock5b v1.41 im my distro. With u-boot from https://dl.radxa.com/rock5/sw/images/loader/rock-5b/debug/ Im getting nicely booting 6.2-rc5 mainline kernel from sd-card.

But when I only replace above u-boot.itb to binary build compiled accordingly to: https://wiki.radxa.com/Rock5/guide/build-u-boot-on-5b

im getting hang like this:

..DDR Version V1.08 20220617
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB
Manufacturer ID:0x6 
CH0 RX Vref:32.7%, TX Vref:21.8%,21.8%
CH1 RX Vref:30.7%, TX Vref:20.8%,20.8%
CH2 RX Vref:31.7%, TX Vref:21.8%,21.8%
CH3 RX Vref:33.7%, TX Vref:21.8%,20.8%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
.INFO:    Preloader serial: 2
NOTICE:  BL31: v2.3():v2.3-405-gb52c2eadd:derrick.huang
NOTICE:  BL31: Built : 11:23:47, Aug 15 2022
INFO:    spec: 0x1
INFO:    ext 32k is not valid
INFO:    GICv3 without legacy support detected.
INFO:    ARM GICv3 driver initialized in EL3
INFO:    system boots from cpu-hwid-0
INFO:    idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001
INFO:    dfs DDR fsp_params[0].freq_mhz= 2112MHz
INFO:    dfs DDR fsp_params[1].freq_mhz= 528MHz
INFO:    dfs DDR fsp_params[2].freq_mhz= 1068MHz
INFO:    dfs DDR fsp_params[3].freq_mhz= 1560MHz
INFO:    BL31: Initialising Exception Handling Framework
INFO:    BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR:   Error initializing runtime service opteed_fast
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9

For me issue is interesting as: test with flashing this locally build u-boot i.e. to working sdcard with radxa buntu gives nicely booting ubuntu. (so this uboot seems work ok with radxa kernel + ubuntu, but fails with mainline).

As debug u-boot boots ok for me - i think issue is in latest radxa u-boot code. (https://github.com/radxa/u-boot/commits/stable-5.10-rock5)

Showstopper for me is lack of any output from radxa u-boot - so I don’t know how to move forward…

Any thoughts what to do with this?

warpme commented 1 year ago

it looks like issue is by https://github.com/radxa/u-boot/commit/0f21198b68538fa98d90ae35b85d08527b5ecaa6

what is purpose of this commit?

RadxaYuntian commented 1 year ago

I think the intention was to speed up U-Boot stage so we get a faster boot. We were have PD negotiation timeout issue on ROCK 5B that causes the device to enter a reboot loop when paired with certain power supplies.

I'll check if we can workaround this issue in Linux kernel instead.