BPI R2 LEDE(openwrt) source code

Source code

The source code of LEDE for supporting BPI R2 is at: https://github.com/moore-bros/bpi-r2-on-lede

Please clone the code to local and checkout the code from branch bpi-r2-on-lede-v1.

Build

Follow the LEDE building instruction to compile the lede system, the target system is MediaTek Ralink ARM, the config file is attached. .config (122.9 KB)

Boot with LEDE image

Step 1: Please program LEDE 2017-09-08 image to emmc by following BPI-R2 New image : Openwrt/LEDE 2017-09-08

Step 2: Boot the board from EMMC, and enter U-boot shell.

Step 3: Load build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32/uImage-mt7623n-bananapi-bpi-r2-initramfs from host pc(tftp 84000000 uImage-mt7623n-bananapi-bpi-r2-initramfs). Before loading image, you may need to set/ipaddr/netmask/serverip in uboot

Step 4: Program the image to EMMC by run command:

   mmc dev 0
   mmc write 84000000 1000 5800

Step 5: Run command boot to boot linux.

Log:

lede_0920.log (38.0 KB)

Known limitation

  1. WAN port doesn’t work
  2. USB3.0 doesn’t work
  3. PCIE is not vaildated
  4. HDMI is not validated.

Please use command make -j1 V=s to build the lede system, a Linux kernel configuration error is required to be fixed manually.

The major steps for building openwrt are:

1. Clone the code to host PC

2. Change the branch to bpi-r2-on-lede-v1

3. make menuconfig, please select below items at least:

    (1)  Target system  -> MediaTek Ralink ARM

    (2)  Target image   ->  ramdisk and cpio.gz

    You may need other tools, such as lspci, lsusb and so on, please enable them in: Base system -> busybox ->

4. Quit menuconfig window

5. Run command make -j1 V=s to build openwrt image,

6. Finnally, the kernal image with ramfs is build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_32/uImage-mt7623n-bananapi-bpi-r2-initramfs

7. Please follow above steps to boot R2 board with this image

The following subsystems are validated, they are working fine

  1. EMMC
  2. PCIE
  3. USB3.0

Log:

> root@LEDE:/# lspci
> 00:00.0 Class 0604: 14c3:0801
> 00:01.0 Class 0604: 14c3:0801
> 02:00.0 Class 0101: 1b21:0611
> 01:00.0 Class 0c03: 1912:0015
> root@LEDE:/# lsusb
> Bus 005 Device 001: ID 1d6b:0002
> Bus 003 Device 001: ID 1d6b:0002
> Bus 001 Device 001: ID 1d6b:0002
> Bus 006 Device 001: ID 1d6b:0003
> Bus 004 Device 001: ID 1d6b:0003
> Bus 004 Device 002: ID 0781:5580
> Bus 002 Device 001: ID 1d6b:0003
> root@LEDE:/# 
> root@LEDE:/# ls /dev/mmcblk0
> mmcblk0       mmcblk0boot1  mmcblk0p2
> mmcblk0boot0  mmcblk0p1     mmcblk0rpmb
1 Like

Hi garywang,

i have done all steps above. Kernel boots but stucks at “mtk_soc_eth 1b100000.ethernet eth1: rx pause enabled, tx pause enabled”.

