LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux PCI enumeration issue (https://www.linuxquestions.org/questions/linux-networking-3/linux-pci-enumeration-issue-4175633685/)

ghhbak 07-10-2018 04:52 AM

Linux PCI enumeration issue
 
Hi folks,

I'm working on a new target board and slowly bringing up U-boot and Linux on it. I'm using OpenWRT version 15.05 (kernel version is 3.18.23). First I did some of my code development on a reference board. Now I have switched to my target board to complete the bring up.

I'm facing a problem with detecting mini PCIe devices on my target board. This issue is not seen on the reference board. Here are the logs from both taken after Linux boot up is completed.

Reference board
---------------
root@OpenWrt:/# dmesg | grep pci
pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
pci_bus 0000:00: root bus resource [io 0x0000]
pci 0000:00:00.0: [168c:003c] type 0 class 0x000280
pci 0000:00:00.0: invalid calibration data
pci 0000:00:00.0: reg 10: [mem 0x00000000-0x001fffff 64bit]
pci 0000:00:00.0: reg 30: [mem 0x00000000-0x0000ffff pref]
pci 0000:00:00.0: supports D1 D2
pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64bit]
pci 0000:00:00.0: BAR 6: assigned [mem 0x10200000-0x1020ffff pref]
pci 0000:00:00.0: using irq 40 for pin 1
root@OpenWrt:/#
root@OpenWrt:/# dmesg | grep PCI
registering PCI controller with io_map_base unset
PCI host bridge to bus 0000:00
PCI: CLS 0 bytes, default 32
root@OpenWrt:/#

On the target board:
-------------------
root@:~# dmesg | grep pci
ar724x-pci ar724x-pci: PCIe link is down
pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
pci_bus 0000:00: root bus resource [io 0x0000]
pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
Modules linked in: ath9k ath9k_common crc_ccitt ath9k_hw ath10k_pci ath10k_core ath mac80211 cfg80211 compat ledtrig_usbdev ledtrig_oneshot arc4 crypto_blkcipher ohci_platform ohci_hcd ehci_platform ehci_hcd gpio_bue

root@:~# dmesg | grep PCI
ar724x-pci ar724x-pci: PCIe link is down
registering PCI controller with io_map_base unset
PCI host bridge to bus 0000:00
PCI: CLS 0 bytes, default 32

What I have tried so far to debug:
---------------------------------
1) Looked at any potential code changes in PCI enumeration, found none.
2) Tried many patches found online related to ar-724x and PCI/PCIe, none worked.
3) Ensured the power is correctly supplied to the mini PCIe card on the target board, and that voltage readings are correct.

Has anyone faced a similar issue? Any tips?

ghhbak 07-13-2018 03:13 AM

I finally managed to figure it out and I'm putting the solution here in case someone hits this in the future. #define CONFIG_PCI 1 was required in my U-boot configuration for this target board.

GektorUA 03-23-2019 05:11 PM

I have the same problem with equal board on AR9334 (Compex WPJ344), working about this problem a week and nothing helpsm PCIe cards did not detect.
How did you fix this? Did you rebuild and flash u-boot?


All times are GMT -5. The time now is 09:39 PM.