Nvethernet Jetson ORIN EQOS MAC

We trying to get our board which is using a Microchip Lan9662 chip connected to
the Jetson ORIN EQOS MAC. The connection between them is a rgmii phy-less design. Using a
6.18.3 Linux kernel we are able to use this design with a few modifications to the nvethernet driver
to accommodate the lack of a phy.

The probblem is when I make the same changes to the R36.5 nvethernet driver the EQOS MAC

never appears to come out of reset. The function call hw_poll_for_swr which polls BIT(0) in

the EQOS_DMA_BMR register and it never goes to 0. It does correctly go to 0 in the 6.18.3 implementation.

I have tried tracing the differences between what is being done in the R36.5 and the 6.18.3 implementations
and they appear to be doing the same initialization steps and the relevant section of the DTB’s appear to
be the same. So my question is what conditions should I be checking for that would keep the EQOS MAC from
coming out of its reset state?

Thank you in advance.

Are you sure this is a topic for Orin NX? You filed this topic in Orin NX forum.

Well, it seemed appropriate since we use Orin AGX and IGX and the nvethernet is tied to the orin module, but I am happy to revisit it some place else. Although, the contacts I have shared this with at Nvidia didn’t seem to question this.

It is just basic items to triage questions.
let me move this to Orin AGX forum.

Thank you

Have you confirmed the pinmux is already configured to the same result as rel-36.5 for EQOS?

We are ding this again now and I wanted to be sure and then reply. I will reply in am.

Yes I have double checked that the pinmux for rmgii pins are the same using busybox to read the registers directly.

Here is the dt information.

ethernet@2310000 {
compatible = “nvidia,nveqos”;
reg = <0x0 0x02310000 0x0 0x10000>, /* EQOS Base Register */
<0x0 0x023D0000 0x0 0x10000>, /* MACSEC Base Register */
<0x0 0x02300000 0x0 0x10000>; /* HV Base Register */
reg-names = “mac”, “macsec-base”, “hypervisor”;
interrupts = <0 194 0x4>, /* common */
<0 186 0x4>, /* vm0 */
<0 187 0x4>, /* vm1 */
<0 188 0x4>, /* vm2 */
<0 189 0x4>, /* vm3 */
<0 190 0x4>, /* MACsec non-secure intr */
<0 191 0x4>; /* MACsec secure intr */
interrupt-names = “common”, “vm0”, “vm1”, “vm2”, “vm3”,
“macsec-ns-irq”, “macsec-s-irq”;
resets = <&bpmp TEGRA234_RESET_EQOS>,
<&bpmp TEGRA234_RESET_EQOS_MACSEC>; /* MACsec non-secure reset */
reset-names = “mac”, “macsec_ns_rst”;
clocks = <&bpmp TEGRA234_CLK_PLLREFE_VCOOUT>,
<&bpmp TEGRA234_CLK_EQOS_AXI>,
<&bpmp TEGRA234_CLK_EQOS_RX>,
<&bpmp TEGRA234_CLK_EQOS_PTP_REF>,
<&bpmp TEGRA234_CLK_EQOS_TX>,
<&bpmp TEGRA234_CLK_AXI_CBB>,
<&bpmp TEGRA234_CLK_EQOS_RX_M>,
<&bpmp TEGRA234_CLK_EQOS_RX_INPUT>,
<&bpmp TEGRA234_CLK_EQOS_MACSEC_TX>,
<&bpmp TEGRA234_CLK_EQOS_TX_DIVIDER>,
<&bpmp TEGRA234_CLK_EQOS_MACSEC_RX>;
clock-names = “pllrefe_vcoout”, “eqos_axi”, “eqos_rx”,
“eqos_ptp_ref”, “eqos_tx”, “axi_cbb”,
“eqos_rx_m”, “eqos_rx_input”,
“eqos_macsec_tx”, “eqos_tx_divider”,
“eqos_macsec_rx”;
#if TEGRA_IOMMU_DT_VERSION >= DT_VERSION_2
interconnects = <&mc TEGRA234_MEMORY_CLIENT_EQOSR>,
<&mc TEGRA234_MEMORY_CLIENT_EQOSW>;
interconnect-names = “dma-mem”, “write”;
endif
iommus = <&smmu_niso1 TEGRA234_SID_EQOS>;
nvidia,num-dma-chans = <8>;
nvidia,num-mtl-queues = <8>;
nvidia,mtl-queues = <0 1 2 3 4 5 6 7>;
nvidia,dma-chans = <0 1 2 3 4 5 6 7>;
nvidia,tc-mapping = <0 1 2 3 4 5 6 7>;
/* Residual Queue can be any valid queue except RxQ0 */
nvidia,residual-queue = <1>;
nvidia,rx-queue-prio = <0x2 0x1 0x30 0x48 0x0 0x0 0x0 0x0>;
nvidia,tx-queue-prio = <0x0 0x7 0x2 0x3 0x0 0x0 0x0 0x0>;
nvidia,rxq_enable_ctrl = <2 2 2 2 2 2 2 2>;
nvidia,vm-irq-config = <&eqos_vm_irq_config>;
status = “okay”;
phy-mode = rgmii";
nvidia,mac-addr-idx = <0x0>;
nvidia,dcs-enable = <0x1>;
nvidia,macsec-enable = <0x1>;
nvidia,pad_calibration = <0x1>;
/* pad calibration 2’s complement offset for pull-down value */
nvidia,pad_auto_cal_pd_offset = <0x0>;
/* pad calibration 2’s complement offset for pull-up value */
nvidia,pad_auto_cal_pu_offset = <0x0>;
nvidia,rx_riwt = <512>;
nvidia,rx_frames = <64>;
nvidia,tx_usecs = <256>;
nvidia,tx_frames = <5>;
nvidia,promisc_mode = <1>;
nvidia,slot_num_check = <0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0>;
nvidia,slot_intvl_vals = <0x0 0x7D 0x7D 0x7D 0x7D 0x7D 0x7D 0x7D>;
nvidia,ptp_ref_clock_speed = <208333334>;
nvidia,instance_id = <4>; /* EQOS instance */
nvidia,ptp-rx-queue = <3>;
pinctrl-names = “mii_rx_disable”, “mii_rx_enable”;
pinctrl-0 = <&eqos_mii_rx_input_state_enable, &eqos_mii_tx_input_state_enable>;
pinctrl-1 = <&eqos_mii_rx_input_state_enable>;
nvidia,dma_rx_ring_sz = <1024>;
nvidia,dma_tx_ring_sz = <1024>;
dma-coherent;
fixed-link = {
speed = < 0x3e8 >
full-duplex;
};
};

