After changing the reset pin of aqr113c, the network card cannot be started

When using a third-party carrier board, after changing the reset pin of the aqr113c network card from Pin D56 to Pin F56, and making the following changes to the device tree, it is no longer possible to ping the device.

I modified the eth node in the dts file, setting nvidia,phy-reset-gpio = <0x04 0x91 0x00>; Replace with: phy-reset-gpio = <0x04 0x79 0x00>;

ethernet@6810000 {
		power-domains = <0x02 0x12>;
		iommus = <0x03 0x06>;
		nvidia,rx_frames = <0x40>;
		nvidia,max-platform-mtu = <0x3fff>;
		nvidia,slot_intvl_vals = <0x00 0x7d 0x7d 0x7d 0x7d 0x7d 0x7d 0x7d 0x7d 0x7d>;
		phy-mode = "10gbase-r";
		dma-coherent;
		nvidia,tx_frames = <0x10>;
		interconnect-names = "dma-mem\0write";
		nvidia,rx_riwt = <0x200>;
		nvidia,num-dma-chans = <0x0a>;
		clock-names = "rx-input-m\0rx-pcs-m\0rx-pcs-input\0rx-pcs\0tx\0tx-pcs\0mac-divider\0mac\0eee-pcs\0mgbe\0ptp-ref\0mgbe_macsec\0rx-input";
		interconnects = <0x44 0x58 0x44 0x5c>;
		reg-names = "mac\0xpcs\0macsec-base\0hypervisor";
		nvidia,promisc_mode = <0x01>;
		nvidia,mtl-queues = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09>;
		nvidia,dcs-enable = <0x01>;
		nvidia,dma_tx_ring_sz = <0x1000>;
		nvidia,num-mtl-queues = <0x0a>;
		nvidia,tx-queue-prio = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x00 0x00>;
		resets = <0x02 0x2e 0x02 0x2d 0x02 0x2f>;
		nvidia,dma-chans = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09>;
		interrupts = <0x00 0x180 0x04 0x00 0x181 0x04 0x00 0x182 0x04 0x00 0x183 0x04 0x00 0x184 0x04 0x00 0x185 0x04 0x00 0x186 0x04 0x00 0x187 0x04>;
		clocks = <0x02 0x165 0x02 0x169 0x02 0x171 0x02 0x175 0x02 0x176 0x02 0x177 0x02 0x178 0x02 0x179 0x02 0x17b 0x02 0x17c 0x02 0x17d 0x02 0x17a 0x02 0xf8>;
		nvidia,rx-queue-prio = <0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 0x00 0x00>;
		nvidia,phy-iface-mode = <0x00>;
		nvidia,phy-reset-gpio = <0x04 0x79 0x00>;
		nvidia,residual-queue = <0x01>;
		mac-address = [3c 6d 66 b1 2d d8];
		nvidia,rxq_enable_ctrl = <0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02>;
		nvidia,tx_usecs = <0x100>;
		compatible = "nvidia,nvmgbe";
		nvidia,ptp-rx-queue = <0x03>;
		nvidia,tc-mapping = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x00 0x01>;
		nvidia,ptp_ref_clock_speed = <0x12a05f20>;
		status = "okay";
		interrupt-names = "common\0vm0\0vm1\0vm2\0vm3\0vm4\0macsec-ns-irq\0macsec-s-irq";
		reg = <0x00 0x6810000 0x00 0x10000 0x00 0x68a0000 0x00 0x10000 0x00 0x68d0000 0x00 0x10000 0x00 0x6800000 0x00 0x10000>;
		nvidia,instance_id = <0x00>;
		phy-handle = <0x4e>;
		reset-names = "mac\0pcs\0macsec_ns_rst";
		nvidia,dma_rx_ring_sz = <0x1000>;
		nvidia,mac-addr-idx = <0x00>;
		nvidia,vm-irq-config = <0x4d>;
		nvidia,pause_frames = <0x01>;
		nvidia,slot_num_check = <0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00>;

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

			ethernet_phy@0 {
				nvidia,phy-rst-duration-usec = <0x35f48>;
				interrupts = <0x93 0x08>;
				interrupt-parent = <0x04>;
				compatible = "ethernet-phy-ieee802.3-c45";
				reg = <0x00>;
				phandle = <0x4e>;
				nvidia,phy-rst-pdelay-msec = <0x96>;
			};
		};
	};

