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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9122DC433FE for ; Mon, 28 Nov 2022 08:02:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229970AbiK1ICh (ORCPT ); Mon, 28 Nov 2022 03:02:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiK1ICf (ORCPT ); Mon, 28 Nov 2022 03:02:35 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C234B24 for ; Mon, 28 Nov 2022 00:02:33 -0800 (PST) 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 1ozZ5n-0002Vz-TR; Mon, 28 Nov 2022 09:02:19 +0100 Message-ID: <96c1ed7e-a2b7-a9a3-f7d4-12eeb099e14b@pengutronix.de> Date: Mon, 28 Nov 2022 09:02:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH 1/2] nvmem: imx-ocotp: reverse MAC on imx6qdl Content-Language: en-US To: Nikolaus Voss , Srinivas Kandagatla , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Krzysztof Kozlowski , Rob Herring , nv@vosn.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20221128074901.8D80B135A@mail.steuer-voss.de> From: Ahmad Fatoum In-Reply-To: <20221128074901.8D80B135A@mail.steuer-voss.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Nikolaus, On 24.11.22 17:50, Nikolaus Voss wrote: > Ethernet MAC on iMX6Q/DL is stored in OTP in little-endian byte order. I > suspect that this is true for all iMX flavors. If so, we could get rid > of the .reverse_mac_address attribute entirely. I also think all i.MX flavors are similar here. The barebox driver has had a MAC address parsing function for a few years[1] and it's the same for all i.MX variants. The only different SoC is VF610, but that has a standalone driver in Linux. [1]: https://elixir.bootlin.com/barebox/v2022.11.0/source/drivers/nvmem/ocotp.c#L551 > Signed-off-by: Nikolaus Voss Reviewed-by: Ahmad Fatoum Cheers, Ahmad > --- > drivers/nvmem/imx-ocotp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c > index 14284e866f26e..a39a0defb070a 100644 > --- a/drivers/nvmem/imx-ocotp.c > +++ b/drivers/nvmem/imx-ocotp.c > @@ -496,6 +496,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 = { -- 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 |