miniPCIe is not working on MCIMX7SABRE

cancel
Showing results for 
Search instead for 
Did you mean: 

miniPCIe is not working on MCIMX7SABRE

1,213 Views
muhammed_ali
Contributor I

Hi Team,

I am using imx7dsabre board. i could not able to connect miniPCIe peripheral module to the sabre board. please help on this.

the lspci command give the following log

root@imx7dsabresd:~# lspci
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.

device spec :

CPU:   Freescale i.MX7D rev1.2 at 792 MHz

Board: i.MX7D SABRESD RevA

Linux version : 4.1.15-1.2.0+g77f6154

Labels (1)
Tags (3)
0 Kudos
18 Replies

540 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Muhammed

for i.MX7D SABRESD RevA as mentions log, some PCIe modifications are needed,

one can refer to attached latest i.MX7D Sabre SD schematic p.1 "Revision History" for

changes for board revisions, in particular for PCIE_REFCLKOUT add blocking capacitor

(C458,C459) before the terminal reisistor (instead R121,122).

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

540 Views
muhammed_ali
Contributor I

Hi Igorpadykov

The attached Schematics rev D. We have latest schematics rev D1 both these 2 schematics we couldn't find any resistor named R121, R122. We replace R644 and R645 with blocking capacitor. but the result is same.

0 Kudos

540 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Muhammed

what is your board revision, suggest to use latest rev.D.

Rev.A is very old and has different schematic.

Best regards
igor

0 Kudos

540 Views
muhammed_ali
Contributor I

Hi Igorpadykov,

Thank you  for the quick reply,

we are using revision D board. previously i mentioned as RevA because of the boot log

Model: Freescale i.MX7 SabreSD Board
Board: i.MX7D SABRESD RevA in secure mode
DRAM:  1 GiB
PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
MMC:   FSL_SDHC: 0, FSL_SDHC: 1

 we have found out that the pci bus is not configured in menuconfig, so we configured it and compiled, now we are not getting error like previous one as mentioned on first message. we checked two module a wifi module wle900vx and usb 3.0 module on miniPCIe, but it is not getting detected on lspci/sys/bus/pci/devices/, and /sys/bus/pci_express/devices/.  could you please help on this

0 Kudos

540 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Muhammed

 

do you have any pcie card connected to board, if not please attach one.
In general for testing several cards may be useful.

 

Best regards
igor

0 Kudos

540 Views
muhammed_ali
Contributor I

Hi Igorpadykov,

as I mentioned. we have already connected two pcie card, wifi module wle900vx and usb 3.0 module and tested. but the result is same

0 Kudos

540 Views
muhammed_ali
Contributor I

Hi Igorpadykov,,
i have tested the miniPCIe by enabling the all pcie bus configuration then the booting stucks after the following log

8021q: 802.1Q VLAN Support v1.8
lib80211: common routines for IEEE802.11 drivers
Key type dns_resolver registered
imx_epdc_v2_fb 306f0000.epdc: Unable to get display PMIC regulator.err = 0xfffffdfb
OF: PCI: host bridge /soc/aips-bus@30800000/pcie@0x33800000 ranges:
OF: PCI:   No bus range found for /soc/aips-bus@30800000/pcie@0x33800000, using [bus 00-ff]
OF: PCI:    IO 0x4ff80000..0x4ff8ffff -> 0x00000000
OF: PCI:   MEM 0x40000000..0x4fefffff -> 0x40000000

when i desabled all configurations in designware pci core support. then the board booted but result is same as previous. no miniPCIe card is detected

0 Kudos

540 Views
igorpadykov
NXP TechSupport
NXP TechSupport

what dts file used in the case, please try

linux/arch/arm/boot/dts/imx7d-sdb.dts

imx7d-sdb.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Also could you provide full log.

Best regards
igor

0 Kudos

540 Views
muhammed_ali
Contributor I

Hi Igorpadykov,

we were using the same dts file

0 Kudos

540 Views
igorpadykov
NXP TechSupport
NXP TechSupport

still I have doubts that you "using revision D board", based on log:

