From patchwork Sun Sep 20 09:57:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1367841 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=Ht4A7H4U; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ExV2J0dk; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BvNLg1Mmnz9sSC for ; Sun, 20 Sep 2020 19:58:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=j6hQYJ00Hs23RBJeXbKhoOXiahTDNCCngmDTwUd38Aw=; b=Ht4A7H4UbwombDZvJhRLuHFot iwbDfpvI/1WF5PDfmaQKV+ihEjHS49jINxfpy+6QSU3WkydLDBqNgBxDfN9uij0AwX8tUs+cBvwGL tnnKJCBYOiCp8N0e0uMgsSULGLRBb0/aXirAVP1w8jxkDmZDuf0meyzBQL7A3I5CARTa/81uixDVr 6O/kbJCWaqi7dwvOfoc/Sj+2Iuk4sBlx2KLweakQz2lP05bGHUFz3Q1f8Kce9WFcVrroLm2gtCqTs TRXFiiuR3346/3ky44fWQGyc6PKqJwc6ZFZ1ivum4v1IIYQJlhCTGF6I7RVWzTteIronu1qFz1Rf5 0MW8yqWJg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJw6M-0006o4-9n; Sun, 20 Sep 2020 09:57:46 +0000 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJw6K-0006n6-3N for linux-mtd@lists.infradead.org; Sun, 20 Sep 2020 09:57:45 +0000 Received: by mail-qv1-xf44.google.com with SMTP id b13so5759220qvl.2 for ; Sun, 20 Sep 2020 02:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1Cp6wGeZB6SS98LJtexBivyXrwvaD2ffDaajHaSACWY=; b=ExV2J0dku2JMmlAU9XWVQ6EA1ZpDFcBWqnSgZ52HkNzqXKPznuXV2TscrMYYZshBMA KScQZHTuODTN5KaT0FSwOi7O2X3RUWwcXQI+WDJ6bS9rvIyl/ZchqRy5d71W/JPiHwcb 1Fl1FTnD2W2BHC3sDNv16IeD96xIkM7YPS9RcOhTcWGi1pKFbd27vQX+ec9nyt11mEx+ drL7pH1LR/HnPBLImJ3r7TQOlyMoDYnfMqyx2Z/YQWlE7iPMRuUIam/1SXMBJm5Me8is 2tu2UXCrDOBaXBazoAa1+ZuUUmvSFSYNqMjJCI9ctYdCYdvKn5M1l6rIVBJBA9IEHHLM Mb3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1Cp6wGeZB6SS98LJtexBivyXrwvaD2ffDaajHaSACWY=; b=M2CoTzcVWmCu1L2P3jQdo1r4uZ585GVGoojOB8oZPYQRYbPISLUIJkRaTnyEJJA4s3 m8YEjpvSWdUccnTtwUxBJ7QsQEK6njHi9etdDWKIz6i39iVWAZcVBkR/4IZ0xA6lPlEB MmvGTfzxUXWUdGBRIUglXCR30P9gSQz1aZ9u+vYhUYuL0kyVqdHsUn91ad8A0lczCn+j MFvKl6IUVioArElxCriZRLpbVyQ01cTcoKwSo0RbmUroJINuvIlYfnXEE9Gq8ciwbLfy 22ekapovMpm+xsFe4v4daRDL5SW0SR36qewnN+9Np8tbz0Afu9uzGA8hVlmJImFPxPov KFYg== X-Gm-Message-State: AOAM532hNaSOVDczXdq9SIVuosXdX5cZiAlOOseR6RX8I+8SX8hnMxF7 kzHSr++yglqyqNEehAYOEHo= X-Google-Smtp-Source: ABdhPJwEhDyAwUV5UVHjMYtJZMqZWnXncn13LWvoJ+ZoTbYCWu2zx0tKeSvcu7jECySfUWPeBSJS+g== X-Received: by 2002:a05:6214:1021:: with SMTP id k1mr24205091qvr.62.1600595862353; Sun, 20 Sep 2020 02:57:42 -0700 (PDT) Received: from Ansuel-XPS.localdomain (93-39-149-95.ip76.fastwebnet.it. [93.39.149.95]) by smtp.googlemail.com with ESMTPSA id w6sm6968323qti.63.2020.09.20.02.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Sep 2020 02:57:40 -0700 (PDT) From: Ansuel Smith To: Miquel Raynal Subject: [PATCH v3 1/4] mtd: Add nvmem support for mtd nvmem-providers Date: Sun, 20 Sep 2020 11:57:19 +0200 Message-Id: <20200920095724.8251-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200920095724.8251-1-ansuelsmth@gmail.com> References: <20200920095724.8251-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200920_055744_206268_C486B3BC X-CRM114-Status: GOOD ( 17.76 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:f44 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ansuelsmth[at]gmail.com] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Vignesh Raghavendra , Boris Brezillon , Richard Weinberger , Russell King , Ansuel Smith , devicetree@vger.kernel.org, Rob Herring , linux-mtd@lists.infradead.org, netdev@vger.kernel.org, Jakub Kicinski , Frank Rowand , "David S. Miller" , linux-kernel@vger.kernel.org, Heiner Kallweit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Introduce 2 new bindings for the mtd structure. Mtd partitions can be set as 'nvmem-provider' and any subpartition defined with the tag 'nvmem-cell' are skipped by the 'fixed-partitions' parser and registred as a nvmem cell by the nvmem api. Signed-off-by: Ansuel Smith --- drivers/mtd/mtdcore.c | 3 ++- drivers/mtd/parsers/ofpart.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 7d930569a7df..ba5236db8318 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -551,6 +551,7 @@ static int mtd_nvmem_reg_read(void *priv, unsigned int offset, static int mtd_nvmem_add(struct mtd_info *mtd) { + struct device_node *mtd_node = mtd_get_of_node(mtd); struct nvmem_config config = {}; config.id = -1; @@ -563,7 +564,7 @@ static int mtd_nvmem_add(struct mtd_info *mtd) config.stride = 1; config.read_only = true; config.root_only = true; - config.no_of_node = true; + config.no_of_node = !of_property_read_bool(mtd_node, "nvmem-provider"); config.priv = mtd; mtd->nvmem = nvmem_register(&config); diff --git a/drivers/mtd/parsers/ofpart.c b/drivers/mtd/parsers/ofpart.c index daf507c123e6..442e039214bc 100644 --- a/drivers/mtd/parsers/ofpart.c +++ b/drivers/mtd/parsers/ofpart.c @@ -61,6 +61,10 @@ static int parse_fixed_partitions(struct mtd_info *master, if (!dedicated && node_has_compatible(pp)) continue; + /* skip adding if a nvmem-cell is detected */ + if (of_property_read_bool(pp, "nvmem-cell")) + continue; + nr_parts++; } @@ -80,6 +84,10 @@ static int parse_fixed_partitions(struct mtd_info *master, if (!dedicated && node_has_compatible(pp)) continue; + /* skip adding if a nvmem-cell is detected */ + if (of_property_read_bool(pp, "nvmem-cell")) + continue; + reg = of_get_property(pp, "reg", &len); if (!reg) { if (dedicated) { From patchwork Sun Sep 20 09:57:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1367844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=yhngrX2w; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=p+WGbfqw; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BvNMH0Jk5z9sSC for ; Sun, 20 Sep 2020 19:59:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OocQAtEJsxvWGTC6kd85Cr1Gk6j8sF2EUstj+DSYEC4=; b=yhngrX2wLruzBTlVZNzu6O5b4 263E9rIluBNA3pdwiGeCdFKDU1Yg/3IhHzLjMXFI5qpmfr4D6aat6nqhqQL3oYT/MTnxzv77r+cHz d6hTchRyX4O1ChgbP41myKu+0dDjESeoU91zb88VUt8rgw9700jckW5r5+UHKrdlV0V5JXi+9Qd5P V1nDex9UZVglxFdhT2YaW9TLPI3wcPYuW/Ee/M+H1JMKwIsh3VYFcE/rhKswwiaZbOHq1uPxKqzs+ no0oN2gwVpqkOcI2Z4e3QpK8xofGyeurUmkAQNTRn9kHfkzlxzc25Lae9Np6ESjwEaEIjxiNqkTOP hstHJym4A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJw6T-0006p6-1x; Sun, 20 Sep 2020 09:57:53 +0000 Received: from mail-qv1-xf41.google.com ([2607:f8b0:4864:20::f41]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJw6Q-0006oR-DH for linux-mtd@lists.infradead.org; Sun, 20 Sep 2020 09:57:51 +0000 Received: by mail-qv1-xf41.google.com with SMTP id h1so5763134qvo.9 for ; Sun, 20 Sep 2020 02:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=64xYu3WDX6vWiceRdxZMl2E+VlBih2IULY9GL5lmn0U=; b=p+WGbfqwHH1OXV5tEzCASV8LZW0RECh7wC89nEJa+Jgn3lNUwPM42+c6NpDjnvUJko dzcxyFmqFi9GPNCuazz0U77Hw21k14/X2EtZbyjbdifztLrlQwEyG9YUAFya6uJaxv6G Lz7sHNHBujFbHP08PRzbi9Uru/TwB6DsS4feb9FdukmPSc5kR/d8jAzQZo+8p606icDv aZldmNlaaV2zhlAqqbD/mKeyUS4BEGnq4REiXhFsuFE0ekVv+4hUL3KKml9tdnHuXPqv SW7MdT268hCNfXw5ff/y9GOVVzKHW/pGLJ5SdXdCwCYeGHGbDhk9RCCIRAjOzwrcVn7F eK+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=64xYu3WDX6vWiceRdxZMl2E+VlBih2IULY9GL5lmn0U=; b=qgyIm1pbP+iNMJ/vh4SPk05ebUKenqfR22Xa+Lh0td1Na+5NRVXRywWTY9qoa9y894 YiH0TfKvfQuwIBr9x7SPl/f2iSxvmSZhYX+YY1tVV9sapd2ZXuJAjU/j1FROmvHUMIhf EXC/QPNv/B0Y1nLFz6tGbXDO+DZtJ8IOBLUbsTIE2qq9+Dz2wCI9aHZDF86o14x1rE/4 a865SxowDp7EZ8Afxqexxeq3kJJT1ESDieQgmeEf2cDdtkIkSPBLR34YRc2rNMFaL1My E81/uDKtfcrb8yBRoA/NbjpYKUoyjeQWqtJZuoJdHp7rSth3h6coij1qyLU073pXAGVT 1AMg== X-Gm-Message-State: AOAM531dAFz3OjxI9ROKgkZGumDesgFbQBr2eWQrTmEWy2kMNUMwPzsN EFDHYBKCX8APTOCRiAbVhPk= X-Google-Smtp-Source: ABdhPJyTALYmylKCiYZL9A6ya14pzjFRwQqsR7A+AhI03Pvj4NRRfyaxkMbpqweW9bRVphtRSAU7PA== X-Received: by 2002:ad4:52e3:: with SMTP id p3mr24148392qvu.42.1600595868538; Sun, 20 Sep 2020 02:57:48 -0700 (PDT) Received: from Ansuel-XPS.localdomain (93-39-149-95.ip76.fastwebnet.it. [93.39.149.95]) by smtp.googlemail.com with ESMTPSA id w6sm6968323qti.63.2020.09.20.02.57.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Sep 2020 02:57:47 -0700 (PDT) From: Ansuel Smith To: Miquel Raynal Subject: [PATCH v3 2/4] dt-bindings: mtd: partition: Document use of nvmem-provider Date: Sun, 20 Sep 2020 11:57:20 +0200 Message-Id: <20200920095724.8251-3-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200920095724.8251-1-ansuelsmth@gmail.com> References: <20200920095724.8251-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200920_055750_463481_14994A73 X-CRM114-Status: GOOD ( 16.07 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:f41 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ansuelsmth[at]gmail.com] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Vignesh Raghavendra , Boris Brezillon , Richard Weinberger , Russell King , Ansuel Smith , devicetree@vger.kernel.org, Rob Herring , linux-mtd@lists.infradead.org, netdev@vger.kernel.org, Jakub Kicinski , Frank Rowand , "David S. Miller" , linux-kernel@vger.kernel.org, Heiner Kallweit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Document the use of this 2 new bindings, nvmem-provider and nvmem-cell, used to describe the nvmem cell that the subpartition provide to the nvmem api and the system. Nvmem cell are direct subnode of the subpartition and are skipped by the 'fixed-partitions' parser if they contain the 'nvmem-cell' tag. The subpartition must have the 'nvmem-provider' tag or the subpartition will not register the cell to the nvmem api. Signed-off-by: Ansuel Smith --- .../devicetree/bindings/mtd/partition.txt | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt index 4a39698221a2..66d3a3f0a021 100644 --- a/Documentation/devicetree/bindings/mtd/partition.txt +++ b/Documentation/devicetree/bindings/mtd/partition.txt @@ -64,6 +64,16 @@ Optional properties: - slc-mode: This parameter, if present, allows one to emulate SLC mode on a partition attached to an MLC NAND thus making this partition immune to paired-pages corruptions +- nvmem-provider : Optionally a subpartition can be set as a nvmem-provider. This can + be very useful if some data like the mac-address is stored in a special partition + at a specific offset. Subpartition that describe nvmem-cell must have set the + 'nvmem-cell' of they will be treated as a subpartition and not skipped and registred + as nvmem cells. In this specific case '#address-cells' and '#size-cells' must be + provided. +- nvmem-cell : A direct subnode of a subpartition can be described as a nvmem-cell and + skipped by the fixed-partition parser and registred as a nvmem-cell of the registred + nvmem subpartition IF it does contain the 'nvmem-provider tag. If the subpartition + lacks of such tag the subnode will be skipped and the nvmem api won't register them. Examples: @@ -158,3 +168,52 @@ flash@3 { }; }; }; + +flash@0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x100000>; + read-only; + }; + + art: art@1200000 { + label = "art"; + reg = <0x1200000 0x0140000>; + read-only; + nvmem-provider; + + #address-cells = <1>; + #size-cells = <1>; + + macaddr_gmac1: macaddr_gmac1@0 { + nvmem-cell; + reg = <0x0 0x6>; + }; + + macaddr_gmac2: macaddr_gmac2@6 { + nvmem-cell; + reg = <0x6 0x6>; + }; + + macaddr_wifi: macaddr_wifi@6 { + nvmem-cell; + reg = <0x6 0x6>; + }; + + pre_cal_24g: pre_cal_24g@1000 { + nvmem-cell; + reg = <0x1000 0x2f20>; + }; + + pre_cal_5g: pre_cal_5g@5000{ + nvmem-cell; + reg = <0x5000 0x2f20>; + }; + }; + }; +}; \ No newline at end of file From patchwork Sun Sep 20 09:57:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1367843 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=SgFAC+He; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=omRBhwAp; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BvNMC3PWXz9sSf for ; Sun, 20 Sep 2020 19:59:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NrsBWkGxcFxn54X8t6qt68a2oMXDKri5DhBBpqLjs5A=; b=SgFAC+HeNFKiMLN7aoRkxuZeA A0mUjD5+P4XOqw9ryFh4Xx+Swx39ORGfvVpdwoHLFi8xmUv7DTvMHKtfJTbkoCNevbnceK2WdZRlK NvwhfEpBCBVfsbTIWcMMccM51KljbwIvOJNPWNgU04g9CLN0k7wQnZirLTRGnrxpDLQt0Fy1Fk5n3 DhNNHLuuS6o8pkMEBQLAU+g3CV1GrIraU/NApFlh6n9o7cPr6+ApopwdXfHthpdH9anPUGkTwLrm0 t9d00YHzXDMbkd/w/3jjf1LkhdW2rnqU9PxArEm7A7e2FaO5ch5a+sSzYrupBCA+RK8CHyU3+v4N9 xO8L65hZQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJw6Y-0006r1-Pz; Sun, 20 Sep 2020 09:57:58 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJw6W-0006pm-8n for linux-mtd@lists.infradead.org; Sun, 20 Sep 2020 09:57:57 +0000 Received: by mail-qk1-x741.google.com with SMTP id g72so11857032qke.8 for ; Sun, 20 Sep 2020 02:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oGhCCUnRTCTino/zuu9ojrWRDplSxRK5bulENX/nsFs=; b=omRBhwApoblQetaK6wIvFMaoNbcKwE3aCrPmkQeTb6VQCcpOrBOB417EIFL4Oyr74e pokAqHPb8h2zWULiXuciV+de2+Mc+b9MEtIUx+57Qi7xQyYbsCab64DDMnQzykB9Iyu5 w87ieJOYwn5g7RPFfPunQhQOcz3Gpv0Y+ppRP36wKDg8oenvP3f7J+Q1OatClKvxbYVP iFEUKAhVDbOSXDsqwGyvQ1/4UEHTuR5R1Sfa21IWovwpVCtYVVFvGB0Q/v30fYhyHuVI GGLhc89b+QP/NZTZwOD695n857m6u3OprVKfPJv5cqMBqEDPOuKgTZUQY6olaIvniv0Y KnQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oGhCCUnRTCTino/zuu9ojrWRDplSxRK5bulENX/nsFs=; b=YbxqOfqLltXzqiVnsIW6D836e2SG6/sCtYnPvJ7Q+CAu33zUZLVn3TjhRAgqIhvh5K K8E0lhUjW8wmwC03ghOp6CoWN1Oc8VA/Sfe65J1zyuvL6k00ryDCFamkCiNyWpX1GT9s p93rdr0uejmrdC4STSV6UtzSWOxPhlgHlWvOJfPCZDojmHFFvq5YiDvedyNS270qkfMD 41d/k7l6b7AlK/OtkEh0wyIwkxFxQuWONGT5/b0VbLTEYMKJmdLC0iAfm/7v2wvVP+7L MPZpuiLW5q9gMXUEOaNTc0pqIA0gukWn86BepQ4/JMmst+14rLx/0VtFMBsDga/EAMKv sNlQ== X-Gm-Message-State: AOAM533TVwmVF49XZ6H1wk2a91C9KcOLxUbOuY6cjXFchEUDzP1hiayG fc+k7MYaAqmNzjt8NrCJlnc= X-Google-Smtp-Source: ABdhPJwKlT3juwz36GeTH9mGGeYK75lJ/GPbrCMq4l3fs1llud3zEd+zx6EVDbFkaIP63Z7MLItNnw== X-Received: by 2002:a05:620a:145:: with SMTP id e5mr39899279qkn.479.1600595874343; Sun, 20 Sep 2020 02:57:54 -0700 (PDT) Received: from Ansuel-XPS.localdomain (93-39-149-95.ip76.fastwebnet.it. [93.39.149.95]) by smtp.googlemail.com with ESMTPSA id w6sm6968323qti.63.2020.09.20.02.57.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Sep 2020 02:57:53 -0700 (PDT) From: Ansuel Smith To: Miquel Raynal Subject: [PATCH v3 3/4] of_net: add mac-address-increment support Date: Sun, 20 Sep 2020 11:57:21 +0200 Message-Id: <20200920095724.8251-4-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200920095724.8251-1-ansuelsmth@gmail.com> References: <20200920095724.8251-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200920_055756_365717_253102B4 X-CRM114-Status: GOOD ( 22.18 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:741 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ansuelsmth[at]gmail.com] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Vignesh Raghavendra , Boris Brezillon , Richard Weinberger , Russell King , Ansuel Smith , devicetree@vger.kernel.org, Rob Herring , linux-mtd@lists.infradead.org, netdev@vger.kernel.org, Jakub Kicinski , Frank Rowand , "David S. Miller" , linux-kernel@vger.kernel.org, Heiner Kallweit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Lots of embedded devices use the mac-address of other interface extracted from nvmem cells and increments it by one or two. Add two bindings to integrate this and directly use the right mac-address for the interface. Some example are some routers that use the gmac mac-address stored in the art partition and increments it by one for the wifi. mac-address-increment-byte bindings is used to tell what byte of the mac-address has to be increased (if not defined the last byte is increased) and mac-address-increment tells how much the byte decided early has to be increased. Signed-off-by: Ansuel Smith --- drivers/of/of_net.c | 57 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c index 6e411821583e..bafbc833e659 100644 --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c @@ -45,7 +45,7 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface) } EXPORT_SYMBOL_GPL(of_get_phy_mode); -static const void *of_get_mac_addr(struct device_node *np, const char *name) +static void *of_get_mac_addr(struct device_node *np, const char *name) { struct property *pp = of_find_property(np, name, NULL); @@ -54,26 +54,31 @@ static const void *of_get_mac_addr(struct device_node *np, const char *name) return NULL; } -static const void *of_get_mac_addr_nvmem(struct device_node *np) +static void *of_get_mac_addr_nvmem(struct device_node *np, int *err) { int ret; - const void *mac; + void *mac; u8 nvmem_mac[ETH_ALEN]; struct platform_device *pdev = of_find_device_by_node(np); - if (!pdev) - return ERR_PTR(-ENODEV); + if (!pdev) { + *err = -ENODEV; + return NULL; + } ret = nvmem_get_mac_address(&pdev->dev, &nvmem_mac); if (ret) { put_device(&pdev->dev); - return ERR_PTR(ret); + *err = ret; + return NULL; } mac = devm_kmemdup(&pdev->dev, nvmem_mac, ETH_ALEN, GFP_KERNEL); put_device(&pdev->dev); - if (!mac) - return ERR_PTR(-ENOMEM); + if (!mac) { + *err = -ENOMEM; + return NULL; + } return mac; } @@ -98,24 +103,50 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np) * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists * but is all zeros. * + * DT can tell the system to increment the mac-address after is extracted by + * using: + * - mac-address-increment-byte to decide what byte to increase + * (if not defined is increased the last byte) + * - mac-address-increment to decide how much to increase. The value will + * not overflow to other bytes if the increment is over 255. + * (example 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00) + * * Return: Will be a valid pointer on success and ERR_PTR in case of error. */ const void *of_get_mac_address(struct device_node *np) { - const void *addr; + u32 inc_idx, mac_inc; + int ret = 0; + u8 *addr; + + /* Check first if the increment byte is present and valid. + * If not set assume to increment the last byte if found. + */ + if (of_property_read_u32(np, "mac-address-increment-byte", &inc_idx)) + inc_idx = 5; + if (inc_idx < 3 || inc_idx > 5) + return ERR_PTR(-EINVAL); addr = of_get_mac_addr(np, "mac-address"); if (addr) - return addr; + goto found; addr = of_get_mac_addr(np, "local-mac-address"); if (addr) - return addr; + goto found; addr = of_get_mac_addr(np, "address"); if (addr) - return addr; + goto found; + + addr = of_get_mac_addr_nvmem(np, &ret); + if (ret) + return ERR_PTR(ret); + +found: + if (!of_property_read_u32(np, "mac-address-increment", &mac_inc)) + addr[inc_idx] += mac_inc; - return of_get_mac_addr_nvmem(np); + return addr; } EXPORT_SYMBOL(of_get_mac_address); From patchwork Sun Sep 20 09:57:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 1367845 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=zhC3WwaF; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=PvksojqI; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BvNMM2KNHz9sSC for ; Sun, 20 Sep 2020 19:59:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7G5Y77UnoMk7fvQOakXRyhHYfErD+U+Vx5HQVBTNuq8=; b=zhC3WwaFzjiqGRRUoxt6K1X9c 18jAHl0OvBe/nA4oyQO0b/ssoMamWtdrlV0usgNwTq5UeoIZ3Dw+s8qIk13cauK+2gJF6ae+hTEzd f5tzwqB0uufo3DcZBHJ+ZRZlvY6n/tQ0yY3bfnS22qsmi7BnowHLRnBcMD1BaIzC0kIJUOOitdfl2 oqQFZQ1ktNNnIYMTCSzUbcLYMu15+XKF1OFBKXmHp4sfFc+WuLZ7QcKAgEuVbVs9fTrIAInXfrY4L R0JZ2pkwiqSF6AK/oWKnvZjXghpm4MxOj9kC/eBOVYRwVzACJao1R5LR/WFFcM8f+RQe/+wmW6GZ+ AG0ljVr3g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJw6e-0006sd-2F; Sun, 20 Sep 2020 09:58:04 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJw6b-0006rS-FG for linux-mtd@lists.infradead.org; Sun, 20 Sep 2020 09:58:02 +0000 Received: by mail-qk1-x741.google.com with SMTP id f142so11852453qke.13 for ; Sun, 20 Sep 2020 02:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7qdhkRouPUBlhhUeuoTWCcVW3x0+uiY3ffJ1oCMZQUk=; b=PvksojqItdBGtMhfwgKVJlnT43Rh3sUoLBTo2Iu8ZudwahRjKwVfIa2w3ob8pTa587 MwqTSxoHQGn17cO0HvQau/Az/czSlT8qzP/HdiabGHVsR89on1ljbFc3xxliPEtfJNlm iCIJG4gGaUnNLLBSXAJ7jeklc6N4f8m6Nf4LVoj0ikbId4Ul32cFhOBAsmdc/lTwP/JM g+tMG4TklMRz/m8LSzok7C3UksAmaq8Vca/WrOzJe703DgdPFeI4+6sO+732rk8SWvLD qHOVsyi1aPzt08ZPEZPCh2g4hK9mDxUmvXG3NF/jNoDFB3Th6PUwfHog9Ija68/O1iQO 1S7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7qdhkRouPUBlhhUeuoTWCcVW3x0+uiY3ffJ1oCMZQUk=; b=A9R2Cn1PBvFdFjCMeHtObh8vyl8QMhAYTfxKdMWWxtb4uhHH/YNY6ASyo1pyq84ani ES39gk9riRTHJAVp5rGRAss9UlsA2pYF5pMD449AxHrkJ/Ar62UrP2GMIxBwzTJerJdI 3l/PlwqdNqeinx/Noer6QEXhPiybCeJqRk5AIlO2gQFZzYK7CFMy4jwi1MvaPTPYcx+P 19nE3nRkTitKP5sQ3Pwbt8cURxxTlmU9J2sCcmKtbZJ24RoUkKM+ZtwnUU+Yx90/hbBn Qzjoc+nXNB86Hz3sF65otrHiOFx5ne6y+H0Xv5gni3AzIKj+bIOiqCKiYonMUa+Lpcin /Naw== X-Gm-Message-State: AOAM533tfV/Sai5o7JZ80IVxaSjLY0RojOC44rQYWYow7iD/4Mq8QQsS jEtmamQ/l2ZY3BtNG7H0I2U= X-Google-Smtp-Source: ABdhPJw4fjyrkxIC+QZRszgyocPb227aTwysjA6Y6+BSsjmYj3MtfEQbRiHUZN+EhaJlycSon3FALA== X-Received: by 2002:ae9:ebcf:: with SMTP id b198mr40726993qkg.488.1600595879999; Sun, 20 Sep 2020 02:57:59 -0700 (PDT) Received: from Ansuel-XPS.localdomain (93-39-149-95.ip76.fastwebnet.it. [93.39.149.95]) by smtp.googlemail.com with ESMTPSA id w6sm6968323qti.63.2020.09.20.02.57.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Sep 2020 02:57:59 -0700 (PDT) From: Ansuel Smith To: Miquel Raynal Subject: [PATCH v3 4/4] dt-bindings: net: Document use of mac-address-increment Date: Sun, 20 Sep 2020 11:57:22 +0200 Message-Id: <20200920095724.8251-5-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200920095724.8251-1-ansuelsmth@gmail.com> References: <20200920095724.8251-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200920_055801_543240_50A3F7DE X-CRM114-Status: GOOD ( 17.30 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:741 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ansuelsmth[at]gmail.com] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Vignesh Raghavendra , Boris Brezillon , Richard Weinberger , Russell King , Ansuel Smith , devicetree@vger.kernel.org, Rob Herring , linux-mtd@lists.infradead.org, netdev@vger.kernel.org, Jakub Kicinski , Frank Rowand , "David S. Miller" , linux-kernel@vger.kernel.org, Heiner Kallweit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Two new bindings are now supported by the of_net driver to increase (or decrease) a mac-address. This can be very useful in case where the system extract the mac-address for the device from a dedicated partition and have a generic mac-address that needs to be incremented based on the device number. - mac-address-increment-byte is used to tell what byte must be incremented (if not set the last byte is increased) - mac-address-increment is used to tell how much to increment of the extracted mac-address decided byte. Signed-off-by: Ansuel Smith --- .../bindings/net/ethernet-controller.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml index fa2baca8c726..8174f64e79bd 100644 --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml @@ -32,6 +32,27 @@ properties: - minItems: 6 maxItems: 6 + mac-address-increment: + description: + The MAC address can optionally be increased (or decreased using + negative values) from the original value read (from a nvmem cell + for example). This can be used if the mac is read from a dedicated + partition and must be increased based on the number of device + present in the system. The increment will not overflow/underflow to + the other bytes if it's over 255 or 0. + (example 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00) + minimum: -255 + maximum: 255 + + mac-address-increment-byte: + description: + If 'mac-address-increment' is defined, this will tell what byte of + the mac-address will be increased. If 'mac-address-increment' is + not defined, this option will do nothing. + default: 5 + minimum: 3 + maximum: 5 + max-frame-size: $ref: /schemas/types.yaml#definitions/uint32 description: