How to use AR8035 GbE PHY with the Xavier?

On the X200 carrier board for the AGX Xavier we have implemented the Micrel (Artheros) AR8035 PHY instead of the Marvell PHY (U1: 88E1512PB2-NNP2C000).

In the Linux configuration of the dev kit in the PHY we have noticed that the Marvell and Micrel PHYs are compiled in the kernel. We have disabled those and enabled the AT803x PHY as a module, assuming that the Artheros PHY AT8035 is the same as the Artheros AR8035.

Then we successfully loaded the AR8030x.ko module with sudo modprobe. But is does not work. I would expect that an eth0 device is created. This is only listed with “ifconfig -a”. But no change whether the AR803x module is loaded or not. Please note that the micrel and marvell modules are still in the kernel. Please see the rmmod messages. Please also note that there is nothing new in dmesg related to eth0.

Questions:

  1. is the at803x.ko the right module for the AR8035 PHY?
  2. can we load this as a module?
  3. why are the marvell and micrel modules not removed?
  4. do we need to do device tree changes to switch to the AR8035 PHY?

External Media

nvidia@jetson-0423318029345:~$ sudo cp /home/nvidia/Desktop/at803x.ko /lib/modules/4.9.108/kernel/drivers/net/phy/
[sudo] password for nvidia: 
nvidia@jetson-0423318029345:~$ lsmod
Module                  Size  Used by
bnep                   16619  2
fuse                  103334  3
nvs_bmi160             22076  0
nvs                    53924  1 nvs_bmi160
bluedroid_pm           14104  0
ip_tables              18922  0
x_tables               29079  1 ip_tables
nvidia@jetson-0423318029345:~$ rmmod micrel
rmmod: ERROR: Module micrel is builtin.
nvidia@jetson-0423318029345:~$ rmmod marvell
rmmod: ERROR: Module marvell is builtin.
nvidia@jetson-0423318029345:~$ rmmod marvello
rmmod: ERROR: Module marvello is not currently loaded
nvidia@jetson-0423318029345:~$ ifconfig
l4tbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.55.1  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::902e:9fff:feb4:db22  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1844 (1.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 888  bytes 55617 (55.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 888  bytes 55617 (55.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether ca:65:2b:51:9c:93  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

nvidia@jetson-0423318029345:~$ depmode
bash: depmode: command not found
nvidia@jetson-0423318029345:~$ sudo depmod
nvidia@jetson-0423318029345:~$ sudo modprobe at803x
nvidia@jetson-0423318029345:~$ lsmod
Module                  Size  Used by
at803x                  6222  0
bnep                   16619  2
fuse                  103334  3
nvs_bmi160             22076  0
nvs                    53924  1 nvs_bmi160
bluedroid_pm           14104  0
ip_tables              18922  0
x_tables               29079  1 ip_tables
nvidia@jetson-0423318029345:~$ ifconfig
l4tbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.55.1  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::902e:9fff:feb4:db22  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1844 (1.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 968  bytes 60417 (60.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 968  bytes 60417 (60.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether ca:65:2b:51:9c:93  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

nvidia@jetson-0423318029345:~$ ifconfig -a
dummy0: flags=130<BROADCAST,NOARP>  mtu 1500
        ether 16:74:d6:c6:ca:0c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:04:4b:cb:99:a8  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 40  

l4tbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.55.1  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::902e:9fff:feb4:db22  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1844 (1.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 1048  bytes 65217 (65.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1048  bytes 65217 (65.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether ca:65:2b:51:9c:93  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

nvidia@jetson-0423318029345:~$ dmesg | grep eth
[    0.000000] psci: probing for conduit method from DT.
[    0.955607] iommu: Adding device 2490000.ether_qos to group 4
[    4.325021] eqos 2490000.ether_qos: no PHY interrupt found
[    4.325653] usbcore: registered new interface driver cdc_ether
[    4.343166] eqos 2490000.ether_qos: No prod values found
[    4.344125] eqos 2490000.ether_qos: Setting local MAC: 0 4 4b cb 99 a8
[   11.772738] using random self ethernet address
[   11.783019] using random host ethernet address
[   11.829537] using random self ethernet address
[   11.831686] using random host ethernet address
[   18.103734] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   18.106010] eth0: Could not attach to PHY
[   18.111406] net eth0: eqos_open: Cannot attach to PHY (error: -19)
nvidia@jetson-0423318029345:~$ sudo ifdown -a
nvidia@jetson-0423318029345:~$ sudo ifup -a
nvidia@jetson-0423318029345:~$ ifconfig
l4tbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.55.1  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::902e:9fff:feb4:db22  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1844 (1.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 1139  bytes 71741 (71.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1139  bytes 71741 (71.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether ca:65:2b:51:9c:93  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

nvidia@jetson-0423318029345:~$ ifconfig -a
dummy0: flags=130<BROADCAST,NOARP>  mtu 1500
        ether 16:74:d6:c6:ca:0c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:04:4b:cb:99:a8  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 40  

l4tbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.55.1  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::902e:9fff:feb4:db22  prefixlen 64  scopeid 0x20<link>
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12  bytes 1844 (1.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 1219  bytes 76541 (76.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1219  bytes 76541 (76.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether be:e7:90:41:71:66  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether ca:65:2b:51:9c:93  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

nvidia@jetson-0423318029345:~$

I guess the built-in driver comes from the defconfig.

CONFIG_MARVELL_PHY=y
 CONFIG_MICREL_PHY=y

Please try to remove them inside the defconfig.

Good point. We just deactivated “marvell” and “micrel” in the GUI interface (please see the screenshot above). It turned out, that the two line were still in the defconfig file. Now we have erased these two lines and recompiled kernel and flashed the image.

Surprise: rmmod still indicates that these modules are in the kernel and cannot be removed. So so change there. Very strange.

But this is just an observation and not necessarily the problem. We would like to install the driver for the AR8035 PHY and activate the native GbE port of the AGX Xavier. Here we are not successful. We were just concerned that there might be a conflict with the Marvell and Micrel modules in the kernel. This is why we wanted to remove them.

I would guess that perhaps something else is depending on those modules. Did you remove those modules via a config editor, or instead by direct file edit? A config editor should see any dependency issues, file edit would not care.

May I ask how you update your kernel image?

Linuxdev, first we tried the config editor. We deselected them in the graphical interface, but the 2 corresponding lines remained in the defconfig file. In a second we removed the lines manually with a text editor. In both cases the 2 modules remained in the kernel after recompilation and flashing of the Xavier. So we were not able to remove them.

WayneWWW, we used the following procedure to update the kernel image:

  • we edited the defconfig file
  • we compiled the kernel with “make” (see below for the complete command)
make ARCH=arm64 O=$KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} -j4
sudo make modules_install ARCH=arm64 O=$KERNEL_OUT CROSS_COMPILE=${CROSS_COMPILE} INSTALL_MOD_PATH=$KERNEL_MODULES_OUT
  • we copied the results of the compilation into the jetpack folder
cd $KERNEL_OUT/
cp ./arch/arm64/boot/Image ${JETPACK}/Xavier/Linux_for_Tegra/kernel/
cp ./arch/arm64/boot/zImage ${JETPACK}/Xavier/Linux_for_Tegra/kernel/
cp -r ./arch/arm64/boot/dts ${JETPACK}/Xavier/Linux_for_Tegra/kernel/dtb
cd $KERNEL_MODULES_OUT
tar --owner root --group root -cjf ${JETPACK}/Xavier/Linux_for_Tegra/kernel/kernel_supplements.tbz2 lib/modules
  • we flashed the image onto the Xavier with Jetpack 4.1.1
cd ${JETPACK}/Xavier/Linux_for_Tegra/
sudo ./apply_binaries.sh
./JetPack-L4T-4.1.1-linux-x64_b57.run

After removing these two from defconfig, I don’t even see *.o files are built.

Could you check whether these files are still there in your KERNEL_OUT?

Any further issue here?

AR8035 works well now? i’m porting KSZ9031 to the xavier, meet the same question

Hi,

We replaced PHY with Qualcomm AR8035 on our custom board,
and we have no response from it too.

The error is also same:

eqos_open: Cannot attach to PHY (error: -19)

Does anybody know how to modify the following block for this PHY?

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

			phy0: ethernet-phy@0 {
				reg = <0>;
				phy_rst_lp_mode = <1>; // 0=disable 1=enable 
				interrupt-parent = <&tegra_main_gpio>;
				interrupts = <TEGRA194_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
				marvell,copper-mode;
				// Setup LED[2] as interrupt pin (active low)
				marvell,reg-init = <0x03 0x12 0x7fff 0x880>;
			};
		};

Best,

Hi again,

I’m not sure if I need to trigger some button to refresh an old topic like this one.
I will open a new topic as this one gets no attention.

Best,