"Board: i.MX7D SABRESD RevA in secure mode".

Please try to debug it and check what is board revision using

function mx7sabre_rev() in

mx7dsabresd.c\mx7dsabresd\freescale\board - uboot-imx - i.MX U-Boot 

Best regards
igor

0 Kudos

540 Views
muhammed_ali
Contributor I

In function mx7sabre_rev(), three board revitions are there (A,B,C) among these revA is taken as default thats why the log comes like that.

#define BOARD_REV_C  0x300
#define BOARD_REV_B  0x200
#define BOARD_REV_A  0x100

static int mx7sabre_rev(void)
{
    /*
     * Get Board ID information from OCOTP_GP1[15:8]
     * i.MX7D SDB RevA: 0x41
     * i.MX7D SDB RevB: 0x42
     */
    struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
    struct fuse_bank *bank = &ocotp->bank[14];
    int reg = readl(&bank->fuse_regs[0]);
    int ret;

    if (reg != 0) {
        switch (reg >> 8 & 0x0F) {
        case 0x3:
            ret = BOARD_REV_C;
            break;
        case 0x02:
            ret = BOARD_REV_B;
            break;
        case 0x01:
        default:
            ret = BOARD_REV_A;
            break;
        }
    } else {
        /* If the gp1 fuse is not burn, we have to use TO rev for the board rev */
        if (is_soc_rev(CHIP_REV_1_0))
            ret = BOARD_REV_A;
        else if (is_soc_rev(CHIP_REV_1_1))
            ret = BOARD_REV_B;
        else
            ret = BOARD_REV_C;
    }
    return ret;
}

0 Kudos

540 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Could you clarify what bsp you are using and attach full log.

Also for rev.D issues one can look on

Issues with PCIe initialization on i.MX7D Sabre Rev D 

Other points for checking:

The PCIe adapter must be an X1 type connection.  X2 or X4 PCIe adapters will not work.

Configs for L4.1.15_2.0.0 :
CONFIG_PCI=y, CONFIG_PCI_DOMAINS=y, CONFIG_PCI_SYSCALL=y,

CONFIG_PCI_MSI=y, CONFIG_PCIE_DW=y, CONFIG_PCI_IMX6=y .


Best regards
igor

0 Kudos

540 Views
muhammed_ali
Contributor I

Hi igorpadykov,

we are using i.MX Linux Yocto Project BSP 4.14.78_1.0.0 Release BSP

the log file is attached. please find the attachment.

0 Kudos

540 Views
igorpadykov
NXP TechSupport
NXP TechSupport

from log you are using uboot :
U-Boot 2018.03-imx_v2018.03_4.14.98_2.0.0_ga+g87a19df
and later use "Linux version 4.14.78" in log.

For this uboot (v2018.03_4.14.98) should be used Linux version 4.14.98, not 4.14.78:

https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.14.98_2.0.0_ga

Best regards
igor

0 Kudos

540 Views
muhammed_ali
Contributor I

Hi igorpadykov,

I have flashed the latest demo image downloaded from nxp, in that image PCI

bus is not configured. so I configured PCI in 4.14.78 BSP and copy zImage

to Boot directory of SD card thats why the log comes like that. I changed

my BSP to 4.14.98 compiled and flashed then also the result is same. log

file is attached, please find the attachment

0 Kudos

540 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Muhammed

you can try to debug issue, starting with imx_pcie_probe(),imx_pcie_wait_for_link() function in driver sources:
linux/drivers/pci/dwc/pci-imx6.c
https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/pci/dwc/pci-imx6.c?h=imx_4.14.98_2...

use AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors
https://www.nxp.com/docs/en/application-note/AN4553.pdf

Best regards
igor

0 Kudos

540 Views
muhammed_ali
Contributor I

Hi Igorpadykov,

any updates on this issue.

0 Kudos

540 Views
igorpadykov
NXP TechSupport
NXP TechSupport

one can look at suggestions provided on

I.MX7 PCIe phy link never came up 

Best regards
igor

0 Kudos