* [PATCH 1/1] nvmem: imx-ocotp: Fix MAC address reversal for i.MX6/7 derivates
@ 2023-05-03 14:16 Alexander Stein
2023-05-03 14:24 ` Ahmad Fatoum
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Stein @ 2023-05-03 14:16 UTC (permalink / raw)
To: Srinivas Kandagatla, Shawn Guo, Sascha Hauer, Fabio Estevam
Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
linux-arm-kernel
Not just i.MX8M, but all i.MX6/7 (and subtypes) need to reverse the
MAC address read from fuses. Exceptions are i.MX6SLL and i.MX7ULP which
do not support ethernet at all.
Fixes: d0221a780cbc ("nvmem: imx-ocotp: add support for post processing")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
Looking at [1] reading MAC address from fuses in u-boot is the same for
all i.MX. Only difference is one or two MAC addresses.
I hit the problem on TQMa6Q (i.MX6Q) and could test this patch. For the
others I checked which have ethernet on NXP page.
[1] https://elixir.bootlin.com/u-boot/v2023.07-rc1/source/arch/arm/mach-imx/mac.c
drivers/nvmem/imx-ocotp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index ac0edb6398f1..93628cd756ec 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -490,6 +490,7 @@ static const struct ocotp_params imx6q_params = {
.bank_address_words = 0,
.set_timing = imx_ocotp_set_imx6_timing,
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
+ .reverse_mac_address = true,
};
static const struct ocotp_params imx6sl_params = {
@@ -497,6 +498,7 @@ static const struct ocotp_params imx6sl_params = {
.bank_address_words = 0,
.set_timing = imx_ocotp_set_imx6_timing,
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
+ .reverse_mac_address = true,
};
static const struct ocotp_params imx6sll_params = {
@@ -511,6 +513,7 @@ static const struct ocotp_params imx6sx_params = {
.bank_address_words = 0,
.set_timing = imx_ocotp_set_imx6_timing,
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
+ .reverse_mac_address = true,
};
static const struct ocotp_params imx6ul_params = {
@@ -518,6 +521,7 @@ static const struct ocotp_params imx6ul_params = {
.bank_address_words = 0,
.set_timing = imx_ocotp_set_imx6_timing,
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
+ .reverse_mac_address = true,
};
static const struct ocotp_params imx6ull_params = {
@@ -525,6 +529,7 @@ static const struct ocotp_params imx6ull_params = {
.bank_address_words = 0,
.set_timing = imx_ocotp_set_imx6_timing,
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
+ .reverse_mac_address = true,
};
static const struct ocotp_params imx7d_params = {
@@ -532,6 +537,7 @@ static const struct ocotp_params imx7d_params = {
.bank_address_words = 4,
.set_timing = imx_ocotp_set_imx7_timing,
.ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
+ .reverse_mac_address = true,
};
static const struct ocotp_params imx7ulp_params = {
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] nvmem: imx-ocotp: Fix MAC address reversal for i.MX6/7 derivates
2023-05-03 14:16 [PATCH 1/1] nvmem: imx-ocotp: Fix MAC address reversal for i.MX6/7 derivates Alexander Stein
@ 2023-05-03 14:24 ` Ahmad Fatoum
2023-05-04 6:05 ` Alexander Stein
0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2023-05-03 14:24 UTC (permalink / raw)
To: Alexander Stein, Srinivas Kandagatla, Shawn Guo, Sascha Hauer,
Fabio Estevam
Cc: NXP Linux Team, Pengutronix Kernel Team, linux-arm-kernel
Hello Alexander,
On 03.05.23 16:16, Alexander Stein wrote:
> Not just i.MX8M, but all i.MX6/7 (and subtypes) need to reverse the
> MAC address read from fuses. Exceptions are i.MX6SLL and i.MX7ULP which
> do not support ethernet at all.
Can't we just drop the reverse_mac_address member then and make
reversing the default for mac-address?
Cheers,
Ahmad
>
> Fixes: d0221a780cbc ("nvmem: imx-ocotp: add support for post processing")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> Looking at [1] reading MAC address from fuses in u-boot is the same for
> all i.MX. Only difference is one or two MAC addresses.
> I hit the problem on TQMa6Q (i.MX6Q) and could test this patch. For the
> others I checked which have ethernet on NXP page.
>
> [1] https://elixir.bootlin.com/u-boot/v2023.07-rc1/source/arch/arm/mach-imx/mac.c
>
> drivers/nvmem/imx-ocotp.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
> index ac0edb6398f1..93628cd756ec 100644
> --- a/drivers/nvmem/imx-ocotp.c
> +++ b/drivers/nvmem/imx-ocotp.c
> @@ -490,6 +490,7 @@ static const struct ocotp_params imx6q_params = {
> .bank_address_words = 0,
> .set_timing = imx_ocotp_set_imx6_timing,
> .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> + .reverse_mac_address = true,
> };
>
> static const struct ocotp_params imx6sl_params = {
> @@ -497,6 +498,7 @@ static const struct ocotp_params imx6sl_params = {
> .bank_address_words = 0,
> .set_timing = imx_ocotp_set_imx6_timing,
> .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> + .reverse_mac_address = true,
> };
>
> static const struct ocotp_params imx6sll_params = {
> @@ -511,6 +513,7 @@ static const struct ocotp_params imx6sx_params = {
> .bank_address_words = 0,
> .set_timing = imx_ocotp_set_imx6_timing,
> .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> + .reverse_mac_address = true,
> };
>
> static const struct ocotp_params imx6ul_params = {
> @@ -518,6 +521,7 @@ static const struct ocotp_params imx6ul_params = {
> .bank_address_words = 0,
> .set_timing = imx_ocotp_set_imx6_timing,
> .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> + .reverse_mac_address = true,
> };
>
> static const struct ocotp_params imx6ull_params = {
> @@ -525,6 +529,7 @@ static const struct ocotp_params imx6ull_params = {
> .bank_address_words = 0,
> .set_timing = imx_ocotp_set_imx6_timing,
> .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> + .reverse_mac_address = true,
> };
>
> static const struct ocotp_params imx7d_params = {
> @@ -532,6 +537,7 @@ static const struct ocotp_params imx7d_params = {
> .bank_address_words = 4,
> .set_timing = imx_ocotp_set_imx7_timing,
> .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> + .reverse_mac_address = true,
> };
>
> static const struct ocotp_params imx7ulp_params = {
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 1/1] nvmem: imx-ocotp: Fix MAC address reversal for i.MX6/7 derivates
2023-05-03 14:24 ` Ahmad Fatoum
@ 2023-05-04 6:05 ` Alexander Stein
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Stein @ 2023-05-04 6:05 UTC (permalink / raw)
To: Ahmad Fatoum
Cc: Srinivas Kandagatla, Shawn Guo, Sascha Hauer, Fabio Estevam,
NXP Linux Team, Pengutronix Kernel Team, linux-arm-kernel
Hello Ahmad,
Am Mittwoch, 3. Mai 2023, 16:24:13 CEST schrieb Ahmad Fatoum:
> Hello Alexander,
>
> On 03.05.23 16:16, Alexander Stein wrote:
> > Not just i.MX8M, but all i.MX6/7 (and subtypes) need to reverse the
> > MAC address read from fuses. Exceptions are i.MX6SLL and i.MX7ULP which
> > do not support ethernet at all.
>
> Can't we just drop the reverse_mac_address member then and make
> reversing the default for mac-address?
That's a nice idea. Thanks
Regards
Alexander
> Cheers,
> Ahmad
>
> > Fixes: d0221a780cbc ("nvmem: imx-ocotp: add support for post processing")
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> > Looking at [1] reading MAC address from fuses in u-boot is the same for
> > all i.MX. Only difference is one or two MAC addresses.
> > I hit the problem on TQMa6Q (i.MX6Q) and could test this patch. For the
> > others I checked which have ethernet on NXP page.
> >
> > [1]
> > https://elixir.bootlin.com/u-boot/v2023.07-rc1/source/arch/arm/mach-imx/m
> > ac.c>
> > drivers/nvmem/imx-ocotp.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
> > index ac0edb6398f1..93628cd756ec 100644
> > --- a/drivers/nvmem/imx-ocotp.c
> > +++ b/drivers/nvmem/imx-ocotp.c
> > @@ -490,6 +490,7 @@ static const struct ocotp_params imx6q_params = {
> >
> > .bank_address_words = 0,
> > .set_timing = imx_ocotp_set_imx6_timing,
> > .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> >
> > + .reverse_mac_address = true,
> >
> > };
> >
> > static const struct ocotp_params imx6sl_params = {
> >
> > @@ -497,6 +498,7 @@ static const struct ocotp_params imx6sl_params = {
> >
> > .bank_address_words = 0,
> > .set_timing = imx_ocotp_set_imx6_timing,
> > .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> >
> > + .reverse_mac_address = true,
> >
> > };
> >
> > static const struct ocotp_params imx6sll_params = {
> >
> > @@ -511,6 +513,7 @@ static const struct ocotp_params imx6sx_params = {
> >
> > .bank_address_words = 0,
> > .set_timing = imx_ocotp_set_imx6_timing,
> > .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> >
> > + .reverse_mac_address = true,
> >
> > };
> >
> > static const struct ocotp_params imx6ul_params = {
> >
> > @@ -518,6 +521,7 @@ static const struct ocotp_params imx6ul_params = {
> >
> > .bank_address_words = 0,
> > .set_timing = imx_ocotp_set_imx6_timing,
> > .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> >
> > + .reverse_mac_address = true,
> >
> > };
> >
> > static const struct ocotp_params imx6ull_params = {
> >
> > @@ -525,6 +529,7 @@ static const struct ocotp_params imx6ull_params = {
> >
> > .bank_address_words = 0,
> > .set_timing = imx_ocotp_set_imx6_timing,
> > .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> >
> > + .reverse_mac_address = true,
> >
> > };
> >
> > static const struct ocotp_params imx7d_params = {
> >
> > @@ -532,6 +537,7 @@ static const struct ocotp_params imx7d_params = {
> >
> > .bank_address_words = 4,
> > .set_timing = imx_ocotp_set_imx7_timing,
> > .ctrl = IMX_OCOTP_BM_CTRL_DEFAULT,
> >
> > + .reverse_mac_address = true,
> >
> > };
> >
> > static const struct ocotp_params imx7ulp_params = {
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-04 6:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-03 14:16 [PATCH 1/1] nvmem: imx-ocotp: Fix MAC address reversal for i.MX6/7 derivates Alexander Stein
2023-05-03 14:24 ` Ahmad Fatoum
2023-05-04 6:05 ` Alexander Stein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox