Open hexdump0815 opened 4 years ago
Sorry, just saw your comment. Thanks for the report, indeed there are H6 devices without an AXP chip. Ideally the I2C scan should come back without a result, but apparently there is some problem with that. I will look into a solution, I guess it goes along the lines of checking the DT for an AXP node first. I don't really want to introduce build time options. Or we find a stable way of running the I2C scan anyway. Will try to reproduce this on my Eachlink box.
So it worked as expected on my Eachlink H6 Mini:
U-Boot SPL 2020.01-00626-g0edb2b9852 (Jan 19 2020 - 00:12:34 +0000)
DRAM: 4096 MiB
Trying to boot from MMC1
NOTICE: BL31: v2.2(debug):v2.2-353-g38aac6d40
NOTICE: BL31: Built : 23:25:03, Jan 18 2020
NOTICE: BL31: Detected Allwinner H6 SoC (1728)
NOTICE: BL31: Found U-Boot DTB at 0xc0801f0, model: Eachlink H6 Mini
INFO: ARM GICv2 driver initialized
INFO: PMIC: Probing AXP805 on I2C
ERROR: Start clear bit timeout
ERROR: PMIC: Cannot write AXP805 register ff
INFO: BL31: Platform setup done
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: CPU workaround for 855873 was applied
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x4a000000
INFO: SPSR = 0x3c9
U-Boot 2020.01-00626-g0edb2b9852 (Jan 19 2020 - 00:12:34 +0000) Allwinner Technology
CPU: Allwinner H6 (SUN50I)
Model: Eachlink H6 Mini
DRAM: 3 GiB
...
I see that you have DEBUG defined for the SPL DRAM driver. Do you have any other changes in your SPL, especially the DRAM driver? And does it really stop after the first two letters of the next INFO statement? Does it hang at this point? Do you know if anything is connected to PL0 or PL1? It could only be GPIOs or I2C on those two pins, AFAICS.
checking the dt for an axp node sounds like a good idea. regarding the dram driver in the spl i tried to get the timing stable with @jernejsk - we tried some patches but in the end it always resets a few times, but after a while gets through it and runs stable then - the story starts here: https://forum.armbian.com/topic/12372-h6-allwinner-tv-box-need-help/?do=findComment&comment=92283 ... but i think the atf problems are not related to that, as i get the same atf hang if i use a u-boot compiled with your libdram binary blob code (with the only difference, that there is no resetting at the beginning in that case) ... regarding the hanging: yes, it really simply hangs reliably after those two letters each time ... here is the dtb extracted from that box: https://forum.armbian.com/topic/12372-h6-allwinner-tv-box-need-help/?do=findComment&comment=92389 - hopefully this will tell you enough about how things are wired up
best wishes - hexdump
I am still somewhat puzzled by that "IN" output, because it hints that the next output would have been an INFO line, which does not make much sense unless there is an AXP detected (compare the outputs in the other cases).
And we actually already check for the AXP DT node (see the output with your patch applied), it's just we should do it a bit earlier. I need to think how to write this properly, since this is partly Allwinner generic code. Technically we should check for a valid I2C bus in the DT, but this harder to do properly.
Hello. Is this issue maybe related? sunxi_power.c
has changed considerably since 2020.
hello,
i just built a fresh mainline u-boot (2020.01) and mainline atf (head as of today from the github mirror) and on a h6 tv box without an axp805 the resulting u-boot with that atf in it will hang:
if i comment out the apx805 probing, it works perfectly fine:
resulting working boot:
maybe the axp805 probing should be made optional by some atf compile time option?
a lot of thanks in advance and best wishes - hexdump