pci-E ubuntu server issues (google coral)

I tried to connect a PCI-e sound card through an adapter. Kernel 4.9 produces a similar error in the logs. But on the mainline kernel (5.5 rc2), the sound card was determined. Apparently, you still need to backport the latest changes related to PCI-e.

@numbqq

Any update on this? Did you have a luck to get Coral M2 module to test it out?

Thanks

1 Like

I just checked, I will try to buy one and feedback here.

I made ubuntu 20.04 image with fenix with mainline linux
uname -a
Linux Khadas 5.6.0
cat /sys/class/mcu/usb_pcie_switch_mode
1
so it looks like I have pci-e mode

but
lspci -vvv
is empty and I don’t see any host bridge
and no sign of meson pci-e in dmesg
any idea?

I would like to connect pci-e dvb-t tunner

btw
http://lists.infradead.org/pipermail/linux-amlogic/2020-May/016641.html

Any progress on connecting coral M2 card to VIM3/L pcie slot?

Any updates on VIM3x and the Coral module? @numbqq

I just bought your VIM3L and tried on VIM3L_Ubuntu-server-focal_Linux-5.7-rc7_arm64_SD-USB_V0.9-20200530 : after installing the B+M module and the Coral driver lspci reports nothing, nothing relevant in dmesg.

I still have no luck to make it work…

Thanks @numbqq for the update.

So you have the Coral M.2 B+M module purchased but you can’t make it work with VIM3x? Have you tried it with your other Khadas boards, especially the ones without built-in NPU, like Edge-V?

What power supply are you using? In my case, once I connect the M.2 module, install the driver and restart, my VIM3L doesn’t boot - I may have to try a beefier power supply (say 12V 5A) as the TPU module specs list current demand up to 3A.

After toggling USB 3.0 -> PCIe I see this in dmesg:

[    1.359614] ehci-pci: EHCI PCI platform driver
[    1.375263] ohci-pci: OHCI PCI platform driver
[    2.277208] dw-pcie fc000000.pcie: IRQ index 1 not found
[    2.282201] meson-pcie fc000000.pcie: host bridge /soc/pcie@fc000000 ranges:
[    2.286951] meson-pcie fc000000.pcie:       IO 0x00fc600000..0x00fc6fffff -> 0x0000000000
[    2.295051] meson-pcie fc000000.pcie:      MEM 0x00fc700000..0x00fdffffff -> 0x00fc700000
[    2.344942] meson-pcie fc000000.pcie: error: wait linkup timeout
[    2.495823] meson-pcie fc000000.pcie: error: wait linkup timeout
[    2.675384] meson-pcie fc000000.pcie: error: wait linkup timeout
[    2.850951] meson-pcie fc000000.pcie: error: wait linkup timeout
[    3.038993] meson-pcie fc000000.pcie: error: wait linkup timeout
[    3.220952] meson-pcie fc000000.pcie: error: wait linkup timeout
[    3.376090] meson-pcie fc000000.pcie: error: wait linkup timeout
[    3.540306] meson-pcie fc000000.pcie: error: wait linkup timeout
[    3.724689] meson-pcie fc000000.pcie: error: wait linkup timeout
[    3.900952] meson-pcie fc000000.pcie: error: wait linkup timeout
[    4.006469] meson-pcie fc000000.pcie: Phy link never came up
[    4.019777] meson-pcie fc000000.pcie: failed to initialize host
[    4.033097] meson-pcie fc000000.pcie: Add PCIe port failed, -110
$ uname -a
Linux Khadas 5.7.0-rc7 #0.9 SMP Sat May 30 14:37:25 CST 2020 aarch64 aarch64 aarch64 GNU/Linux

Someone reported on another forum that this -110 error had gone away with fixes in 5.8.x, can we count on updated Khadas images soon?

Same issue and syslog as OP on my VIM3L with Linux Khadas 4.9.241 #8 SMP and Coral TPU B+M. Using 12V 6A supply through the VIN connector.

