Problems about NIC, PCIe and usb on RK3568 EVB

Doug Brewer brewer.doug at gmail.com
Tue Apr 18 22:47:10 PDT 2023


On Tue, Apr 18, 2023 at 5:27 PM Michael Riesch
<michael.riesch at wolfvision.net> wrote:
>
> Hi Doug,

Hi Michael,

> On 4/14/23 04:39, Doug Brewer wrote:
> > On Thu, Apr 13, 2023 at 5:37 PM Frank Wunderlich
> > <frank-w at public-files.de> wrote:
> >>
> >>
> >>
> >>> Gesendet: Donnerstag, 13. April 2023 um 11:21 Uhr
> >>> Von: "Doug Brewer" <brewer.doug at gmail.com>
> >>> On Thu, Apr 13, 2023 at 4:02 PM Frank Wunderlich
> >>> <frank-w at public-files.de> wrote:
> >>>>
> >>>> Hi
> >>>>> Gesendet: Donnerstag, 13. April 2023 um 08:28 Uhr
> >>>>> Von: "Johannes Zink" <j.zink at pengutronix.de>
> >>>>> On 4/13/23 07:55, Doug Brewer wrote:
> >>>>>> Hi,
> >>>>>>
> >>>>>> I tested Linux kernel 6.3-rc6 on my rk3568 evaluation board, it seems there
> >>>>>> are problems with Ethernet, PCIe and usb devices.
> >>>>>>
> >>>>>> First, NICs doesn't work.
> >>>>>>
> >>>>>> rk_gmac-dwmac fe010000.ethernet: IRQ eth_lpi not found
> >>>>>> rk_gmac-dwmac fe010000.ethernet: no regulator found
> >>>>>> rk_gmac-dwmac fe010000.ethernet: clock input or output? (output).
> >>>>>> rk_gmac-dwmac fe010000.ethernet: Can not read property: tx_delay.
> >>>>>> rk_gmac-dwmac fe010000.ethernet: set tx_delay to 0x30
> >>>>>> rk_gmac-dwmac fe010000.ethernet: Can not read property: rx_delay.
> >>>>>> rk_gmac-dwmac fe010000.ethernet: set rx_delay to 0x10
> >>>>>> rk_gmac-dwmac fe010000.ethernet: integrated PHY? (no).
> >>>>>> rk_gmac-dwmac fe010000.ethernet: init for RGMII_ID
> >>>>>> rk_gmac-dwmac fe010000.ethernet: User ID: 0x30, Synopsys ID: 0x51
> >>>>>> rk_gmac-dwmac fe010000.ethernet:         DWMAC4/5
> >>>>>> rk_gmac-dwmac fe010000.ethernet: DMA HW capability register suppd
> >>>>>> rk_gmac-dwmac fe010000.ethernet: RX Checksum Offload Engine suppd
> >>>>>> rk_gmac-dwmac fe010000.ethernet: TX Checksum insertion supported
> >>>>>> rk_gmac-dwmac fe010000.ethernet: Wake-Up On Lan supported
> >>>>>> rk_gmac-dwmac fe010000.ethernet: TSO supported
> >>>>>> rk_gmac-dwmac fe010000.ethernet: Enable RX Mitigation via HW Watr
> >>>>>> rk_gmac-dwmac fe010000.ethernet: Enabled RFS Flow TC (entries=10)
> >>>>>> rk_gmac-dwmac fe010000.ethernet: TSO feature enabled
> >>>>>> rk_gmac-dwmac fe010000.ethernet: Using 32/32 bits DMA host/devich
> >>>>>> mdio_bus stmmac-1: MDIO device at address 0 is missing.
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: IRQ eth_lpi not found
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: no regulator found
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: clock input or output? (output).
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: Can not read property: tx_delay.
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: set tx_delay to 0x30
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: Can not read property: rx_delay.
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: set rx_delay to 0x10
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: integrated PHY? (no).
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: init for RGMII_ID
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: User ID: 0x30, Synopsys ID: 0x51
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet:         DWMAC4/5
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: DMA HW capability register suppd
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: RX Checksum Offload Engine suppd
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: TX Checksum insertion supported
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: Wake-Up On Lan supported
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: TSO supported
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: Enable RX Mitigation via HW Watr
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: Enabled RFS Flow TC (entries=10)
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: TSO feature enabled
> >>>>>> rk_gmac-dwmac fe2a0000.ethernet: Using 32/32 bits DMA host/devich
> >>>>>> mdio_bus stmmac-0: MDIO device at address 0 is missing.
> >>>>>> rk_gmac-dwmac fe010000.ethernet eth0: Register MEM_TYPE_PAGE_POO0
> >>>>>> rk_gmac-dwmac fe010000.ethernet eth0: __stmmac_open: Cannot atta)
> >>>>>>
> >>>>>> Second, running 'lspci' and 'lsusb' doesn't see any devices on PCIe and USB.
> >>>>>> I guess the device tree might be updated.  Anyone has idea how to fix it?
> >>>>>> Thanks.
> >>>>>>
> >>>>>> - Doug
> >>>>>
> >>>>> I've seen similar errors on other boards when the phy is not powered or
> >>>>> does not have a clock supplied. Could you check your DT if there is any
> >>>>> diffs in the phy-supply or any gpio-Hog pulling the enable of a
> >>>>> regulator that might enable the phy? Also you could check if you have
> >>>>> all the required regulator drivers available and probed.
> >>>>>
> >>>>> Best regards
> >>>>> Johannes
> >>>>
> >>>> i tested 6.3.0-rc4 on my banaanpi r2pro and there it seem no problem...do you have the issue on rc4 too?
> >>>
> >>> I just tested 6.3.0-rc4 on my rk3568 evb, no luck.
> >>
> >> was 6.2.0 working?
> >
> > 6.2.0 is not working.
> >
> >> you should upload your full dmesg and .config to pastebin or similar and send the linke here
> >
> > Fair enough.
> > dmesg: http://sprunge.us/LNFvdL
>
> Is this really the complete log (which would mean that your board hangs
> after "Cannot attach to PHY")? Maybe you are booting via NFS and your
> rootfs is not found, but above you state that you were able to run lsusb
> and lspci.

