PCIe problem on RK3568 EVB

Doug Brewer brewer.doug at gmail.com
Wed Apr 19 21:09:51 PDT 2023


On Wed, Apr 19, 2023 at 2:38 PM Doug Brewer <brewer.doug at gmail.com> wrote:
>
> On Tue, Apr 18, 2023 at 5:22 PM Michael Riesch
> <michael.riesch at wolfvision.net> wrote:
> >
> > Hi Doug,
>
> Hi Michael,
>
> > On 4/18/23 04:19, Doug Brewer wrote:
> > > Hello,
> > >
> > > I added the following lines in rk3568-evb1-v10.dts:
> > >
> > > pcie30_avdd0v9: pcie30-avdd0v9 {
> > >        compatible = "regulator-fixed";
> > >        regulator-name = "pcie30_avdd0v9";
> > >        regulator-always-on;
> > >        regulator-boot-on;
> > >        regulator-min-microvolt = <900000>;
> > >        regulator-max-microvolt = <900000>;
> > >        vin-supply = <&vcc3v3_sys>;
> > > };
> > >
> > > pcie30_avdd1v8: pcie30-avdd1v8 {
> > >        compatible = "regulator-fixed";
> > >        regulator-name = "pcie30_avdd1v8";
> > >        regulator-always-on;
> > >        regulator-boot-on;
> > >        regulator-min-microvolt = <1800000>;
> > >        regulator-max-microvolt = <1800000>;
> > >        vin-supply = <&vcc3v3_sys>;
> > > };
> > >
> > > vcc3v3_pcie: gpio-regulator {
> > >        compatible = "regulator-fixed";
> > >        regulator-name = "vcc3v3_pcie";
> > >        regulator-min-microvolt = <3300000>;
> > >        regulator-max-microvolt = <3300000>;
> > >        enable-active-high;
> > >        gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
> > >        startup-delay-us = <5000>;
> > >        vin-supply = <&dc_12v>;
> > > };
> > >
> > > &pcie30phy {
> > >        status = "okay";
> > > };
> > >
> > > &pcie3x2 {
> > >        reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
> >
> > Shouldn't there be a pinctrl? It seems the pcie3x2 has to possible pinouts?!
> >
> > >        vpcie3v3-supply = <&vcc3v3_pcie>;
> > >        status = "okay";
> > > };
> > >
> > Maybe you can take the Radxa ROCK3 Model A as mainline reference solution.
>
> I added the following lines:
>
> &pcie3x2 {
>        pinctrl-names = "default";
>        pinctrl-0 = <&pcie30x2m1_pins>;
>        reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
>        vpcie3v3-supply = <&vcc3v3_pcie>;
>        status = "okay";
> };
>
> Same result, lspci shows nothing.
>
> > > lspci produces no output (literally nothing), even with -vvvv.
> > > Any idea how to debug this?  Thanks.
> >
> > Again, please show us the full dmesg log and your current .config.
>
> Here's my kernel config file: http://sprunge.us/LtErQm
>
> > Additionally, the output of
> >
> >   cat /sys/kernel/debug/devices_deferred
> >
> > may be helpful to find any devices that could not be probed due to
> > missing dependencies.
>
> # cat /sys/kernel/debug/devices_deferred
> #
>
> Seems there's no missing dependencies.

It seems that PCIe works fine:

[    0.971206] rockchip-dw-pcie 3c0800000.pcie: host bridge /pcie at fe280000 range
s:
[    0.972000] rockchip-dw-pcie 3c0800000.pcie:       IO 0x03bef00000..0x03befff
fff -> 0x003ef00000
[    0.972953] rockchip-dw-pcie 3c0800000.pcie:      MEM 0x0380000000..0x03beeff
fff -> 0x0000000000
[    0.982507] rockchip-dw-pcie 3c0800000.pcie: iATU: unroll T, 8 ob, 8 ib, alig
n 64K, limit 8G
[    1.188445] rockchip-dw-pcie 3c0800000.pcie: PCIe Gen.3 x1 link up
[    1.189466] rockchip-dw-pcie 3c0800000.pcie: PCI host bridge to bus 0002:00
[    1.190180] pci_bus 0002:00: root bus resource [bus 00-0f]
[    1.190743] pci_bus 0002:00: root bus resource [io  0x0000-0xfffff] (bus addr
ess [0x3ef00000-0x3effffff])
[    1.191701] pci_bus 0002:00: root bus resource [mem 0x380000000-0x3beefffff]
(bus address [0x00000000-0x3eefffff])
[    1.192830] pci 0002:00:00.0: [1d87:3566] type 01 class 0x060400
[    1.193461] pci 0002:00:00.0: reg 0x10: [mem 0x00000000-0x3fffffff]
[    1.194106] pci 0002:00:00.0: reg 0x14: [mem 0x00000000-0x3fffffff]
[    1.194747] pci 0002:00:00.0: reg 0x38: [mem 0x380000000-0x38000ffff pref]
[    1.195565] pci 0002:00:00.0: supports D1 D2
[    1.196004] pci 0002:00:00.0: PME# supported from D0 D1 D3hot
[    1.202187] pci_bus 0002:01: busn_res: can not insert [bus 01-ff] under [bus
00-0f] (conflicts with (null) [bus 00-0f])
[    1.203389] pci 0002:01:00.0: [17cb:1104] type 00 class 0x028000
[    1.204091] pci 0002:01:00.0: reg 0x10: [mem 0x380000000-0x3801fffff 64bit]
[    1.205370] pci 0002:01:00.0: PME# supported from D0 D3hot D3cold
[    1.206235] pci 0002:01:00.0: 7.876 Gb/s available PCIe bandwidth, limited by
 8.0 GT/s PCIe x1 link at 0002:00:00.0 (capable of 15.752 Gb/s with 8.0 GT/s PCI
e x2 link)
[    1.216583] pci 0002:00:00.0: BAR 0: no space for [mem size 0x40000000]
[    1.217262] pci 0002:00:00.0: BAR 0: failed to assign [mem size 0x40000000]
[    1.217967] pci 0002:00:00.0: BAR 1: no space for [mem size 0x40000000]
[    1.218633] pci 0002:00:00.0: BAR 1: failed to assign [mem size 0x40000000]
[    1.219339] pci 0002:00:00.0: BAR 14: assigned [mem 0x380000000-0x3801fffff]
[    1.220050] pci 0002:00:00.0: BAR 6: assigned [mem 0x380200000-0x38020ffff pr
ef]
[    1.220840] pci 0002:01:00.0: BAR 0: assigned [mem 0x380000000-0x3801fffff 64
bit]
[    1.221646] pci 0002:00:00.0: PCI bridge to [bus 01-ff]
[    1.222185] pci 0002:00:00.0:   bridge window [mem 0x380000000-0x3801fffff]
[    1.225671] pcieport 0002:00:00.0: PME: Signaling with IRQ 26
[    1.226781] pcieport 0002:00:00.0: AER: enabled with IRQ 26

Thanks Michael.



More information about the Linux-rockchip mailing list