All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <oss@buserror.net>
To: Valentin Longchamp <valentin.longchamp@keymile.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] powerpc: define the fman node for the kmcoge4 DTS
Date: Sat, 16 Apr 2016 20:49:11 -0500	[thread overview]
Message-ID: <1460857751.32510.175.camel@buserror.net> (raw)
In-Reply-To: <5705FAD3.40106@keymile.com>

On Thu, 2016-04-07 at 08:14 +0200, Valentin Longchamp wrote:
> On 06/04/16 23:49, Scott Wood wrote:
> > On Wed, 2016-04-06 at 15:37 +0200, Valentin Longchamp wrote:
> > > Now that the FMAN mac driver has been merged the fman node is relevant.
> > > 
> > > The kmcoge4 board implements 3 ethernet interfaces, 1 with a RGMII phy
> > > and 2 with fixed 1 Giga SGMII links.
> > > 
> > > Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> > > ---
> > >  arch/powerpc/boot/dts/fsl/kmcoge4.dts | 39
> > > +++++++++++++++++++++++++++++++++++
> > >  1 file changed, 39 insertions(+)
> > > 
> > > diff --git a/arch/powerpc/boot/dts/fsl/kmcoge4.dts
> > > b/arch/powerpc/boot/dts/fsl/kmcoge4.dts
> > > index 6858ec9..1cec66d 100644
> > > --- a/arch/powerpc/boot/dts/fsl/kmcoge4.dts
> > > +++ b/arch/powerpc/boot/dts/fsl/kmcoge4.dts
> > > @@ -106,6 +106,45 @@
> > >  		sata@221000 {
> > >  			status = "disabled";
> > >  		};
> > > +
> > > +		fman0: fman@400000 {
> > > +			enet0: ethernet@e0000 {
> > > +				phy-connection-type = "sgmii";
> > > +				local-mac-address = [00 11 22 33 44
> > > 55];
> > > +				fixed-link {
> > > +					speed = <1000>;
> > > +					full-duplex;
> > > +				};
> > > +			};
> > > +			mdio0: mdio@e1120 {
> > > +				front_phy: ethernet-phy@11 {
> > > +					reg = <0x11>;
> > > +				};
> > > +			};
> > > +
> > > +			enet1: ethernet@e2000 {
> > > +				phy-connection-type = "sgmii";
> > > +				local-mac-address = [00 11 22 33 44
> > > 56];
> > > +				fixed-link {
> > > +					speed = <1000>;
> > > +					full-duplex;
> > > +				};
> > > +			};
> > 
> > No hardcoded MAC addresses.
> > 
> 
> For these 2 interfaces where I have the local-mac-address field, the MAC
> addresses are set later by an application that reads the real address in
> some
> EEPROM. However, in order to let the fman mac_probe to run successfully in
> the
> first place I have set non-zero MAC addresses since the local-mac-address
> fields
> are not set by u-boot.

Why can't it be set from U-Boot?

If you absolutely must hardcode a mac address, use one with the locally
-administered bit set (0x02 in the first byte).

> I have found several local-mac-address fields in other DTS files that are
> all
> zeros, and thus are rejected by of_get_mac_address. Are they leftovers from
> the
> past or should they be used here as well ? If not, I will simply drop these
> 2
> fields.

That's a relic from ancient U-Boots that could only overwrite existing
properties rather than insert them from scratch.

-Scott

  reply	other threads:[~2016-04-17  1:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 13:37 [PATCH] powerpc: define the fman node for the kmcoge4 DTS Valentin Longchamp
2016-04-06 21:49 ` Scott Wood
2016-04-07  6:14   ` Valentin Longchamp
2016-04-17  1:49     ` Scott Wood [this message]
2016-04-18 14:37       ` Valentin Longchamp

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=1460857751.32510.175.camel@buserror.net \
    --to=oss@buserror.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=valentin.longchamp@keymile.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.