All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Adam Ford <aford173@gmail.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
	linux-omap@vger.kernel.org, netdev@vger.kernel.org,
	Sekhar Nori <nsekhar@ti.com>
Subject: Re: Fwd: DA850-evm MAC Address is random
Date: Mon, 28 Aug 2017 14:12:17 -0700	[thread overview]
Message-ID: <20170828211217.GO6008@atomide.com> (raw)
In-Reply-To: <CAHCN7xLHEjda9DcVw5iHA9RaJ7UnyMVxf7e4e8NTEj9Op1JaBw@mail.gmail.com>

* Adam Ford <aford173@gmail.com> [170828 13:33]:
> On Mon, Aug 28, 2017 at 1:54 PM, Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
> > Cc: Sekhar
> >
> > On 08/28/2017 10:32 AM, Adam Ford wrote:
> >>
> >> The davinvi_emac MAC address seems to attempt a call to
> >> ti_cm_get_macid in cpsw-common.c but it returns the message
> >> 'davinci_emac davinci_emac.1: incompatible machine/device type for
> >> reading mac address ' and then generates a random MAC address.
> >>
> >> The function appears to lookup varions boards using
> >> 'of_machine_is_compaible' and supports dm8148, am33xx, am3517, dm816,
> >> am4372 and dra7.  I don't see the ti,davinci-dm6467-emac which is
> >> what's shown in the da850 device tree.
> >>
> >> Is there a patch somewhere for supporting the da850-evm?
> >
> >
> > Not sure if MAC address can be read from Control module.
> > May be Sekhar can say more?
> 
> My understanding is that the MAC address is programmed by Logic PD
> into the SPI flash.  The Bootloader reads this from either SPI or its
> env variables.  Looking at the partition info listed in the
> da850-evm.dts file, it appears as if they've reserved space for it.
> Unfortunately, I don't see any code that reads it out.  I was hoping
> there might be a way to just pass cmdline parameter from the
> bootloader to the kernel to accept the MAC address.
> 
> >
> >>
> >> If not, is there a way to pass the MAC address from U-Boot to the
> >> driver so it doesn't generate a random MAC?
> >
> >
> > "local-mac-address" dt porp
> 
> The downside here, is that we'd have to have the Bootloader modify the
> device tree.

That piece of code exists somewhere in u-boot already. Note how
we are populating the mac address for USB Ethernet drivers in
u-boot and then the Ethernet driver code parses it. See commit
055d31de7158 ("ARM: omap3: beagleboard-xm: dt: Add ethernet to
the device tree") for some more information.

I think u-boot needs the ethernet alias for finding the interface.

Regards,

Tony

  reply	other threads:[~2017-08-28 21:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 15:32 Fwd: DA850-evm MAC Address is random Adam Ford
2017-08-28 18:54 ` Grygorii Strashko
2017-08-28 18:54   ` Grygorii Strashko
2017-08-28 20:32   ` Adam Ford
2017-08-28 21:12     ` Tony Lindgren [this message]
2017-08-29  8:23       ` Sekhar Nori
2017-08-29  8:23         ` Sekhar Nori
2017-08-29 10:23         ` Adam Ford
2017-08-29 11:42           ` Sekhar Nori
2017-08-29 11:42             ` Sekhar Nori
2017-08-29 12:02             ` Adam Ford
2017-08-29 15:16               ` Sekhar Nori
2017-08-29 15:16                 ` Sekhar Nori
2017-08-29 15:20                 ` Adam Ford
2017-08-30  0:49                   ` Adam Ford
2017-08-30  5:38                     ` Sekhar Nori
2017-08-30  5:38                       ` Sekhar Nori
2017-09-05  4:42                       ` Sekhar Nori
2017-09-05  4:42                         ` Sekhar Nori
2017-09-06 21:41                         ` Adam Ford
2017-09-07  8:36                           ` Sekhar Nori
2017-09-07  8:36                             ` Sekhar Nori
2017-09-08 14:18                             ` Adam Ford

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=20170828211217.GO6008@atomide.com \
    --to=tony@atomide.com \
    --cc=aford173@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /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.