This is the output of executing dmesg.  It's the complete log:
http://sprunge.us/KQyTVi

I'm booting Linux from SD card.

> Also, can you check whether
>
> cat /sys/kernel/debug/devices_deferred
>
> shows a missing dependency?

No.
# cat /sys/kernel/debug/devices_deferred
#


> Best regards,
> Michael

Thanks,
Doug

> > .config: http://sprunge.us/vPdrLf
> >
> >>> # dmesg |grep rk_gmac
> >>> [   11.381071] rk_gmac-dwmac fe010000.ethernet: IRQ eth_lpi not found
> >>> [   11.381892] rk_gmac-dwmac fe010000.ethernet: no regulator found
> >>> [   11.382529] rk_gmac-dwmac fe010000.ethernet: clock input or output? (output).
> >>> [   11.383178] rk_gmac-dwmac fe010000.ethernet: Can not read property: tx_delay.
> >>> [   11.383815] rk_gmac-dwmac fe010000.ethernet: set tx_delay to 0x30
> >>> [   11.384373] rk_gmac-dwmac fe010000.ethernet: Can not read property: rx_delay.
> >>> [   11.385008] rk_gmac-dwmac fe010000.ethernet: set rx_delay to 0x10
> >>> [   11.385561] rk_gmac-dwmac fe010000.ethernet: integrated PHY? (no).
> >>> [   11.396162] rk_gmac-dwmac fe010000.ethernet: init for RGMII_ID
> >>> [   11.400201] rk_gmac-dwmac fe010000.ethernet: User ID: 0x30, Synopsys ID: 0x51
> >>> [   11.400878] rk_gmac-dwmac fe010000.ethernet:         DWMAC4/5
> >>> [   11.401349] rk_gmac-dwmac fe010000.ethernet: DMA HW capability register suppd
> >>> [   11.402067] rk_gmac-dwmac fe010000.ethernet: RX Checksum Offload Engine suppd
> >>> [   11.402755] rk_gmac-dwmac fe010000.ethernet: TX Checksum insertion
> >>> supported
> >>> [   11.403401] rk_gmac-dwmac fe010000.ethernet: Wake-Up On Lan supported
> >>> [   11.404185] rk_gmac-dwmac fe010000.ethernet: TSO supported
> >>> [   11.406883] rk_gmac-dwmac fe010000.ethernet: Enable RX Mitigation via HW Watr
> >>> [   11.407964] rk_gmac-dwmac fe010000.ethernet: Enabled RFS Flow TC (entries=10)
> >>> [   11.408624] rk_gmac-dwmac fe010000.ethernet: TSO feature enabled
> >>> [   11.411098] rk_gmac-dwmac fe010000.ethernet: Using 32/32 bits DMA host/devich
> >>> [   11.421076] rk_gmac-dwmac fe2a0000.ethernet: IRQ eth_lpi not found
> >>> [   11.422308] rk_gmac-dwmac fe2a0000.ethernet: no regulator found
> >>> [   11.422870] rk_gmac-dwmac fe2a0000.ethernet: clock input or output? (output).
> >>> [   11.423515] rk_gmac-dwmac fe2a0000.ethernet: Can not read property: tx_delay.
> >>> [   11.425161] rk_gmac-dwmac fe2a0000.ethernet: set tx_delay to 0x30
> >>> [   11.425862] rk_gmac-dwmac fe2a0000.ethernet: Can not read property: rx_delay.
> >>> [   11.426731] rk_gmac-dwmac fe2a0000.ethernet: set rx_delay to 0x10
> >>> [   11.427430] rk_gmac-dwmac fe2a0000.ethernet: integrated PHY? (no).
> >>> [   11.433094] rk_gmac-dwmac fe2a0000.ethernet: init for RGMII_ID
> >>> [   11.445612] rk_gmac-dwmac fe2a0000.ethernet: User ID: 0x30, Synopsys ID: 0x51
> >>> [   11.446753] rk_gmac-dwmac fe2a0000.ethernet:         DWMAC4/5
> >>> [   11.447265] rk_gmac-dwmac fe2a0000.ethernet: DMA HW capability register suppd
> >>> [   11.447940] rk_gmac-dwmac fe2a0000.ethernet: RX Checksum Offload Engine suppd
> >>> [   11.448612] rk_gmac-dwmac fe2a0000.ethernet: TX Checksum insertion
> >>> supported
> >>> [   11.449536] rk_gmac-dwmac fe2a0000.ethernet: Wake-Up On Lan supported
> >>> [   11.452947] rk_gmac-dwmac fe2a0000.ethernet: TSO supported
> >>> [   11.453468] rk_gmac-dwmac fe2a0000.ethernet: Enable RX Mitigation via HW Watr
> >>> [   11.454401] rk_gmac-dwmac fe2a0000.ethernet: Enabled RFS Flow TC (entries=10)
> >>> [   11.455054] rk_gmac-dwmac fe2a0000.ethernet: TSO feature enabled
> >>> [   11.456887] rk_gmac-dwmac fe2a0000.ethernet: Using 32/32 bits DMA host/devich
> >>> [   12.340615] rk_gmac-dwmac fe010000.ethernet eth0: Register MEM_TYPE_PAGE_POO0
> >>> [   12.342575] rk_gmac-dwmac fe010000.ethernet eth0: no phy found
> >>> [   12.343121] rk_gmac-dwmac fe010000.ethernet eth0: __stmmac_open: Cannot atta)
> >>>
> >>>>
> >>>> root at bpi-r2pro:~# dmesg | grep rk_gmac-dwmac
> >>>> [    3.033681] rk_gmac-dwmac fe010000.ethernet: IRQ eth_lpi not found
> >>>> [    3.034528] rk_gmac-dwmac fe010000.ethernet: Looking up phy-supply from devie
> >>>> [    3.035243] rk_gmac-dwmac fe010000.ethernet: Looking up phy-supply property d
> >>>> [    3.036170] rk_gmac-dwmac fe010000.ethernet: no regulator found
> >>>> [    3.036713] rk_gmac-dwmac fe010000.ethernet: clock input or output? (output).
> >>>> [    3.037361] rk_gmac-dwmac fe010000.ethernet: TX delay(0x3c).
> >>>> [    3.037877] rk_gmac-dwmac fe010000.ethernet: RX delay(0x2f).
> >>>> [    3.038398] rk_gmac-dwmac fe010000.ethernet: integrated PHY? (no).
> >>>> [    3.044063] rk_gmac-dwmac fe010000.ethernet: init for RGMII
> >>>> [    3.044896] rk_gmac-dwmac fe010000.ethernet: User ID: 0x30, Synopsys ID: 0x51
> >>>> [    3.045559] rk_gmac-dwmac fe010000.ethernet:         DWMAC4/5
> >>>> [    3.046033] rk_gmac-dwmac fe010000.ethernet: DMA HW capability register suppd
> >>>> [    3.046747] rk_gmac-dwmac fe010000.ethernet: RX Checksum Offload Engine suppd
> >>>> [    3.047428] rk_gmac-dwmac fe010000.ethernet: TX Checksum insertion supported
> >>>> [    3.048062] rk_gmac-dwmac fe010000.ethernet: Wake-Up On Lan supported
> >>>> [    3.048725] rk_gmac-dwmac fe010000.ethernet: TSO supported
> >>>> [    3.049229] rk_gmac-dwmac fe010000.ethernet: Enable RX Mitigation via HW Watr
> >>>> [    3.049954] rk_gmac-dwmac fe010000.ethernet: Enabled RFS Flow TC (entries=10)
> >>>> [    3.050628] rk_gmac-dwmac fe010000.ethernet: TSO feature enabled
> >>>> [    3.051176] rk_gmac-dwmac fe010000.ethernet: Using 32/32 bits DMA host/devich
> >>>> [    3.189988] rk_gmac-dwmac fe2a0000.ethernet: IRQ eth_lpi not found
> >>>> [    3.190982] rk_gmac-dwmac fe2a0000.ethernet: Looking up phy-supply from devie
> >>>> [    3.191715] rk_gmac-dwmac fe2a0000.ethernet: Looking up phy-supply property d
> >>>> [    3.192636] rk_gmac-dwmac fe2a0000.ethernet: no regulator found
> >>>> [    3.193180] rk_gmac-dwmac fe2a0000.ethernet: clock input or output? (input).
> >>>> [    3.193818] rk_gmac-dwmac fe2a0000.ethernet: TX delay(0x4f).
> >>>> [    3.194336] rk_gmac-dwmac fe2a0000.ethernet: RX delay(0xf).
> >>>> [    3.194885] rk_gmac-dwmac fe2a0000.ethernet: integrated PHY? (no).
> >>>> [    3.195499] rk_gmac-dwmac fe2a0000.ethernet: clock input from PHY
> >>>> [    3.201067] rk_gmac-dwmac fe2a0000.ethernet: init for RGMII
> >>>> [    3.201885] rk_gmac-dwmac fe2a0000.ethernet: User ID: 0x30, Synopsys ID: 0x51
> >>>> [    3.202575] rk_gmac-dwmac fe2a0000.ethernet:         DWMAC4/5
> >>>> [    3.203052] rk_gmac-dwmac fe2a0000.ethernet: DMA HW capability register suppd
> >>>> [    3.203730] rk_gmac-dwmac fe2a0000.ethernet: RX Checksum Offload Engine suppd
> >>>> [    3.204405] rk_gmac-dwmac fe2a0000.ethernet: TX Checksum insertion supported
> >>>> [    3.205039] rk_gmac-dwmac fe2a0000.ethernet: Wake-Up On Lan supported
> >>>> [    3.205702] rk_gmac-dwmac fe2a0000.ethernet: TSO supported
> >>>> [    3.206207] rk_gmac-dwmac fe2a0000.ethernet: Enable RX Mitigation via HW Watr
> >>>> [    3.206969] rk_gmac-dwmac fe2a0000.ethernet: Enabled RFS Flow TC (entries=10)
> >>>> [    3.207621] rk_gmac-dwmac fe2a0000.ethernet: TSO feature enabled
> >>>> [    3.208167] rk_gmac-dwmac fe2a0000.ethernet: Using 32/32 bits DMA host/devich
> >>>> [   80.517694] rk_gmac-dwmac fe010000.ethernet eth0: Register MEM_TYPE_PAGE_POO0
> >>>> [   80.520178] rk_gmac-dwmac fe010000.ethernet eth0: PHY [stmmac-1:00] driver [)
> >>>> [   80.520230] rk_gmac-dwmac fe010000.ethernet eth0: No Safety Features supportd
> >>>> [   80.520258] rk_gmac-dwmac fe010000.ethernet eth0: IEEE 1588-2008 Advanced Tid
> >>>> [   80.520514] rk_gmac-dwmac fe010000.ethernet eth0: registered PTP clock
> >>>> [   80.520898] rk_gmac-dwmac fe010000.ethernet eth0: configuring for phy/rgmii e
> >>>> [   84.615184] rk_gmac-dwmac fe010000.ethernet eth0: Link is Up - 1Gbps/Full - x
> >>>> root at bpi-r2pro:~# ip a
> >>>> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defau0
> >>>>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> >>>>     inet 127.0.0.1/8 scope host lo
> >>>>        valid_lft forever preferred_lft forever
> >>>>     inet6 ::1/128 scope host
> >>>>        valid_lft forever preferred_lft forever
> >>>> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group def0
> >>>>     link/ether 76:95:00:96:b3:89 brd ff:ff:ff:ff:ff:ff
> >>>>     inet 192.168.0.12/24 scope global eth0
> >>>>        valid_lft forever preferred_lft forever
> >>>>     inet6 fe80::7495:ff:fe96:b389/64 scope link
> >>>>        valid_lft forever preferred_lft forever
> >>>> 3: eth1: <BROADCAST,MULTICAST> mtu 1504 qdisc noop state DOWN group default qle0
> >>>>     link/ether 76:95:00:96:b3:88 brd ff:ff:ff:ff:ff:ff
> >>>> 4: sit0 at NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
> >>>>     link/sit 0.0.0.0 brd 0.0.0.0
> >>>> 5: lan0 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group0
> >>>>     link/ether 76:95:00:96:b3:88 brd ff:ff:ff:ff:ff:ff
> >>>> 6: lan1 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group0
> >>>>     link/ether 76:95:00:96:b3:88 brd ff:ff:ff:ff:ff:ff
> >>>> 7: lan2 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group0
> >>>>     link/ether 76:95:00:96:b3:88 brd ff:ff:ff:ff:ff:ff
> >>>> 8: lan3 at eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group0
> >>>>     link/ether 76:95:00:96:b3:88 brd ff:ff:ff:ff:ff:ff
> >>>> root at bpi-r2pro:~# lsusb
> >>>> Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> >>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >>>> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> >>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >>>> Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> >>>> Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >>>> Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> >>>> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >>>> root at bpi-r2pro:~# lspci
> >>>> 0001:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Pro)
> >>>> 0002:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Pro)
> >>>> root at bpi-r2pro:~# uname -a
> >>>> Linux bpi-r2pro 6.3.0-rc4-bpi-r2pro #1 SMP PREEMPT Mon Apr 10 13:39:18 CEST 202x
> >>>> root at bpi-r2pro:~#
> >>>>
> >>>> tested eth1 too...also working. so maybe "only" a evb related dts-change or between rc4 and rc6
> >>>
> >>> Maybe the device tree is not correct on evb...
> >>
> >> or you miss any Kconfig option (regulator/power-related)
> >>
> >> else make a diff between last working version (dt + config). i see no relevant changes in dts itself between 6.2 and 6.3
> >>
> >> regards Frank
> >
> > Thanks!
> > Doug
> >
> > _______________________________________________
> > Linux-rockchip mailing list
> > Linux-rockchip at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip



More information about the Linux-rockchip mailing list