ср, 8 апр. 2020 г. в 11:13, Michal Simek <mon...@monstr.eu>: > > On 08. 04. 20 9:12, Matwey V. Kornilov wrote: > > ср, 8 апр. 2020 г. в 09:56, Michal Simek <mon...@monstr.eu>: > >> > >> On 07. 04. 20 22:12, Joe Hershberger wrote: > >>> On Tue, Apr 7, 2020 at 1:34 PM Matwey V. Kornilov > >>> <matwey.korni...@gmail.com> wrote: > >>>> > >>>> вт, 7 апр. 2020 г. в 12:18, Michal Simek <mon...@monstr.eu>: > >>>>> > >>>>> On 07. 04. 20 11:16, Matwey V. Kornilov wrote: > >>>>>> вт, 7 апр. 2020 г. в 12:01, Michal Simek <mon...@monstr.eu>: > >>>>>>> > >>>>>>> On 07. 04. 20 9:58, Matwey V. Kornilov wrote: > >>>>>>>> пн, 6 апр. 2020 г. в 12:41, Michal Simek <mon...@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@e0100000: 0 > >>>>>>>>>> In: serial@e0001000 > >>>>>>>>>> Out: serial@e0001000 > >>>>>>>>>> Err: serial@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.j...@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.j...@nxp.com> > >>>> Reported-by: tetsu-aoki via github > >>>> Acked-by: Joe Hershberger <joe.hershber...@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@e000b000 > > M > > > -- > 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