public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Benedict Hewson <benedict@hewson-venieri.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] setting Ethernet address
Date: Sat, 15 Mar 2014 07:08:54 +0000	[thread overview]
Message-ID: <3081365.J34PDCkffQ@desktop1> (raw)
In-Reply-To: <CAOMZO5Chi-HxNmrnhEVg1z+xM2JCqP=txtGtYkoWYNkQ_yU4Pg@mail.gmail.com>

On Friday 14 Mar 2014 15:52:29 Fabio Estevam wrote:
> On Fri, Mar 14, 2014 at 3:29 PM, Benedict Hewson
> 
> <benedict@hewson-venieri.com> wrote:
> > I am trying to get network support working on the Embest imx6 Marsboard.
> > I have been reading through the various imx6 boards and it appears that
> > some at least store a MAC address in the fuse memory.
> > 
> > This does not appear to be set on the MarSboard - the fuse memory contains
> > 0. The original 2009 version used the ethaddr environment variable.
> > If I try to include this in the config header file either as part of the
> > CONFIG_EXTRA_ENV_SETTINGS -
> 
> I would suggest you to add support for this board in mainline U-boot
> and the MAC address will be read from fuse without problems.
> 

I am in the process of adding this to the mainline . I did submit a patch a 
few days ago, but much too early and it needed a lot of work as there was a 
lot of dead code, wrongly formatted comments and out of date CONFIG options as 
it was mostly based on 2009 uboot.

I have cleaned it up and removed the various CONFIG options which do not 
appear anywhere else in uboot. Just a few things left to sort out with 
networking.

Based on the mx6sabre configs I have tried inlcuding the config options

#define CONFIG_CMD_FUSE
#ifdef CONFIG_CMD_FUSE
#define CONFIG_MXC_OCOTP
#endif

and also 

#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_MII
#define CONFIG_CMD_NET
#define CONFIG_FEC_MXC
#define CONFIG_MII
#define IMX_FEC_BASE			ENET_BASE_ADDR
#define CONFIG_FEC_XCV_TYPE		RGMII
#define CONFIG_ETHPRIME			"FEC"
#define CONFIG_FEC_MXC_PHYADDR		4

Anyway I get a can't set MAC address warning when booting.

In the fec_get_hwaddr() function I have printed out the values returned by 
imx_get_mac_from_fuse() and they are all 0.

I have read in the README.imx6 file that the MAC address is stored in the fuse 
bank. The default reset value according to the datasheet is 0, so is this 
programmed by Freescale or the board vendor ?  


Do I need to add anything more than CONFIG_CMD_FUSE & CONFIG_MXC_OCOTP to make 
the reading of the fuse memory work ?

regards
Ben

  reply	other threads:[~2014-03-15  7:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14 18:29 [U-Boot] setting Ethernet address Benedict Hewson
2014-03-14 18:52 ` Fabio Estevam
2014-03-15  7:08   ` Benedict Hewson [this message]
2014-03-15 19:59     ` Fabio Estevam
2014-03-16  7:00       ` Benedict Hewson
2014-03-16  8:06         ` Wolfgang Denk
2014-03-16  8:35           ` Benedict Hewson

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=3081365.J34PDCkffQ@desktop1 \
    --to=benedict@hewson-venieri.com \
    --cc=u-boot@lists.denx.de \
    /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