From patchwork Thu Nov 24 11:15:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 13054843 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 36891C433FE for ; Thu, 24 Nov 2022 11:17:18 +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=zmSJwsgxmqCswasU/a8r8aUrTJeGkYMrG6/wwbi4Kss=; b=nejhePyZWnlhE9 Q2mZkjbKgf9S+xGfbxrTT8J+dC327vjGPaqN8z2jhzd1p5rud5st7z4QJeRbdRlcfYGlMfC9npUp3 i8x5ryE51sXvpgzKul/wxXYu33+r6A5gPMpxOBMHsMQCilvZD5oCzMJEg98RbZsFP8brUYksL1xkz RJl+DeKGV68QqdxdiiE5+SBdSLM1bJ++QL2l1/+4pOM/IsZtQcVABCYVS3CgpKwSLNFiKjQkTsd5n BJBhOr8FaO2VutSEHz41+ClNsBk/1pWq/IeizMGh5hrgBi4oXeZ+l7haCjNpt+bZYAMXWjrK/s4LD zGE6QoTnuKV0YWdZCcMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyADC-007yRY-RC; Thu, 24 Nov 2022 11:16:10 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyAD7-007yON-Nm for linux-arm-kernel@lists.infradead.org; Thu, 24 Nov 2022 11:16:08 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 912B51C0003; Thu, 24 Nov 2022 11:15:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1669288560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cjEyF9Ie26j30k+xWS+sGbqXthb9SDc8p5d5gfhe8Yc=; b=nlUfaEqhj6VJFwAc1HEeUT9yQvapv1nOxwPe7EzGqZ/RX+fZgGzR10X8Uz4HSzIZW1c8UG 7ZUWG7aTC4waMHwVqTf7Y5ph89CLnwPRoGuwlq66roTmHyAiMiu2zlCYyNVK2HV58z5Pcw 4BSkrCRn6q/LGdnvpm9QslMPqm+NG1ZiVQK08lCZaQ518MvtlIj/diXH75cNcWJnkibhC6 4RHsdz1dWdTk1BxyhKAq3HD1Ub7bkM4T9IhvNjgpCjsUh96Vseq/yxvE2UHcVZcTMgcx+8 grW27/0y4wDO0RhuplgEcnawE+cti8RiBbkXdsWOivEaqGYTdE+7DD+YAyL2lw== From: Miquel Raynal To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , netdev@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , Marcin Wojtas , , , Vadym Kochan , Miquel Raynal Subject: [PATCH net-next v2 0/7] Marvell nvmem mac addresses support Date: Thu, 24 Nov 2022 12:15:49 +0100 Message-Id: <20221124111556.264647-1-miquel.raynal@bootlin.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-20221124_031606_222323_9A0BB39A X-CRM114-Status: GOOD ( 14.11 ) 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 Hello, Now that we are aligned on how to make information available from static storage media to drivers like Ethernet controller drivers or switch drivers by using nvmem cells and going through the whole nvmem infrastructure, here are two driver updates to reflect these changes. Prior to the driver updates, I propose: * Reverting binding changes which should have never been accepted like that. * A conversion of the (old) Prestera and DFX server bindings (optional, can be dropped if not considered necessary). * A better description of the more recent Prestera PCI switch. Please mind that this series cannot break anything since retrieving the MAC address Prestera driver has never worked upstream, because the (ONIE tlv) driver supposed to export the MAC address has not been accepted in its original form and has been updated to the nvmem-layout infrastructure (bindings have been merged, the code remains to be applied). Thanks, Miquèl Changes in v2: * Bindings: - Add Rob's tags. - Use "additionalProperties: \n type: object" in both yaml files. - Add missing PCI properties to the prestera example as suggested. - Added a limitation over the number of register entries in the dfx-server description. * Drivers: - Export the of_ helper retrieving MAC addresses from nvmem cells. - Add a comment in mvpp2 to say that the nvmem lookup only is valid on OF enabled platforms as suggested by Marcin. Miquel Raynal (7): Revert "dt-bindings: marvell,prestera: Add description for device-tree bindings" dt-bindings: net: marvell,dfx-server: Convert to yaml dt-bindings: net: marvell,prestera: Convert to yaml dt-bindings: net: marvell,prestera: Describe PCI devices of the prestera family of: net: export of_get_mac_address_nvmem() net: marvell: prestera: Avoid unnecessary DT lookups net: mvpp2: Consider NVMEM cells as possible MAC address source .../bindings/net/marvell,dfx-server.yaml | 62 +++++++++++++ .../bindings/net/marvell,prestera.txt | 81 ----------------- .../bindings/net/marvell,prestera.yaml | 91 +++++++++++++++++++ .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 7 ++ .../ethernet/marvell/prestera/prestera_main.c | 15 +-- include/linux/of_net.h | 6 ++ net/core/of_net.c | 5 +- 7 files changed, 173 insertions(+), 94 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/marvell,dfx-server.yaml delete mode 100644 Documentation/devicetree/bindings/net/marvell,prestera.txt create mode 100644 Documentation/devicetree/bindings/net/marvell,prestera.yaml