ethernet@6800000 {
reg = <0x0 0x06800000 0x0 0x10000>, /* HV base */
<0x0 0x06810000 0x0 0x10000>, /* MGBE base */
<0x0 0x068A0000 0x0 0x10000>, /* XPCS base */
<0x0 0x068D0000 0x0 0x10000>; /* MACsec RM base */
reg-names = “hypervisor”, “mac”, “xpcs”, “macsec-base”;
interrupts = <0 384 0x4>, /* common */
<0 385 0x4>, /* vm0 */
<0 386 0x4>, /* vm1 */
<0 387 0x4>, /* vm2 */
<0 388 0x4>, /* vm3 */
<0 389 0x4>, /* vm4 */
<0 390 0x4>, /* MACsec non-secure intr */
<0 391 0x4>; /* MACsec secure intr */
interrupt-names = “common”, “vm0”, “vm1”, “vm2”, “vm3”, “vm4”,
“macsec-ns-irq”, “macsec-s-irq”;
resets = <&bpmp TEGRA234_RESET_MGBE0_MAC>,
<&bpmp TEGRA234_RESET_MGBE0_PCS>,
<&bpmp TEGRA234_RESET_MGBE0_MACSEC>; /* MACsec non-secure reset */
reset-names = “mac”, “pcs”, “macsec_ns_rst”;
clocks = <&bpmp TEGRA234_CLK_MGBE0_RX_INPUT_M>,
<&bpmp TEGRA234_CLK_MGBE0_RX_PCS_M>,
<&bpmp TEGRA234_CLK_MGBE0_RX_PCS_INPUT>,
<&bpmp TEGRA234_CLK_MGBE0_RX_PCS>,
<&bpmp TEGRA234_CLK_MGBE0_TX>,
<&bpmp TEGRA234_CLK_MGBE0_TX_PCS>,
<&bpmp TEGRA234_CLK_MGBE0_MAC_DIVIDER>,
<&bpmp TEGRA234_CLK_MGBE0_MAC>,
<&bpmp TEGRA234_CLK_MGBE0_EEE_PCS>,
<&bpmp TEGRA234_CLK_MGBE0_APP>,
<&bpmp TEGRA234_CLK_MGBE0_PTP_REF>,
<&bpmp TEGRA234_CLK_MGBE0_MACSEC>,
<&bpmp TEGRA234_CLK_MGBE0_RX_INPUT>;
clock-names = “rx-input-m”, “rx-pcs-m”, “rx-pcs-input”,
“rx-pcs”, “tx”, “tx-pcs”, “mac-divider”,
“mac”, “eee-pcs”, “mgbe”, “ptp-ref”,
“mgbe_macsec”, “rx-input”;
interconnects = <&mc TEGRA234_MEMORY_CLIENT_MGBEARD>,
<&mc TEGRA234_MEMORY_CLIENT_MGBEAWR>;
status = “disabled”;
nvidia,vm-irq-config = <&mgbe_vm_irq_config>;
nvidia,num-dma-chans = <10>;
nvidia,dma-chans = <0 1 2 3 4 5 6 7 8 9>;
nvidia,num-mtl-queues = <10>;
nvidia,mtl-queues = <0 1 2 3 4 5 6 7 8 9>;
nvidia,tc-mapping = <0 1 2 3 4 5 6 7 0 1>;
/* Residual Queue can be any valid queue except RxQ0 */
nvidia,residual-queue = <1>;
nvidia,rxq_enable_ctrl = <2 2 2 2 2 2 2 2 2 2>;
nvidia,tx-queue-prio = <0 1 2 3 4 5 6 7 0 0>;
nvidia,rx-queue-prio = <0x1 0x2 0x4 0x8 0x10 0x20 0x40 0x80 0x0 0x0>;
nvidia,dcs-enable = <0x1>;
nvidia,macsec-enable = <0>;
nvidia,rx_riwt = <512>;
nvidia,rx_frames = <64>;
nvidia,tx_usecs = <256>;
nvidia,tx_frames = <16>;
nvidia,promisc_mode = <1>;
nvidia,slot_num_check = <0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0>;
nvidia,slot_intvl_vals = <0x0 0x7D 0x7D 0x7D 0x7D 0x7D 0x7D 0x7D 0x7D 0x7D>;
nvidia,ptp_ref_clock_speed = <312500000>;
nvidia,instance_id = <0>; /* MGBE0 instance */
nvidia,ptp-rx-queue = <3>;
nvidia,dma_rx_ring_sz = <4096>;
nvidia,dma_tx_ring_sz = <4096>;
dma-coherent;
};

