Aw: Re: Re: [PATCH v2 0/7] rockchip: rk3568: Fix use of PCIe bifurcation

Frank Wunderlich frank-w at public-files.de
Mon Oct 2 11:03:14 CEST 2023


Hi Jonas,

> Gesendet: Montag, 02. Oktober 2023 um 10:33 Uhr
> Von: "Jonas Karlman" <jonas at kwiboo.se>
> An: "Frank Wunderlich" <frank-w at public-files.de>, "Sebastian Reichel" <sebastian.reichel at collabora.com>
> Cc: "Kever Yang" <kever.yang at rock-chips.com>, "Simon Glass" <sjg at chromium.org>, "Philipp Tomsich" <philipp.tomsich at vrull.eu>, "Eugen Hristev" <eugen.hristev at collabora.com>, "Jon Lin" <jon.lin at rock-chips.com>, "FUKAUMI Naoki" <naoki at radxa.com>, "John Clark" <inindev at gmail.com>, u-boot at lists.denx.de
> Betreff: Re: Aw: Re: [PATCH v2 0/7] rockchip: rk3568: Fix use of PCIe bifurcation
>
> Hi Frank,
>
> On 2023-10-02 09:17, Frank Wunderlich wrote:
> > Hi,
> >
> >> Gesendet: Sonntag, 01. Oktober 2023 um 21:11 Uhr
> >> Von: "Sebastian Reichel" <sebastian.reichel at collabora.com>
> >> An: "Jonas Karlman" <jonas at kwiboo.se>
> >> Cc: "Kever Yang" <kever.yang at rock-chips.com>, "Simon Glass" <sjg at chromium.org>, "Philipp Tomsich" <philipp.tomsich at vrull.eu>, "Eugen Hristev" <eugen.hristev at collabora.com>, "Jon Lin" <jon.lin at rock-chips.com>, "FUKAUMI Naoki" <naoki at radxa.com>, "John Clark" <inindev at gmail.com>, u-boot at lists.denx.de
> >> Betreff: Re: [PATCH v2 0/7] rockchip: rk3568: Fix use of PCIe bifurcation
> >>
> >> Hi,
> >>
> >> On Wed, Sep 27, 2023 at 06:07:59PM +0000, Jonas Karlman wrote:
> >>> Above works with this series in U-Boot and also in mainline linux. Not
> >>> sure the RK3588 bifurcation part of driver have been verified on real HW,
> >>> rk3588 boards available for testing have typicality not used bifurcation.
> >>
> >> Upstream kernel bifurcation code looks ok to me. It's quite different
> >> from Rockchip vendor implementation, which might have confused Kever.
> >> I also missed this when having a quick look initially. As you said
> >> Rock 5A, Rock 5B and EVB1 do not use bifurcation, so no testing happened
> >> on our side.
> >
> > my Bananapi R2Pro (rk3568) uses bifurcation and it is working in mainline Linux, but not yet in uboot.
>
> The issue on your Bananapi R2Pro is most likely not related to the
> pcie bifurcation code added in this series.
>
> The coded added in this series works same/very similar as on mainline
> linux and fixes bifurcation use on devices such as Radxa E25 and NanoPi
> R5C/R5S.
>
> Please clarify if pcie work in mainline linux when booting with mainline
> u-boot, or does it only work when booting with vendor u-boot? (in case
> vendor u-boot set different/default pinconf).
>
> >
> > posted my test-results here:
> > https://patchwork.ozlabs.org/project/uboot/patch/20230918173624.31464-1-linux@fw-web.de/#3183519
>
> From your pci enum command I only see an expected pcie at fe270000 (ngff)
> link fail. Does it also print out link fail for pcie at fe280000 (minipcie)?

good catch, you're right, no message of mpcie, only ngff (no card)

#initial status (before enabling pcie-related regulators)
BPI-R2PRO> regulator status
Name                 Enabled            uV         mA Mode       Status
vdd_logic            enabled        900000          - -          0
vdd_gpu              enabled        900000          - -          0
vcc_ddr              enabled        500000          - -          0
vdd_npu              disabled       500000          - -          0
vcc_1v8              enabled       1800000          - -          0
vdda0v9_image        enabled        900000          - -          0
vdda_0v9             enabled        900000          - -          0
vdda0v9_pmu          enabled        900000          - -          0
vccio_acodec         enabled       3300000          - -          0
vccio_sd             enabled       3300000          - -          0
vcc3v3_pmu           enabled       3300000          - -          0
vcca_1v8             enabled       1800000          - -          0
vcca1v8_pmu          enabled       1800000          - -          0
vcca1v8_image        enabled       1800000          - -          0
vcc_3v3              enabled             0          - -          0
vcc3v3_sd            enabled             0          - -          0
dc_12v               enabled      12000000          - -          0
vcc3v3_sys           enabled       3300000          - -          0
vcc5v0_sys           enabled       5000000          - -          0
pcie30_avdd0v9       enabled        900000          - -          0
pcie30_avdd1v8       enabled       1800000          - -          0
vcc3v3_pcie          disabled      3300000          - -          0
vcc3v3_minipcie      disabled      3300000          - -          0
vcc3v3_ngff          disabled      3300000          - -          0
vcc5v0_usb           enabled       5000000          - -          0
vcc5v0_usb_host      disabled      5000000          - -          0
vcc5v0_usb_otg       disabled      5000000          - -          0
BPI-R2PRO> regulator dev vcc3v3_pcie
dev: vcc3v3_pcie @ vcc3v3-pi6c-05-regulator
BPI-R2PRO> regulator enable
BPI-R2PRO> regulator status
Regulator vcc3v3_pcie status:
 * enable:         1 (true)
 * value uV:       3300000
 * current uA:     No data available (err: -61)
 * mode id:        Function not implemented (err: -38)
BPI-R2PRO> regulator dev vcc3v3_minipcie
dev: vcc3v3_minipcie @ vcc3v3-minipcie-regulator
BPI-R2PRO> regulator status
Regulator vcc3v3_minipcie status:
 * enable:         0 (false)
 * value uV:       3300000
 * current uA:     No data available (err: -61)
 * mode id:        Function not implemented (err: -38)
BPI-R2PRO> regulator enable
BPI-R2PRO> regulator status
Regulator vcc3v3_minipcie status:
 * enable:         1 (true)
 * value uV:       3300000
 * current uA:     No data available (err: -61)
 * mode id:        Function not implemented (err: -38)

BPI-R2PRO> pci enum
pcie_dw_rockchip pcie at fe270000: PCIe-0 Link Fail
BPI-R2PRO> pci 1
Scanning PCI devices on bus 1
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
01.00.00   0x1d87     0x3566     Bridge device           0x04
BPI-R2PRO> pci 2
Scanning PCI devices on bus 2
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
02.00.00   0x14c3     0x7612     Network controller      0x80

so mpcie slot works so far as it detects the network-card (mt7612),
only need to find a way to enable the regulators (vcc3v3_pcie, vcc3v3_minipcie, vcc3v3_ngff).

btw. is there a way to show overall status (like the first regulator status) after enabling
the regulators (only shows current regulator)?

> If not, try running "pci 1" and "pci 2" after an initial "pci enum" to
> see if the root complex and your minipcie device is detected.

sorry for confusion, have not done much with pcie in uboot yet.
so you can add my tested by

Tested-by: Frank Wunderlich <frank-w at public-files.de>

Thank you very much for your work.

regards Frank


More information about the U-Boot mailing list