我遇到了使用rgmii+8211phy,无法找到网卡的问题

我使用rgmii接了一个8211Phy。
我借鉴了这个帖子RGMII not working on jetson agx orin

我修改了设备树,添加了ethernet@2130000 enable and configuration

我目前是,有了eth0这个新的网卡,但是
root@orin:~# ifconfig eth0 up
[ 159.387176] nvethernet 2310000.ethernet: [poll_check][42][type:0x4][loga-0x0] poll_check: timeout
[ 159.396316] net eth0: failed to poll MAC Software reset
SIOCSIFFLAGS: Operation not permitted
root@orin:~#
然而我不知道如何修改pinmux,并让这个配置在板子中生效。
请问下如何让修改pinmux,并让pinmux在板子上生效呢,如果不通过烧写img的方式行吗? 比如,可以通过更换/boot下的设备树,生效吗?
以下是我的pinmux文件
tegra234-mb1-bct-pinmux-p3701-0000.dtsi.txt (63.6 KB)
tegra234-mb1-bct-gpio-p3701-0000.dtsi.txt (4.9 KB)

root@orin:~# busybox devmem 0x22140a0
0x00000003
root@orin:~# busybox devmem 0x2214080
0x00000000
root@orin:~#
上边是我现在的值,我知道0x2214080寄存器,应该是0x1才对。
因为我是远程操作,要是通过flash.sh去烧写的话比较麻烦,不知道有什么方法,可以配置好这个gpio的值呢?

通过下边这个方法可以吗?
root@orin:~# busybox devmem 0x2214080 16 0x00000001
root@orin:~# busybox devmem 0x2214080
0x00000001
root@orin:~#

可以試試看devmem直接寫完之後做ifconfig eth0 down/up

但你最後還是得做重燒. 這只是簡易步驟而已 重開機之後就會重設.

明白,因为我是在远程调试,以后正式生产,会进行烧写的。

我配置了0x2214080 为0x00000001,但是执行ifocnfig eth0 up还是报错,如下:

root@orin:~# ifconfig eth0 up
[ 689.829159] nvethernet 2310000.ethernet: [poll_check][42][type:0x4][loga-0x0] poll_check: timeout
[ 689.838301] net eth0: failed to poll MAC Software reset
SIOCSIFFLAGS: Operation not permitted
root@orin:~# [ 691.109157] nvethernet 2310000.ethernet: [poll_check][42][type:0x4][loga-0x0] poll_check: timeout
[ 691.118294] net eth0: failed to poll MAC Software reset

root@orin:~#
root@orin:~#
root@orin:~# [ 761.709172] nvethernet 2310000.ethernet: [poll_check][42][type:0x4][loga-0x0] poll_check: timeout
[ 761.718304] net eth0: failed to poll MAC Software reset
[ 786.137192] nvethernet 2310000.ethernet: [poll_check][42][type:0x4][loga-0x0] poll_check: timeout
[ 786.146337] net eth0: failed to poll MAC Software reset

root@orin:~# ifconfig eth0 down
root@orin:~# ifconfig eth0 up
[ 867.593198] nvethernet 2310000.ethernet: [poll_check][42][type:0x4][loga-0x0] poll_check: timeout
[ 867.602342] net eth0: failed to poll MAC Software reset
SIOCSIFFLAGS: Operation not permitted

如果你是連document都沒讀過的話, 還是先確認一下以下內容

https://docs.nvidia.com/jetson/archives/r36.4.3/DeveloperGuide/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxOrinSeries.html?highlight=rgmii

我剛才看了一下你的pinmux發現全部都沒有設定. 你這樣只改一根gpio enable/disable自然沒有什麼幫助

1 Like

哦 好的。但是我现在板子,不在身边。能否,通过devmem去设置呢?

我想,我是否可以想这个帖子中

的下边的这些值去配置呢?
Here is pinmux dump log.

busybox devmem 0x02434070
0x00000040

busybox devmem 0x02434078
0x00000000

busybox devmem 0x02445058
0x00002408

busybox devmem 0x02445018
0x00002408

busybox devmem 0x02445010
0x00002408

busybox devmem 0x02445008
0x00002408

busybox devmem 0x02445000
0x00002408

busybox devmem 0x02445068
0x00002408

busybox devmem 0x02445040
0x00002458

busybox devmem 0x02445030
0x00002458

busybox devmem 0x02445028
0x00002458

busybox devmem 0x02445020
0x00002458

busybox devmem 0x02445070
0x00002458

busybox devmem 0x02445060
0x00002458

busybox devmem 0x02445038
0x00002440

busybox devmem 0x02445048
0x00002408

busybox devmem 0x02445050
0x00002000

我现在修改了我的pinmux和gpio文件,如下:
tegra234-mb1-bct-gpio-p3701-0000-a04.txt (4.8 KB)
tegra234-mb1-bct-pinmux-p3701-0000-a04.txt (63.6 KB)
我现在烧写进去了。我的板子是,通过UPHY6接了一个AQR113C的万兆,以及一个pcie的rtl8111的phy,出来了两个网口,这两个网口是正常的,eth0和eth1。
现在是通过rgmii出来第三个网口,目前还是无法看到,该网口。请给予帮助。

temp-dts.txt (552.3 KB)
这个是附件是我现在使用的dtb,通过dtc,反编译出来的dts文件。这里边有我添加的那个网口。
ethernet@2310000 {
status = “okay”;
nvidia,mac-addr-idx = <0>;
nvidia,phy-reset-gpio = <&tegra_main_gpio TEGRA234_MAIN_GPIO(G, 5) 0>;
phy-mode = “rgmii-id”;
phy-handle = <&phy>;
/delete-node/ fixed-link;

    mdio {
        compatible = "nvidia,eqos-mdio";
        #address-cells = <1>;
        #size-cells = <0>;

        phy: phy@1 {
            reg = <1>;
            nvidia,phy-rst-pdelay-msec = <224>; /* msec */
            nvidia,phy-rst-duration-usec = <10000>; /* usec */
            interrupt-parent = <&tegra_main_gpio>;
            interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
        };
    };
};

现在我出来的网口,eth0地址居然是2310000,但是这并不是我得那个rgmii的口,附件是demsg打印信息。
dmesg.txt (58.2 KB)

现在我的这个rgmii出来的8211通了,但是我原来的那个pcie的8111网卡,却不见了。

