From: Sjoerd Simons <sjoerd.simons-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
To: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH] ARM: dts: rockchip: Setup ethernet0 alias for u-boot
Date: Fri, 30 Oct 2015 10:47:03 +0100 [thread overview]
Message-ID: <1446198423.4092.285.camel@collabora.co.uk> (raw)
In-Reply-To: <CAMuHMdXBcZAXSm1hXv6E-hW9Zp-bPLpp-HxuWukS-Y837LBneQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Fri, 2015-10-30 at 10:15 +0100, Geert Uytterhoeven wrote:
> Hi Sjoerd,
>
> On Thu, Oct 29, 2015 at 9:44 PM, Sjoerd Simons
> <sjoerd.simons-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org> wrote:
> > Add an ethernet0 alias for the wired network card and an all 0
> > default
> > mac address so that u-boot can find the device-node and fill in the
> > mac address.
>
> Thanks a lot!
>
> I had the same issue on another board, and adding an "ethernet0"
> alias
> fixes it.
Happy to help, this stuff is really not that well document
unfortunately.
> > @@ -130,6 +134,8 @@
> > };
> >
> > &gmac {
> > + /* To be filled in by U-Boot */
> > + mac-address = [00 00 00 00 00 00];
> > status = "ok";
> > };
>
> Note that in my case I didn't have to add an empty mac-address
> property.
> U-Boot (2015.04-something --- don't have the sources) seems to add a
> "local-mac-address" property automatically.
After submitting the patch i actually dived a bit deeper at how this
all hangs together.
The linux kernel checks for mac-address, local-mac-address and address
in the fdt node, in that order of preference. u-boot (at least recent
ones like you have), will set the mac-address property *if* it's
already defined but will always create the local-mac-address property
regardless.
So indeed practially, as you noticed, just setting the alias is enough.
I'm now just very confused about the intended meanings of the
properties, Documentation/devicetree/bindings/net/ethernet.txt doesn't
shed a lot of light on it:
- local-mac-address: array of 6 bytes, specifies the MAC address that
was assigned to the network device;
- mac-address: array of 6 bytes, specifies the MAC address that was
last used by the boot program; should be used in cases where the MAC
address assigned to the device by the boot program is different from
the "local-mac-address"property;
So yeah, I'm not sure what the "correct" fix is. It's tempting to
indeed just leave out the mac-address property though :)
--
Sjoerd Simons
Collabora Ltd.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-10-30 9:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 20:44 [PATCH] ARM: dts: rockchip: Setup ethernet0 alias for u-boot Sjoerd Simons
[not found] ` <1446151497-29833-1-git-send-email-sjoerd.simons-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-10-29 20:52 ` Heiko Stuebner
2015-10-29 21:39 ` Sjoerd Simons
[not found] ` <1446154764.4092.273.camel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-10-29 22:57 ` Heiko Stuebner
2015-10-30 9:15 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXBcZAXSm1hXv6E-hW9Zp-bPLpp-HxuWukS-Y837LBneQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-30 9:47 ` Sjoerd Simons [this message]
[not found] ` <1446198423.4092.285.camel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-10-30 9:57 ` Geert Uytterhoeven
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=1446198423.4092.285.camel@collabora.co.uk \
--to=sjoerd.simons-zgy8ohtn/8ppycu2f3hruq@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).