Skip to content

h6 atf hangs at the axp805 probe on some h6 devices #5

@hexdump0815

Description

@hexdump0815

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:

U-Boot SPL 2020.01-dirty (Jan 15 2020 - 21:56:28 +0100)                                   
DRAM:MBUS port 0 cfg0 0100000d cfg1 00640080                                              
MBUS port 1 cfg0 06000009 cfg1 01000578                                                   
MBUS port 2 cfg0 0200000d cfg1 00600100                                                   
MBUS port 3 cfg0 01000009 cfg1 00500064                                                   
MBUS port 4 cfg0 20000209 cfg1 1388157c                                                   
MBUS port 5 cfg0 00640209 cfg1 00200040                                                   
MBUS port 6 cfg0 00640209 cfg1 00200040                                                   
MBUS port 8 cfg0 01000009 cfg1 00400080                                                   
MBUS port 11 cfg0 01000009 cfg1 00640080                                                  
MBUS port 14 cfg0 04000009 cfg1 00400100                                                  
MBUS port 16 cfg0 2000060d cfg1 09600af0                                                  
MBUS port 25 cfg0 0064000d cfg1 00200040                                                  
MBUS port 26 cfg0 20000209 cfg1 1388157c                                                  
MBUS port 37 cfg0 01000009 cfg1 00400080
MBUS port 38 cfg0 00640209 cfg1 00200040
MBUS port 39 cfg0 20000209 cfg1 1388157c
MBUS port 40 cfg0 00640209 cfg1 00200040
 2048 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.2(debug):v2.2-321-g743600b2
NOTICE:  BL31: Built : 21:53:49, Jan 15 2020
NOTICE:  BL31: Detected Allwinner H6 SoC (1728)
NOTICE:  BL31: Found U-Boot DTB at 0xc07ae70, model: Eachlink H6 Mini
INFO:    ARM GICv2 driver initialized
INFO:    PMIC: Probing AXP805 on I2C
IN

if i comment out the apx805 probing, it works perfectly fine:

diff --git a/plat/allwinner/sun50i_h6/sunxi_power.c b/plat/allwinner/sun50i_h6/sunxi_power.c
index 443015ba..a1e4d692 100644
--- a/plat/allwinner/sun50i_h6/sunxi_power.c
+++ b/plat/allwinner/sun50i_h6/sunxi_power.c
@@ -55,16 +55,16 @@ int axp_write(uint8_t reg, uint8_t val)
 
 static int axp805_probe(void)
 {
-       int ret;
-
-       /* Switch the AXP805 to master/single-PMIC mode. */
-       ret = axp_write(0xff, 0x0);
-       if (ret)
-               return ret;
-
-       ret = axp_check_id();
-       if (ret)
-               return ret;
+//     int ret;
+//
+//     /* Switch the AXP805 to master/single-PMIC mode. */
+//     ret = axp_write(0xff, 0x0);
+//     if (ret)
+//             return ret;
+//
+//     ret = axp_check_id();
+//     if (ret)
+//             return ret;
 
        return 0;
 }

resulting working boot:

U-Boot SPL 2020.01-dirty (Jan 15 2020 - 22:04:24 +0100)
DRAM:MBUS port 0 cfg0 0100000d cfg1 00640080
MBUS port 1 cfg0 06000009 cfg1 01000578
MBUS port 2 cfg0 0200000d cfg1 00600100
MBUS port 3 cfg0 01000009 cfg1 00500064
MBUS port 4 cfg0 20000209 cfg1 1388157c
MBUS port 5 cfg0 00640209 cfg1 00200040
MBUS port 6 cfg0 00640209 cfg1 00200040
MBUS port 8 cfg0 01000009 cfg1 00400080
MBUS port 11 cfg0 01000009 cfg1 00640080
MBUS port 14 cfg0 04000009 cfg1 00400100
MBUS port 16 cfg0 2000060d cfg1 09600af0
MBUS port 25 cfg0 0064000d cfg1 00200040
MBUS port 26 cfg0 20000209 cfg1 1388157c
MBUS port 37 cfg0 01000009 cfg1 00400080
MBUS port 38 cfg0 00640209 cfg1 00200040
MBUS port 39 cfg0 20000209 cfg1 1388157c
MBUS port 40 cfg0 00640209 cfg1 00200040
 2048 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.2(debug):v2.2-321-g743600b2-dirty
NOTICE:  BL31: Built : 22:03:55, Jan 15 2020
NOTICE:  BL31: Detected Allwinner H6 SoC (1728)
NOTICE:  BL31: Found U-Boot DTB at 0xc07ae70, model: Eachlink H6 Mini
INFO:    ARM GICv2 driver initialized
INFO:    PMIC: Probing AXP805 on I2C                                                      
WARNING: PMIC: No PMIC DT node, skipping setup                                            
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-dirty (Jan 15 2020 - 22:04:24 +0100) Allwinner Technology                  
                                                                                          
CPU:   Allwinner H6 (SUN50I)                                                              
Model: Eachlink H6 Mini                                                                   
DRAM:  2 GiB                                                                              
MMC:   mmc@4020000: 0, mmc@4022000: 1                                                     
Loading Environment from FAT... Unable to use mmc 1:1... In:    serial@5000000            
Out:   serial@5000000                                                                     
Err:   serial@5000000                                                                     
Net:   No ethernet found.
Hit any key to stop autoboot:  0 
...

maybe the axp805 probing should be made optional by some atf compile time option?

a lot of thanks in advance and best wishes - hexdump

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions