# Customer board - No ethernet

**URL:** <https://discuss.pynq.io/t/customer-board-no-ethernet/152>\
**Category:** Support\
**Created:** [May 31, 2019, 1:37pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152 "2019-05-31T13:37:52Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [May 31, 2019, 1:37pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/1 "2019-05-31T13:37:52Z")

</div>

I have successfully adapted and booted a pynq image for my board following the **[Retargeting to a Different Board](https://pynq.readthedocs.io/en/latest/pynq_sd_card.html#retargeting-to-a-different-board)** instruction and modifyng few settings in the petalinux-config Kconfig, as reported in a different thread.  
But I don’t have ethernet…  
In my hardware the PS has got the ENET0 enabled:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/1X/5fd0b213de6f65733bd663822fad98cee552c944.png)  
What can I do to fix or at lest debug? My PHY is KSZ8794, it may not be the same as the PYNQ-Z1 or Z2  
My boot dump is attached. [boot.log (31.3 KB)](https://discuss.pynq.io/uploads/short-url/rhITJ5SjexfjJM4iMBHcnpXcf41.log)  
My petalinux-config:  
internet settings:  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/1X/136df98c96e7ffc9547484cd36f30a77b3fcf1a3.png)  
dtb image settings:  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/1X/66cb6ef4d2ed3173124f4d9a1efc00f4c26d4343.png)

---

<div class="post-metadata">

