All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Bin Meng" <bin.meng@windriver.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	"Jean-Christophe Dubois" <jcd@tribudubois.net>,
	qemu-arm <qemu-arm@nongnu.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v3 3/4] hw/arm: sabrelite: Connect the Ethernet PHY at address 6
Date: Sat, 1 May 2021 12:28:30 +0800	[thread overview]
Message-ID: <CAEUhbmUTLecMcr0=vmBeYJZeK6CdZY4SZcYiOu0E9AawY41+Cg@mail.gmail.com> (raw)
In-Reply-To: <20210430144136.GA2880420@roeck-us.net>

On Fri, Apr 30, 2021 at 10:41 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> Hi,
>
> On Wed, Jan 06, 2021 at 02:35:03PM +0800, Bin Meng wrote:
> > From: Bin Meng <bin.meng@windriver.com>
> >
> > At present, when booting U-Boot on QEMU sabrelite, we see:
> >
> >   Net:   Board Net Initialization Failed
> >   No ethernet found.
> >
> > U-Boot scans PHY at address 4/5/6/7 (see board_eth_init() in the
> > U-Boot source: board/boundary/nitrogen6x/nitrogen6x.c). On the real
> > board, the Ethernet PHY is at address 6. Adjust this by updating the
> > "fec-phy-num" property of the fsl_imx6 SoC object.
> >
> > With this change, U-Boot sees the PHY but complains MAC address:
> >
> >   Net:   using phy at 6
> >   FEC [PRIME]
> >   Error: FEC address not set.
> >
> > This is due to U-Boot tries to read the MAC address from the fuse,
> > which QEMU does not have any valid content filled in. However this
> > does not prevent the Ethernet from working in QEMU. We just need to
> > set up the MAC address later in the U-Boot command shell, by:
> >
> >   => setenv ethaddr 00:11:22:33:44:55
> >
>
> With this patch in place, the standard Ethernet interface no longer works when
> booting sabrelite Linux images directly (without u-boot) using the following
> qemu command.
>         qemu-system-arm -M sabrelite -kernel arch/arm/boot/zImage
>         ...
>
> The Ethernet interface still instantiates, but packet transfer to the host
> no longer works. Reverting this patch fixes the problem for me.
>
> Is there a qemu command line parameter that is now necessary to instantiate
> the Ethernet interface when booting Linux ?

Enabling "guest_errors" shows that Linux kernel fec driver is trying
to read PHY at address 0, which is not what we want.

[imx.fec.phy]imx_phy_read: Bad phy num 0

The device tree blob of the sabrelite does not contain a node for the
ethernet phy specifying phy address, so I suspect Linux kernel driver
is using default phy address 0 instead.

Could you please test on a real hardware to see what happens?

Regards,
Bin


  reply	other threads:[~2021-05-01  4:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  6:35 [PATCH v3 0/4] hw/arm: sabrelite: Improve emulation fidelity to allow booting upstream U-Boot Bin Meng
2021-01-06  6:35 ` [PATCH v3 1/4] hw/misc: imx6_ccm: Update PMU_MISC0 reset value Bin Meng
2021-01-06  6:35 ` [PATCH v3 2/4] hw/msic: imx6_ccm: Correct register value for silicon type Bin Meng
2021-01-06  6:35 ` [PATCH v3 3/4] hw/arm: sabrelite: Connect the Ethernet PHY at address 6 Bin Meng
2021-04-30 14:41   ` Guenter Roeck
2021-05-01  4:28     ` Bin Meng [this message]
2021-05-01 13:12       ` Guenter Roeck
2021-05-01 20:12       ` Guenter Roeck
2021-05-01 21:40         ` Philippe Mathieu-Daudé
2021-05-01 23:21           ` Guenter Roeck
2021-05-02  0:24             ` Bin Meng
2021-05-02  1:37               ` Guenter Roeck
2021-05-02 13:58                 ` Guenter Roeck
2021-05-01 23:06         ` Bin Meng
2021-01-06  6:35 ` [PATCH v3 4/4] docs/system: arm: Add sabrelite board description Bin Meng
2021-01-08 12:32 ` [PATCH v3 0/4] hw/arm: sabrelite: Improve emulation fidelity to allow booting upstream U-Boot Peter Maydell

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='CAEUhbmUTLecMcr0=vmBeYJZeK6CdZY4SZcYiOu0E9AawY41+Cg@mail.gmail.com' \
    --to=bmeng.cn@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=bin.meng@windriver.com \
    --cc=jcd@tribudubois.net \
    --cc=linux@roeck-us.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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.