Author Topic: TE0720 can't get ethernet to work in uBoot  (Read 75 times)

JoeM

  • Active Member
  • *
  • Posts: 5
TE0720 can't get ethernet to work in uBoot
« on: September 16, 2020, 08:25:32 PM »
Hi. I'm using a Trenz 7020 dev system, and building uBoot from buildroot using uboot-xilinx-v2016.7.  I can't get ethernet working from uBoot.  It looks like uBoot is using the wrong PHY, but I'm not sure how to change it/debug the issue:

U-Boot 2016.07 (Sep 16 2020 - 16:31:23 +0000)

Board: Xilinx Zynq
DRAM:  ECC disabled 1 GiB
MMC:   sdhci@e0100000: 0, sdhci@e0101000: 1
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
In:    serial@e0000000
Out:   serial@e0000000
Err:   serial@e0000000
Board: Xilinx Zynq
Net:   ZYNQ GEM: e000c000, phyaddr 8, interface gmii
PHY is not detected
GEM PHY init failed

How can I change which PHY/ethernet port is being used?  Do I need to change device tree, or can I change it in code?

Thanks,


JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1413
Re: TE0720 can't get ethernet to work in uBoot
« Reply #1 on: September 17, 2020, 07:27:31 AM »
Hi,
do you have used  the correct phy address? Do you use correct FSBL configuration (depends on your PS setup in your Design)

We offer an reference designs also with prebuilt binaries to test directly:
https://wiki.trenz-electronic.de/display/PD/TE0720+Test+Board

br
John

JoeM

  • Active Member
  • *
  • Posts: 5
Re: TE0720 can't get ethernet to work in uBoot
« Reply #2 on: September 17, 2020, 06:09:23 PM »
John,

  Thanks. The system boots a kernel that has Ethernet working, so I think the FSBL is correct. This system has not required ethernet from uBoot before this, so I'm trying to get ethernet working from uBoot now. I added the GEM driver to the uboot build, but I get errors when trying to use it.  gem0 is at address e000b000, and that is the one I want to use, but uBoot looks like it's picking gem1, and I'm not sure how to change it. I also get errors when I try to dhcp:

ZynqJJM> dhcp
ZYNQ GEM: e000c000, phyaddr 8, interface gmii
mdio_register: non unique device name 'gem'
ZYNQ GEM: e000c000, phyaddr 8, interface gmii
mdio_register: non unique device name 'gem'
ZYNQ GEM: e000c000, phyaddr 8, interface gmii
mdio_register: non unique device name 'gem'
ZYNQ GEM: e000c000, phyaddr 8, interface gmii
mdio_register: non unique device name 'gem'
No ethernet found.
ZYNQ GEM: e000c000, phyaddr 8, interface gmii
mdio_register: non unique device name 'gem'

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1413
Re: TE0720 can't get ethernet to work in uBoot
« Reply #3 on: September 18, 2020, 07:06:37 AM »
Hi,
how did you generate your uboot? With petalinux and your xsa (or hdf on on older vivado)? What is in your generated device tree?
On board PHY is  connected to gem0 --> ethernet@e000b000 this will be setup automatically with petalinux.
Your PHY address is also wrong, see: https://wiki.trenz-electronic.de/display/PD/TE0720+Test+Board#TE0720TestBoard-DeviceTree
br
John