Board init log: `[USBD] USB PRB0 LineState: 0

[USBD] USB cable/ No Cable inserted!                                                                                  
                                                                                                                      
[PLFM] Keep stay in USB Mode                                                                                          
Platform initialization is ok                                                                                         
wait for frequency meter finish, CLK26CALI = 0x81                                                                     
mt_pll_post_init: mt_get_cpu_freq = 1040000Khz                                                                        
wait for frequency meter finish, CLK26CALI = 0x90                                                                     
mt_pll_post_init: mt_get_bus_freq = 273000Khz                                                                         
wait for frequency meter finish, CLK26CALI = 0x81                                                                     
mt_pll_post_init: mt_get_mem_freq = 133250Khz                                                                         
[PWRAP] pwrap_init_preloader                                                                                          
[PWRAP] pwrap_init                                                                                                    
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=0,rdata=2D52                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=1,rdata=2D52                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=2,rdata=2D52                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=3 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=4 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=5 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=6 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=7 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=8 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=9 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=10 rdata=5AA5                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=11,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=12,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=13,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=14,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=15,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=16,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=17,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=18,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=19,rdata=6A97                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=20,rdata=6A97                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=21,rdata=6A97                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=22,rdata=6A97                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=23,rdata=6A97                                                     
[PWRAP] _pwrap_init_reg_clock                                                                                         
[PMIC_WRAP]wrap_init pass,the return value=0.                                                                         
[pmic6323_init] Preloader Start..................                                                                     
[pmic6323_init] PMIC CHIP Code = 0x2023                                                                               
INT_MISC_CON: 1  TOP_RST_MISC: 1                                                                                      
pl pmic powerkey Release                                                                                              
[pmic6323_init] powerKey = 0                                                                                          
[pmic6323_init] is USB in = 0xB004                                                                                    
[pmic6323_init] Reg[0x11A]=0x1B                                                                                       
pmic setup LED                                                                                                        
[pmic6323_init] Done...................                                                                               
mt7623 disable long press reset ->>>>>                                                                                
mt7623 disable long press reset <<<<<-                                                                                
mt7623 VPA supplied by 1.0V to MT7530 ->                                                                              
mt7623 VPA supplied by 1.0V to MT7530 <-                                                                              
mt7623 enables RG_VGP1_EN for LCM ->                                                                                  
mt7623 enables RG_VGP1_EN for LCM <-                                                                                  
MT7623 E2 setting =>                                                                                                  
MT7623 E2 setting <=                                                                                                  
[PLFM] Init I2C: OK(0)                                                                                                
[PLFM] Init PWRAP: OK(0)                                                                                              
[PLFM] Init PMIC: OK(0)                                                                                               
[PLFM] chip[CA00]                                                                                                     
                                                                                                                      
[BLDR] [Support SD/eMMC] Build Time: 20170905-120917                                                                  
==== Dump RGU Reg ========                                                                                            
RGU MODE:     4D                                                                                                      
RGU LENGTH:   FFE0                                                                                                    
RGU STA:      0                                                                                                       
RGU INTERVAL: FFF                                                                                                     
RGU SWSYSRST: 0                                                                                                       
==== Dump RGU Reg End ====                                                                                            
RGU: g_rgu_satus:0                                                                                                    
 mtk_wdt_mode_config  mode value=10, tmp:22000010                                                                     
PL P ON                                                                                                               
WDT does not trigger reboot                                                                                           
RGU mtk_wdt_init:MTK_WDT_DEBUG_CTL(590200F3)                                                                          
kpd read addr: 0x0040: data:0x4001                                                                                    
Enter mtk_kpd_gpio_set!                                                                                               
kpd debug column : 0, 0, 0, 0, 0, 0, 0, 0                                                                             
kpd debug row : 0, 0, 0, 0, 0, 0, 0, 0                                                                                
after set KP enable: KP_SEL = 0x0 !                                                                                   
MTK_PMIC_RST_KEY is used for this project!                                                                            
[RTC] get_frequency_meter: input=0x0, ouput=5                                                                         
[RTC] get_frequency_meter: input=0x0, ouput=3968                                                                      
[RTC] get_frequency_meter: input=0x0, ouput=5                                                                         
[RTC] get_frequency_meter: input=0x0, ouput=0                                                                         
[RTC] get_frequency_meter: input=0x0, ouput=0                                                                         
[RTC] bbpu = 0xD, con = 0x426                                                                                         
[RTC] powerkey1 = 0xA357, powerkey2 = 0x67D2                                                                          
Writeif_unlock                                                                                                        
[RTC] RTC_SPAR0=0x40                                                                                                  
rtc_2sec_reboot_check cali=1792                                                                                       
rtc_2sec_stat_clear                                                                                                   
[RTC] irqsta = 0x0, pdn1 = 0x0, pdn2 = 0x201, spar0 = 0x40, spar1 = 0x800                                             
[RTC] new_spare0 = 0x0, new_spare1 = 0x1, new_spare2 = 0x1, new_spare3 = 0x1                                          
[RTC] bbpu = 0xD, con = 0x426, cali = 0x700                                                                           
pl pmic powerkey Release                                                                                              
[PLFM] Power key boot!                                                                                                
[RTC] rtc_bbpu_power_on done                                                                                          
[EMI] mcp_dram_num:0,discrete_dram_num:1,enable_combo_dis:0                                                           
[EMI] PCDDR3                                                                                                          
[Check]mt_get_mdl_number 0x0                                                                                          
[EMI] eMMC/NAND ID = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0                                                                  
[EMI] MDL number = 0                                                                                                  
[EMI] emi_set eMMC/NAND ID = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0                                                          
[EMI][Vcore]0x21E=0x48,0x220=0x48                                                                                     
[EMI][Vmem]0x554=0x0                                                                                                  
wait for frequency meter finish, CLK26CALI = 0x81                                                                     
[EMI] PCDDR3 DRAM Clock = 1599912 KHz, MEMPLL MODE = 2                                                                
[EMI] PCDDR3 RXTDN Calibration:                                                                                       
Start REXTDN SW calibration...                                                                                        
drvp=0xB,drvn=0x9                                                                                                     
[EMI] pinmux = 4                                                                                                      
===============================================================================                                       
                                                                                                                      
        dramc_write_leveling_swcal                                                                                    
===============================================================================                                       
delay  byte0  byte1  byte2  byte3                                                                                     
-----------------------------                                                                                         
0    0    0    0    1                                                                                                 
1    0    0    0    1                                                                                                 
2    0    0    1    1                                                                                                 
3    0    1    1    1                                                                                                 
4    0    1    1    1                                                                                                 
5    0    1    1    1                                                                                                 
6    0    1    1    1                                                                                                 
7    0    1    1    1                                                                                                 
8    0    1    1    1                                                                                                 
9    1    1    1    1                                                                                                 
10    1    1    1    1                                                                                                
11    1    1    1    1                                                                                                
12    1    1    1    1                                                                                                
13    1    1    1    1                                                                                                
14    1    1    1    1                                                                                                
15    1    1    1    1                                                                                                
pass bytecount = 4                                                                                                    
byte_i    status    best delay                                                                                        
0    2    9                                                                                                           
1    2    3                                                                                                           
2    2    2                                                                                                           
3    2    0                                                                                                           
========================================                                                                              
[write leveling]DQS: 0x239, DQM: 0x239                                                                                
[write leveling after remap]DQ byte0 reg: 0x200 val: 0x99993333                                                       
[write leveling after remap]DQ byte1 reg: 0x204 val: 0x33339999                                                       
[write leveling after remap]DQ byte2 reg: 0x208 val: 0x22220000                                                       
[write leveling after remap]DQ byte3 reg: 0x20C val: 0x2222                                                           
=============================================                                                                         
X-axis: DQS Gating Window Delay (Fine Scale)                                                                          
Y-axis: DQS Gating Window Delay (Coarse Scale)                                                                        
=============================================                                                                         
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120                                
      --------------------------------------------------------------------------------                                
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0010:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    1    1                                
0011:|    0    0    0    0    0    0    0    0    0    1    1    1    1    1    1    1                                
0012:|    0    0    0    0    1    1    1    1    1    1    1    1    1    0    0    0                                
0013:|    1    1    1    1    1    1    1    1    0    0    0    0    0    0    0    0                                
0014:|    1    1    1    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
Rank 0 coarse tune value selection : 18, 18                                                                           
18                                                                                                                    
64                                                                                                                    
rank 0 coarse = 18                                                                                                    
rank 0 fine = 64                                                                                                      
00:|    0    0    0    0    0    0    0    0    1    1    1    0                                                      
opt_dle value:13                                                                                                      
==================================================================                                                    
                RX      DQS perbit delay software calibration                                                         
==================================================================                                                    
1.0-31 bit dq delay value                                                                                             
==================================================================                                                    
bit|     0  1  2  3  4  5  6  7  8  9                                                                                 
--------------------------------------                                                                                
0 |    0 0 0 0 0 0 0 0 0 0                                                                                            
10 |    0 0 0 0 0 0 0 0 0 0                                                                                           
20 |    0 0 0 0 0 0 0 0 0 0                                                                                           
30 |    0 0                                                                                                           
--------------------------------------                                                                                
==================================================================                                                    
2.dqs window                                                                                                          
x=pass dqs delay value (min~max)center                                                                                
y=0-7bit DQ of every group                                                                                            
input delay:DQS0 =49 DQS1 = 39 DQS2 =51 DQS3 = 45                                                                     
==================================================================                                                    
bit     DQS0     bit      DQS1     bit     DQS2     bit     DQS3                                                      
0  (20~68)44  8  (7~58)32  16  (21~67)44  24  (18~62)40                                                               
1  (21~70)45  9  (7~56)31  17  (21~68)44  25  (17~62)39                                                               
2  (21~70)45  10  (9~58)33  18  (23~68)45  26  (19~64)41                                                              
3  (20~67)43  11  (11~60)35  19  (21~67)44  27  (19~63)41                                                             
4  (21~74)47  12  (17~62)39  20  (24~74)49  28  (23~67)45                                                             
5  (22~67)44  13  (15~62)38  21  (23~67)45  29  (21~61)41                                                             
6  (23~69)46  14  (11~57)34  22  (22~72)47  30  (18~62)40                                                             
7  (26~73)49  15  (14~60)37  23  (29~74)51  31  (19~64)41                                                             
==================================================================                                                    
3.dq delay value last                                                                                                 
==================================================================                                                    
bit|    0  1  2  3  4  5  6  7  8   9                                                                                 
--------------------------------------                                                                                
0 |    5 4 4 6 2 5 3 0 7 8                                                                                            
10 |    6 4 0 1 5 2 7 7 6 7                                                                                           
20 |    2 6 4 0 5 6 4 4 0 4                                                                                           
30 |    5 4                                                                                                           
==================================================================                                                    
*DQIDLY1 = 0x6040405                                                                                                  
*DQIDLY2 = 0x30502                                                                                                    
*DQIDLY3 = 0x4060807                                                                                                  
*DQIDLY4 = 0x2050100                                                                                                  
*DQIDLY5 = 0x7060707                                                                                                  
*DQIDLY6 = 0x40602                                                                                                    
*DQIDLY7 = 0x4040605                                                                                                  
*DQIDLY8 = 0x4050400                                                                                                  
*DRAMC_R0DELDLY = 0x2D332731                                                                                          
                                                                                                                      
[MEM]CONA:F3A2,conf1:F07486A3                                                                                         
DM4BitMux = 1                                                                                                         
DQSO 0 in TX per-bit = 2 <= DQSO 0 in WL = 9                                                                          
DQSO 1 in TX per-bit = 0 <= DQSO 1 in WL = 3                                                                          
[Warning] DQSO 2 in TX per-bit = 10 > DQSO 2 in WL = 2                                                                
[Warning] DQSO 3 in TX per-bit = 7 > DQSO 3 in WL = 0                                                                 
Tx DQM dly  = 0x1279                                                                                                  
Tx DQM dly bit4 = 0x0                                                                                                 
DRAMC_DQODLY1=79A98889h                                                                                               
DRAMC_DQODLY2=8966B99Bh                                                                                               
DRAMC_DQODLY3=12302112h                                                                                               
DRAMC_DQODLY4=22004345h                                                                                               
Tx DQ dly bit4 = 0x0                                                                                                  
Tx DQS dly = 0x7A39                                                                                                   
Tx DQS dly bit4 = 0x0                                                                                                 
TX Byte0: DQ - 16, DQS - 17. win_sum= 32                                                                              
TX Byte1: DQ - 21, DQS - 13. win_sum= 33                                                                              
TX Byte2: DQ - 8, DQS - 22. win_sum= 29                                                                               
TX Byte3: DQ - 9, DQS - 22. win_sum= 30                                                                               
DRAMC calibration takes 651611583 CPU cycles                                                                          
                                                                                                                      
[EMI] DRAMC calibration passed                                                                                        
                                                                                                                      
[MEM] complex R/W mem test pass                                                                                       
0:dram_rank_size:80000000                                                                                             
[Dram_Buffer] dram size:-2147483648                                                                                   
[Dram_Buffer] structure size: 1725560                                                                                 
[Dram_Buffer] MAX_TEE_DRAM_SIZE: 0                                                                                    
Load u-boot from eMMC...                                                                                              
[PLFM] Init Boot Device: OK(0)                                                                                        
                                                                                                                      
[PART] blksz: 512B                                                                                                    
[PART] [0x0000000000000000-0x000000000003FFFF] "PRELOADER" (512 blocks)                                               
[PART] [0x0000000000000000-0x000000000003FFFF] "MBR" (512 blocks)                                                     
[PART] [0x0000000000040000-0x00000000000BFFFF] "UBOOT" (1024 blocks)                                                  
[PART] [0x00000000000C0000-0x00000000000FFFFF] "CONFIG" (512 blocks)                                                  
[PART] [0x0000000000100000-0x000000000013FFFF] "FACTORY" (512 blocks)                                                 
[PART] [0x0000000000140000-0x000000000213FFFF] "BOOTIMG" (65536 blocks)                                               
[PART] [0x0000000002140000-0x000000000413FFFF] "RECOVERY" (65536 blocks)                                              
[PART] [0x0000000004140000-0x000000004413FFFF] "ROOTFS" (2097152 blocks)                                              
[PART] [0x0000000044140000-0x000001FFC413FFFF] "USER" (-4194304 blocks)                                               
[platform_vusb_on] PASS                                                                                               
[TOOL] PMIC not dectect usb cable!                                                                                    
[TOOL] <UART> listen  ended, receive size:0!                                                                          
[TOOL] <UART> wait sync time 150ms->5ms                                                                               
[TOOL] <UART> receieved data: ()                                                                                      
                                                                                                                      
Device APC domain init setup:                                                                                         
                                                                                                                      
 bootloader load uboot ,the address of uboot is 81E00000                                                              
[PART]partition name UBOOT                                                                                            
[PART]partition start block 0x200                                                                                     
[PART]partition size 0x80000                                                                                          
[PART]partition blks 0x400                                                                                            
[PART]partition flags 0x0                                                                                             
[PART]partition name 0x8                                                                                              
[bean] part->startblk(0x200) bdev->blksz(0x200) part->part_id(8) hdr(0xFFB50000)                                      
[BlkDev.c 101 ]partition block size 0x200 ,blks:0xE90000                                                              
[BlkDev.c 101 ]partition block erase size 0x200                                                                       
                                                                                                                      
[PART] load "UBOOT" from 0x0000000000050000 (dev) to 0x81E00000 (mem) [SUCCESS]                                       
[PART] load speed: 10462KB/s, 300000 bytes, 28ms                                                                      
[BT_SD_PG] device info 0x8590 0x8A00 0xCB01 0x102                                                                     
0:dram_rank_size:80000000                                                                                             
[PLFM] md_type[0] = 100                                                                                               
[PLFM] md_type[1] = 32                                                                                                
                                                                                                                      
[PLFM] boot reason: 0                                                                                                 
[PLFM] boot mode: 0                                                                                                   
[PLFM] META COM0: 0                                                                                                   
[PLFM] <0xFFB7CC10>: 0x0                                                                                              
[PLFM] boot time: 2020ms                                                                                              
[PLFM] DDR reserve mode: enable = 0, success = 0                                                                      
                                                                                                                      
[BLDR] jump to 0x81E00000                                                                                             
[BLDR] <0x81E00000>=0xEA00000F                                                                                        
[BLDR] <0x81E00004>=0xE59FF014                                                                                        
                                                                                                                      
                                                                                                                      
U-Boot  (Aug 01 2017 - 09:59:52)                                                                                      
                                                                                                                      
================== Iverson debug. ===========================                                                         
g_nr_bank = 1.                                                                                                        
g_total_rank_size = 0x80000000                                                                                        
DRAM:  2 GiB                                                                                                          
WARNING: Caches not enabled                                                                                           
dev_num = 0                                                                                                           
***size=4096, offset=1536, blk_start=3, blk_cnt=8                                                                     
*** Warning - bad CRC, using default environment                                                                      
                                                                                                                      
In:    serial                                                                                                         
Out:   serial                                                                                                         
Err:   serial                                                                                                         
dev_num = 0                                                                                                           
***size=4096, offset=1536, blk_start=3, blk_cnt=8                                                                     
*** Warning - bad CRC, using default environment `

Next post contains Boot log.

Boot log:

