03-17-2021 12:04 AM - edited 03-17-2021 12:10 AM
I am currently using ARTY A7-100T board with SoC by Shakti Processor. I have compiled the changes made in the DTS and booted in the Xilinx board. I am now able to see the interface in the ifconfig. But at the end of the xemaclite_open and adjust_link the driver prints "xilinx_emaclite 44000.ethernet eth0: Link is Down". The memory map for the ethernet is from 0x44000 to 0x47FFF and the interrupt used is from PLIC id 31. Is there any part of the configuration that I am missing? Also, when I try to read the BMSR and BMCR values 0xFFFF for both. If there is any issue in the MDIO bus how can we debug it. I am able to set the IP address using ifconfig, but not able to detect any link.
Logs for reference :
[ 50.605804] libphy: Fixed MDIO Bus: probed [ 50.759582] Device Tree Probing for EmacLite Started... [ 50.934448] Platform get resource irq : b231640 [ 51.090301] Platform get resource mem : b231600 [ 51.256530] The value of type in devres.c file __devm_ioremap function is 0 [ 51.524963] Address of remap is 4004000 [ 51.634490] The base address is 4004000 [ 51.785430] ndev->mem_start is 44000 [ 51.907135] ndev->mem_end is 294911 [ 52.070648] libphy: Xilinx Emaclite MDIO: probed [ 52.338165] The status of MDIO setup is 0 [ 52.455413] xilinx_emaclite 44000.ethernet: MAC address is now 00:0a:35:00:00:00 [ 52.954589] xilinx_emaclite 44000.ethernet: Xilinx EmacLite at 0x00044000 mapped to 0x04004000, irq=31
Starting network plug daemon: /etc/netplug.d/netplug eth0 probe -> pid 62 [ 453.830474] The lp->ndev value is b371000 and lp->phy_node value is fa7eb30 [ 454.087646] Inside bus_find_device and value of bus->p is b285000 [ 454.088714] Device address is b2a1c00 in of_phy_find_device [ 454.496093] mdiodev value inside the conditional is : b2a1c00 [ 454.706909] The value of mdiodev->flag is 1 [ 454.842041] The flag value of MDIO device flag phy is true [ 455.054290] The address returned by of_phy_find_device is b2a1c00 [ 457.111358] b2a1c00 [ 457.147308] Set max speed done... [ 457.624084] mii-ctrl value is 65535 [ 457.723022] Set MII_CTRL100 done... [ 457.858245] Set Advertise done... [ 458.498748] BMSR value is 65535 [ 458.729461] PHY_ADDR Register value is 65535 [ 458.862213] Set if phy_node done... [ 458.990600] Set MAC address setting done... [ 459.146697] Request_IRQ is done... [ 459.254302] Set enable interrupt done... [ 459.403656] Queue started... [ 459.612976] lp->last_link is 102 and link_state is 102 [ 459.781158] xilinx_emaclite 44000.ethernet eth0: Link is Down
$ e␛[Jthtool eth0 Settings for eth0: Supported ports: [ ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 10000baseT/Full 2500baseT/Full 5000baseT/Full Link partner advertised pause frame use: Symmetric Receive-only Link partner advertised auto-negotiation: Yes Link partner advertised FEC modes: Not reported Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Link detected: no
I am not able to see any supported boards in the ethtool output. Also, with that when I try to read the register values by phytool I get the following output.
$ phyto␛[Jol ␛[Jprint eth0/1 ieee-phy: id:0xffffffff ieee-phy: reg:BMCR(0x00) val:0xffff flags: ␛[1m+reset␛[0m ␛[1m+loopback␛[0m ␛[1m+aneg-enable␛[0m ␛[1m+power-down␛[0m ␛[1m+isolate␛[0m ␛[1m+aneg-restart␛[0m ␛[1m+collision-test␛[0m speed: 1000-full ieee-phy: reg:BMSR(0x01) val:0xffff capabilities: ␛[1m+100-b4␛[0m ␛[1m+100-f␛[0m ␛[1m+100-h␛[0m ␛[1m+10-f␛[0m ␛[1m+10-h␛[0m ␛[1m+100-t2-f␛[0m ␛[1m+100-t2-h␛[0m flags: ␛[1m+ext-status␛[0m ␛[1m+aneg-complete␛[0m ␛[1m+remote-fault␛[0m ␛[1m+aneg-capable␛[0m ␛[1m+link␛[0m ␛[1m+jabber␛[0m ␛[1m+ext-register␛[0m