AGX Orin RGMII with Marvell Switch Auto Negotiation Failed

Hello folks,

We are trying to bring up RGMII with Marvell Switch 88E6172 on our customer board. But we are able to make auto negotiation works.

The 4 ports of Marvell switch can pass through to each other. But the RGMII between Marvel switch and AGX Orin seems not working.

root@tegra-ubuntu:/home/nvidia# mii-tool eth0
eth0: autonegotiation failed, link ok
root@tegra-ubuntu:/home/nvidia# dmesg | grep 2310000
[   13.904151] nvethernet 2310000.ethernet: Adding to iommu group 53
[   13.910579] nvethernet 2310000.ethernet: failed to read skip mac reset flag, default 0
[   13.918766] nvethernet 2310000.ethernet: failed to read MDIO address
[   13.925477] nvethernet 2310000.ethernet: setting to default DMA bit mask
[   13.932411] nvethernet 2310000.ethernet: max-platform-mtu DT entry missing, setting default 1500
[   13.941945] nvethernet 2310000.ethernet: failed to get phy reset gpio error: -2
[   13.952603] nvethernet 2310000.ethernet: Ethernet MAC address: 48:b0:2d:91:51:88
[   13.960636] nvethernet 2310000.ethernet: Macsec not enabled
[   13.966372] nvethernet 2310000.ethernet: Macsec: Reduced MTU: 1466 Max: 1500
[   13.975085] nvethernet 2310000.ethernet: eth0 (HW ver: 53) created with 8 DMA channels
[   16.298076] mv88e6085 2310000.ethernet:00: switch 0x1720 detected: Marvell 88E6172, revision 1
[   16.475162] mv88e6085: probe of 2310000.ethernet:00 failed with error -22
[   16.600308] nvethernet 2310000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

And more info about our current custom board are

And our device tree is as follows

eth0:ethernet@2310000 {
		status = "okay";
		nvidia,mac-addr-idx = <0>;
		nvidia,pause_frames = <0>;		
		phy-mode = "rgmii-id";		

		 fixed-link {
			speed = <1000>;
			full-duplex;
		};

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

			switch0: switch@0 {
				compatible = "marvell,mv88e6085";
				#address-cells = <0>;
				#size-cells = <0>;
				reg = <0>;
				dsa,member = <0 0>;

				status = "okay";

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						label = "lan0";
					};

					port@1 {
						reg = <1>;
						label = "lan1";
					};

					port@2 {
						reg = <2>;
						label = "lan2";
					};

					port@3 {
						reg = <3>;
						label = "lan3";
					};

					port@4 {
						reg = <4>;
						label = "lan4";
					};

					switch0port5:port@5 {
						reg = <5>;
						label = "cpu";
						phy-mode = "rgmii-id";

												
						fixed-link {
							speed = <1000>;
							full-duplex;
						};
					};
				};
			};
		};

	};

We are grateful for any feedback or advices. Thanks!

What is causing the error of this ? Could you track the phy driver?

[ 16.475162] mv88e6085: probe of 2310000.ethernet:00 failed with error -22

@WayneWWW Thanks! It’s a great direction.
I increased the log level and got the following information.

Apr 21 12:54:43 tegra-ubuntu kernel: [   17.730983] mv88e6085 2310000.ethernet:00: switch 0x1720 detected: Marvell 88E6172, revision 1
Apr 21 12:54:43 tegra-ubuntu systemd[1]: mnt-l4t\x2ddevmode\x2d389.mount: Succeeded.
Apr 21 12:54:43 tegra-ubuntu snapd[445]: helpers.go:137: error trying to compare the snap system key: system-key missing on disk
Apr 21 12:54:43 tegra-ubuntu systemd[1]: Started Modem Manager.
Apr 21 12:54:43 tegra-ubuntu kernel: [   17.792589] Mass Storage Function, version: 2009/09/11
Apr 21 12:54:43 tegra-ubuntu kernel: [   17.792598] LUN: removable file: (no medium)
Apr 21 12:54:43 tegra-ubuntu kernel: [   17.806579] using random self ethernet address
Apr 21 12:54:43 tegra-ubuntu kernel: [   17.811182] using random host ethernet address
Apr 21 12:54:43 tegra-ubuntu systemd[1]: Started Snap Daemon.
Apr 21 12:54:43 tegra-ubuntu systemd[1]: Starting Wait until snapd is fully seeded...
Apr 21 12:54:43 tegra-ubuntu kernel: [   17.891680] DSA: tree 0 has no CPU port
Apr 21 12:54:43 tegra-ubuntu kernel: [   17.898095] mv88e6085: probe of 2310000.ethernet:00 failed with error -22

@WayneWWW I dived into the kernel source, and realized that the above device tree doesn’t make a valid CPU port under Marvell switch.

Every switch port->type is DSA_PORT_TYPE_USER, no matter the label is “lan” or “cpu” under device tree.

Do you possible have a reference device tree for a Marvell switch? Thanks.

Sorry that we don’t have experience with Marvell switch. Is there any contact with Marvell to know what configuration is needed?

Hello @WayneWWW,

Thanks for your reply. We have been investigating the root cause for several days and are quite sure it’s related to the RGMII internal delay requirement.

Orin’s product design guide mentioned that there is a lack of RGMII-ID feature of NVIDIA EQOS.

Do you think there is any software workaround to enable the RGMII-ID feature of ethernet@2310000?

Thanks

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