`BPI: SD/eMMC SD=1 eMMC=0 id = 1 (drivers/mmc/mediatek/mtk_mmc.c)

__mmc_init ret = 1
No MMC card found
** Bad device mmc 1 **
Boot from eMMC
BPI: SD/eMMC SD=1 eMMC=0 id = 0 (drivers/mmc/mediatek/mtk_mmc.c)
__mmc_init ret = 0
ret2 = 1
ret2 = 1
BPI: g_mtk_mmc_block.dev = 0
<= [mmc1 block 0] =>
[0x00000000] 53 44 4d 4d 43 5f 42 4f
[0x00000008] 4f 54 00 00 01 00 00 00
[0x00000010] 00 02 00 00 ff ff ff ff
[0x00000018] ff ff ff ff ff ff ff ff
[0x00000020] ff ff ff ff ff ff ff ff
[0x00000028] ff ff ff ff ff ff ff ff
[0x00000030] ff ff ff ff ff ff ff ff
[0x00000038] ff ff ff ff ff ff ff ff
[0x00000040] ff ff ff ff ff ff ff ff                                                                                  
[0x00000048] ff ff ff ff ff ff ff ff                                                                                  
[0x00000050] ff ff ff ff ff ff ff ff                                                                                  
[0x00000058] ff ff ff ff ff ff ff ff                                                                                  
[0x00000060] ff ff ff ff ff ff ff ff                                                                                  
[0x00000068] ff ff ff ff ff ff ff ff                                                                                  
[0x00000070] ff ff ff ff ff ff ff ff                                                                                  
[0x00000078] ff ff ff ff ff ff ff ff                                                                                  
[0x00000080] ff ff ff ff ff ff ff ff                                                                                  
[0x00000088] ff ff ff ff ff ff ff ff                                                                                  
[0x00000090] ff ff ff ff ff ff ff ff                                                                                  
[0x00000098] ff ff ff ff ff ff ff ff                                                                                  
[0x000000a0] ff ff ff ff ff ff ff ff                                                                                  
[0x000000a8] ff ff ff ff ff ff ff ff                                                                                  
[0x000000b0] ff ff ff ff ff ff ff ff                                                                                  
[0x000000b8] ff ff ff ff ff ff ff ff                                                                                  
[0x000000c0] ff ff ff ff ff ff ff ff                                                                                  
[0x000000c8] ff ff ff ff ff ff ff ff                                                                                  
[0x000000d0] ff ff ff ff ff ff ff ff                                                                                  
[0x000000d8] ff ff ff ff ff ff ff ff                                                                                  
[0x000000e0] ff ff ff ff ff ff ff ff                                                                                  
[0x000000e8] ff ff ff ff ff ff ff ff                                                                                  
[0x000000f0] ff ff ff ff ff ff ff ff                                                                                  
[0x000000f8] ff ff ff ff ff ff ff ff                                                                                  
[0x00000100] ff ff ff ff ff ff ff ff                                                                                  
[0x00000108] ff ff ff ff ff ff ff ff                                                                                  
[0x00000110] ff ff ff ff ff ff ff ff                                                                                  
[0x00000118] ff ff ff ff ff ff ff ff                                                                                  
[0x00000120] ff ff ff ff ff ff ff ff                                                                                  
[0x00000128] ff ff ff ff ff ff ff ff                                                                                  
[0x00000130] ff ff ff ff ff ff ff ff                                                                                  
[0x00000138] ff ff ff ff ff ff ff ff                                                                                  
[0x00000140] ff ff ff ff ff ff ff ff                                                                                  
[0x00000148] ff ff ff ff ff ff ff ff                                                                                  
[0x00000150] ff ff ff ff ff ff ff ff                                                                                  
[0x00000158] ff ff ff ff ff ff ff ff                                                                                  
[0x00000160] ff ff ff ff ff ff ff ff                                                                                  
[0x00000168] ff ff ff ff ff ff ff ff                                                                                  
[0x00000170] ff ff ff ff ff ff ff ff                                                                                  
[0x00000178] ff ff ff ff ff ff ff ff                                                                                  
[0x00000180] ff ff ff ff ff ff ff ff                                                                                  
[0x00000188] ff ff ff ff ff ff ff ff                                                                                  
[0x00000190] ff ff ff ff ff ff ff ff                                                                                  
[0x00000198] ff ff ff ff ff ff ff ff                                                                                  
[0x000001a0] ff ff ff ff ff ff ff ff                                                                                  
[0x000001a8] ff ff ff ff ff ff ff ff                                                                                  
[0x000001b0] ff ff ff ff ff ff ff ff                                                                                  
[0x000001b8] 40 86 e7 7d 00 00 00 be                                                                                  
[0x000001c0] 33 0c 0c 61 34 2d 00 20                                                                                  
[0x000001c8] 03 00 00 00 08 00 00 61                                                                                  
[0x000001d0] 37 2d 83 60 ec b6 02 20                                                                                  
[0x000001d8] 0b 00 00 d8 dd 00 00 00                                                                                  
[0x000001e0] 00 00 00 00 00 00 00 00                                                                                  
[0x000001e8] 00 00 00 00 00 00 00 00                                                                                  
[0x000001f0] 00 00 00 00 00 00 00 00                                                                                  
[0x000001f8] 00 00 00 00 00 00 55 aa                                                                                  
                                                                                                                      
Partition Map for MMC device 0  --   Partition Type: DOS                                                              
                                                                                                                      
Part    Start Sector    Num Sectors     UUID            Type                                                          
  1     204800          524288          7de78640-01     0c                                                            
  2     729090          14538752        7de78640-02     83                                                            
mmc0 is available                                                                                                     
reading bananapi/bpi-r2/linux/uEnv.txt                                                                                
762 bytes read in 6 ms (124 KiB/s)                                                                                    
Loaded environment from uEnv.txt                                                                                      
Banana Pi bpi-r2 chip: mt7623n Service: linux                                                                         
reading bananapi/bpi-r2/linux/uImage                                                                                  
5726856 bytes read in 353 ms (15.5 MiB/s)                                                                             
reading bananapi/berryboot.img                                                                                        
** Unable to read file bananapi/berryboot.img **                                                                      
bootm flag=0, states=70f                                                                                              
## Booting kernel from Legacy Image at 84000000 ...                                                                   
   Image Name:   MIPS OpenWrt Linux-4.9.44                                                                            
   Image Type:   ARM Linux Kernel Image (uncompressed)                                                                
   Data Size:    5726792 Bytes = 5.5 MiB                                                                              
   Load Address: 80008000                                                                                             
   Entry Point:  80008000                                                                                             
   Verifying Checksum ... OK                                                                                          
   Loading Kernel Image ... OK                                                                                        
                                                                                                                      
Starting kernel ...                                                                                                   
                                                                                                                      
Uncompressing Linux... done, booting the kernel.                                                                      
[    0.000000] Booting Linux on physical CPU 0x0                                                                      
[    0.000000] Linux version 4.9.44 (marco@kilimanjaro) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4755-dabf2b36df) ) #0 SMP7
[    0.000000] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d                                        
[    0.000000] CPU: div instructions available: patching division code                                                
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache                               
[    0.000000] OF: fdt:Machine model: Bananapi BPI-R2                                                                 
[    0.000000] bootconsole [earlycon0] enabled                                                                        
[    0.000000] Memory policy: Data cache writealloc                                                                   
[    0.000000] percpu: Embedded 14 pages/cpu @eefaa000 s25356 r8192 d23796 u57344                                     
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522751                            
[    0.000000] Kernel command line: earlyprintk block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:256k(mbr)2
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)                                                   
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)                                       
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)                                         
[    0.000000] Memory: 2060780K/2097148K available (4889K kernel code, 248K rwdata, 1592K rodata, 11552K init, 376K b)
[    0.000000] Virtual kernel memory layout:                                                                          
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)                                                      
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)                                                      
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)                                                      
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)                                                      
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)                                                      
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)                                                      
[    0.000000]       .text : 0xc0008000 - 0xc04ce8ec   (4891 kB)                                                      
[    0.000000]       .init : 0xc0684000 - 0xc11cc000   (11552 kB)                                                     
[    0.000000]       .data : 0xc11cc000 - 0xc120a100   ( 249 kB)                                                      
[    0.000000]        .bss : 0xc120a100 - 0xc12683c8   ( 377 kB)                                                      
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1                                             
[    0.000000] Preemptible hierarchical RCU implementation.                                                           
[    0.000000]  Build-time adjustment of leaf fanout to 32.                                                           
[    0.000000] NR_IRQS:16 nr_irqs:16 16                                                                               
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 13.00MHz (phys).                                  
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 4407952024s
[    0.000005] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns                            
[    0.008043] Switching to timer-based delay loop, resolution 76ns                                                   
[    0.014205] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns              
[    0.023457] sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns                             
[    0.031639] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000) 
[    0.042025] pid_max: default: 32768 minimum: 301                                                                   
[    0.046772] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)                                            
[    0.053443] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)                                       
[    0.061001] CPU: Testing write buffer coherency: ok                                                                
[    0.066193] Setting up static identity map for 0x80008220 - 0x80008278                                             
[    0.426163] Brought up 4 CPUs                                                                                      
[    0.429200] SMP: Total of 4 processors activated (104.00 BogoMIPS).                                                
[    0.435510] CPU: All CPU(s) started in SVC mode.                                                                   
[    0.447555] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 3                                
[    0.455555] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns       
[    0.465434] futex hash table entries: 1024 (order: 4, 65536 bytes)                                                 
[    0.471780] pinctrl core: initialized pinctrl subsystem                                                            
[    0.477919] NET: Registered protocol family 16                                                                     
[    0.482654] DMA: preallocated 256 KiB pool for atomic coherent allocations                                         
[    0.490684] No ATAGs?[    0.541386] SCSI subsystem initialized                                                     
[    0.545486] usbcore: registered new interface driver usbfs                                                         
[    0.551146] usbcore: registered new interface driver hub                                                           
[    0.556581] usbcore: registered new device driver usb                                                              
[    0.561746] Linux video capture interface: v2.00                                                                   
[    0.566468] pps_core: LinuxPPS API ver. 1 registered                                                               
[    0.571483] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>               
[    0.580672] PTP clock support registered                                                                           
[    0.586093] clocksource: Switched to clocksource arch_sys_counter                                                  
[    0.593472] NET: Registered protocol family 2                                                                      
[    0.598539] TCP established hash table entries: 8192 (order: 3, 32768 bytes)                                       
[    0.605698] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)                                              
[    0.612316] TCP: Hash tables configured (established 8192 bind 8192)                                               
[    0.618782] UDP hash table entries: 512 (order: 2, 16384 bytes)                                                    
[    0.624784] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)                                               
[    0.631361] NET: Registered protocol family 1                                                                      
[    0.738763] No memory allocated for crashlog                                                                       
[    0.743389] workingset: timestamp_bits=30 max_order=19 bucket_order=0                                              
[    0.755129] squashfs: version 4.0 (2009/01/31) Phillip Lougher                                                     
[    0.761114] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.        
[    0.812446] bounce: pool size: 64 pages                                                                            
[    0.816407] io scheduler noop registered                                                                           
[    0.820388] io scheduler deadline registered (default)                                                             
[    0.829484] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled                                               
[    0.839280] console [ttyS0] disabled                                                                               
[    0.863132] 11004000.serial: ttyS0 at MMIO 0x11004000 (irq = 194, base_baud = 1625000) is a ST16650V2              
[    0.872461] console [ttyS0] enabled                                                                                
[    0.872461] console [ttyS0] enabled                                                                                
[    0.879501] bootconsole [earlycon0] disabled                                                                       
[    0.879501] bootconsole [earlycon0] disabled                                                                       
[    0.888608] mtk_rng 1020f000.rng: registered RNG driver                                                            
[    0.894493] mt6323-regulator mt6323-regulator: Chip ID = 0x2023                                                    
[    0.911134] libphy: Fixed MDIO Bus: probed                                                                         
[    0.915406] 2.mt7530 supply core not found, using dummy regulator                                                  
[    0.921583] 2.mt7530 supply io not found, using dummy regulator                                                    
[    0.927660] mt7530: probe of 2.mt7530 failed with error -22                                                        
[    0.933509] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI                                                  
[    0.939611] e100: Copyright(c) 1999-2006 Intel Corporation                                                         
[    0.945102] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI                                       
[    0.952112] e1000: Copyright (c) 1999-2006 Intel Corporation.                                                      
[    0.957904] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k                                                     
[    0.963688] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.                                                    
[    0.969646] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k                                        
[    0.976583] igb: Copyright (c) 2007-2014 Intel Corporation.                                                        
[    0.982150] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k                              
[    0.989932] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.                                                    
[    0.995844] i40e: Intel(R) Ethernet Connection XL710 Network Driver - version 1.6.16-k                             
[    1.003711] i40e: Copyright (c) 2013 - 2014 Intel Corporation.                                                     
[    1.009682] ixgb: Intel(R) PRO/10GbE Network Driver - version 1.0.135-k2-NAPI                                      
[    1.016781] ixgb: Copyright (c) 1999-2008 Intel Corporation.                                                       
[    1.022451] Intel(R) Ethernet Switch Host Interface Driver - version 0.21.2-k                                      
[    1.029543] Copyright (c) 2013 - 2016 Intel Corporation.                                                           
[    1.057625] mtk_soc_eth 1b100000.ethernet: chip id = 7623                                                          
[    1.063191] libphy: mdio: probed                                                                                   
[    1.066440] mtk_soc_eth 1b100000.ethernet: generated random MAC address a2:20:71:d1:3d:bc                          
[    1.089219] mtk_soc_eth 1b100000.ethernet: connected mac 0 to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY] 
[    1.100106] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xf0900000, irq 205                       
[    1.108529] mtk_soc_eth 1b100000.ethernet: generated random MAC address 6e:2b:27:2f:30:ed                          
[    1.131240] mtk_soc_eth 1b100000.ethernet: connected mac 1 to PHY at fixed-0:01 [uid=00000000, driver=Generic PHY] 
[    1.142140] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xf0900000, irq 205                       
[    1.150688] usbcore: registered new interface driver rtl8150                                                       
[    1.156388] usbcore: registered new interface driver r8152                                                         
[    1.162673] xhci-mtk 1a1c0000.usb: xHCI Host Controller                                                            
[    1.167927] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 1                                   
[    1.175517] xhci-mtk 1a1c0000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x00210010                        
[    1.183905] xhci-mtk 1a1c0000.usb: irq 203, io mem 0x1a1c0000                                                      
[    1.190297] hub 1-0:1.0: USB hub found                                                                             
[    1.194047] hub 1-0:1.0: 1 port detected                                                                           
[    1.198335] xhci-mtk 1a1c0000.usb: xHCI Host Controller                                                            
[    1.203527] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 2                                   
[    1.210951] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.                           
[    1.219582] hub 2-0:1.0: USB hub found                                                                             
[    1.223333] hub 2-0:1.0: 1 port detected                                                                           
[    1.228019] xhci-mtk 1a240000.usb: xHCI Host Controller                                                            
[    1.233220] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 3                                   
[    1.240824] xhci-mtk 1a240000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x00210010                        
[    1.249173] xhci-mtk 1a240000.usb: irq 204, io mem 0x1a240000                                                      
[    1.255499] hub 3-0:1.0: USB hub found                                                                             
[    1.259265] hub 3-0:1.0: 1 port detected                                                                           
[    1.263504] xhci-mtk 1a240000.usb: xHCI Host Controller                                                            
[    1.268716] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 4                                   
[    1.276139] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.                           
[    1.284745] hub 4-0:1.0: USB hub found                                                                             
[    1.288510] hub 4-0:1.0: 1 port detected                                                                           
[    1.292967] usbcore: registered new interface driver usb-storage                                                   
[    1.298949] i2c /dev entries driver                                                                                
[    1.303616] IR NEC protocol handler initialized                                                                    
[    1.308260] IR RC5(x/sz) protocol handler initialized                                                              
[    1.313269] IR RC6 protocol handler initialized                                                                    
[    1.317778] IR JVC protocol handler initialized                                                                    
[    1.322268] IR Sony protocol handler initialized                                                                   
[    1.326858] IR SANYO protocol handler initialized                                                                  
[    1.331520] IR Sharp protocol handler initialized                                                                  
[    1.336304] IR XMP protocol handler initialized                                                                    
[    1.340944] Registered IR keymap rc-empty                                                                          
[    1.345226] input: mtk_cir as /devices/platform/10013000.cir/rc/rc0/input0                                         
[    1.352199] rc rc0: mtk_cir as /devices/platform/10013000.cir/rc/rc0                                               
[    1.359275] mtk_cir 10013000.cir: Initialized MT7623 IR driver, sample period = 46us                               
[    1.367408] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values                  
[    1.377070] mtk-wdt 10007000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)                               
[    1.385186] cpu cpu0: dummy supplies not allowed                                                                   
[    1.390861] sdhci: Secure Digital Host Controller Interface driver                                                 
[    1.397022] sdhci: Copyright(c) Pierre Ossman                                                                      
[    1.456663] mtk-msdc 11240000.mmc: Got CD GPIO                                                                     
[    1.510805] mmc0: new high speed MMC card at address 0001                                                          
[    1.516680] sdhci-pltfm: SDHCI platform and OF driver helper                                                       
[    1.522574] mmcblk0: mmc0:0001 8WPD3R 7.28 GiB                                                                     
[    1.527432] mmcblk0boot0: mmc0:0001 8WPD3R partition 1 4.00 MiB                                                    
[    1.533673] mmcblk0boot1: mmc0:0001 8WPD3R partition 2 4.00 MiB                                                    
[    1.540938] mmcblk0rpmb: mmc0:0001 8WPD3R partition 3 512 KiB                                                      
[    1.549881]  mmcblk0: p1 p2                                                                                        
[    1.573266] alg: aead: encryption failed on test 1 for gcm-aes-mtk: ret=22                                         
[    1.584550] random: fast init done                                                                                 
[    1.595707] NET: Registered protocol family 10                                                                     
[    1.601100] NET: Registered protocol family 17                                                                     
[    1.605541] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load .
[    1.618549] 8021q: 802.1Q VLAN Support v1.8                                                                        
[    1.622786] ThumbEE CPU extension supported.                                                                       
[    1.627063] Registering SWP/SWPB emulation handler                                                                 
[    1.744258] mtk-pcie 1a140000.pcie-controller: Port0 link down                                                     
[    1.780529] mtk-pcie 1a140000.pcie-controller: PCI host bridge to bus 0000:00                                      
[    1.787632] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x1a160000-0x1a16ffff])           
[    1.797047] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]                                         
[    1.803867] pci_bus 0000:00: root bus resource [bus 00-ff]                                                         
[    1.809351] pci 0000:00:00.0: ignoring class 0x0d8000 (doesn't match header type 01)                               
[    1.817633] PCI: bus0: Fast back to back transfers disabled                                                        
[    1.823161] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring                            
[    1.831119] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring                            
[    2.136139] mtk_soc_eth 1b100000.ethernet eth1: rx pause enabled, tx pause enabled`

It looks like an PCI addressing error in the Device Tree definition in file mt7623.dtsi. This error causes the kernel to hang during the PCI initialization and configuration.

Hi Spoensche

I checked the log, you’re using the preloader and uboot from Ubuntu image, right? but I’m not sure if both preloader and uboot will work fine with lede image.

Cann you please follow below link to program a base firmware to eMMC and boot with the new lede image. g BPI-R2 New image : Openwrt/LEDE 2017-09-08

Hi,

it seems that the first time the contents of the sd-card was not flashed to eMMC. I do it again and contents of sd-card was flashed successfully. After booting i get into console.

Do you need the logs?

I am going to build and test my LEDE image.

Thank you.

I build the test image and kernel boots but stucks again on PCI configuration and initialization.

Preboot- Log: `[USBD] USB PRB0 LineState: 0

[USBD] USB cable/ No Cable inserted!                                                                                  
                                                                                                                      
[PLFM] Keep stay in USB Mode                                                                                          
Platform initialization is ok                                                                                         
wait for frequency meter finish, CLK26CALI = 0x81                                                                     
mt_pll_post_init: mt_get_cpu_freq = 1040000Khz                                                                        
wait for frequency meter finish, CLK26CALI = 0x90                                                                     
mt_pll_post_init: mt_get_bus_freq = 273000Khz                                                                         
wait for frequency meter finish, CLK26CALI = 0x81                                                                     
mt_pll_post_init: mt_get_mem_freq = 133250Khz                                                                         
[PWRAP] pwrap_init_preloader                                                                                          
[PWRAP] pwrap_init                                                                                                    
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=0,rdata=2D52                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=1,rdata=2D52                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=2,rdata=2D52                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=3 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=4 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=5 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=6 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=7 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=8 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=9 rdata=5AA5                                                      
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=10 rdata=5AA5                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=11,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=12,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=13,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=14,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=15,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=16,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=17,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=18,rdata=B54B                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=19,rdata=6A97                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=20,rdata=6A97                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=21,rdata=6A97                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=22,rdata=6A97                                                     
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=23,rdata=6A97                                                     
[PWRAP] _pwrap_init_reg_clock                                                                                         
[PMIC_WRAP]wrap_init pass,the return value=0.                                                                         
[pmic6323_init] Preloader Start..................                                                                     
[pmic6323_init] PMIC CHIP Code = 0x2023                                                                               
INT_MISC_CON: 1  TOP_RST_MISC: 1                                                                                      
pl pmic powerkey Press                                                                                                
[pmic6323_init] powerKey = 1                                                                                          
[pmic6323_init] is USB in = 0xB004                                                                                    
[pmic6323_init] Reg[0x11A]=0x1B                                                                                       
pmic setup LED                                                                                                        
[pmic6323_init] Done...................                                                                               
mt7623 disable long press reset ->>>>>                                                                                
mt7623 disable long press reset <<<<<-                                                                                
mt7623 VPA supplied by 1.0V to MT7530 ->                                                                              
mt7623 VPA supplied by 1.0V to MT7530 <-                                                                              
mt7623 enables RG_VGP1_EN for LCM ->                                                                                  
mt7623 enables RG_VGP1_EN for LCM <-                                                                                  
MT7623 E2 setting =>                                                                                                  
MT7623 E2 setting <=                                                                                                  
[PLFM] Init I2C: OK(0)                                                                                                
[PLFM] Init PWRAP: OK(0)                                                                                              
[PLFM] Init PMIC: OK(0)                                                                                               
[PLFM] chip[CA00]                                                                                                     
                                                                                                                      
[BLDR] [Support SD/eMMC] Build Time: 20170905-094359                                                                  
==== Dump RGU Reg ========                                                                                            
RGU MODE:     4D                                                                                                      
RGU LENGTH:   FFE0                                                                                                    
RGU STA:      0                                                                                                       
RGU INTERVAL: FFF                                                                                                     
RGU SWSYSRST: 0                                                                                                       
==== Dump RGU Reg End ====                                                                                            
RGU: g_rgu_satus:0                                                                                                    
 mtk_wdt_mode_config  mode value=10, tmp:22000010                                                                     
PL P ON                                                                                                               
WDT does not trigger reboot                                                                                           
RGU mtk_wdt_init:MTK_WDT_DEBUG_CTL(590200F3)                                                                          
kpd read addr: 0x0040: data:0x4001                                                                                    
Enter mtk_kpd_gpio_set!                                                                                               
kpd debug column : 0, 0, 0, 0, 0, 0, 0, 0                                                                             
kpd debug row : 0, 0, 0, 0, 0, 0, 0, 0                                                                                
after set KP enable: KP_SEL = 0x0 !                                                                                   
MTK_PMIC_RST_KEY is used for this project!                                                                            
[RTC] get_frequency_meter: input=0x0, ouput=5                                                                         
[RTC] get_frequency_meter: input=0x0, ouput=3967                                                                      
[RTC] get_frequency_meter: input=0x0, ouput=5                                                                         
[RTC] get_frequency_meter: input=0x0, ouput=0                                                                         
[RTC] get_frequency_meter: input=0x0, ouput=0                                                                         
[RTC] bbpu = 0xD, con = 0x426                                                                                         
[RTC] powerkey1 = 0xA357, powerkey2 = 0x67D2                                                                          
Writeif_unlock                                                                                                        
[RTC] RTC_SPAR0=0x40                                                                                                  
rtc_2sec_reboot_check cali=1792                                                                                       
rtc_2sec_stat_clear                                                                                                   
[RTC] irqsta = 0x0, pdn1 = 0x0, pdn2 = 0x201, spar0 = 0x40, spar1 = 0x800                                             
[RTC] new_spare0 = 0x0, new_spare1 = 0x1, new_spare2 = 0x1, new_spare3 = 0x1                                          
[RTC] bbpu = 0xD, con = 0x426, cali = 0x700                                                                           
pl pmic powerkey Release                                                                                              
[PLFM] Power key boot!                                                                                                
[RTC] rtc_bbpu_power_on done                                                                                          
[EMI] mcp_dram_num:0,discrete_dram_num:1,enable_combo_dis:0                                                           
[EMI] PCDDR3                                                                                                          
[Check]mt_get_mdl_number 0x0                                                                                          
[EMI] eMMC/NAND ID = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0                                                                  
[EMI] MDL number = 0                                                                                                  
[EMI] emi_set eMMC/NAND ID = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0                                                          
[EMI][Vcore]0x21E=0x48,0x220=0x48                                                                                     
[EMI][Vmem]0x554=0x0                                                                                                  
wait for frequency meter finish, CLK26CALI = 0x81                                                                     
[EMI] PCDDR3 DRAM Clock = 1600012 KHz, MEMPLL MODE = 2                                                                
[EMI] PCDDR3 RXTDN Calibration:                                                                                       
Start REXTDN SW calibration...                                                                                        
drvp=0xB,drvn=0x9                                                                                                     
[EMI] pinmux = 4                                                                                                      
===============================================================================                                       
                                                                                                                      
        dramc_write_leveling_swcal                                                                                    
===============================================================================                                       
delay  byte0  byte1  byte2  byte3                                                                                     
-----------------------------                                                                                         
0    0    0    0    1                                                                                                 
1    0    0    0    1                                                                                                 
2    0    0    1    1                                                                                                 
3    0    0    1    1                                                                                                 
4    0    1    1    1                                                                                                 
5    0    1    1    1                                                                                                 
6    0    1    1    1                                                                                                 
7    0    1    1    1                                                                                                 
8    0    1    1    1                                                                                                 
9    0    1    1    1                                                                                                 
10    1    1    1    1                                                                                                
11    1    1    1    1                                                                                                
12    1    1    1    1                                                                                                
13    1    1    1    1                                                                                                
14    1    1    1    1                                                                                                
15    1    1    1    1                                                                                                
pass bytecount = 4                                                                                                    
byte_i    status    best delay                                                                                        
0    2    10                                                                                                          
1    2    4                                                                                                           
2    2    2                                                                                                           
3    2    0                                                                                                           
========================================                                                                              
[write leveling]DQS: 0x24A, DQM: 0x24A                                                                                
[write leveling after remap]DQ byte0 reg: 0x200 val: 0xAAAA4444                                                       
[write leveling after remap]DQ byte1 reg: 0x204 val: 0x4444AAAA                                                       
[write leveling after remap]DQ byte2 reg: 0x208 val: 0x22220000                                                       
[write leveling after remap]DQ byte3 reg: 0x20C val: 0x2222                                                           
=============================================                                                                         
X-axis: DQS Gating Window Delay (Fine Scale)                                                                          
Y-axis: DQS Gating Window Delay (Coarse Scale)                                                                        
=============================================                                                                         
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120                                
      --------------------------------------------------------------------------------                                
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
000F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0010:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    1    1                                
0011:|    0    0    0    0    0    0    0    0    0    1    1    1    1    1    1    1                                
0012:|    0    0    0    0    1    1    1    1    1    1    1    1    1    1    0    0                                
0013:|    1    1    1    1    1    1    1    1    0    0    0    0    0    0    0    0                                
0014:|    1    1    1    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0                                
Rank 0 coarse tune value selection : 18, 18                                                                           
18                                                                                                                    
72                                                                                                                    
rank 0 coarse = 18                                                                                                    
rank 0 fine = 72                                                                                                      
00:|    0    0    0    0    0    0    0    0    1    1    1    0                                                      
opt_dle value:13                                                                                                      
==================================================================                                                    
                RX      DQS perbit delay software calibration                                                         
==================================================================                                                    
1.0-31 bit dq delay value                                                                                             
==================================================================                                                    
bit|     0  1  2  3  4  5  6  7  8  9                                                                                 
--------------------------------------                                                                                
0 |    0 0 0 0 0 0 0 0 0 0                                                                                            
10 |    0 0 0 0 0 0 0 0 0 0                                                                                           
20 |    0 0 0 0 0 0 0 0 0 0                                                                                           
30 |    0 0                                                                                                           
--------------------------------------                                                                                
==================================================================                                                    
2.dqs window                                                                                                          
x=pass dqs delay value (min~max)center                                                                                
y=0-7bit DQ of every group                                                                                            
input delay:DQS0 =49 DQS1 = 39 DQS2 =51 DQS3 = 45                                                                     
==================================================================                                                    
bit     DQS0     bit      DQS1     bit     DQS2     bit     DQS3                                                      
0  (20~68)44  8  (7~58)32  16  (21~67)44  24  (18~62)40                                                               
1  (21~68)44  9  (7~57)32  17  (21~68)44  25  (17~62)39                                                               
2  (21~69)45  10  (9~60)34  18  (23~69)46  26  (19~63)41                                                              
3  (20~66)43  11  (11~62)36  19  (21~68)44  27  (19~63)41                                                             
4  (21~74)47  12  (17~62)39  20  (23~75)49  28  (23~67)45                                                             
5  (21~67)44  13  (15~61)38  21  (24~68)46  29  (21~60)40                                                             
6  (23~68)45  14  (11~57)34  22  (22~70)46  30  (17~61)39                                                             
7  (26~72)49  15  (14~60)37  23  (29~74)51  31  (19~64)41                                                             
==================================================================                                                    
3.dq delay value last                                                                                                 
==================================================================                                                    
bit|    0  1  2  3  4  5  6  7  8   9                                                                                 
--------------------------------------                                                                                
0 |    5 5 4 6 2 5 4 0 7 7                                                                                            
10 |    5 3 0 1 5 2 7 7 5 7                                                                                           
20 |    2 5 5 0 5 6 4 4 0 5                                                                                           
30 |    6 4                                                                                                           
==================================================================                                                    
*DQIDLY1 = 0x6040505                                                                                                  
*DQIDLY2 = 0x40502                                                                                                    
*DQIDLY3 = 0x3050707                                                                                                  
*DQIDLY4 = 0x2050100                                                                                                  
*DQIDLY5 = 0x7050707                                                                                                  
*DQIDLY6 = 0x50502                                                                                                    
*DQIDLY7 = 0x4040605                                                                                                  
*DQIDLY8 = 0x4060500                                                                                                  
*DRAMC_R0DELDLY = 0x2D332731                                                                                          
                                                                                                                      
[MEM]CONA:F3A2,conf1:F07486A3                                                                                         
DM4BitMux = 1                                                                                                         
DQSO 0 in TX per-bit = 2 <= DQSO 0 in WL = 10                                                                         
DQSO 1 in TX per-bit = 0 <= DQSO 1 in WL = 4                                                                          
[Warning] DQSO 2 in TX per-bit = 10 > DQSO 2 in WL = 2                                                                
[Warning] DQSO 3 in TX per-bit = 7 > DQSO 3 in WL = 0                                                                 
Tx DQM dly  = 0x128A                                                                                                  
Tx DQM dly bit4 = 0x0                                                                                                 
DRAMC_DQODLY1=89BB999Ah                                                                                               
DRAMC_DQODLY2=9A77CAACh                                                                                               
DRAMC_DQODLY3=12302122h                                                                                               
DRAMC_DQODLY4=22004245h                                                                                               
Tx DQ dly bit4 = 0x0                                                                                                  
Tx DQS dly = 0x7A4A                                                                                                   
Tx DQS dly bit4 = 0x0                                                                                                 
TX Byte0: DQ - 16, DQS - 17. win_sum= 32                                                                              
TX Byte1: DQ - 20, DQS - 13. win_sum= 32                                                                              
TX Byte2: DQ - 8, DQS - 22. win_sum= 29                                                                               
TX Byte3: DQ - 8, DQS - 21. win_sum= 28                                                                               
DRAMC calibration takes 651807705 CPU cycles                                                                          
                                                                                                                      
[EMI] DRAMC calibration passed                                                                                        
                                                                                                                      
[MEM] complex R/W mem test pass                                                                                       
0:dram_rank_size:80000000                                                                                             
[Dram_Buffer] dram size:-2147483648                                                                                   
[Dram_Buffer] structure size: 1725560                                                                                 
[Dram_Buffer] MAX_TEE_DRAM_SIZE: 0                                                                                    
Load u-boot from eMMC...                                                                                              
[PLFM] Init Boot Device: OK(0)                                                                                        
                                                                                                                      
[PART] blksz: 512B                                                                                                    
[PART] [0x0000000000000000-0x000000000003FFFF] "PRELOADER" (512 blocks)                                               
[PART] [0x0000000000000000-0x000000000003FFFF] "MBR" (512 blocks)                                                     
[PART] [0x0000000000040000-0x00000000000BFFFF] "UBOOT" (1024 blocks)                                                  
[PART] [0x00000000000C0000-0x00000000000FFFFF] "CONFIG" (512 blocks)                                                  
[PART] [0x0000000000100000-0x000000000013FFFF] "FACTORY" (512 blocks)                                                 
[PART] [0x0000000000140000-0x000000000213FFFF] "BOOTIMG" (65536 blocks)                                               
[PART] [0x0000000002140000-0x000000000413FFFF] "RECOVERY" (65536 blocks)                                              
[PART] [0x0000000004140000-0x000000004413FFFF] "ROOTFS" (2097152 blocks)                                              
[PART] [0x0000000044140000-0x000001FFC413FFFF] "USER" (-4194304 blocks)                                               
[platform_vusb_on] PASS                                                                                               
[TOOL] PMIC not dectect usb cable!                                                                                    
[TOOL] <UART> listen  ended, receive size:0!                                                                          
[TOOL] <UART> wait sync time 150ms->5ms                                                                               
[TOOL] <UART> receieved data: ()                                                                                      
                                                                                                                      
Device APC domain init setup:                                                                                         
                                                                                                                      
 bootloader load uboot ,the address of uboot is 81E00000                                                              
[PART]partition name UBOOT                                                                                            
[PART]partition start block 0x200                                                                                     
[PART]partition size 0x80000                                                                                          
[PART]partition blks 0x400                                                                                            
[PART]partition flags 0x0                                                                                             
[PART]partition name 0x8                                                                                              
[bean] part->startblk(0x200) bdev->blksz(0x200) part->part_id(8) hdr(0xFFB50000)                                      
[BlkDev.c 101 ]partition block size 0x200 ,blks:0xE90000                                                              
[BlkDev.c 101 ]partition block erase size 0x200                                                                       
                                                                                                                      
[PART] load "UBOOT" from 0x0000000000050000 (dev) to 0x81E00000 (mem) [SUCCESS]                                       
[PART] load speed: 10462KB/s, 300000 bytes, 28ms                                                                      
[BT_SD_PG] device info 0x8590 0x8A00 0xCB01 0x102                                                                     
0:dram_rank_size:80000000                                                                                             
[PLFM] md_type[0] = 100                                                                                               
[PLFM] md_type[1] = 84                                                                                                
                                                                                                                      
[PLFM] boot reason: 0                                                                                                 
[PLFM] boot mode: 0                                                                                                   
[PLFM] META COM0: 0                                                                                                   
[PLFM] <0xFFB7CC10>: 0x0                                                                                              
[PLFM] boot time: 2020ms                                                                                              
[PLFM] DDR reserve mode: enable = 0, success = 0                                                                      
                                                                                                                      
[BLDR] jump to 0x81E00000                                                                                             
[BLDR] <0x81E00000>=0xEA00000F                                                                                        
[BLDR] <0x81E00004>=0xE59FF014                                                                                        
                                                                                                                      
                                                                                                                      
U-Boot 2014.04-rc1 (Sep 05 2017 - 12:43:27)                                                                           
                                                                                                                      
g_nr_bank = 1.                                                                                                        
g_total_rank_size = 0x80000000                                                                                        
DRAM:  2 GiB                                                                                                          
WARNING: Caches not enabled                                                                                           
MMC:     emmc: 0,  sdcard: 1                                                                                          
***Env Dev is 0                                                                                                       
dev_num = 0                                                                                                           
***size=16384, offset=1048576, blk_start=2048, blk_cnt=32                                                             
*** Warning - bad CRC, using default environment                                                                      
                                                                                                                      
In:    serial                                                                                                         
Out:   serial                                                                                                         
Err:   serial                                                                                                       
Net:   Eth0                                                                                                           
Uip activated`
Kernel Log:
`[    0.000000] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d                                        
[    0.000000] CPU: div instructions available: patching division code                                                
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache                               
[    0.000000] OF: fdt:Machine model: Bananapi BPI-R2                                                                 
[    0.000000] Memory policy: Data cache writealloc                                                                   
[    0.000000] percpu: Embedded 14 pages/cpu @eefab000 s25356 r8192 d23796 u57344                                     
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522751                            
[    0.000000] Kernel command line: earlyprintk block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:256k(mbr)2
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)                                                   
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)                                       
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)                                         
[    0.000000] Memory: 2062736K/2097148K available (4732K kernel code, 240K rwdata, 1528K rodata, 9840K init, 370K bs)
[    0.000000] Virtual kernel memory layout:                                                                          
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)                                                      
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)                                                      
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)                                                      
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)                                                      
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)                                                      
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)                                                      
[    0.000000]       .text : 0xc0008000 - 0xc04a735c   (4733 kB)                                                      
[    0.000000]       .init : 0xc064c000 - 0xc0fe8000   (9840 kB)                                                      
[    0.000000]       .data : 0xc0fe8000 - 0xc10243c0   ( 241 kB)                                                      
[    0.000000]        .bss : 0xc10243c0 - 0xc1080ee8   ( 371 kB)                                                      
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1                                             
[    0.000000] Preemptible hierarchical RCU implementation.                                                           
[    0.000000]  Build-time adjustment of leaf fanout to 32.                                                           
[    0.000000] NR_IRQS:16 nr_irqs:16 16                                                                               
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 13.00MHz (phys).                                  
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 4407952024s
[    0.000005] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns                            
[    0.000017] Switching to timer-based delay loop, resolution 76ns                                                   
[    0.000143] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns              
[    0.000158] sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns                             
[    0.000353] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000) 
[    0.000368] pid_max: default: 32768 minimum: 301                                                                   
[    0.000451] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)                                            
[    0.000461] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)                                       
[    0.000942] CPU: Testing write buffer coherency: ok                                                                
[    0.001196] Setting up static identity map for 0x800081e0 - 0x80008238                                             
[    0.360506] Brought up 4 CPUs                                                                                      
[    0.360521] SMP: Total of 4 processors activated (104.00 BogoMIPS).                                                
[    0.360528] CPU: All CPU(s) started in SVC mode.                                                                   
[    0.368101] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 3                                
[    0.368386] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns       
[    0.368409] futex hash table entries: 1024 (order: 4, 65536 bytes)                                                 
[    0.368535] pinctrl core: initialized pinctrl subsystem                                                            
[    0.369397] NET: Registered protocol family 16                                                                     
[    0.369684] DMA: preallocated 256 KiB pool for atomic coherent allocations                                         
[    0.370875] No ATAGs?                                                                                              
[    0.422210] SCSI subsystem initialized                                                                             
[    0.422515] usbcore: registered new interface driver usbfs                                                         
[    0.422578] usbcore: registered new interface driver hub                                                           
[    0.422668] usbcore: registered new device driver usb                                                              
[    0.422756] pps_core: LinuxPPS API ver. 1 registered                                                               
[    0.422765] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>               
[    0.422788] PTP clock support registered                                                                           
[    0.424264] clocksource: Switched to clocksource arch_sys_counter                                                  
[    0.425474] NET: Registered protocol family 2                                                                      
[    0.426060] TCP established hash table entries: 8192 (order: 3, 32768 bytes)                                       
[    0.426141] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)                                              
[    0.426254] TCP: Hash tables configured (established 8192 bind 8192)                                               
[    0.426312] UDP hash table entries: 512 (order: 2, 16384 bytes)                                                    
[    0.426358] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)                                               
[    0.426525] NET: Registered protocol family 1                                                                      
[    0.515369] No memory allocated for crashlog                                                                       
[    0.515677] workingset: timestamp_bits=30 max_order=19 bucket_order=0                                              
[    0.520338] squashfs: version 4.0 (2009/01/31) Phillip Lougher                                                     
[    0.520350] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.        
[    0.556064] bounce: pool size: 64 pages                                                                            
[    0.556082] io scheduler noop registered                                                                           
[    0.556091] io scheduler deadline registered (default)                                                             
[    0.559976] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled                                               
[    0.561128] console [ttyS0] disabled                                                                               
[    0.581355] 11004000.serial: ttyS0 at MMIO 0x11004000 (irq = 194, base_baud = 1625000) is a ST16650V2              
[    1.074085] console [ttyS0] enabled                                                                                
[    1.078111] mtk_rng 1020f000.rng: registered RNG driver                                                            
[    1.084037] mt6323-regulator mt6323-regulator: Chip ID = 0x2023                                                    
[    1.100558] libphy: Fixed MDIO Bus: probed                                                                         
[    1.104891] 2.mt7530 supply core not found, using dummy regulator                                                  
[    1.111015] 2.mt7530 supply io not found, using dummy regulator                                                    
[    1.117067] mt7530: probe of 2.mt7530 failed with error -22                                                        
                                             
[    1.247101] mtk_soc_eth 1b100000.ethernet: chip id = 7623                                                          
[    1.252668] libphy: mdio: probed                                                                                   
[    1.255918] mtk_soc_eth 1b100000.ethernet: generated random MAC address da:e1:46:7b:a1:81                          
[    1.276322] mtk_soc_eth 1b100000.ethernet: connected mac 0 to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY] 
[    1.287240] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xf0920000, irq 205                       
[    1.295661] mtk_soc_eth 1b100000.ethernet: generated random MAC address 32:b9:3c:e8:ba:8b                          
[    1.315792] mtk_soc_eth 1b100000.ethernet: connected mac 1 to PHY at fixed-0:01 [uid=00000000, driver=Generic PHY] 
[    1.326684] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xf0920000, irq 205                       
[    1.335267] usbcore: registered new interface driver rtl8150                                                       
[    1.340922] usbcore: registered new interface driver r8152                                                         
[    1.347228] xhci-mtk 1a1c0000.usb: xHCI Host Controller                                                            
[    1.352435] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 1                                   
[    1.360071] xhci-mtk 1a1c0000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x00210010                        
[    1.368449] xhci-mtk 1a1c0000.usb: irq 203, io mem 0x1a1c0000                                                      
[    1.374905] hub 1-0:1.0: USB hub found                                                                             
[    1.378656] hub 1-0:1.0: 1 port detected                                                                           
[    1.382932] xhci-mtk 1a1c0000.usb: xHCI Host Controller                                                            
[    1.388145] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 2                                   
[    1.395586] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.                           
[    1.404151] hub 2-0:1.0: USB hub found                                                                             
[    1.407913] hub 2-0:1.0: 1 port detected                                                                           
[    1.412550] xhci-mtk 1a240000.usb: xHCI Host Controller                                                            
[    1.417799] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 3                                   
[    1.425387] xhci-mtk 1a240000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x00210010                        
[    1.433725] xhci-mtk 1a240000.usb: irq 204, io mem 0x1a240000                                                      
[    1.440034] hub 3-0:1.0: USB hub found                                                                             
[    1.443789] hub 3-0:1.0: 1 port detected                                                                           
[    1.448034] xhci-mtk 1a240000.usb: xHCI Host Controller                                                            
[    1.453228] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 4                                   
[    1.460649] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.                           
[    1.469243] hub 4-0:1.0: USB hub found                                                                             
[    1.472995] hub 4-0:1.0: 1 port detected                                                                           
[    1.477449] usbcore: registered new interface driver usb-storage                                                   
[    1.483408] i2c /dev entries driver                                                                                
[    1.488184] IR NEC protocol handler initialized                                                                    
[    1.492679] IR RC5(x/sz) protocol handler initialized                                                              
[    1.497713] IR RC6 protocol handler initialized                                                                    
[    1.502204] IR JVC protocol handler initialized                                                                    
[    1.506707] IR Sony protocol handler initialized                                                                   
[    1.511284] IR SANYO protocol handler initialized                                                                  
[    1.516093] IR Sharp protocol handler initialized                                                                  
[    1.520758] IR XMP protocol handler initialized                                                                    
[    1.525414] Registered IR keymap rc-empty                                                                          
[    1.529680] input: mtk_cir as /devices/platform/10013000.cir/rc/rc0/input0                                         
[    1.536638] rc rc0: mtk_cir as /devices/platform/10013000.cir/rc/rc0                                               
[    1.543702] mtk_cir 10013000.cir: Initialized MT7623 IR driver, sample period = 46us                               
[    1.551820] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values                  
[    1.561611] mtk-wdt 10007000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)                               
[    1.569781] cpu cpu0: dummy supplies not allowed                                                                   
[    1.575455] sdhci: Secure Digital Host Controller Interface driver                                                 
[    1.581585] sdhci: Copyright(c) Pierre Ossman                                                                      
[    1.644825] mtk-msdc 11240000.mmc: Got CD GPIO                                                                     
[    1.698997] mmc0: new high speed MMC card at address 0001                                                          
[    1.704902] sdhci-pltfm: SDHCI platform and OF driver helper                                                       
[    1.710832] mmcblk0: mmc0:0001 8WPD3R 7.28 GiB                                                                     
[    1.715722] mmcblk0boot0: mmc0:0001 8WPD3R partition 1 4.00 MiB                                                    
[    1.721979] mmcblk0boot1: mmc0:0001 8WPD3R partition 2 4.00 MiB                                                    
[    1.729948] mmcblk0rpmb: mmc0:0001 8WPD3R partition 3 512 KiB                                                      
[    1.739041]  mmcblk0: p1 p2                                                                                        
[    1.758282] alg: aead: encryption failed on test 1 for gcm-aes-mtk: ret=22                                         
[    1.769442] random: fast init done                                                                                 
[    1.780322] NET: Registered protocol family 10                                                                     
[    1.785631] NET: Registered protocol family 17                                                                     
[    1.790067] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load .
[    1.803133] 8021q: 802.1Q VLAN Support v1.8                                                                        
[    1.807458] ThumbEE CPU extension supported.                                                                       
[    1.811803] Registering SWP/SWPB emulation handler                                                                 
[    1.934317] mtk-pcie 1a140000.pcie-controller: Port0 link down                                                     
[    1.970562] mtk-pcie 1a140000.pcie-controller: PCI host bridge to bus 0000:00                                      
[    1.977668] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x1a160000-0x1a16ffff])           
[    1.987083] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]                                         
[    1.993902] pci_bus 0000:00: root bus resource [bus 00-ff]                                                         
[    1.999387] pci 0000:00:00.0: ignoring class 0x0d8000 (doesn't match header type 01)                               
[    2.007657] PCI: bus0: Fast back to back transfers disabled                                                        
[    2.013186] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring                            
[    2.021154] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring`