You can see in the gpioinfo that the phy_reset has been switched.

However, after connecting the device, the network port light did not turn on, and it was also impossible to ping it.

我想你這裡應該意思是從頭到尾這AQR113C在這片板子上沒有成功跑起來過吧?

因為你的英文原文意思其實比較像是本來可以動, 但被你換了GPIO才不行.

我認為這裡用中文跟你確認一下你的意思比較妥.

是的,AQR113C修改dts前和修改dts后都没有跑起来过,因为确认更换了reset引脚,由于我是使用dtc工具反编译而来的dts,在使用示波器测量pin reset的时候也可以看到存在电平变化

一些dmesg信息

root@ayxx-desktop:/home/ayxx# dmesg | grep eth
[    0.000000] psci: probing for conduit method from DT.
[    4.538006] usbcore: registered new interface driver cdc_ether
[    6.240970] optee: probing for conduit method.
[   12.048744] nvethernet 6810000.ethernet: Adding to iommu group 51
[   12.056012] nvethernet 6810000.ethernet: failed to read skip mac reset flag, default 0
[   12.064804] nvethernet 6810000.ethernet: failed to read MDIO address
[   12.071996] nvethernet 6810000.ethernet: setting to default DMA bit mask
[   12.079537] nvethernet 6810000.ethernet: failed to read UPHY GBE mode- default to 10G
[   12.472240] nvethernet 6810000.ethernet: Ethernet MAC address: 3c:6d:66:b1:2d:d8
[   12.480928] nvethernet 6810000.ethernet: macsec param in DT is missing or disabled
[   12.489333] nvethernet 6810000.ethernet: Macsec not supported/Not enabled in DT
[   12.499419] nvethernet 6810000.ethernet: eth0 (HW ver: 31) created with 10 DMA channels
[   15.528232] using random self ethernet address
[   15.528235] using random host ethernet address
[   15.813749] using random self ethernet address
[   15.819016] using random host ethernet address
[   18.795154] Aquantia AQR113C 6810000.ethernet:00: aqr107_wait_reset_complete failed: -110
[   18.866528] Aquantia AQR113C 6810000.ethernet:00: No AQR phy_mode setting in DT
root@ayxx-desktop:/home/ayxx#

我指的是修改后的reset引脚

請問這是Jetpack5還是6?

你換了rst pin之後有調整pinmux設定嗎?

这是jetpack5,我看了下默认的pinmux config,这两个rst pin的配置是一致的,所以我直接修改了dts里面rst pin的地址,我也排查了dts,新的rst pin没有其它被占用的节点

看起來不像是rst 的行為問題.

請問PHY firmware有燒對嗎?

我们提取了官方载板flash,将其烧入进去,烧入后dmesg可以看到-110的错误码已经清除了


root@ayxx-desktop:/home/ayxx# sudo dmesg | grep eth
[    0.000000] psci: probing for conduit method from DT.
[    4.600767] usbcore: registered new interface driver cdc_ether
[    6.220933] optee: probing for conduit method.
[   11.994866] nvethernet 6810000.ethernet: Adding to iommu group 51
[   12.002097] nvethernet 6810000.ethernet: failed to read skip mac reset flag, default 0
[   12.010891] nvethernet 6810000.ethernet: failed to read MDIO address
[   12.018067] nvethernet 6810000.ethernet: setting to default DMA bit mask
[   12.025620] nvethernet 6810000.ethernet: failed to read UPHY GBE mode- default to 10G
[   12.418743] nvethernet 6810000.ethernet: Ethernet MAC address: 3c:6d:66:b1:2d:d8
[   12.427420] nvethernet 6810000.ethernet: macsec param in DT is missing or disabled
[   12.435832] nvethernet 6810000.ethernet: Macsec not supported/Not enabled in DT
[   12.445901] nvethernet 6810000.ethernet: eth0 (HW ver: 31) created with 10 DMA channels
[   15.828622] using random self ethernet address
[   15.828626] using random host ethernet address
[   16.148048] using random self ethernet address
[   16.153156] using random host ethernet address
[   17.287960] Aquantia AQR113C 6810000.ethernet:00: No AQR phy_mode setting in DT

