Message ID | 20220125180114.12286-1-zajec5@gmail.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 08150C433EF for <linux-arm-kernel@archiver.kernel.org>; Tue, 25 Jan 2022 18:03:05 +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=/QjMu2Zg0doKIIq24vwIi0lh6Kbf1NYG0tWIDI9nZEk=; b=pHzyuZclBV7hAQ gprGRxsSYVhwxlxRZHPhyRL03o6Dfh51h7tblhBbLFTmPg9yrMRaPi3gBnis7saiaHq/9YouUCFEe fuepGS/l2x7HBCtJt6MhPTFah0xvOOJuFuIN/pR4iZD8j8W/Z0G5umsFtdsfEAGN7FelzyZ0zeqFR DHN+VTzt/pdfzX/G9UhVt6n0Ck5Mxt7LWiaKdVieBbAwwhLpp0Ku8iSqYWPnaz1CS90SVM5YNnafD No1qnxPN0/JFIjmgnSjNLDZHflYMrUjdCmh7vlzUD9BAwoXgTU3RPIz5Uybxk4aAgbIdfhFgvtZGz SbiZLieb3fPQFcxAq3kQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCQ8R-0098cA-CO; Tue, 25 Jan 2022 18:01:39 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCQ8A-0098ZO-T9; Tue, 25 Jan 2022 18:01:24 +0000 Received: by mail-lj1-x22c.google.com with SMTP id z14so16468241ljc.13; Tue, 25 Jan 2022 10:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GM66wyVEQfYH7PQMt46Z5bne3N5mqgIHb4gE5XOX3QU=; b=qyX4+YOYstvWZ1ZiNLgvZY9TpsI07bcy1pSRR/tryKGf6eHosT3nY2XJ3VnftoWE6D lFstLOcE3HaNjlqisM5DI9KtnQ5isJdsloqol6DpAHFh1PmGmpT/TzGhA92zXgcSlCw8 vO80Ebh+IF2kJ2vQddoGyUSUAK/Eqia13m27m83QkJa7F4WBniAk81U0cxWDtkwoCKVQ cCLH1nBHXCbpg0cinEymgD/SZYqtgH7w/UvyEmBClP6JFwNigbVt525c24FGLyDKWscv 7iQGHRpVIxrDrBLD9QTQvnbQm9ljrqtJTRN/3aeGeRy77WK0woITYfSeoSCIaQm2PT3c 2gHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GM66wyVEQfYH7PQMt46Z5bne3N5mqgIHb4gE5XOX3QU=; b=X4F4pyx3tzirA1TsMHz0mLJ64tdlnZ2gMTOXrfnwuJZ6JfqO+IO5YfsMm/dGBLPuuT VbGoSyY4zuVB7g3cW5nUgTqaKMKy1NH9EgIAbABiCrs5TXGldBW5/Vjv5sqEyEQWZhFY ehjK3Tb7yJVWh5qkbxlCRnQDCpd6QEivrl1ANB9eOhYq811M6ymwac4j3ADxLpAm1c+E H9anwPKUos/Bi5+GCzJRYL0m6hYdyYMVXaj4KT12pdA/RwlW6ZJm+empLgQz0jigRmL7 fWTlxuvkO16PjR67igP8YNVqgCTKVM3pipdjQDqbiJ4zb4FoM3RfM3GkLigUKIJxcy1V LZPw== X-Gm-Message-State: AOAM530hR5tuaKWLf6euuwHn4ArLwsj+4qDisIW665w7ZI0sCU4s7zbm /65/eoafHYNsicG+oNz0890= X-Google-Smtp-Source: ABdhPJwoWthi4gg4kuMx//yhY6O7ZoD9EuAirCd3tjV+pL+5cXulMUAH0DG7CEqZRyZnq1GcejGO2Q== X-Received: by 2002:a2e:8e21:: with SMTP id r1mr6874390ljk.433.1643133679587; Tue, 25 Jan 2022 10:01:19 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id z24sm1149121lfb.206.2022.01.25.10.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 10:01:19 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= <zajec5@gmail.com> To: Rob Herring <robh+dt@kernel.org>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Michael Walle <michael@walle.cc> Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Shawn Guo <shawnguo@kernel.org>, Li Yang <leoyang.li@nxp.com>, Frank Rowand <frowand.list@gmail.com>, "David S . Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Ansuel Smith <ansuelsmth@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Hauke Mehrtens <hauke@hauke-m.de>, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= <rafal@milecki.pl> Subject: [PATCH 0/2] dt-bindings: nvmem: support describing cells Date: Tue, 25 Jan 2022 19:01:12 +0100 Message-Id: <20220125180114.12286-1-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_100122_993579_532AA035 X-CRM114-Status: GOOD ( 13.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
dt-bindings: nvmem: support describing cells
|
expand
|
From: Rafał Miłecki <rafal@milecki.pl> Michael has recently posted a cleaned up patchset for NVMEM transformations support: [PATCH 0/8] nvmem: add ethernet address offset support https://lore.kernel.org/lkml/20211228142549.1275412-1-michael@walle.cc/T/ https://patchwork.ozlabs.org/project/linux-mtd/list/?series=278644&state=* I find it very important & fully support it. In home routers we very often deal with just one MAC address that: 1. Is a base for calculating multiple Ethernet addresses 2. Can be stored in binary as well as ASCII format I'd like to suggest just a slightly different solution though. I think that using something like: otp-1 { compatible = "kontron,sl28-vpd", "user-otp"; #address-cells = <1>; #size-cells = <1>; base_mac_address: base-mac-address@17 { #nvmem-cell-cells = <1>; reg = <17 6>; }; }; isn't clear enough and requires too much conditional code in Linux / whatever implementation. DT doesn't make it clear which NVMEM cells are used for what and how should be handled. That has to be hardcoded in a Linux / whatever driver. My idea is to add "compatible" & additional flags to NVMEM cells. Example: otp-1 { compatible = "user-otp"; #address-cells = <1>; #size-cells = <1>; base_mac_address: base-mac-address@17 { compatible = "mac-address"; reg = <17 6>; #nvmem-cell-cells = <1>; }; }; (for more examples see PATCH 2/2 and its mac-address.yaml . Rafał Miłecki (2): dt-bindings: nvmem: extract NVMEM cell to separated file dt-bindings: nvmem: cells: add MAC address cell .../devicetree/bindings/nvmem/cells/cell.yaml | 35 +++++++ .../bindings/nvmem/cells/mac-address.yaml | 94 +++++++++++++++++++ .../devicetree/bindings/nvmem/nvmem.yaml | 25 +---- 3 files changed, 131 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/nvmem/cells/cell.yaml create mode 100644 Documentation/devicetree/bindings/nvmem/cells/mac-address.yaml