LX2080 pcie controller initialization is abnormal

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LX2080 pcie controller initialization is abnormal

Jump to solution
2,877 Views
liushuangxin
Contributor III

Hello nxp,
We are ready to replace LX2160 with LX2080, using lsdk20.04, linux5.4.3, using pcie.3 pcie.4 of serdes2, the system can start normally. During the uboot phase, the pcie can initialize normally and scan for the pcie EP device, but the pcie controller initialization is abnormal, there are the following errors:

[ 6.229920] layerscape-pcie-gen4 3600000.pcie: host bridge /soc/pcie@3600000 ranges:
[ 6.229934] layerscape-pcie-gen4 3600000.pcie: MEM 0x9040000000..0x907fffffff -> 0x40000000
[ 6.229994] layerscape-pcie-gen4 3600000.pcie: mobiveil_host_init ret = 0
[ 6.230088] layerscape-pcie-gen4 3600000.pcie: mobiveil_pcie_interrupt_init ret = 0
[ 6.230093] layerscape-pcie-gen4 3600000.pcie: devm_request_pci_bus_resources ret = 0
[ 7.230156] layerscape-pcie-gen4 3600000.pcie: link never came up
[ 7.230159] layerscape-pcie-gen4 3600000.pcie: mobiveil_bringup_link ret = -110
[ 7.230161] layerscape-pcie-gen4 3600000.pcie: link bring-up failed
[ 7.230164] layerscape-pcie-gen4 3600000.pcie: Fail to probe
[ 7.230206] layerscape-pcie-gen4: probe of 3600000.pcie failed with error -110
[ 7.230258] layerscape-pcie-gen4 3700000.pcie: host bridge /soc/pcie@3700000 ranges:
[ 7.230267] layerscape-pcie-gen4 3700000.pcie: MEM 0x9840000000..0x987fffffff -> 0x40000000
[ 7.230325] layerscape-pcie-gen4 3700000.pcie: mobiveil_host_init ret = 0
[ 7.230398] layerscape-pcie-gen4 3700000.pcie: mobiveil_pcie_interrupt_init ret = 0
[ 7.230402] layerscape-pcie-gen4 3700000.pcie: devm_request_pci_bus_resources ret = 0
[ 8.230459] layerscape-pcie-gen4 3700000.pcie: link never came up
[ 8.230461] layerscape-pcie-gen4 3700000.pcie: mobiveil_bringup_link ret = -110
[ 8.230464] layerscape-pcie-gen4 3700000.pcie: link bring-up failed
[ 8.230465] layerscape-pcie-gen4 3700000.pcie: Fail to probe
[ 8.230499] layerscape-pcie-gen4: probe of 3700000.pcie failed with error -110

We compared the pcie initialization print of the LX2160 and found that the LX2160 used layerscape-pcie, rather than Layerscape-PCI-GEN4, which is currently used in the LX2080.
We find the pcie compatible is ls2088a in the /proc/device-tree of LX2160.
I have a few questions right now:
1.In the device tree, the LX2160 pcie compatible is "fsl,lx2160a-pcie". Why does it match the Layerscape-pcie.c driver file?
2.In the case of using the same code, LX2080 can't match layerscape-pcie.c driver match?
3.Are there any differences between the pcie drivers of LX2080 and LX2160? How can we locate the initialization exception of the PcIE controller of LX2080?

I have provided some rcw, device tree configuration and other information in the attachment. I hope to get your reply, thank you.

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
2,776 Views
liushuangxin
Contributor III
Hello community,
At present, the problem has been solved, and the controller driver of the gen3 pcie of the lx2 series uses pci-layerscape.c. 
In uboot, the function determines the chip type and then modifies the fdt to initialize the pcie controller at the linux stage.
int pcie_board_fix_fdt(void *fdt)
{
uint svr;
 
svr = SVR_SOC_VER(get_svr());
 
if ((svr == SVR_LX2160A || svr == SVR_LX2162A ||
     svr == SVR_LX2120A || svr == SVR_LX2080A ||
     svr == SVR_LX2122A || svr == SVR_LX2082A) &&
     IS_SVR_REV(get_svr(), 2, 0))
return lx2_board_fix_fdt(fdt);
 
return 0;
}
Because I am using an older version, the chip model of lx2080 cannot correspond to the model in the code, resulting in failure to reconfigure devce-tree, so that linux pcie cannot be initialized.
Friends with the same problem can be used as a reference.

View solution in original post

0 Kudos
Reply
2 Replies
2,777 Views
liushuangxin
Contributor III
Hello community,
At present, the problem has been solved, and the controller driver of the gen3 pcie of the lx2 series uses pci-layerscape.c. 
In uboot, the function determines the chip type and then modifies the fdt to initialize the pcie controller at the linux stage.
int pcie_board_fix_fdt(void *fdt)
{
uint svr;
 
svr = SVR_SOC_VER(get_svr());
 
if ((svr == SVR_LX2160A || svr == SVR_LX2162A ||
     svr == SVR_LX2120A || svr == SVR_LX2080A ||
     svr == SVR_LX2122A || svr == SVR_LX2082A) &&
     IS_SVR_REV(get_svr(), 2, 0))
return lx2_board_fix_fdt(fdt);
 
return 0;
}
Because I am using an older version, the chip model of lx2080 cannot correspond to the model in the code, resulting in failure to reconfigure devce-tree, so that linux pcie cannot be initialized.
Friends with the same problem can be used as a reference.
0 Kudos
Reply
2,876 Views
liushuangxin
Contributor III
 
0 Kudos
Reply