UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant coreyhahn
Participant
698 Views
Registered: ‎09-13-2018

debug operations to fix an ethernet phy that is not working in linux.

Bought a HTG-Z920 dev board and a HTG-FMC-8639 FMC board.  Cannot get the ethernet phy to work on the FMC daughter board.  The phy leds do not light up nor can i see anything from linux command line.

What are the steps to debugging the issue?

What I have done already.

Double checked connections through the FMC.

Checked Voltage levels on the daughter card.

Using GEM3 on zynqMP.  Double checked vivado project when setting up zynqMP IP.  Exported hardware definition.

Created Petalinux project from scratch using hardware definition file (SDK folder as a whole)

Double checked TI phy support in the kernel was enabled.

Generated BOOT.BIN and image.ub.

Booted from generated code.

Relevant phy messages.  

[    1.618327] macb ff0e0000.ethernet eth0: Could not attach to PHY

Configuring network interfaces... Cannot find device "eth0"

ifconfig returns only the loopback interface.

Where do i go from here to figure this problem out?

 

 

 

Tags (1)
0 Kudos
9 Replies
Participant coreyhahn
Participant
684 Views
Registered: ‎09-13-2018

Re: debug operations to fix an ethernet phy that is not working in linux.

Attached Boot Log

0 Kudos
Adventurer
Adventurer
632 Views
Registered: ‎10-03-2018

Re: debug operations to fix an ethernet phy that is not working in linux.

Hello @coreyhahn,

Have you tried an electrical continuity test for each of the conductors? 

You should be able to do so with a cut Ethernet cable and an ohmmeter. 

After that, use an Ethernet loop-back connector to see if the link talks to its self. 

Finally, if that all works, try changing your Ethernet cable. 

Good Luck!
Peimann

Kind Regards,
Peimann, S. M.
----
Toddlers are the Storm-Troopers of the Great God Entropy.
Physics: Not Just a Good Idea, It's THE LAW.
0 Kudos
Moderator
Moderator
613 Views
Registered: ‎04-24-2017

Re: debug operations to fix an ethernet phy that is not working in linux.

Hi @coreyhahn,

Do you have your phy sub node in GEM3 device-tree node. 

Refer ZCU102 eval board device-tree https://github.com/Xilinx/device-tree-xlnx/blob/master/device_tree/data/kernel_dtsi/2018.3/BOARD/zcu102-rev1.0.dtsi#L42-L53

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Participant coreyhahn
Participant
593 Views
Registered: ‎09-13-2018

Re: debug operations to fix an ethernet phy that is not working in linux.

I do.

zynqmp.dtsi

gem3: ethernet@ff0e0000 {
compatible = "cdns,zynqmp-gem", "cdns,gem";
status = "disabled";
interrupt-parent = <&gic>;
interrupts = <0 63 4>, <0 63 4>;
reg = <0x0 0xff0e0000 0x0 0x1000>;
clock-names = "pclk", "hclk", "tx_clk";
#address-cells = <1>;
#size-cells = <0>;
#stream-id-cells = <1>;
iommus = <&smmu 0x877>;
power-domains = <&pd_eth3>;
};

system-conf.dtsi

&gem3 {
local-mac-address = [00 0a 35 00 22 01];
};

 

 

 

0 Kudos
Participant coreyhahn
Participant
494 Views
Registered: ‎09-13-2018

Re: debug operations to fix an ethernet phy that is not working in linux.

This problem is software related.  Upon boot the zynq is not even sending the clock to the TI phy.

0 Kudos
Moderator
Moderator
481 Views
Registered: ‎04-24-2017

Re: debug operations to fix an ethernet phy that is not working in linux.

Hi @coreyhahn,

I don't see the phy sub nodes mentioned in your device-tree.

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Participant coreyhahn
Participant
446 Views
Registered: ‎09-13-2018

Re: debug operations to fix an ethernet phy that is not working in linux.

So after some debugging i have gotten to the point where the linux kernel will pick up the ti driver and it seems to think the phy is there but neither UBoot or Linux can get auto negotiation to work.  I still do not see activation and link lights from the phy.

