This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: PCIe can't work after upgrading to new kernel

Genius 13655 points
Part Number: AM5728


Hello Champs,

HW: Customer own AM5728 board

SW: ti-processor-sdk-android-am57xx-evm-06.03.00.106    Kernel:4.19

PCIe is connected to FPGA on customer own board, AM5728 is configured to RC mode. When using android5.1.1+linux3.14, everything is ok.

But when upgrading to the new 4.19 version. The PCIe can't work. It can detect the PCI device, but it prompted below error message when reading BAR0. The value is all 0xffff ffff。

omap_l3_noc 44000000.ocp: L3 application error: target 5 mod:1 (unclearable)

omap_l3_noc 44000000.ocp: L3 debug error: target 5 mod:1 (unclearable)

Below is the log of PCIe:

console:/ # dmesg | grep pci                                                   
[    0.905083] usm-controller usm_controller: GPIO lookup for consumer pcie_rst
[    0.905111] of_get_named_gpiod_flags: parsed 'pcie_rst-gpios' property of node '/usm_controller[0]' - status (0)
[    0.905145] no flags found for pcie_rst
[    2.877261] ehci-pci: EHCI PCI platform driver
[    3.454369] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.3
[    3.462209] dra7-pcie 51000000.pcie: GPIO lookup for consumer (null)
[    3.462213] dra7-pcie 51000000.pcie: using device tree for GPIO lookup
[    3.462226] of_get_named_gpiod_flags: can't parse 'gpios' property of node '/ocp/axi@0/pcie@51000000[0]'
[    3.462236] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/ocp/axi@0/pcie@51000000[0]'
[    3.462242] dra7-pcie 51000000.pcie: using lookup tables for GPIO lookup
[    3.462247] dra7-pcie 51000000.pcie: No GPIO consumer (null) found
[    3.462398] dra7-pcie 51000000.pcie: host bridge /ocp/axi@0/pcie@51000000 ranges:
[    3.469927] dra7-pcie 51000000.pcie: Parsing ranges property...
[    3.469949] dra7-pcie 51000000.pcie:    IO 0x20003000..0x20012fff -> 0x00000000
[    3.477310] dra7-pcie 51000000.pcie:   MEM 0x20013000..0x2fffffff -> 0x20013000
[    3.584771] dra7-pcie 51000000.pcie: Link up
[    3.589199] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
[    3.595497] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.610258] pci_bus 0000:00: root bus resource [io  0x1000-0x10000]
[    3.616570] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
[    3.623545] pci_bus 0000:00: scanning bus
[    3.623623] pci 0000:00:00.0: [104c:8888] type 01 class 0x060400
[    3.623650] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    3.623679] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    3.623733] pci 0000:00:00.0: supports D1
[    3.623740] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    3.623760] pci 0000:00:00.0: PME# disabled
[    3.628460] pci_bus 0000:00: fixups for bus
[    3.634066] pci 0000:00:00.0: scanning [bus 01-01] behind bridge, pass 0
[    3.634136] pci_bus 0000:01: scanning bus
[    3.634197] pci 0000:01:00.0: [10ee:7024] type 00 class 0x058000
[    3.634289] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00ffffff 64bit pref]
[    3.634316] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00007fff]
[    3.634587] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot
[    3.634601] pci 0000:01:00.0: PME# disabled
[    3.634652] pci 0000:01:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5 GT/s x1 link at 0000:00:00.0 (capable of 8.000 Gb/s with 5 GT/s x2 l
ink)
[    3.653130] pci_bus 0000:01: fixups for bus
[    3.658767] pci_bus 0000:01: bus scan returning with max=01
[    3.658776] pci 0000:00:00.0: scanning [bus 01-01] behind bridge, pass 1
[    3.658784] pci_bus 0000:00: bus scan returning with max=01
[    3.658804] pci 0000:00:00.0: BAR 9: assigned [mem 0x21000000-0x21ffffff pref]
[    3.666057] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    3.672909] pci 0000:00:00.0: BAR 8: assigned [mem 0x20200000-0x202fffff]
[    3.679739] pci 0000:00:00.0: BAR 1: assigned [mem 0x20020000-0x2002ffff]
[    3.686560] pci 0000:01:00.0: BAR 0: assigned [mem 0x21000000-0x21ffffff 64bit pref]
[    3.694393] pci 0000:01:00.0: BAR 2: assigned [mem 0x20200000-0x20207fff]
[    3.701231] pci 0000:00:00.0: PCI bridge to [bus 01]
[    3.706217] pci 0000:00:00.0:   bridge window [mem 0x20200000-0x202fffff]
[    3.713043] pci 0000:00:00.0:   bridge window [mem 0x21000000-0x21ffffff pref]