**Author:** ![PeterOgden](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/peterogden/32/55_2.png) [@PeterOgden](https://discuss.pynq.io/u/PeterOgden)\
**Post date:** [May 31, 2019, 2:13pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/2 "2019-05-31T14:13:01Z")

</div>

A scan of the boot log seems to indicate the PHY is not being detected and hence the Ethernet driver is not being loaded. Do you have an entry in the device tree corresponding to the PHY? As a first pass you could try seeing if the one we use for the PYNQ-Z1/2 works - [PYNQ/system-user.dtsi at master · Xilinx/PYNQ · GitHub](https://github.com/Xilinx/PYNQ/blob/master/boards/Pynq-Z2/petalinux_bsp/meta-user/recipes-bsp/device-tree/files/system-user.dtsi).

Have you had any success with Ethernet in a pure Petalinux environment?

Peter

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [May 31, 2019, 2:27pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/3 "2019-05-31T14:27:08Z")

</div>

At the beginning, in the image coming out of **make BOARDDIR=myBoard** , there was no system.dtb in the fat partition, only boot.bin and image.ub, so I think I didn’t have an entry in the device tree.  
Then I added the following to the system-user.dtsi:

```
&gem0 {
status = "okay";

fixed-link {
    speed = <1000>;
    full-duplex;
   };
};

```

rebuilt and added the generated system.dtb to the boot partition but no luck.  
I fear the PHY specific reset signal may not be released early enough for the zynq to see the IC alive… such an occurrence is mentioned somewhere on the Xilinx forum

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [May 31, 2019, 2:30pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/4 "2019-05-31T14:30:43Z")

</div>

For the second question:

- Yes, for the same zynq+phy hardware arrangement, different PCB model

- I didn’t try for this specific PCB model, yet.

---

<div class="post-metadata">

**Author:** ![PeterOgden](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/peterogden/32/55_2.png) [@PeterOgden](https://discuss.pynq.io/u/PeterOgden)\
**Post date:** [May 31, 2019, 2:35pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/5 "2019-05-31T14:35:09Z")

</div>

Is your reset coming from PS or the board? Looking through the PHY device-tree bindings ([linux-xlnx/phy.txt at master · Xilinx/linux-xlnx · GitHub](https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/net/phy.txt)) it looks like you should be able to specify the reset-gpios property to ensure that the reset is deasserted before the chip is probed.

Peter

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [May 31, 2019, 2:37pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/6 "2019-05-31T14:37:27Z")

</div>

No, unfortunately the reset signal is coming from an external uC. I will have to remove it by brute force 🙂

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [May 31, 2019, 3:32pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/7 "2019-05-31T15:32:07Z")

</div>

modified the network settings in petalinux-config to “manual”, the log messages:  
**PHY is not detected**  
**GEM PHY init failed**  
**No ethernet found.**  
disappeared, but there is still no ethernet.  
[boot2.log (29.3 KB)](https://discuss.pynq.io/uploads/short-url/rwvttAQnkzoYByXvjeSa1tD0oP6.log)

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [June 4, 2019, 12:18pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/8 "2019-06-04T12:18:58Z")

</div>

I get this four lines out of the boot log related to my ethernet connection:

libphy: Fixed MDIO Bus: probed  
libphy: MACB\_mii\_bus: probed  
mdio\_bus e000b000.ethernet-ffffffff: /amba/ethernet@e000b000/fixed-link **has invalid PHY address**  
mdio\_bus e000b000.ethernet-ffffffff: scan phy fixed-link at address 0

what it means? is it a device tree problem, an hardware problem, a driver problem? Has anyone seen something like this? my PHY is a KSZ8794, the device tree (system.dtb dtc to dts to dts.txt because dts files can’t be loaded) is attached and the complete log, too.  
Help!  
[boot\_log\_2019\_06\_03\_02.txt (29.0 KB)](https://discuss.pynq.io/uploads/short-url/aAhqhJ0ptR5xuG3WwjA5cJVNvIv.txt) [system.dts.txt (19.6 KB)](https://discuss.pynq.io/uploads/short-url/2TGjuneXAai67BbpgsyE3WMrP4H.txt)

---

<div class="post-metadata">

**Author:** ![PeterOgden](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/peterogden/32/55_2.png) [@PeterOgden](https://discuss.pynq.io/u/PeterOgden)\
**Post date:** [June 5, 2019, 8:14am UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/9 "2019-06-05T08:14:48Z")

</div>

I’m not sure that fixed-link is the correct child node to use in this case - have you tried with a regular phy node instead? It looks from your PS7 config that you are using MDIO to communicate with the PHY which would imply that a phy node should be present in the device tree.

```nohighlight
&gem0 {
    status = "okay";
    phy@0 {
        reg = <0>;
    };
};

```

No idea what the address will be though.

Peter

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [June 5, 2019, 8:32am UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/10 "2019-06-05T08:32:21Z")

</div>

Ok, I will try as you suggest… thank you.  
There are two things I must highlight, maybe will make my life and your helping effort easier :

1. The MDIO bus pins are not externally connected to the PHY, an SPI from PL is used for communication instead, so I should probably remove the setting in the PS7 IP customization

2. I have got another board, different shape and features but same hardware arrangement, for which I used the PYNQ-Z1 SD image (I believe it was 2.1) and replaced only the three boot partition files, generating them out of petalinux, and worked perfectly… this one instead, didn’t even boot with modified 2.1. Since I now found why this one wasn’t booting (i.e. was looking for bootenv in a non-existing primary flash) maybe I should retry 2.1. modified, just to make sure is not something related with kernel\driver incompatibility after update.

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [June 5, 2019, 1:22pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/11 "2019-06-05T13:22:21Z")

</div>

I don’t know if [this](https://patchwork.ozlabs.org/patch/957535/) might be relevant. The truth is I need to get petalinux to acknowledge my PHY as not-MDIO connected… I disabled the MDIO pins in the PS7 customization and I am eagerly waiting for the Vivado implementation to complete.

---

<div class="post-metadata">

**Author:** ![PeterOgden](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/peterogden/32/55_2.png) [@PeterOgden](https://discuss.pynq.io/u/PeterOgden)\
**Post date:** [June 5, 2019, 3:10pm UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/12 "2019-06-05T15:10:06Z")

</div>

If it works it subsequently works in PetaLinux then the same device-tree should also work in PYNQ. Good Luck!

Peter

---

<div class="post-metadata">

**Author:** ![gpcus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/gpcus/32/54_2.png) [@gpcus](https://discuss.pynq.io/u/gpcus)\
**Post date:** [June 7, 2019, 11:03am UTC](https://discuss.pynq.io/t/customer-board-no-ethernet/152/13 "2019-06-07T11:03:44Z")

</div>

I finally got it working!  
As planned I regenerate the hdf file after disabling MDIO for ENET0 in the PS7 IP Vivado customization panel, and though there is no evidence that it changed anything in the device tree, the bootlog shows the macb finally awake…  
**macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 29 (1e :57:8c:b9:3a:8c)**  
**Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii\_bus:phy\_addr=fixe d-0:00, irq=POLL)**  
I honestly believe this might be an issue with my board hardware arrangement exploiting a macb driver weakness or bug, because the MDIO bus is scanned nevertheless.  
I attach the ultimately successful bootlog, the device tree and a link to the [xilinx macb](https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841740/Macb+Driver) page for future reference  
And I’ll ask the web manager to close this thread, as I like to get up from the table as a winner!!! 😀😀  
[Downloads.zip (15.2 KB)](https://discuss.pynq.io/uploads/short-url/s4DFbMYKSDeeithsVtoVd77TgfJ.zip)