Hi,

This does not answer my previous question… Have you configured the pinmux setting as the developer guide mentioned or not?

I assumed you are talking about 2310000 but not the MGBE interface, right? If so, then you don’t need to share me the DT of MGBE.

We are talking about the 2310000. Sorry, we were attempting to show all the changes we had made including disabling the 6800000. Yes I believe we configured the pinmux as the developer guide mentioned. Below is an extraction from the dtsi file and I can provide the output of busybox of the PADCTL_A21 registers relating to these pins from the running system, if that helps

Robert.

	eqos_txc_pe0 {
		nvidia,pins = "eqos_txc_pe0";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_DISABLE>;
		nvidia,enable-input = <TEGRA_PIN_DISABLE>;
	};

	eqos_td0_pe1 {
		nvidia,pins = "eqos_td0_pe1";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_DISABLE>;
		nvidia,enable-input = <TEGRA_PIN_DISABLE>;
	};

	eqos_td1_pe2 {
		nvidia,pins = "eqos_td1_pe2";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_DISABLE>;
		nvidia,enable-input = <TEGRA_PIN_DISABLE>;
	};

	eqos_td2_pe3 {
		nvidia,pins = "eqos_td2_pe3";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_DISABLE>;
		nvidia,enable-input = <TEGRA_PIN_DISABLE>;
	};

	eqos_td3_pe4 {
		nvidia,pins = "eqos_td3_pe4";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_DISABLE>;
		nvidia,enable-input = <TEGRA_PIN_DISABLE>;
	};

	eqos_tx_ctl_pe5 {
		nvidia,pins = "eqos_tx_ctl_pe5";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_DISABLE>;
		nvidia,enable-input = <TEGRA_PIN_DISABLE>;
	};

	eqos_rd0_pe6 {
		nvidia,pins = "eqos_rd0_pe6";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_ENABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
	};

	eqos_rd1_pe7 {
		nvidia,pins = "eqos_rd1_pe7";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_ENABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
	};

	eqos_rd2_pf0 {
		nvidia,pins = "eqos_rd2_pf0";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_ENABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
	};

	eqos_rd3_pf1 {
		nvidia,pins = "eqos_rd3_pf1";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_ENABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
	};

	eqos_rx_ctl_pf2 {
		nvidia,pins = "eqos_rx_ctl_pf2";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_ENABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
	};

	eqos_rxc_pf3 {
		nvidia,pins = "eqos_rxc_pf3";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_ENABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
	};

	eqos_sma_mdio_pf4 {
		nvidia,pins = "eqos_sma_mdio_pf4";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_DISABLE>;
		nvidia,enable-input = <TEGRA_PIN_ENABLE>;
	};

	eqos_sma_mdc_pf5 {
		nvidia,pins = "eqos_sma_mdc_pf5";
		nvidia,function = "eqos";
		nvidia,pull = <TEGRA_PIN_PULL_NONE>;
		nvidia,tristate = <TEGRA_PIN_DISABLE>;
		nvidia,enable-input = <TEGRA_PIN_DISABLE>;
	};

