Re: [PATCH 0/5] Add PCIe and its clock support for mt7622

On Mon, 2020-08-10 at 18:47 +0800, Henry Yen wrote:
Chuanjia Liu schrieb am 10.08.20 um 10:17:
This series patchs add PCIe/clock support for MT7622
change node:
v1:add PCIe support for MT7622
Chuanjia Liu (5):
clk: mediatek: add pciesys support for MT7622 SoC
arm: dts: mediatek: add pciesys support for MT7622 SoC
PCI: mediatek: Add PCIe support for MT7622
arm: dts: mediatek: add PCIe node for MT7622
configs: mt7622: add PCIe controller related configs
Hi,
Tested on bananapi-r64 with an mt7612 in slot cn8 and compex wle900vx in cn25.
BPI-R64> pci enum
PCI: Failed autoconfig bar 10
PCI: Failed autoconfig bar 10
BPI-R64> pci 0
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
00.00.00 0x14c3 0x3258 Bridge device 0x04
00.01.00 0x14c3 0x3258 Bridge device 0x04
BPI-R64> pci 1
Scanning PCI devices on bus 1
BusDevFun VendorId DeviceId Device Class Sub-Class
01.00.00 0x168c 0x003c Network controller 0x80
BPI-R64>
if i swap the cards
BPI-R64> pci enum
Port1 link down
PCI: Failed autoconfig bar 10
BPI-R64> pci 0
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
00.00.00 0x14c3 0x3258 Bridge device 0x04
BPI-R64> pci 1
Scanning PCI devices on bus 1
BusDevFun VendorId DeviceId Device Class Sub-Class
01.00.00 0x14c3 0x7612 Network controller 0x80
BPI-R64>
note that there are pcie-HW-issues on my boards revision(power limitation and missing capacitors on tx-lines) which may cause the different Pcie-Ids for mt7612 and the class of the compex-card. sorry had not seen this before on tests with Steven
maybe anyone can test the Patches with a fixed board.
regards Frank
Hi Frank,
We've verified the patchset on a fixed board.
The result shows that no matter how I swap the cards, it all works fine :)
Here are the logs:
========================================= MT7622> pci enum PCI: Failed autoconfig bar 10 PCI: Failed autoconfig bar 10 MT7622> pci 0 Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 00.00.00 0x14c3 0x3258 Bridge device 0x04 00.01.00 0x14c3 0x3258 Bridge device 0x04 MT7622> pci 1 Scanning PCI devices on bus 1 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 01.00.00 0x14c3 0x7603 Network controller 0x80 MT7622> pci 2 Scanning PCI devices on bus 2 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 02.00.00 0x14c3 0x7662 Network controller 0x80
---------------------------------------
MT7622> pci enum PCI: Failed autoconfig bar 10 PCI: Failed autoconfig bar 10 MT7622> pci 0 Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 00.00.00 0x14c3 0x3258 Bridge device 0x04 00.01.00 0x14c3 0x3258 Bridge device 0x04 MT7622> pci 1 Scanning PCI devices on bus 1 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 01.00.00 0x14c3 0x7662 Network controller 0x80 MT7622> pci 2 Scanning PCI devices on bus 2 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 02.00.00 0x14c3 0x7603 Network controller 0x80
=========================================
Thanks !
Sincerely, Henry

