Banana PI R2 - MT7623 - Issue with PCIE2 slot

Hi.

Using an MT7623 SOC Banana Pi R2 based board with Openwrt 18.06 (Kernel 4.14) Ported.

I have seen that the PCI card that I use works well if connected to PCIE0 and PCIE1 I want to use PCIE2 slot for my tests , in which a 60G PCI WiFi Card is used. But the kernel BOOT hangs completely which trying to enumerate the devices connected on PCIE2. I understand that PCIE2 is multiplexed with USB(U3PHY2). I have made changes to dts file to use the slot as PCIE2.

      I have tried enumerating another WiFi Card on the same PCIE2 slot (Qualcomm) , which works well on PCIE2 slot.

The difference with the Qualcomm card and 60G card I use is the PCI device enumeration part where Qualcomm card is enumerated as Single Device, whereas 60G card enumerates with different tree stucture ( Bridges,Switch and Device).

The KERNEL BOOT always hangs at same point while my device is connected to PCIE2. Am I missing some other configurations,may be in the dts file or something, i am attaching the same here.

        Anyone can help,it would be great .

Regards

Sreekanth R.Vmt7623n-bananapi-bpi-r2.dts (11.0 KB)

Where do you have 3 pcie-slots? My board has only one. Imho pcie1 is used by sata and pcie2 by usb3

Hi

Attached is the Front and Back side Image of Board.

PCIE2 is currently configured in DTS file instead of USB3 functionality

Thanks & Regards

Sreekanth

Where did you get this board? It’s no bpi-r2…but maybe a mt7623 based one

btw. your mt7623.dtsi will be interesting if you change role of pcie-port

This appears to be based on MT7623A instead on MT7623N as BananaPi-R2 and it’s called AP7623-A02

afair A and N differs only in integration of mt7530 switch (in a series) where N series need it externally

but it seems Sreekanth only changed dts and adding a 3rd port…but it needs to be defined in mt7623.dtsi and also additional phy (or changed USB3-phy)

Yes it’s not banana pi R2 .it’s a board from asiaRF team based on mt7623. What I would like to know is about PCIE2 which should be common for both this boardand banana pi… Connecting a 60G wifi Card on PCIE2 is causing the Kernel to HANG is something weird that we see. So would like to know if some config is being missed out in PCIE2.

We are using Openwrt 18.06 based build system

Regards Sreekanth

Please share your mt7623.dtsi

hi

Attached is the mt7623.dtsi we use…

Regards Sreekanthmt7623.dtsi (23.8 KB)

I don’t think you can use u3phy as pcie and bind to xhci driver

<&u3port1 PHY_TYPE_PCIE>;

usb2: usb@1a240000 {
	compatible = "mediatek,mt7623-xhci",
	phys = <&u2port1 PHY_TYPE_USB2>, <&u3port1 PHY_TYPE_USB3>;

u3port1: usb-phy@1a244900 {

Hi,

Can you just elaborate on this?

Because we have not enabled the “usb2” section in the “dts” file we use . Using “hifsys” config u3port1 is enabled as PCIE2.

This is the configuration in “dts” file

usb2 is not used (commented out)

/* &usb2 { vusb33-supply = <&reg_3p3v>; vbus-supply = <&reg_5v>; status = “okay”; }; */ &u3phy1 { status = “okay”; };

&u3phy2 {

status = “okay”; mediatek,phy-switch = <&hifsys>; };

mt7623n-bananapi-bpi-r2.dts (11.3 KB)

Also WiFi card which enumerates as only SINGLE DEVICE works well

But our card enumerates as Multiple devices …

This is the “lspci” output of our 60G WiFi card connected to PCIE0

00:00.0 Class 0604: 14c3:0801

02:02.0 Class 0604: 1204:0201

02:01.0 Class 0604: 1204:0201

04:00.0 Class 0280: 1204:1965

02:00.0 Class 0604: 1204:0201

02:03.0 Class 0604: 1204:0201

01:00.0 Class 0604: 1204:0101

While connecting the same device to PCIE2, KERNEL BOOT HANGS on enumerating one of the device class and no response further… :frowning:

I have gone through the pci driver code and understood that no return from FUNCTION “pci_setup_device” in “drivers/pci/probe.c” is happening after something goes wrong while device is on PCIE2.

Attached is the boot log with the device connected on PCIE2

boot_log_mt7623.txt (9.4 KB)

Kernel Boot always hangs and MT7623A device becomes non-responsive at this point always

[ 2.360893] PCI: bus3: Fast back to back transfers enabled

Regards

Sreekanth R.V.

Hi

Any inputs on the issue?

I have detailed the issue above…

Thanks & Regards

Sreekanth R.V.

As i cannot test it by myself and do not know much details about pcie/dts i guess i cannot help further here…maybe @ryder.lee can help here

You might need to contact the team who have designed the board, as it is not necessary that it will work per an R2 schematics

This thread is for BPI-R2 and BPI-R64 only.

Thank you.