mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH 2/3] ARM: dts: i.MX8MP: move MAC address description to common location
Date: Thu, 12 Jan 2023 09:41:52 +0100	[thread overview]
Message-ID: <c1864924c708b6ce14b3afead30d777cd58a365e.camel@pengutronix.de> (raw)
In-Reply-To: <72d6d708-3fef-83a5-812e-85be67615eda@pengutronix.de>

Am Mittwoch, dem 11.01.2023 um 21:13 +0100 schrieb Ahmad Fatoum:
> On 11.01.23 21:00, Lucas Stach wrote:
> > Hi Ahmad,
> > 
> > Am Mittwoch, dem 11.01.2023 um 20:03 +0100 schrieb Ahmad Fatoum:
> > > Hello Lucas,
> > > 
> > > On 11.01.23 19:21, Lucas Stach wrote:
> > > > All i.MX8MP boards should consult the common fuse locations for the
> > > > MAC address of the network interfaces. Also add the second location
> > > > for the EQOS network interface.
> > > 
> > > Do we really want to extend use of this binding? The upstream kernel
> > > DT already has nvmem-cells for the MAC addresses and we have support
> > > for reading that out.
> > > 
> > I thought about this too, but...
> > 
> > >  Only thing missing is the equivalent of
> > > 
> > > Linux commit d0221a780cbc ("nvmem: imx-ocotp: add support for post processing")
> > > 
> > This isn't the only thing missing. To handle the second MAC address via
> > NMEM, we would need to add unaligned read/write support to the OCOTP
> > driver. The currently used regmap_read/write_bulk API does only work
> > with register aligned accesses. The benefit of NVMEM didn't look that
> > tempting anymore when looking at the cost of the necessary OCOTP driver
> > changes, so I choose to go with the more minimal change.
> 
> You can switch the driver over to use nvmem_regmap_register(), which will
> take care of the alignment for you. I still think it's worth it.
> 
Thanks, didn't know about this one. I'll take a stab at converting the
OCOTP driver.

Regards,
Lucas

> Cheers,
> Ahmad
> 
> > 
> > Regards,
> > Lucas
> > 
> > > Cheers,
> > > Ahmad
> > > 
> > > > 
> > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > > ---
> > > >  arch/arm/dts/imx8mp-evk.dts                | 4 ----
> > > >  arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts | 4 ----
> > > >  arch/arm/dts/imx8mp.dtsi                   | 1 +
> > > >  3 files changed, 1 insertion(+), 8 deletions(-)
> > > > 
> > > > diff --git a/arch/arm/dts/imx8mp-evk.dts b/arch/arm/dts/imx8mp-evk.dts
> > > > index d992b14882a3..28d8c5f9292e 100644
> > > > --- a/arch/arm/dts/imx8mp-evk.dts
> > > > +++ b/arch/arm/dts/imx8mp-evk.dts
> > > > @@ -68,7 +68,3 @@
> > > >  		reg = <0xe0000 0x20000>;
> > > >  	};
> > > >  };
> > > > -
> > > > -&ocotp {
> > > > -	barebox,provide-mac-address = <&fec 0x640>;
> > > > -};
> > > > diff --git a/arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts
> > > > index c47e7285a703..6e81f58e2786 100644
> > > > --- a/arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts
> > > > +++ b/arch/arm/dts/imx8mp-tqma8mpql-mba8mpxl.dts
> > > > @@ -53,7 +53,3 @@
> > > >  		reg = <0xe0000 0x20000>;
> > > >  	};
> > > >  };
> > > > -
> > > > -&ocotp {
> > > > -	barebox,provide-mac-address = <&fec 0x640>;
> > > > -};
> > > > diff --git a/arch/arm/dts/imx8mp.dtsi b/arch/arm/dts/imx8mp.dtsi
> > > > index 5da79f13d339..379fa49d6042 100644
> > > > --- a/arch/arm/dts/imx8mp.dtsi
> > > > +++ b/arch/arm/dts/imx8mp.dtsi
> > > > @@ -13,6 +13,7 @@
> > > >  feat: &ocotp {
> > > >  	#feature-cells = <1>;
> > > >  	barebox,feature-controller;
> > > > +	barebox,provide-mac-address = <&fec 0x640 &eqos 0x650>;
> > > >  };
> > > >  
> > > >  &pgc_mipi_phy1 {
> > > 
> > 
> > 
> 




  reply	other threads:[~2023-01-12  8:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 18:21 [PATCH 1/3] nvmem: ocotp: add support for second MAC address on i.MX8MP Lucas Stach
2023-01-11 18:21 ` [PATCH 2/3] ARM: dts: i.MX8MP: move MAC address description to common location Lucas Stach
2023-01-11 19:03   ` Ahmad Fatoum
2023-01-11 20:00     ` Lucas Stach
2023-01-11 20:13       ` Ahmad Fatoum
2023-01-12  8:41         ` Lucas Stach [this message]
2023-01-11 18:21 ` [PATCH 3/3] net: eqos: add i.MX8MP support Lucas Stach
2023-01-12 14:59   ` Ahmad Fatoum
2023-01-27 14:14 ` [PATCH 1/3] nvmem: ocotp: add support for second MAC address on i.MX8MP Sascha Hauer

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=c1864924c708b6ce14b3afead30d777cd58a365e.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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