I suppose an error in addressing and/or aligning in the PCI setup, because an header not matched error is never rised in normal function. Furthermore the invalid PCI- Bridge configuration is an additional indicator.

I have done researching a little and it looks like an error in the devicetree description for the controller or pcie ports.

If i can get more infos, i post it here.

Can you please try my image in below link? http://pan.baidu.com/s/1boMLnxt

How to load it:

  1. Enter Uboot shell
  2. Configure the IP Address and serverip
  3. Download the image to R2 board by running command tftp 84000000 uImage-mt7623n-bananapi-bpi-r2-initramfs
  4. Run command: bootm

&pcie { pinctrl-names = “default”; pinctrl-0 = <&pcie_default>; status = “okay”;

pcie@0,0 {
	status = "okay";
};

pcie@1,0 {
	status = "okay";
};

};

&pcie0_phy { status = “okay”; };

&pcie1_phy { status = “okay”; };

Hi garywang,

i followed your instructions.

Log: ` Starting kernel …

[    0.000000] Booting Linux on physical CPU 0x0                                                                      
[    0.000000] Linux version 4.9.44 (gary@gary-HP-Z238-Microtower-Workstation) (gcc version 5.4.0 (LEDE GCC 5.4.0 r477
[    0.000000] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d                                        
[    0.000000] CPU: div instructions available: patching division code                                                
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache                               
[    0.000000] OF: fdt:Machine model: Bananapi BPI-R2                                                                 
[    0.000000] Memory policy: Data cache writealloc                                                                   
[    0.000000] percpu: Embedded 14 pages/cpu @eefab000 s25356 r8192 d23796 u57344                                     
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522751                            
[    0.000000] Kernel command line: earlyprintk block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:256k(mbr)2
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)                                                   
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)                                       
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)                                         
[    0.000000] Memory: 2066772K/2097148K available (4714K kernel code, 240K rwdata, 1528K rodata, 5820K init, 370K bs)
[    0.000000] Virtual kernel memory layout:                                                                          
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)                                                      
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)                                                      
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)                                                      
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)                                                      
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)                                                      
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)                                                      
[    0.000000]       .text : 0xc0008000 - 0xc04a2c54   (4716 kB)                                                      
[    0.000000]       .init : 0xc0647000 - 0xc0bf6000   (5820 kB)                                                      
[    0.000000]       .data : 0xc0bf6000 - 0xc0c32240   ( 241 kB)                                                      
[    0.000000]        .bss : 0xc0c32240 - 0xc0c8eda8   ( 371 kB)                                                      
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1                                             
[    0.000000] Preemptible hierarchical RCU implementation.                                                           
[    0.000000]  Build-time adjustment of leaf fanout to 32.                                                           
[    0.000000] NR_IRQS:16 nr_irqs:16 16                                                                               
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 13.00MHz (phys).                                  
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 4407952024s
[    0.000005] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns                            
[    0.000016] Switching to timer-based delay loop, resolution 76ns                                                   
[    0.000140] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns              
[    0.000155] sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns                             
[    0.000351] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000) 
[    0.000366] pid_max: default: 32768 minimum: 301                                                                   
[    0.000447] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)                                            
[    0.000458] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)                                       
[    0.000937] CPU: Testing write buffer coherency: ok                                                                
[    0.001187] Setting up static identity map for 0x800081e0 - 0x80008238                                             
[    0.360504] Brought up 4 CPUs                                                                                      
[    0.360518] SMP: Total of 4 processors activated (104.00 BogoMIPS).                                                
[    0.360526] CPU: All CPU(s) started in SVC mode.                                                                   
[    0.368126] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 3                                
[    0.368419] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns       
[    0.368440] futex hash table entries: 1024 (order: 4, 65536 bytes)                                                 
[    0.368566] pinctrl core: initialized pinctrl subsystem                                                            
[    0.369418] NET: Registered protocol family 16                                                                     
[    0.369706] DMA: preallocated 256 KiB pool for atomic coherent allocations                                         
[    0.370894] No ATAGs?                                                                                              
[    0.422199] SCSI subsystem initialized                                                                             
[    0.422502] usbcore: registered new interface driver usbfs                                                         
[    0.422566] usbcore: registered new interface driver hub                                                           
[    0.422658] usbcore: registered new device driver usb                                                              
[    0.422746] pps_core: LinuxPPS API ver. 1 registered                                                               
[    0.422754] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>               
[    0.422781] PTP clock support registered                                                                           
[    0.424247] clocksource: Switched to clocksource arch_sys_counter                                                  
[    0.425463] NET: Registered protocol family 2                                                                      
[    0.426033] TCP established hash table entries: 8192 (order: 3, 32768 bytes)                                       
[    0.426114] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)                                              
[    0.426226] TCP: Hash tables configured (established 8192 bind 8192)                                               
[    0.426285] UDP hash table entries: 512 (order: 2, 16384 bytes)                                                    
[    0.426330] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)                                               
[    0.426494] NET: Registered protocol family 1                                                                      
[    0.482005] No memory allocated for crashlog                                                                       
[    0.482330] workingset: timestamp_bits=30 max_order=19 bucket_order=0                                              
[    0.487080] squashfs: version 4.0 (2009/01/31) Phillip Lougher                                                     
[    0.487091] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.        
[    0.508824] bounce: pool size: 64 pages                                                                            
[    0.508842] io scheduler noop registered                                                                           
[    0.508850] io scheduler deadline registered (default)                                                             
[    0.512751] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled                                               
[    0.513898] console [ttyS0] disabled                                                                               
[    0.534439] 11004000.serial: ttyS0 at MMIO 0x11004000 (irq = 194, base_baud = 1625000) is a ST16650V2              
[    1.028697] console [ttyS0] enabled                                                                                
[    1.032704] mtk_rng 1020f000.rng: registered RNG driver                                                            
[    1.038659] mt6323-regulator mt6323-regulator: Chip ID = 0x2023                                                    
[    1.055189] libphy: Fixed MDIO Bus: probed                                                                         
[    1.059483] 2.mt7530 supply core not found, using dummy regulator                                                  
[    1.065640] 2.mt7530 supply io not found, using dummy regulator                                                    
[    1.071671] mt7530: probe of 2.mt7530 failed with error -22                                                        
[    1.077578] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI                                                  
[    1.083621] e100: Copyright(c) 1999-2006 Intel Corporation                                                         
[    1.089135] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI                                       
[    1.096170] e1000: Copyright (c) 1999-2006 Intel Corporation.                                                      
[    1.101931] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k                                                     
[    1.107744] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.                                                    
[    1.113674] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k                                        
[    1.120612] igb: Copyright (c) 2007-2014 Intel Corporation.                                                        
[    1.126207] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k                              
[    1.133971] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.                                                    
[    1.139917] i40e: Intel(R) Ethernet Connection XL710 Network Driver - version 1.6.16-k                             
[    1.147785] i40e: Copyright (c) 2013 - 2014 Intel Corporation.                                                     
[    1.153744] ixgb: Intel(R) PRO/10GbE Network Driver - version 1.0.135-k2-NAPI                                      
[    1.160843] ixgb: Copyright (c) 1999-2008 Intel Corporation.                                                       
[    1.166531] Intel(R) Ethernet Switch Host Interface Driver - version 0.21.2-k                                      
[    1.173606] Copyright (c) 2013 - 2016 Intel Corporation.                                                           
[    1.201698] mtk_soc_eth 1b100000.ethernet: chip id = 7623                                                          
[    1.207277] libphy: mdio: probed                                                                                   
[    1.210506] mtk_soc_eth 1b100000.ethernet: generated random MAC address c2:e1:29:f9:9e:2b                          
[    1.224064] mtk_soc_eth 1b100000.ethernet: connected mac 0 to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY] 
[    1.234967] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xf0920000, irq 205                       
[    1.243366] mtk_soc_eth 1b100000.ethernet: generated random MAC address ce:1f:a3:60:1a:db                          
[    1.256840] mtk_soc_eth 1b100000.ethernet: connected mac 1 to PHY at fixed-0:01 [uid=00000000, driver=Generic PHY] 
[    1.267714] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xf0920000, irq 205                       
[    1.276266] usbcore: registered new interface driver rtl8150                                                       
[    1.281920] usbcore: registered new interface driver r8152                                                         
[    1.288234] xhci-mtk 1a1c0000.usb: xHCI Host Controller                                                            
[    1.293441] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 1                                   
[    1.301050] xhci-mtk 1a1c0000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x00210010                        
[    1.309427] xhci-mtk 1a1c0000.usb: irq 203, io mem 0x1a1c0000                                                      
[    1.315832] hub 1-0:1.0: USB hub found                                                                             
[    1.319594] hub 1-0:1.0: 1 port detected                                                                           
[    1.323859] xhci-mtk 1a1c0000.usb: xHCI Host Controller                                                            
[    1.329078] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 2                                   
[    1.336498] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.                           
[    1.345096] hub 2-0:1.0: USB hub found                                                                             
[    1.348841] hub 2-0:1.0: 1 port detected                                                                           
[    1.353488] xhci-mtk 1a240000.usb: xHCI Host Controller                                                            
[    1.358713] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 3                                   
[    1.366302] xhci-mtk 1a240000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x00210010                        
[    1.374650] xhci-mtk 1a240000.usb: irq 204, io mem 0x1a240000                                                      
[    1.380939] hub 3-0:1.0: USB hub found                                                                             
[    1.384705] hub 3-0:1.0: 1 port detected                                                                           
[    1.388931] xhci-mtk 1a240000.usb: xHCI Host Controller                                                            
[    1.394123] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 4                                   
[    1.401551] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.                           
[    1.410144] hub 4-0:1.0: USB hub found                                                                             
[    1.413887] hub 4-0:1.0: 1 port detected                                                                           
[    1.418342] usbcore: registered new interface driver usb-storage                                                   
[    1.424431] i2c /dev entries driver                                                                                
[    1.429078] IR NEC protocol handler initialized                                                                    
[    1.433571] IR RC5(x/sz) protocol handler initialized                                                              
[    1.438606] IR RC6 protocol handler initialized                                                                    
[    1.443097] IR JVC protocol handler initialized                                                                    
[    1.447600] IR Sony protocol handler initialized                                                                   
[    1.452177] IR SANYO protocol handler initialized                                                                  
[    1.456983] IR Sharp protocol handler initialized                                                                  
[    1.461647] IR XMP protocol handler initialized                                                                    
[    1.466290] Registered IR keymap rc-empty                                                                          
[    1.470564] input: mtk_cir as /devices/platform/10013000.cir/rc/rc0/input0                                         
[    1.477520] rc rc0: mtk_cir as /devices/platform/10013000.cir/rc/rc0                                               
[    1.484655] mtk_cir 10013000.cir: Initialized MT7623 IR driver, sample period = 46us                               
[    1.492680] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values                  
[    1.502444] mtk-wdt 10007000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)                               
[    1.510608] cpu cpu0: dummy supplies not allowed                                                                   
[    1.516277] sdhci: Secure Digital Host Controller Interface driver                                                 
[    1.522407] sdhci: Copyright(c) Pierre Ossman                                                                      
[    1.584799] mtk-msdc 11240000.mmc: Got CD GPIO                                                                     
[    1.638971] mmc0: new high speed MMC card at address 0001                                                          
[    1.644843] sdhci-pltfm: SDHCI platform and OF driver helper                                                       
[    1.650803] mmcblk0: mmc0:0001 8WPD3R 7.28 GiB                                                                     
[    1.655680] mmcblk0boot0: mmc0:0001 8WPD3R partition 1 4.00 MiB                                                    
[    1.661948] mmcblk0boot1: mmc0:0001 8WPD3R partition 2 4.00 MiB                                                    
[    1.669239] mmcblk0rpmb: mmc0:0001 8WPD3R partition 3 512 KiB                                                      
[    1.678173]  mmcblk0: p1 p2                                                                                        
[    1.686177] alg: aead: encryption failed on test 1 for gcm-aes-mtk: ret=22                                         
[    1.697570] random: fast init done                                                                                 
[    1.708654] NET: Registered protocol family 10                                                                     
[    1.713993] NET: Registered protocol family 17                                                                     
[    1.718576] 8021q: 802.1Q VLAN Support v1.8                                                                        
[    1.722849] ThumbEE CPU extension supported.                                                                       
[    1.727209] Registering SWP/SWPB emulation handler                                                                 
[    1.844327] mtk-pcie 1a140000.pcie-controller: Port0 link down                                                     
[    1.880575] mtk-pcie 1a140000.pcie-controller: PCI host bridge to bus 0000:00                                      
[    1.887679] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x1a160000-0x1a16ffff])           
[    1.897093] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]                                         
[    1.903911] pci_bus 0000:00: root bus resource [bus 00-ff]                                                         
[    1.909396] pci 0000:00:00.0: ignoring class 0x0d8000 (doesn't match header type 01)                               
[    1.917667] PCI: bus0: Fast back to back transfers disabled                                                        
[    1.923196] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring                            
[    1.931157] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring                            
[    2.234284] mtk_soc_eth 1b100000.ethernet eth0: rx pause enabled, tx pause enabled    `