My current dtsi

&gem3 {
status = "okay";
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
xlnx,has-mdio = <0x1>;


mdio {
phy0: phy@12 {
compatible = "ti,dp83867", "ethernet-phy-ieee802.3-c22";
device_type = "ethernet-phy";

reg = <12>;
ti,rx-internal-delay = <0x8>;
ti,tx-internal-delay = <0x0>;
ti,fifo-depth = <0x01>;
ti,dp83867-rxctrl-strap-quirk;

};
};
};

 

While in UBoot I captured some data with the mii tool.  The dumps do not look right.  They are all ones and they do not look like other mii dumps in the forums.

ZynqMP> mii device
MII devices: 'eth0'
Current device: 'eth0'
ZynqMP> mii dump 0 0
0. (ffff) -- PHY control register --
(8000:8000) 0.15 = 1 reset
(4000:4000) 0.14 = 1 loopback
(2040:2040) 0. 6,13 = b11 speed selection = 10 Mbps
(1000:1000) 0.12 = 1 A/N enable
(0800:0800) 0.11 = 1 power-down
(0400:0400) 0.10 = 1 isolate
(0200:0200) 0. 9 = 1 restart A/N
(0100:0100) 0. 8 = 1 duplex = full
(0080:0080) 0. 7 = 1 collision test enable
(003f:003f) 0. 5- 0 = 63 (reserved)


ZynqMP> mii dump 0 1
1. (ffff) -- PHY status register --
(8000:8000) 1.15 = 1 100BASE-T4 able
(4000:4000) 1.14 = 1 100BASE-X full duplex able
(2000:2000) 1.13 = 1 100BASE-X half duplex able
(1000:1000) 1.12 = 1 10 Mbps full duplex able
(0800:0800) 1.11 = 1 10 Mbps half duplex able
(0400:0400) 1.10 = 1 100BASE-T2 full duplex able
(0200:0200) 1. 9 = 1 100BASE-T2 half duplex able
(0100:0100) 1. 8 = 1 extended status
(0080:0080) 1. 7 = 1 (reserved)
(0040:0040) 1. 6 = 1 MF preamble suppression
(0020:0020) 1. 5 = 1 A/N complete
(0010:0010) 1. 4 = 1 remote fault
(0008:0008) 1. 3 = 1 A/N able
(0004:0004) 1. 2 = 1 link status
(0002:0002) 1. 1 = 1 jabber detect
(0001:0001) 1. 0 = 1 extended capabilities

 

0 Kudos
Participant coreyhahn
Participant
426 Views
Registered: ‎09-13-2018

Re: debug operations to fix an ethernet phy that is not working in linux.

ok a new question.  what is mii info reporting?

My device tree has a phy at address 31

&gem3 {
    status = "okay";
    phy-handle = <&phy0>;
    phy-mode = "rgmii-id";
	xlnx,has-mdio = <0x1>;

   
	mdio {
		phy0: phy@31 {
			compatible = "ti,dp83867", "ethernet-phy-ieee802.3-c22";
			device_type = "ethernet-phy";
            status = "okay";
			
			reg = <31>;
			ti,rx-internal-delay = <0x8>; 
			ti,tx-internal-delay = <0x0>; 
			ti,fifo-depth = <0x01>; 
			ti,dp83867-rxctrl-strap-quirk;
			
		};
	};
};

but no matter what address i set the phy address to in the device tree, mii info produces.

ZynqMP> mii info
PHY 0x0C: OUI = 0x80028, Model = 0x23, Rev = 0x01,  10baseT, HDX

Why is the phy address listed as 0xc (12)?  Always.

0 Kudos
Participant coreyhahn
Participant
422 Views
Registered: ‎09-13-2018

Re: debug operations to fix an ethernet phy that is not working in linux.

Ok so.

mii info

is reporting all the phy devices it sees.   Which in my case is the correct case of a phy at addr 12/0x0C  it was doing the right thing. 

an equivalent command is

mii info 0x0C

Now when I run

mii dump 0x0C 0x00

I get expected results (non-all ones).

Hope this can help someone in the future.

 

0 Kudos