All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matwey V. Kornilov <matwey.kornilov@gmail.com>
To: u-boot@lists.denx.de
Subject: zynq_z_turn_defconfig: broken networking
Date: Wed, 8 Apr 2020 10:12:41 +0300	[thread overview]
Message-ID: <CAJs94EZcEEXXMcZfZ=Dspa4G+jN4VmO6Mn-zNhc1K7tE0qh=nA@mail.gmail.com> (raw)
In-Reply-To: <be4dbe0a-92ed-47d4-321c-c1cc2655a691@monstr.eu>

??, 8 ???. 2020 ?. ? 09:56, Michal Simek <monstr@monstr.eu>:
>
> On 07. 04. 20 22:12, Joe Hershberger wrote:
> > On Tue, Apr 7, 2020 at 1:34 PM Matwey V. Kornilov
> > <matwey.kornilov@gmail.com> wrote:
> >>
> >> ??, 7 ???. 2020 ?. ? 12:18, Michal Simek <monstr@monstr.eu>:
> >>>
> >>> On 07. 04. 20 11:16, Matwey V. Kornilov wrote:
> >>>> ??, 7 ???. 2020 ?. ? 12:01, Michal Simek <monstr@monstr.eu>:
> >>>>>
> >>>>> On 07. 04. 20 9:58, Matwey V. Kornilov wrote:
> >>>>>> ??, 6 ???. 2020 ?. ? 12:41, Michal Simek <monstr@monstr.eu>:
> >>>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> On 06. 04. 20 10:14, Matwey V. Kornilov wrote:
> >>>>>>>> 06.04.2020 11:12, Matwey V. Kornilov ?????:
> >>>>>>>>> Hello,
> >>>>>>>>>
> >>>>>>>>> I am running u-boot 2020.04-rc4-00100-g74bf17db39 with
> >>>>>>>>> zynq_z_turn_defconfig configuration on MYIR Z-Turn board.
> >>>>>>>>> And I see the following when I am trying to run `dhcp' command.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
> >>>>>>>>> mdio_register: non unique device name 'eth0'
> >>>>>>>>> ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
> >>>>>>>>> mdio_register: non unique device name 'eth0'
> >>>>>>>>> ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
> >>>>>>>>> mdio_register: non unique device name 'eth0'
> >>>>>>>>> ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
> >>>>>>>>> mdio_register: non unique device name 'eth0'
> >>>>>>>>> No ethernet found.
> >>>>>>>>> ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
> >>>>>>>>> mdio_register: non unique device name 'eth0'
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>> Full boot log is the following:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> U-Boot SPL 2020.04-rc4-00100-g74bf17db39 (Apr 06 2020 - 11:00:45 +0300)
> >>>>>>>> mmc boot
> >>>>>>>> Trying to boot from MMC1
> >>>>>>>> spl_load_image_fat_os: error reading image system.dtb, err - -2
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> U-Boot 2020.04-rc4-00100-g74bf17db39 (Apr 06 2020 - 11:00:45 +0300)
> >>>>>>>>
> >>>>>>>> CPU:   Zynq 7z010
> >>>>>>>> Silicon: v3.1
> >>>>>>>> Model: Zynq Z-Turn MYIR Board
> >>>>>>>> DRAM:  ECC disabled 1 GiB
> >>>>>>>> MMC:   mmc at e0100000: 0
> >>>>>>>> In:    serial at e0001000
> >>>>>>>> Out:   serial at e0001000
> >>>>>>>> Err:   serial at e0001000
> >>>>>>>> Net:   ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
> >>>>>>>> Could not get PHY for eth0: addr 0
> >>>>>>>> No ethernet found.
> >>>>>>>>
> >>>>>>>> Hit any key to stop autoboot:  0
> >>>>>>>>
> >>>>>>>
> >>>>>>> u-boot is not able to find out your phy. Address is setup 0 which means
> >>>>>>> u-boot should do it autodetection. I don't have this board here to tell
> >>>>>>> you what can be wrong.
> >>>>>>>
> >>>>>>> Alex, Anton: Can you please comment it?
> >>>>>>>
> >>>>>>
> >>>>>> Is there a chance that something is wrong with ps7_init_gpl.c ?
> >>>>>> The Ethernet PHY doesn't work in Linux too with the similar error message.
> >>>>>
> >>>>> Did you validate any golden images that phy is fine?
> >>>>
> >>>> Yes, I did. There was microsd card supplied with the board (it has
> >>>> U-Boot 2013.10-svn7 and 3.15.0-xilinx kernel). The Ethernet is working
> >>>> with this image.
> >>>>
> >>>>>
> >>>>> Anyway as I said I don't have this board here that's why guys who has it
> >>>>> should debug it or patches welcome.
> >>>>> Or 3rd option is if none wants to keep it alive I will remove support
> >>>>> for it.
> >>>>
> >>>> Well, unfortunately, I have little knowledge how to debug this, but if
> >>>> you have an ideas what could I check, please ask.
> >>>
> >>> This board is in mainline for a while. That's why you can go back to
> >>> commit which introduced this board and try it. Then you can bisect it
> >>> and see which commit breaks it.
> >>
> >> Thanks. I've found where Ethernet was broken:
> >>
> >> 1f60789602e0d5f5f9a8b507f25737c65b5d8daa is the first bad commit
> >> commit 1f60789602e0d5f5f9a8b507f25737c65b5d8daa
> >> Author: Priyanka Jain <priyanka.jain@nxp.com>
> >> Date:   Tue Nov 5 04:05:11 2019 +0000
> >>
> >>     net/phy: Fix phy_connect() for phy addr 0
> >>
> >>     Fix 'mask' calculation in phy_connect() for phy addr '0'.
> >>     'mask' is getting set to '0xffffffff' for phy addr '0'
> >>     in phy_connect() whereas expected value is '0'.
> >>
> >>     Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
> >>     Reported-by: tetsu-aoki via github
> >>     Acked-by: Joe Hershberger <joe.hershberger@ni.com>
> >>
> >
> > So presumably that means the phy addr should be set to -1 instead of 0
> > for autodetect, right? I believe this was seen on at least one other
> > board [1].
> >
> > [1] - https://www.mail-archive.com/u-boot at lists.denx.de/msg351386.html
>
> Good. I think that would be the best to setup direct phy address used on
> that board instead of trying to do autodetection but up2you.

As far as I understand, the register comes from dtb which basically
comes from Linux kernel sources.
In the board schematics
http://www.myirtech.com/download/Zynq7000/Z-TURNBOARD_schematic.pdf
I see "PHY address: 000" (page 9), but I cannot understand what did they mean.

>
> Thanks,
> Michal
>
> --
> Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
> w: www.monstr.eu p: +42-0-721842854
> Maintainer of Linux kernel - Xilinx Microblaze
> Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
> U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
>


-- 
With best regards,
Matwey V. Kornilov

  reply	other threads:[~2020-04-08  7:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06  8:12 zynq_z_turn_defconfig: broken networking Matwey V. Kornilov
2020-04-06  8:14 ` Matwey V. Kornilov
2020-04-06  9:40   ` Michal Simek
2020-04-07  7:58     ` Matwey V. Kornilov
2020-04-07  9:01       ` Michal Simek
2020-04-07  9:16         ` Matwey V. Kornilov
2020-04-07  9:17           ` Michal Simek
2020-04-07 18:34             ` Matwey V. Kornilov
2020-04-07 20:12               ` Joe Hershberger
2020-04-08  6:56                 ` Michal Simek
2020-04-08  7:12                   ` Matwey V. Kornilov [this message]
2020-04-08  8:13                     ` Michal Simek
2020-04-08 10:43                       ` Matwey V. Kornilov
2020-04-08 10:46                         ` Michal Simek
2020-04-08 12:11                           ` Matwey V. Kornilov
2020-04-08 12:26                             ` Matwey V. Kornilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJs94EZcEEXXMcZfZ=Dspa4G+jN4VmO6Mn-zNhc1K7tE0qh=nA@mail.gmail.com' \
    --to=matwey.kornilov@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.