配置网口ip后发现还是无法ping通,使用ethtool查看eth0

root@ayxx-desktop:/home/ayxx# ethtool eth0
Settings for eth0:
        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
        Speed: Unknown!
        Duplex: Unknown! (255)
        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: no

請問有測量過mdio/mdc bus的訊號了嗎?

用示波器测量之后mdio和mdc都有方波出现,阶段性的出现

我对照了下原理图,中断信号的引脚的也被更换了,原本的中断信号引脚是C57(PY03),现在的中断引脚是H52(PN01),我认为应该需要在设备树中同步,但是我不知道需要下方三个interrupts的哪些地方,以及如何修改

	ethernet@6810000 {
		power-domains = <0x02 0x12>;
		iommus = <0x03 0x06>;
		nvidia,rx_frames = <0x40>;
		nvidia,max-platform-mtu = <0x3fff>;
		nvidia,slot_intvl_vals = <0x00 0x7d 0x7d 0x7d 0x7d 0x7d 0x7d 0x7d 0x7d 0x7d>;
		phy-mode = "10gbase-r";
		dma-coherent;
		nvidia,tx_frames = <0x10>;
		interconnect-names = "dma-mem\0write";
		nvidia,rx_riwt = <0x200>;
		nvidia,num-dma-chans = <0x0a>;
		clock-names = "rx-input-m\0rx-pcs-m\0rx-pcs-input\0rx-pcs\0tx\0tx-pcs\0mac-divider\0mac\0eee-pcs\0mgbe\0ptp-ref\0mgbe_macsec\0rx-input";
		interconnects = <0x44 0x58 0x44 0x5c>;
		reg-names = "mac\0xpcs\0macsec-base\0hypervisor";
		nvidia,promisc_mode = <0x01>;
		nvidia,mtl-queues = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09>;
		nvidia,dcs-enable = <0x01>;
		nvidia,dma_tx_ring_sz = <0x1000>;
		nvidia,num-mtl-queues = <0x0a>;
		nvidia,tx-queue-prio = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x00 0x00>;
		resets = <0x02 0x2e 0x02 0x2d 0x02 0x2f>;
		nvidia,dma-chans = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09>;
		interrupts = <0x00 0x180 0x04 0x00 0x181 0x04 0x00 0x182 0x04 0x00 0x183 0x04 0x00 0x184 0x04 0x00 0x185 0x04 0x00 0x186 0x04 0x00 0x187 0x04>;
		clocks = <0x02 0x165 0x02 0x169 0x02 0x171 0x02 0x175 0x02 0x176 0x02 0x177 0x02 0x178 0x02 0x179 0x02 0x17b 0x02 0x17c 0x02 0x17d 0x02 0x17a 0x02 0xf8>;
		nvidia,rx-queue-prio = <0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 0x00 0x00>;
		nvidia,phy-iface-mode = <0x00>;
		nvidia,phy-reset-gpio = <0x04 0x79 0x00>;
		nvidia,residual-queue = <0x01>;
		mac-address = [3c 6d 66 b1 2d d8];
		nvidia,rxq_enable_ctrl = <0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02 0x02>;
		nvidia,tx_usecs = <0x100>;
		compatible = "nvidia,nvmgbe";
		nvidia,ptp-rx-queue = <0x03>;
		nvidia,tc-mapping = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x00 0x01>;
		nvidia,ptp_ref_clock_speed = <0x12a05f20>;
		status = "okay";
		interrupt-names = "common\0vm0\0vm1\0vm2\0vm3\0vm4\0macsec-ns-irq\0macsec-s-irq";
		reg = <0x00 0x6810000 0x00 0x10000 0x00 0x68a0000 0x00 0x10000 0x00 0x68d0000 0x00 0x10000 0x00 0x6800000 0x00 0x10000>;
		nvidia,instance_id = <0x00>;
		phy-handle = <0x4e>;
		reset-names = "mac\0pcs\0macsec_ns_rst";
		nvidia,dma_rx_ring_sz = <0x1000>;
		nvidia,mac-addr-idx = <0x00>;
		nvidia,vm-irq-config = <0x4d>;
		nvidia,pause_frames = <0x01>;
		nvidia,slot_num_check = <0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00>;

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

			ethernet_phy@0 {
				nvidia,phy-rst-duration-usec = <0x35f48>;
				interrupts = <0x93 0x08>;
				interrupt-parent = <0x04>;
				compatible = "ethernet-phy-ieee802.3-c45";
				reg = <0x00>;
				phandle = <0x4e>;
				nvidia,phy-rst-pdelay-msec = <0x96>;
			};
		};
	};