lspci -x
(no output)
sudo dmesg | grep pci
[    0.557199] amlogic-pcie-v2 fc000000.pcieA: amlogic_pcie_probe!
[    0.559858] OF: PCI: host bridge /pcieA@fc000000 ranges:
[    0.561072] amlogic-pcie-v2 fc000000.pcieA: Set the RC Bus Master, Memory Space and I/O Space enables.
[    0.561107] amlogic-pcie-v2 fc000000.pcieA: normal gpio
[    0.561155] amlogic-pcie-v2 fc000000.pcieA: GPIO normal: amlogic_pcie_assert_reset
[    0.647563] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    0.819902] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    0.992109] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.164412] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.336667] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.508941] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.681217] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.853500] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    2.025769] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    2.198047] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    2.288849] amlogic-pcie-v2 fc000000.pcieA: phy link never came up
[    2.289047] amlogic-pcie-v2 fc000000.pcieA: PCI host bridge to bus 0000:00
[    2.289081] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.289105] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    2.289129] pci_bus 0000:00: root bus resource [mem 0xfc700000-0xfdffffff]
[    2.289184] amlogic-pcie-v2 fc000000.pcieA: link timeout, disable PCIE PLL
[    2.289215] amlogic-pcie-v2 fc000000.pcieA: power down pcie phy
[    2.608198] ehci-pci: EHCI PCI platform driver
[    2.608328] ohci-pci: OHCI PCI platform driver
[    5.193860] amlogic-new-usb3-v2 ffe09080.usb3phy: pci-e driver probe, disable USB 3.0 function!!!

Message pci-e driver probe, disable USB 3.0 function is perplexing, since PCIe is enabled using factory Android on eMMC.

cat /sys/class/mcu/usb_pcie_switch_mode
1

Anything else can be checked to troubleshoot this @numbqq?

@adzio Sorry, we still haven’t let TPU run on VIM3/VIM3L …

1 Like

What’s the status of this issue now? And any plan for this issue? (It lasts for almost 2 years.)
Following is the the FW running on my VIM3. PCIe Wi-Fi card inserting to M.2 slot still hit this issue.
Would you please share a working FW image (Ubuntu) that I can work as a WAR.

Thanks,

Linux Khadas 4.9.241 #20 SMP PREEMPT Fri Jun 25 14:26:34 CST 2021 aarch64 aarch64 aarch64 GNU/Linux

I am also waiting for the support.

Hi @Vignesh_Raja
We just ordered a Coral, @numbqq and @Frank will try to fix this issue once the package is delivered.

Good day!

1 Like
[    0.560623@4] amlogic-pcie-v2 fc000000.pcieA: amlogic_pcie_probe!
[    0.562892@4] OF: PCI: host bridge /pcieA@fc000000 ranges:
[    0.562923@4] OF: PCI:    IO 0xfc600000..0xfc6fffff -> 0x00000000
[    0.562946@4] OF: PCI:   MEM 0xfc700000..0xfdffffff -> 0xfc700000
[    0.563754@4] amlogic-pcie-v2 fc000000.pcieA: Set the RC Bus Master, Memory Space and I/O Space enables.
[    0.563782@4] amlogic-pcie-v2 fc000000.pcieA: normal gpio
[    0.563818@4] amlogic-pcie-v2 fc000000.pcieA: GPIO normal: amlogic_pcie_assert_reset
[    0.654539@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    0.830670@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.006825@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.182979@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.359129@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.535275@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.711428@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    1.887577@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    2.063728@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    2.239879@4] amlogic-pcie-v2 fc000000.pcieA: Error: Wait linkup timeout.
[    2.334343@4] amlogic-pcie-v2 fc000000.pcieA: phy link never came up
[    2.334479@4] amlogic-pcie-v2 fc000000.pcieA: PCI host bridge to bus 0000:00
[    2.334503@4] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.334522@4] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    2.334541@4] pci_bus 0000:00: root bus resource [mem 0xfc700000-0xfdffffff]
[    2.334581@4] amlogic-pcie-v2 fc000000.pcieA: link timeout, disable PCIE PLL
[    2.334605@4] amlogic-pcie-v2 fc000000.pcieA: power down pcie phy
[    2.334885@4] chip type:0x29

Is there any solution to this problem?

@brunovollmer @David_Zou @Vignesh_Raja Mainline kernel can use coral now. 4.9 kernel still haven’t run it.

2 Likes

@Frank I have used the Google USB Coral with the latest Ubuntu Image and all the code samples from Google Coral works within a matter of minutes. Thanks for it.

Good to hear that. Will test it on Monday with the mainline kernel!

@brunovollmer It is known that there is a bug that will make the SSD unusable, but it will not affect your testing of the coral for the time being. The test should refer to the following steps

I made a statement inside, how to use

1 Like