TI中文支持网
TI专业的中文技术问题搜集分享网站

AM5728: PCIe 连接FPGA问题

Part Number:AM5728

SDK版本:ti-processor-sdk-android-am57xx-evm-06.03.00.106

内核:4.19

自己的am5728板卡,通过PCIe连接FPGA。该PCI设备在之前的SDK (3.14内核版本),是可以正常使用的。

目前想升级到4.19内核,无法正常使用。

启动可以看到PCI设备信息,但是读BAR0的时候报错:

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)

并且读回来的都是0xffff ffff。

pci有关的启动信息如下:

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]

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 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

Ximeng Du:

补充一下:AM5728是作为RC模式使用的

,

Shine:

请问之前的可以运行的SDK也是基于android系统的吗?具体SDK版本号是多少?

下面是两个L3 error的帖子,看一下是否有帮助。https://e2e.ti.com/support/processors-group/processors/f/processors-forum/717108/linux-am5728-omap_l3_noc-errorhttps://e2e.ti.com/support/processors-group/processors/f/processors-forum/475372/am4376-with-omap-l3-error

,

Ximeng Du:

是的,是基于Android系统的,SDK版本较早, android5.1.1+linux3.14 ,具体SDK号忘记了。

看了相关的帖子,好像跟我遇到的情况还都不太一样,现在不确定是PCIe配置的问题,还是L3时钟那块配置的不对?

,

Shine:

link training看上去成功了,请确认一下MMU配置是否正确?另外,是否能把旧版本的booklog和lspci的输出结果发一下?

,

Ximeng Du:

MMU这边应该重点关注那些寄存器?我这边用新内核tisdk_am57xx-evm-android_defconfig默认配置的,MMU部分没有更改。新旧内核对于这部分的默认配置是否有啥改动?

旧版本的日志如下:

<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 Reporting01: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

,

Shine:

我把您的问题升级给e2e 负责android工程师,请关注下面帖子的回复。https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1032857/am5728-pcie-can-t-work-after-upgrading-to-new-kernel

,

Ximeng Du:

好的,谢谢。

还有个问题,我自己注册的e2e账号是不是没办法直接在上面回复?

,

Shine:

如果是用公司邮箱注册的话,可以在e2e上发帖或者回复。如果是qq, 学校等免费邮箱的话,不能发帖。

赞(0)
未经允许不得转载:TI中文支持网 » AM5728: PCIe 连接FPGA问题
分享到: 更多 (0)