@ryder: I build a new kernel and test your pcie Config in DTS-File.

Can you please put debuglog in a file and attach that? it’s easier to read… :slight_smile:

I have found two possible causes for this boot stuck.

1. 0068-backport-pcie-driver-node-nodes-from-upstream.patch

Not the whole patch. But the first patch changes the PCI- Addresses and in the mt7623.dtsi file which is included by mt7623n-bananapi-bpi-r2.dts. I suppose the result is the PCI bridge configuration invalid.

I moved the whole file out of the patch folder. Therefore i can not say if only the devicetree patch causes the problem but i will test it.

2. Kernel bootparameters: block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:256k(mbr)ro,512k(uboot)ro,256k(config)ro,256k(factory)ro,32M(kernel),32M(recovery),1024M(rootfs),2048M(usrdata),-(bmtpool)

This parameters are hardcoded in the file mt7623n-bananapi-bpi-r2.dts. The Kernel uses the whole root squashfs as initramfs but in the whole boot / init process pivot_root /switch_root is never called and an overlay mount never takes part. The image could named live image. Maybe this fact causes some trouble in the LEDE interna but i do not know it exactly.

Now the boot process is fully done and i get an console.

I am going to test the patch without patching the .dtsi file and i think it should work. Maybe i run the tests today but tomorrow i finished them.

Finally an additional Thank you, to all who helped to solve the problem. Have a nice weekend.

Did you buiild/enable PCIe PHY driver?

So the root cause is wrong kernel boot parameters, right?

please make sure CONFIG_PHY_MTK_TPHY=y

Hi,

i am step further. I have attached 2 files with patches. 0071-add-pcie.patch (2,6 KB) 0068-backport-pcie-driver-node-nodes-from-upstream.patch (73,3 KB)

Kernel boots fine but the mtk PCIe driver said “missing num-lanes property.” How many lanes has the controller?