FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
6188 Discussions

Ethernet PHY Attachment Issue on Cyclone V SoC Board

Nitin_Dogra
Beginner
496 Views
Dear Sir,Madam,
 
I am reaching out to report an issue encountered on our custom Cyclone V SoC-based board. We are currently facing a problem with the Ethernet interface, specifically with the eth0 device. Below are the details:
 
Issue Description:
 
When attempting to configure the Ethernet interface (eth0), the following error occurs:
root@cchp:~# ifconfig eth0 172.40.1.10  
[ 46.490069] socfpga-dwmac ff700000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19) 
SIOCSIFFLAGS: No such device
 
For your reference, I’ve also attached the complete booting logs.
 
kindly assist us in diagnosing and resolving this issue.
 
Regards
Nitin Dogra
Senior Engineer / Product Development Group
B.H.E.L (Electronics Division) Bangalore, India
Labels (1)
0 Kudos
8 Replies
Nitin_Dogra
Beginner
411 Views

Dear Sir/Madam,

I am writing to follow up on my previous query regarding the Ethernet PHY issue on our custom Cyclone V SoC-based board. I sent the initial email four days ago and have not received a response yet.

Could you kindly look into this matter and provide any updates?

 

Best regards,
Nitin Dogra

BHEL

0 Kudos
Jeet14
Employee
398 Views

Hi Nitin,


I hope you have configured your device tree for ethernet phy interface.

Is it possible to share your device tree and the phy details used in your board?

For reference purpose you can refer the Cyclone V DE0_NANO_SOC device tree changes.

https://github.com/altera-opensource/linux-socfpga/blob/socfpga-6.6.22-lts/arch/arm/boot/dts/intel/socfpga/socfpga_cyclone5_de0_nano_soc.dts


Regards

Tiwari


0 Kudos
Nitin_Dogra
Beginner
393 Views

Dear Mr. Tiwari,

Thank you for your prompt response.

As requested, I am sharing the device tree configuration PFA and the PHY details for our custom Cyclone V SoC-based board.

PHY Details:

We are using the KSZ9021RNI PHY in our design.

 

Best regards,
Nitin Dogra

BHEL

0 Kudos
Jeet14
Employee
329 Views

Hi,


I mean what you have set the parameters in the socfpga_cyclone5_socdk.dts.

Is the skew values are entered based on your hardware?

Also, what all MDIO settings are entered in the socfpga_cyclone5_socdk.dts.


Regards

Tiwari


0 Kudos
Nitin_Dogra
Beginner
308 Views

Hi,

 

We have used two KSZ9021RNI PHYs on our custom Cyclone V SoC-based board. One of the PHYs is working fine with hardware-specific skew values configured in the device tree.

However, there are no MDIO-related configurations present in either our custom device tree or the provided socfpga_cyclone5_socdk.dts.

If MDIO-specific configurations are required for proper operation, could you kindly suggest the necessary changes or provide guidance on how to proceed?

Best regards,
Nitin Dogra

0 Kudos
Jeet14
Employee
201 Views

Hi Nitin,


So, both HPS ethernet are used together and both are with the HPS IO's.

Did you tried disabling 2nd HPS ethernet(working) and used only 1st ethernet(non-working)?


Also, can try with below line in ethernet@ff700000.

altr,sysmgr-syscon = <0x20 0x60 0x02>; //also try and check with commenting this line

phy-mode = "rgmii-id";


Regards

Tiwari


0 Kudos
Nitin_Dogra
Beginner
184 Views

Hi,

 

Yes, both PHYs are on HPS, and I have checked with the second Ethernet (working) disabled. Additionally, I have tried the changes you suggested:

altr,sysmgr-syscon = <0x20 0x60 0x02>; // also tried commenting this line

and
phy-mode = "rgmii-id";

 

However, the issue remains the same. Below are the relevant logs related to Ethernet:

 