I just notice that the test environment is not as what I thought.

Are you talking about you could make this work on rel-39 but it fails on rel-36?

We have a custom board using the Jetson Orin AGX and a PHY-less Microchip lan9662 in rgmii mode. The board is flashed with a Jetpack 6.2.2 R36.5 image. Everything else works in this configuration but the EQOS <= rgmii => Lan9662 interface.

Another group here took the Linux 6.13.8 kernel (which contains a lan9662 driver) and took an upstream Nvidia OOT source tree and created a working system for the EQOS <= rgmii => Lan9662. This required a few mods to the Device Tree (which we have posted) and a few mods to the lan9662 driver and the nvethernet driver to allow for operation without a phy.

So this was a 6.13.8 kernel, upstream oot drivers. A new extlinux.conf entry was added to boot this new kernel, modified dtb and /lib/modules/6.13.8. Everything else was still from the Jetpack 6.2.2 R36.5 flashed system.

The other group then back ported the lan9662 driver, made the same mods to the r36.5 nvethernet driver and was unable to get past the described “EQOS unable to get out of reset” with the native R36.5 kernel.

Again, same hardware, same DTB, different kernel, essentially same drivers. One works and one doesn’t.

I was asked to continue the effort and I examined and tried many things all to no avail. If I could get a description of what conditions and/or what signals can keep the EQOS from getting out of reset maybe I will have some luck in getting out of this rut.

If this is still not clear, either what we have tried or were we are maybe a quick phone call can help with the understanding.

Thank you,

Robert

I’ve checked and the same group that tried to back port to R36.5 did get the Jetpack 7.2 release to work recently as well with the phy-less mods. But we need to be working with the 5.15 as per our customers requirements.

Have you tried to confirm which OOT driver is making the diff?

Is nvethernet.ko itself sufficient to bring your case working?

Do you have a full dmesg to share? Logs from both k6.13 and k5.15 might help.

. This required a few mods to the Device Tree (which we have posted)

And could you directly point out what are the mods you did there that make as key difference?

I can send dmesg logs but honestly there are no errors or warning until the nvethernet reports the timing out on the reset perform through the DMA register. The log files will be heavy with messages because I added tons of tracing messages to verify what the flow through the drivers was on both systems, but if you want them I can add them.

There are no mods that were done that “fixed” the reset problem. It just doesn’t occur with the 6.13.8 kernel. There are mods to allow the nvethernet driver to not error out because of the lack of a PHY that were happening much later in the nvethernet driver. That said I will provide a diff of what was done to the nvethernet driver.

The nvethernet does this reset as one of it’s early early steps. It pretty much starts a number of clocks, then tries the reset and timesout.

Robert