[ 9.548820] pci_bus 0005:00: root bus resource [bus 00-ff]
[ 9.554461] pci_bus 0005:00: root bus resource [io 0x200000-0x2fffff] (bus address [0x3a100000-0x3a1fffff])
[ 9.564568] pci_bus 0005:00: root bus resource [mem 0x2b28000000-0x2b2fffffff] (bus address [0x40000000-0x47ffffff])
[ 9.575403] pci_bus 0005:00: root bus resource [mem 0x2740000000-0x2b27ffffff pref]
[ 9.583326] pci 0005:00:00.0: [10de:229a] type 01 class 0x060400
[ 9.589663] pci 0005:00:00.0: PME# supported from D0 D3hot
[ 9.599059] tegra-xusb 3610000.xhci: entering ELPG done
[ 9.605634] pci 0005:01:00.0: [10ec:8168] type 00 class 0x020000
[ 9.611960] pci 0005:01:00.0: reg 0x10: [io 0x0000-0x00ff]
[ 9.617882] pci 0005:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit]
[ 9.624987] pci 0005:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit]
[ 9.633046] pci 0005:01:00.0: supports D1 D2
[ 9.637434] pci 0005:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 9.648916] pci 0005:00:00.0: BAR 14: assigned [mem 0x2b28000000-0x2b280fffff]
[ 9.656344] pci 0005:00:00.0: BAR 13: assigned [io 0x200000-0x200fff]
[ 9.663071] pci 0005:01:00.0: BAR 4: assigned [mem 0x2b28000000-0x2b28003fff 64bit]
[ 9.671047] pci 0005:01:00.0: BAR 2: assigned [mem 0x2b28004000-0x2b28004fff 64bit]
[ 9.679013] pci 0005:01:00.0: BAR 0: assigned [io 0x200000-0x2000ff]
[ 9.685671] pci 0005:00:00.0: PCI bridge to [bus 01-ff]
[ 9.691049] pci 0005:00:00.0: bridge window [io 0x200000-0x200fff]
[ 9.697679] pci 0005:00:00.0: bridge window [mem 0x2b28000000-0x2b280fffff]
[ 9.705032] pci 0005:00:00.0: Max Payload Size set to 128/ 256 (was 256), Max Read Rq 512
[ 9.713769] pci 0005:01:00.0: Max Payload Size set to 128/ 128 (was 128), Max Read Rq 512
[ 9.722746] pcieport 0005:00:00.0: Adding to iommu group 11
[ 9.728759] pcieport 0005:00:00.0: PME: Signaling with IRQ 68
[ 9.734915] pcieport 0005:00:00.0: AER: enabled with IRQ 68
[ 9.741842] nvethernet 2310000.ethernet: Adding to iommu group 51
[ 9.748246] nvethernet 2310000.ethernet: failed to read skip mac reset flag, default 0
[ 9.756402] nvethernet 2310000.ethernet: failed to read MDIO address
[ 9.762951] nvethernet 2310000.ethernet: Failed to read nvida,pause_frames, so setting to default support as disable
[ 9.773778] nvethernet 2310000.ethernet: setting to default DMA bit mask
[ 9.780680] nvethernet 2310000.ethernet: max-platform-mtu DT entry missing, setting default 1500
[ 9.789756] nvethernet 2310000.ethernet: missing nvidia,pad_auto_cal_pu_offset, setting default 0
[ 9.798881] nvethernet 2310000.ethernet: missing nvidia,pad_auto_cal_pd_offset, setting default 0
[ 10.056289] nvethernet 2310000.ethernet: Ethernet MAC address: 48:b0:2d:ab:9e:54
[ 10.064193] nvethernet 2310000.ethernet: macsec param in DT is missing or disabled
[ 10.071983] nvethernet 2310000.ethernet: Macsec not supported/Not enabled in DT
[ 10.082477] nvethernet 2310000.ethernet: eth0 (HW ver: 53) created with 4 DMA channels
[ 10.090803] nvethernet 6810000.ethernet: Adding to iommu group 52
[ 10.097559] nvethernet 6810000.ethernet: failed to read skip mac reset flag, default 0
[ 10.105709] nvethernet 6810000.ethernet: failed to read MDIO address
[ 10.112252] nvethernet 6810000.ethernet: setting to default DMA bit mask
[ 10.119136] nvethernet 6810000.ethernet: failed to read UPHY GBE mode- default to 10G
[ 10.327746] mmc1: SDHCI controller on 3400000.sdhci [3400000.sdhci] using ADMA 64-bit
[ 10.517475] nvethernet 6810000.ethernet: Ethernet MAC address: 48:b0:2d:ab:9e:54
[ 10.525394] nvethernet 6810000.ethernet: macsec param in DT is missing or disabled
[ 10.533177] nvethernet 6810000.ethernet: Macsec not supported/Not enabled in DT
[ 10.545398] nvethernet 6810000.ethernet: eth1 (HW ver: 31) created with 8 DMA channels

我对这里比较迷惑,都无法通过mdio通信吗,但是我通过ethtool,还有mii-tool能看到信息呢。而且,我通过lspci是可以看到我的8111phy的。但是就是无法出来。我感觉那个ethernet@2310000,这个地址,是和pcie的8111冲突了?

root@tegra-ubuntu:~# lspci
0004:00:00.0 PCI bridge: NVIDIA Corporation Device 229c (rev a1)
0004:01:00.0 Non-Volatile memory controller: Sandisk Corp Device 5041 (rev 01)
0005:00:00.0 PCI bridge: NVIDIA Corporation Device 229a (rev a1)
0005:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
root@tegra-ubuntu:~# mii-tool eth0
eth0: negotiated 1000baseT-FD flow-control, link ok
root@tegra-ubuntu:~# mii-tool eth1
No MII transceiver present!.
root@tegra-ubuntu:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: d
Current message level: 0x00000000 (0)

    Link detected: yes

root@tegra-ubuntu:~# ethtool eth1
Settings for eth1:
Supported ports:
Supported link modes: 100baseT/Half 100baseT/Full
1000baseT/Full
1000baseKX/Full
10000baseT/Full
10000baseKX4/Full
10000baseKR/Full
2500baseT/Full
5000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 100baseT/Half 100baseT/Full
1000baseT/Full
1000baseKX/Full
10000baseT/Full
10000baseKX4/Full
10000baseKR/Full
2500baseT/Full
5000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: d
Current message level: 0x00000000 (0)

    Link detected: yes

root@tegra-ubuntu:~#

我现在是找到了rgmii的网卡,但是失去了原来正常的pcie的网卡,
请给予帮助,谢谢。

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.