Hi Henry,
thanks for checking it...as i said i guess my behaviour is caused by known HW-issue with my R64 v1.1. Fullsize card (gen2?) not recognized in CN8.
Gesendet: Donnerstag, 13. August 2020 um 14:53 Uhr Von: "Henry Yen" henry.yen@mediatek.com
We've verified the patchset on a fixed board.
The result shows that no matter how I swap the cards, it all works fine :)
Here are the logs:
========================================= MT7622> pci enum PCI: Failed autoconfig bar 10 PCI: Failed autoconfig bar 10 MT7622> pci 0 Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 00.00.00 0x14c3 0x3258 Bridge device 0x04 00.01.00 0x14c3 0x3258 Bridge device 0x04 MT7622> pci 1 Scanning PCI devices on bus 1 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 01.00.00 0x14c3 0x7603 Network controller 0x80 MT7622> pci 2 Scanning PCI devices on bus 2 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 02.00.00 0x14c3 0x7662 Network controller 0x80
MT7622> pci enum PCI: Failed autoconfig bar 10 PCI: Failed autoconfig bar 10 MT7622> pci 0 Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 00.00.00 0x14c3 0x3258 Bridge device 0x04 00.01.00 0x14c3 0x3258 Bridge device 0x04 MT7622> pci 1 Scanning PCI devices on bus 1 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 01.00.00 0x14c3 0x7662 Network controller 0x80 MT7622> pci 2 Scanning PCI devices on bus 2 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 02.00.00 0x14c3 0x7603 Network controller 0x80
=========================================
in your logs i see you query also pci 2 (i had only tested 0+1), so i did it again
compex (fullsize) in front slot (cn25) and mt7612 (halfsize) in rear slot (cn8):
BPI-R64> pci enum PCI: Failed autoconfig bar 10 PCI: Failed autoconfig bar 10 BPI-R64> pci 0 Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 00.00.00 0x14c3 0x3258 Bridge device 0x04 00.01.00 0x14c3 0x3258 Bridge device 0x04 BPI-R64> pci 1 Scanning PCI devices on bus 1 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 01.00.00 0x168c 0x003c Network controller 0x80 BPI-R64> pci 2 Scanning PCI devices on bus 2 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 02.00.00 0x14c3 0x7612 Network controller 0x80 BPI-R64>
and swapped:
BPI-R64> pci enum Port1 link down PCI: Failed autoconfig bar 10 BPI-R64> pci 0 Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 00.00.00 0x14c3 0x3258 Bridge device 0x04 BPI-R64> pci 1 Scanning PCI devices on bus 1 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 01.00.00 0x14c3 0x7612 Network controller 0x80 BPI-R64> pci 2 No such bus BPI-R64>
afair compex-card was only recognized in front-slot, so same behaviour in uboot...
so first state in linux (5.8 with disabled sata):
root@bpi-r64:~# lspci 0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 3258 0000:01:00.0 Network controller: Qualcomm Atheros QCA986x/988x 802.11ac Wirelesr 0001:00:01.0 PCI bridge: MEDIATEK Corp. Device 3258 0001:01:00.0 Network controller: MEDIATEK Corp. Device 7612
poweroff and swap cards
root@bpi-r64:~# lspci 00:00.0 PCI bridge: MEDIATEK Corp. Device 3258 01:00.0 Network controller: MEDIATEK Corp. Device 7612 root@bpi-r64:~#
i guess this is caused by known HW-Issues on R64 <=1.1 (power-limit / missing capacitors) and no driver-problem in uboot...
i have a additional half-size-card (intel wifi) but no extender to mount it so i replaced compex and pressed it down in cn8 with a remote control ;)
BPI-R64> pci 0 Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 00.00.00 0x14c3 0x3258 Bridge device 0x04 00.01.00 0x14c3 0x3258 Bridge device 0x04 BPI-R64> pci 1 Scanning PCI devices on bus 1 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 01.00.00 0x14c3 0x7612 Network controller 0x80 BPI-R64> pci 2 Scanning PCI devices on bus 2 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 02.00.00 0x8086 0x4238 Network controller 0x80 BPI-R64>
and it is recognized :) in linux it looks like this:
root@bpi-r64:~# lspci 0000:00:00.0 PCI bridge: MEDIATEK Corp. Device 3258 0000:01:00.0 Network controller: MEDIATEK Corp. Device 7612 0001:00:01.0 PCI bridge: MEDIATEK Corp. Device 3258 0001:01:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (re) root@bpi-r64:~#
i hope it get merged as soon as possible because it is the base for my Patches ;)
Tested-By: Frank Wunderlich frank-w@public-files.de
Regards Frank
participants (2)
-
Frank Wunderlich
-
Henry Yen