[BPI-R2] Uboot - pcie/sata/ahci + USB

Just created a new thread because the original Uboot-thread got to big…

currently working on https://github.com/frank-w/u-boot/commits/sata_test_ryder

last state: needs phy-driver ( Add latest U-boot support for BPI R2 & BPI R64 (not yet) )

added now a basic template…needs to be filled :slight_smile: : https://github.com/frank-w/u-boot/commit/ba0c145cc1d739c07ff440dc2b01d8387ab4e4a8

this is the one on linux: https://github.com/torvalds/linux/blob/master/drivers/phy/mediatek/phy-mtk-tphy.c

pcie-driver in uboot (current state): https://github.com/frank-w/u-boot/blob/sata_test_ryder/drivers/pci/pcie_mediatek.c

@ryder.lee first problem, how can i trigger the tphy-driver? it is compiled in, but not called on pci enum

1 Like

phy drivers should be attached by OFW/FDT code.

PCI-E driver should find them by FDT xref from “phys” property.

1 Like

arch/arm/dts/mt7623n-bananapi-bpi-r2.dtb: Warning (phys_property): /pcie-controller@1a140000: Missing property '#phy-cells' in node /pcie-phy@1a14a000 or bad phandle (referred from phys[1])

tried to add phys here in pcie-node (not the phy):

285         phys = <&pcie0_phy>,
286                <&pcie1_phy>;

ok, got it…had added phy-cells only to one phy :smiley:

seems to work so far:

DEBUG: probing TPHY mtk_phy_probe 32

have to go now…maybe you can try to get further? @ray

Me giving hints and writing mt7530 init for second port :slight_smile:

your phandle is wrong. I will take care of phy driver these days.

Have not uploaded last state (had to hurry)…it’s defined like above…with #PHY-CELLS=0 in both phy-nodes

have now pushed current state (where phy-probe gets called)

sent Patch-Series out: https://patchwork.ozlabs.org/project/uboot/list/?series=123226

1 Like

What’s the current status?

Still waiting for apply…seema like uboot-master is currently only for bugfixes till release and new code is included in next mergewindow

Maybe you should gentle ping?

https://lists.denx.de/pipermail/u-boot/2019-October/385126.html

Patches for pcie/ahci are merged now for 2020.01

@ray have you uploaded usb-code anywhere?

1 Like

Cool! Finally :slight_smile:

@ray have you uploaded usb-code anywhere?

Don’t even start it yet :slight_smile:

Too busy currently.

Great news. But we’re still waiting for @sinovoip to fix current situation with preloaders…