zynq_z_turn_defconfig: broken networking

Matwey V. Kornilov matwey.kornilov at gmail.com
Wed Apr 8 14:11:42 CEST 2020


ср, 8 апр. 2020 г. в 13:46, Michal Simek <monstr at monstr.eu>:
>
> On 08. 04. 20 12:43, Matwey V. Kornilov wrote:
> > ср, 8 апр. 2020 г. в 11:13, Michal Simek <monstr at monstr.eu>:
> >>
> >> On 08. 04. 20 9:12, Matwey V. Kornilov wrote:
> >>> ср, 8 апр. 2020 г. в 09:56, Michal Simek <monstr at 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 at gmail.com> wrote:
> >>>>>>
> >>>>>> вт, 7 апр. 2020 г. в 12:18, Michal Simek <monstr at monstr.eu>:
> >>>>>>>
> >>>>>>> On 07. 04. 20 11:16, Matwey V. Kornilov wrote:
> >>>>>>>> вт, 7 апр. 2020 г. в 12:01, Michal Simek <monstr at monstr.eu>:
> >>>>>>>>>
> >>>>>>>>> On 07. 04. 20 9:58, Matwey V. Kornilov wrote:
> >>>>>>>>>> пн, 6 апр. 2020 г. в 12:41, Michal Simek <monstr at 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 at 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 at nxp.com>
> >>>>>>     Reported-by: tetsu-aoki via github
> >>>>>>     Acked-by: Joe Hershberger <joe.hershberger at 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@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.
> >>
> >> when you run mdio list you should see detected phy address.
> >
> > Zynq> mdio list
> > eth0:
> > 3 - Generic PHY <--> ethernet at e000b000
>
> Then enable CONFIG_PHY_ATHEROS and retest.
> You should be able to detect ar8035. If that both works please send a
> patch to change phy addr from 0 to 3 and enable AR8035 driver in config.

With CONFIG_PHY_ATHEROS enabled, I still see

3 - Generic PHY <--> ethernet at e000b000

However, I've located the PHY chip on my board instance, and it is not
Atheros, it is KSZ9031RNXCC.
Probably, the schematics (or my board which I ordered in 2019) are
outdated. So, probably there are multiple revisions of Z-Turn board
over the world, and fixing PHY address is not a solution.

CONFIG_PHY_MICREL_KSZ90X1 does the things:

Zynq> mdio list
eth0:
3 - Micrel ksz9031 <--> ethernet at e000b000

So, I think it is worth to contact the vendor in this case. I think at
least we would like to know if there are really two revisions of this
board existing (one with AR8035 and one with the Micrel), and we need
actual schematics for both revisions. My only concern is that the
vendor would not like to speak with people from street like me.

>
> 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


More information about the U-Boot mailing list