[ 1.564121] socfpga-dwmac ff700000.ethernet: IRQ eth_wake_irq not found
[ 1.570748] socfpga-dwmac ff700000.ethernet: IRQ eth_lpi not found
[ 1.577034] socfpga-dwmac ff700000.ethernet: PTP uses main clock
[ 1.583210] socfpga-dwmac ff700000.ethernet: Version ID not available
[ 1.589652] socfpga-dwmac ff700000.ethernet: DWMAC1000
[ 1.594861] socfpga-dwmac ff700000.ethernet: DMA HW capability register supported
[ 1.602324] socfpga-dwmac ff700000.ethernet: RX Checksum Offload Engine supported
[ 1.609786] socfpga-dwmac ff700000.ethernet: COE Type 2
[ 1.614993] socfpga-dwmac ff700000.ethernet: TX Checksum insertion supported
[ 1.622030] socfpga-dwmac ff700000.ethernet: Enhanced/Alternate descriptors
[ 1.628981] socfpga-dwmac ff700000.ethernet: Extended descriptors not supported
[ 1.636270] socfpga-dwmac ff700000.ethernet: Ring mode enabled
[ 1.642101] socfpga-dwmac ff700000.ethernet: device MAC address a2:de:14:70:1c:cc
[ 1.668634] mdio_bus stmmac-0:00: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
[ 1.678136] mdio_bus stmmac-0:01: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
[ 1.687617] mdio_bus stmmac-0:02: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:02, irq=POLL)
[ 1.697075] mdio_bus stmmac-0:03: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:03, irq=POLL)
[ 1.706529] mdio_bus stmmac-0:04: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:04, irq=POLL)
[ 1.715983] mdio_bus stmmac-0:05: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:05, irq=POLL)
[ 1.725427] mdio_bus stmmac-0:06: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:06, irq=POLL)
[ 1.734880] mdio_bus stmmac-0:07: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:07, irq=POLL)
[ 1.744334] mdio_bus stmmac-0:08: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:08, irq=POLL)
[ 1.753788] mdio_bus stmmac-0:09: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:09, irq=POLL)
[ 1.763242] mdio_bus stmmac-0:0a: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:0a, irq=POLL)
[ 1.772695] mdio_bus stmmac-0:0b: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:0b, irq=POLL)
[ 1.782149] mdio_bus stmmac-0:0c: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:0c, irq=POLL)
[ 1.791602] mdio_bus stmmac-0:0d: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:0d, irq=POLL)
[ 1.801055] mdio_bus stmmac-0:0e: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:0e, irq=POLL)
[ 1.810509] mdio_bus stmmac-0:0f: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:0f, irq=POLL)
[ 1.819962] mdio_bus stmmac-0:10: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:10, irq=POLL)
[ 1.829416] mdio_bus stmmac-0:11: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:11, irq=POLL)
[ 1.838870] mdio_bus stmmac-0:12: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:12, irq=POLL)
[ 1.848324] mdio_bus stmmac-0:13: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:13, irq=POLL)
[ 1.857778] mdio_bus stmmac-0:14: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:14, irq=POLL)
[ 1.867231] mdio_bus stmmac-0:15: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:15, irq=POLL)
[ 1.876684] mdio_bus stmmac-0:16: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:16, irq=POLL)
[ 1.886137] mdio_bus stmmac-0:17: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:17, irq=POLL)
[ 1.895580] mdio_bus stmmac-0:18: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:18, irq=POLL)
[ 1.905032] mdio_bus stmmac-0:19: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:19, irq=POLL)
[ 1.914487] mdio_bus stmmac-0:1a: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:1a, irq=POLL)
[ 1.923940] mdio_bus stmmac-0:1b: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:1b, irq=POLL)
[ 1.933392] mdio_bus stmmac-0:1c: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:1c, irq=POLL)
[ 1.942847] mdio_bus stmmac-0:1d: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:1d, irq=POLL)
[ 1.952299] mdio_bus stmmac-0:1e: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:1e, irq=POLL)
[ 1.961752] mdio_bus stmmac-0:1f: attached PHY driver [unbound] (mii_bus:phy_addr=stmmac-0:1f, irq=POLL)
[ 1.973049] dwc2 ffb40000.usb: supply vusb_d not found, using dummy regulator
........

[ OK ] Started Avahi mDNS/DNS-SD Stack.
[ 9.542391] socfpga-dwmac ff700000.ethernet eth0: validation of rgmii with support 0000000,00000000,00006280 and advertise2
[ OK ] Reached target Network.
[ 9.596027] socfpga-dwmac ff700000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -22)
Starting Run init_all.sh script...
[ 9.630811] socfpga-dwmac ff700000.ethernet eth0: validation of rgmii with support 0000000,00000000,00006280 and advertise2
[ 9.706421] socfpga-dwmac ff700000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -22)
[ 9.724555] socfpga-dwmac ff700000.ethernet eth0: validation of rgmii with support 0000000,00000000,00006280 and advertise2
Starting Hostname Service...
Starting WPA supplicant...
[ OK ] Started User Login Management.
[ 9.799816] socfpga-dwmac ff700000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -22)
[ OK ] Finished Run init_all.sh script.

eht1 is disabled

0 Kudos
Jeet14
Employee
62 Views

Hi Nitin,


Apologies for delay due to other priorities. I am checking on this and will update you by tomorrow.


Regards

Tiwari


0 Kudos
Reply