Bug 217100 - Bifurcation between pcie3x1 & pcie3x2 doesn't work in RK3568J.
Summary: Bifurcation between pcie3x1 & pcie3x2 doesn't work in RK3568J.
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCI (show other bugs)
Hardware: ARM Linux
: P1 normal
Assignee: drivers_pci@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-28 08:53 UTC by Anton
Modified: 2023-02-28 08:53 UTC (History)
0 users

See Also:
Kernel Version: 6.2
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Anton 2023-02-28 08:53:50 UTC
Hello.

First, I want to say that pcie3x1 crashes if started before pcie3x2 . Driver
> pcie-designware.c 

in function 

> void dw_pcie_version_detect(struct dw_pcie *pci)

tries to read parameter from dbi register (PCIE_VERSION_NUMBER) and fails on it.
So I changed sequence of declaration PCIE in rk3568.dtsi: first - pcie3x2 next pcie3x1. Now Linux first starts pcie3x2, then successfully starts pcie3x1.

But main problem is that bifurcation in phy driver 
> phy-rockchip-snps-pcie3.c 

doesn't work. I tried add next lines in function

> static int rockchip_p3phy_probe(struct platform_device *pdev)

right after block check

> if (priv->num_lanes == -EINVAL) {
> }

> priv->num_lanes = 2;
> priv->lanes[0] = 1;
> priv->lanes[1] = 2

And driver writes during Linux boot process that bifurcation is enabled, but

lspci

does't show second device.

Best regards,
Anton.

Note You need to log in before you can comment on or make changes to this bug.