From patchwork Thu May 4 06:05:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13230788 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 9B7DEC77B7C for ; Thu, 4 May 2023 06:06:48 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ws6isWczKksOc7cYKkroyJ8eWpNmm8bnehHjB4Xuxrs=; b=xu7mRqUCEVSydg C0fiStHxJ2Q3Ivb73gCkcOW4N8poq1Kk+wjVaaBdSzlxlOmOSl9Iq0NzomcVSQj0StG6DDWo2Riq0 WESLeqmIxaexD2NKUU63MVO0JVjCH8urZWZvYUAEE2dzqlmyDvazFQgRtr6D6L2AvJf76Faepr9NR EFmC+KzEYc4HX1++q/IJTZCYXyT2xyvkvRngRpm9XR85XN8FORlL0Dnt87orv2/hfa+BDwZqK/ggM WkmAedDZ7dbME9VtC32L8U5oq115L3dSgF3Hj3pbqI0e0W23fkunArYm+clTlacmBc+o0ya+ir8V8 LgBTyd0gkugzFM+xLIsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1puS6G-006hQq-34; Thu, 04 May 2023 06:05:56 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1puS6D-006hQA-2W for linux-arm-kernel@lists.infradead.org; Thu, 04 May 2023 06:05:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1683180353; x=1714716353; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=TRPd0aNUfyx1lofbm0onZMtUcNJf6GcNxR5t7kCH2lM=; b=f+pNMTmrnouVtMvKfIIrLEhXeb4tAK+cAJg7c4gBGJvKnPNrFmej5bLc zuKV1atqNPLi7bCxobu6sqUHqR5MRP/H++6mdjrpeWHpRpAGeC6d9GW/m //kV6sttTVx4OYNGvkqrXt8wcotV1x1Em0jh9JOmccknFgBP+5KjSlgUF BkEZfiEyG7TWAHf8hT62mVqsZdtvBgNtaxsQV2Qh8NYCeyMwUMZq7/vmw a9wh4Vcm79LfUBwWvs2O0OufWpTCFYP50R1i4tOjYOYcAA3bJdE8sxfm3 IBa9yr7fC6kRn8tnz80l4Y0sVfbElwiGeJrm8eK2gHScWfMIac9+C37mu g==; X-IronPort-AV: E=Sophos;i="5.99,249,1677538800"; d="scan'208";a="30707224" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 04 May 2023 08:05:52 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 04 May 2023 08:05:52 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 04 May 2023 08:05:52 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1683180352; x=1714716352; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=TRPd0aNUfyx1lofbm0onZMtUcNJf6GcNxR5t7kCH2lM=; b=AUu2+vp+mXG8SUPEk0s/sBp77pK+E3v3KEqsIUe4S1NgHMvlJV3xweDA +38Yry7+QkaE0k5AwslCItAWJSZTsj45VWdnKmSFQ3YGzcwrenNP6DF8m VF5AsAq1RdQojTeZNO2i6jBHovbB+HYeDt+1OkAgFd7AzuP78GM5tqdpq re2OMgCqvRnS/KFXvnvkWux99uFeNR5/uznAseRrR3Us0YKIVThx2viv/ DbXKNt0osgvcMG2fiVXWlrp294hC0f3/0lPUnjnKCHpfCY5fUw2GvRU3u 1vx0sENx/Ur8JLfgeROjy24XE96uxjx2nnMppr6bHqDrvufVjuutQ5onB w==; X-IronPort-AV: E=Sophos;i="5.99,249,1677538800"; d="scan'208";a="30707223" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 04 May 2023 08:05:52 +0200 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 0308F280056; Thu, 4 May 2023 08:05:51 +0200 (CEST) From: Alexander Stein To: Srinivas Kandagatla , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , Pengutronix Kernel Team , NXP Linux Team , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/1] nvmem: imx-ocotp: Reverse MAC addresses on all i.MX derivates Date: Thu, 4 May 2023 08:05:45 +0200 Message-Id: <20230504060545.2619156-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230503_230554_159605_D858FDA6 X-CRM114-Status: GOOD ( 14.32 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- Changes in v2: * Instead of adding the flag for all platforms, apply post processing by default drivers/nvmem/imx-ocotp.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index ac0edb6398f1..c1af27105227 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -97,7 +97,6 @@ struct ocotp_params { unsigned int bank_address_words; void (*set_timing)(struct ocotp_priv *priv); struct ocotp_ctrl_reg ctrl; - bool reverse_mac_address; }; static int imx_ocotp_wait_for_busy(struct ocotp_priv *priv, u32 flags) @@ -545,7 +544,6 @@ static const struct ocotp_params imx8mq_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 imx8mm_params = { @@ -553,7 +551,6 @@ static const struct ocotp_params imx8mm_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 imx8mn_params = { @@ -561,7 +558,6 @@ static const struct ocotp_params imx8mn_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 imx8mp_params = { @@ -569,7 +565,6 @@ static const struct ocotp_params imx8mp_params = { .bank_address_words = 0, .set_timing = imx_ocotp_set_imx6_timing, .ctrl = IMX_OCOTP_BM_CTRL_8MP, - .reverse_mac_address = true, }; static const struct of_device_id imx_ocotp_dt_ids[] = { @@ -624,8 +619,7 @@ static int imx_ocotp_probe(struct platform_device *pdev) imx_ocotp_nvmem_config.size = 4 * priv->params->nregs; imx_ocotp_nvmem_config.dev = dev; imx_ocotp_nvmem_config.priv = priv; - if (priv->params->reverse_mac_address) - imx_ocotp_nvmem_config.layout = &imx_ocotp_layout; + imx_ocotp_nvmem_config.layout = &imx_ocotp_layout; priv->config = &imx_ocotp_nvmem_config;