The log of spci -v :

00:00.0 Class 0604: Device 104c:8888 (rev 01)
        Flags: bus master, fast devsel, latency 0
        Memory at 20100000 (32-bit, non-prefetchable)
 [Result]  flg:537919488  pciaddr_t a : 0x20100000
 [size=1M]
        Memory at 20020000 (32-bit, non-prefetchable)
 [Result]  flg:537001984  pciaddr_t a : 0x20020000
 [size=64K]
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        Memory behind bridge: 20200000-202fffff
        Prefetchable memory behind bridge: 21000000-21ffffff
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Root Port (Slot-), MSI 00
        Capabilities: [100] Advanced Error Reporting

01:00.0 Class 0580: Device 10ee:7024
        Subsystem: Device 10ee:0007
        Flags: bus master, fast devsel, latency 0, IRQ 215
        Memory at 21000000 (64-bit, prefetchable)
 [Result]  flg:553648140  pciaddr_t a : 0x21000000
 [size=16M]
        Memory at 20200000 (32-bit, non-prefetchable)
 [Result]  flg:538968064  pciaddr_t a : 0x20200000
 [size=32K]
        Capabilities: [40] Power Management version 3
        Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Device Serial Number 00-00-00-01-01-00-0a-35
        Kernel driver in use: E5PCIeDriver

Thanks.
Rgds

