From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFE28C77B7F for ; Wed, 3 May 2023 14:25:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7vHkyuO12LYRiE/FfPGlyISszfE5Zunvg9nXkYijBfs=; b=nQS3Yxe8TFS1K+ 9Norb0jas0+ZV6bgCtZDq42rM3p0U1Pinf15EhZuElZCmmCswQCwABNS0bbWCGlbsADJzF/tUM9+8 gEKEOlz6KXm/wWNr7+Zqo+dtUHF/H1wGIopQGdMbB7aTJZsoL9IbRS9ye6NGa4GuZ0YzKZ+ruJWZ+ l/bTN7C8S6n2Y1f1Wt6t5vthBfZ2fFsSzqyzb41Lr45NM4Ji4u7I1BDN/Sjb7FSjsH5r3sWMLYSJY UShbAB7oxqkgKzNfBTm5MV1ZTOwVcebVCeXuzpbEYi/IE/CRydrIXkLL6wOcbQFXIMk16MeI08dbg BEsu5p0sRp02cW1xckVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1puDP7-004pAu-2C; Wed, 03 May 2023 14:24:25 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1puDP5-004p9v-1h for linux-arm-kernel@lists.infradead.org; Wed, 03 May 2023 14:24:25 +0000 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1puDOx-0006Bg-Tu; Wed, 03 May 2023 16:24:15 +0200 Message-ID: <170fc93b-b660-ec7b-7ceb-070651dfb02f@pengutronix.de> Date: Wed, 3 May 2023 16:24:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 1/1] nvmem: imx-ocotp: Fix MAC address reversal for i.MX6/7 derivates Content-Language: en-US To: Alexander Stein , Srinivas Kandagatla , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: NXP Linux Team , Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org References: <20230503141627.2546884-1-alexander.stein@ew.tq-group.com> From: Ahmad Fatoum In-Reply-To: <20230503141627.2546884-1-alexander.stein@ew.tq-group.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230503_072423_570607_CF9C85F7 X-CRM114-Status: GOOD ( 24.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > --- > 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