請問你更改dts的方法是什麼?

照理你參照我們原本的source code跟文件應該能很明顯的發現要改哪裡.

聽起來你好像不清楚我們的source code要去哪下載?

之前的设备树是通过/boot/dtb中的设备树反编译得来的,现在我已经部署好源码和刷机的环境了,然后我有个点想确认一下p3701.conf.common是不是原厂默认的配置文件,在这里面我看到tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi是PINMUX,我想知道这个pinmux.dtsi文件是不是目前系统生效的pinmux.dtsi,我想用Orin_Jetson_Series_Pinmux_Config_Template-v2.1生成的一系列dtsi做个替换,tegra234-p3701-0005-p3737-0000.dtb这是我目前加载的dtb的文件名,其中应该包含了载板的信息

是的, 那個pinmux是預設使用的檔案.

你可以確認flash時候的log. 它也會有燒錄的檔案名稱

你好,我在将ethernet@6810000的中断引脚从TEGER234_MAIN_GPIO(Y,3)切换到TEGER234_MAIN_GPIO(N,1)的过程中sources/kernel/kernel-5.10/drivers/soc/tegra/pmc.c的文件中有如下内容

#define TEGRA_WAKE_GPIO(_name, _id, _instance, _pin)	\
	{						\
		.name = _name,				\
		.id = _id,				\
		.irq = 0,				\
		.gpio = {				\
			.instance = _instance,		\
			.pin = _pin,			\
		},					\
	}
	
static const struct tegra_wake_event tegra234_wake_events[] = {
	TEGRA_WAKE_IRQ("pmu", 24, 209),
	TEGRA_WAKE_IRQ("rtc", 73, 10),
	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA234_AON_GPIO(EE, 4)),
	TEGRA_WAKE_IRQ("sw_wake", 83, 179),
	TEGRA_WAKE_GPIO("sd_wake", 8, 0, TEGRA234_MAIN_GPIO(G, 7)),
	TEGRA_WAKE_GPIO("pex_wake", 1, 0, TEGRA234_MAIN_GPIO(L, 2)),
	TEGRA_WAKE_IRQ("usb3_port_0", 76, 167),
	TEGRA_WAKE_IRQ("usb3_port_1", 77, 167),
	TEGRA_WAKE_IRQ("usb3_port_2_3", 78, 167),
	TEGRA_WAKE_IRQ("usb2_port_0", 79, 167),
	TEGRA_WAKE_IRQ("usb2_port_1", 80, 167),
	TEGRA_WAKE_IRQ("usb2_port_2", 81, 167),
	TEGRA_WAKE_IRQ("usb2_port_3", 82, 167),
	TEGRA_WAKE_GPIO("soc_gpio50", 48, 1, TEGRA234_AON_GPIO(BB, 2)),
	TEGRA_WAKE_GPIO("mgbe_wake", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
	TEGRA_WAKE_GPIO("eqos_wake", 20, 0, TEGRA234_MAIN_GPIO(G, 4)),
};

如果我需要修改中断引脚的话此驱动mgbe_wake需要修改吗,如果需要修改id和instance需要改成什么,感谢

請問你原本的問題已經解決了嗎? 現在看來有點離題了

解决了,这个pmc是用于远程启动的,我们暂时用不到,但是这里直接改成PN01也是对的