Shine

  • Shine, 

    It seems the link training was successful. Could you confirm if you verified MMU configuration in Andriod is all good?

    Also can you send the same booklog and lspci output from the old kernel?

    thanks

    Jian

  • Hi Jian,

    Thanks for your support. 

    Which MMU registers need to be confirmed? Customer used the default config tisdk_am57xx-evm-android_defconfig, he didn't modify MMU code. Is there some MMU different between new kernel and old kernel? 

    Below is the old kernel log:

    <6>[    2.932298] ehci-pci: EHCI PCI platform driver
    <7>[    3.661943] of_get_named_gpiod_flags: can't parse gpios property of node '/ocp/axi@0/pcie@51000000[0]'
    <6>[    3.682120] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
    <6>[    3.688457] pci_bus 0000:00: root bus resource [io  0x1000-0x10000]
    <6>[    3.694770] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
    <6>[    3.701728] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
    <7>[    3.709774] pci 0000:00:00.0: [104c:8888] type 01 class 0x060400
    <7>[    3.709799] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
    <7>[    3.709815] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
    <7>[    3.709866] pci 0000:00:00.0: supports D1
    <7>[    3.709875] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
    <7>[    3.716246] pci 0000:01:00.0: [10ee:7024] type 00 class 0x058000
    <7>[    3.716296] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00ffffff 64bit pref]
    <7>[    3.716322] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00007fff]
    <7>[    3.716477] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot
    <7>[    3.723078] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
    <7>[    3.723093] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
    <6>[    3.723251] pci 0000:00:00.0: BAR 9: assigned [mem 0x21000000-0x21ffffff pref]
    <6>[    3.737254] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff]
    <6>[    3.744094] pci 0000:00:00.0: BAR 8: assigned [mem 0x20200000-0x202fffff]
    <6>[    3.750954] pci 0000:00:00.0: BAR 1: assigned [mem 0x20020000-0x2002ffff]
    <6>[    3.757871] pci 0000:01:00.0: BAR 0: assigned [mem 0x21000000-0x21ffffff 64bit pref]
    <6>[    3.765690] pci 0000:01:00.0: BAR 2: assigned [mem 0x20200000-0x20207fff]
    <6>[    3.772548] pci 0000:00:00.0: PCI bridge to [bus 01]
    <6>[    3.777633] pci 0000:00:00.0:   bridge window [mem 0x20200000-0x202fffff]
    <6>[    3.784471] pci 0000:00:00.0:   bridge window [mem 0x21000000-0x21ffffff pref]
    <6>[    3.791749] pci 0000:00:00.0: PCI bridge to [bus 01]
    <6>[    3.796754] pci 0000:00:00.0:   bridge window [mem 0x20200000-0x202fffff]
    <6>[    3.803587] pci 0000:00:00.0:   bridge window [mem 0x21000000-0x21ffffff pref]
    <7>[    3.810905] pci_bus 0000:00: resource 4 [io  0x1000-0x10000]
    <7>[    3.810915] pci_bus 0000:00: resource 5 [mem 0x20013000-0x2fffffff]
    <7>[    3.810924] pci_bus 0000:01: resource 1 [mem 0x20200000-0x202fffff]
    <7>[    3.810933] pci_bus 0000:01: resource 2 [mem 0x21000000-0x21ffffff pref]
    <4>[    6.488161] probe (dev = 0xd29b0400, pci_id = 0xbf00220c)

    lspci -v

    00:00.0 Class 0604: Device 104c:8888 (rev 01)
        Flags: bus master, fast devsel, latency 0
        Memory at 20100000 (32-bit, non-prefetchable)
     [Result]  flg:537919488  pciaddr_t a : 0x20100000
     [size=1M]
        Memory at 20020000 (32-bit, non-prefetchable)
     [Result]  flg:537001984  pciaddr_t a : 0x20020000
     [size=64K]
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        Memory behind bridge: 20200000-202fffff
        Prefetchable memory behind bridge: 21000000-21ffffff
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Root Port (Slot-), MSI 00
        Capabilities: [100] Advanced Error Reporting

    01:00.0 Class 0580: Device 10ee:7024
        Subsystem: Device 10ee:0007
        Flags: bus master, fast devsel, latency 0, IRQ 429
        Memory at 21000000 (64-bit, prefetchable)
     [Result]  flg:553648140  pciaddr_t a : 0x21000000
     [size=16M]
        Memory at 20200000 (32-bit, non-prefetchable)
     [Result]  flg:538968064  pciaddr_t a : 0x20200000
     [size=32K]
        Capabilities: [40] Power Management version 3
        Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Device Serial Number 00-00-00-01-01-00-0a-35
        Kernel driver in use: E5PCIeDriver

    Thanks.
    Rgds
    Shine

  • Hi Jian,

    I check the MMU registers and I can't find any different between old kernel and new one.

    But I find some different in PCIECTRL_PL_IATU* registers above:

    kernel 3.14:

    registers name (address)                          |             value

    PCIECTRL_PL_IATU_INDEX(0x51000900)    0x00000000

    PCIECTRL_PL_IATU_REG_CTRL_1(0x51000904)    0x00000000

    PCIECTRL_PL_IATU_REG_LOWER_BASE(0x5100090C)    0x00013000

    PCIECTRL_PL_IATU_REG_LOWER_LIMIT(0x51000914)    0x0FFFFFFF

    PCIECTRL_PL_IATU_REG_LOWER_TARGET(0x51000918)     0x20013000

    kernel 4.19:

    PCIECTRL_PL_IATU_INDEX(0x51000900)    0x00000001

    PCIECTRL_PL_IATU_REG_CTRL_1(0x51000904)    0x00000002

    PCIECTRL_PL_IATU_REG_LOWER_BASE(0x5100090C)    0x00003000

    PCIECTRL_PL_IATU_REG_LOWER_LIMIT(0x51000914)    0x00012FFF

    PCIECTRL_PL_IATU_REG_LOWER_TARGET(0x51000918)     0x00001000

    why they are different? Is it a possible reasons of my question?