From patchwork Wed Jan 11 07:30:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 13096156 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 2ECC8C46467 for ; Wed, 11 Jan 2023 07:32:34 +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:References:In-Reply-To: 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: List-Owner; bh=BSqCbwZsMfF922fuljTv9RtNQdo1QDzGdAqipBY7HGw=; b=Vz02ad04zzt09K YFjtNSZ2/m6w8pb2bBo3OZehRpsUkH8sIw1fzuxgTU0q+md5AdPXgvfqHf3XG3cTZMnTUc9646/6M jQA7d7QoOqUjCpXOaitdg3oQnnzhoArVN5/NgVqn1rvy1yw4LDH0j7VSPIJ+AYbedUuCuymMGFcnY xWPxj/Bj0Fiyq42FEAb62pHrmrwrbUACrjwPaMjq8RpKnwYHFhrPiMS/0Apv2R/F3vnrOgcZke95O GnI2oecynoc7Saj3szRMr52jmcv44QbeoyfcBmBvtYTOXEICJ1XlacYoY4cGBQYeBj/UI6u0R+/27 J3FflZAFaIfEOSnwNg4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFVaE-00A3AM-41; Wed, 11 Jan 2023 07:31:38 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFVZu-00A331-Ib for linux-arm-kernel@lists.infradead.org; Wed, 11 Jan 2023 07:31:20 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 18so21067567edw.7 for ; Tue, 10 Jan 2023 23:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xLzMMc8ebvQzEKmQRYFOwkLETqyrkUTk5WSaxVlJTiI=; b=AdHiFpQdoA09CZEj5w953fkCedR6xXBwi/v2pnfJIvJChAWTHwFHisWOe4bheUZDRA A8enp6oPE/6Muccn+lVT364GP9a1S9tZ0xS3KOH8kMNabGN3kY0+cAxueomtqqaBUkXU 3BDy1nuUAK4PLPLkKFmc9zgxRGVv2kLmceDzKhJghJUhnBg6sqkrW+lfFwRhAwJ2mxbG YtbmDPIWuVjWLU1zzCHSemztcPOSd4IwR93eb9ulpwv3tBtJGceGcSSGtIrlv4VTK4ms JptkRFpb31kyO1B5urcjh+twOef07Rj5em4haoU1WtaorRxPBVFqLLL5hSqbosCxdCw8 /wdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xLzMMc8ebvQzEKmQRYFOwkLETqyrkUTk5WSaxVlJTiI=; b=63PBtFtiGQI+bc/fVN2SOY4OpKGOdwPXwBvj0JtD5O/5IX2zx9lUvh0X/A1YNNvKlo iSh/UZnBaxcd34w6DZSdC/Vc46ntG3IyTtrf9gWfLVTOm2Hq4JRObaT+CqY5NmTVZalV vC/o6gayjfXsqxJ8ulE+kL6fIC0MBllCwDPQnxojm+IDuVHBiiQLfHhBlC6oOnq2rI9W Z0t7+YXv8sflHnYTXr9lrO3BJ1EiWIhDn9kKWQmBoPJTie0rpojRwZXsNmngdoqp3zbJ 9mLk54miGiCgaX74W1cpFmkfccZ8SLezhlNO0lBsaC4ybXQwIxRb0z3gPuQpAk+azB7N s/pA== X-Gm-Message-State: AFqh2krtcFwXEyMhb0aBvu/11oF/ouaH8Tjr8UXfNWhO6cROd4LHiK7S q8CfY71lEZ8wehhAlmYo3XA= X-Google-Smtp-Source: AMrXdXvXcOBuq4tt32IRxlFPwJkena6RpsWqDJWjTvn1AZibTtum4mml/kSn4pbl6DxqtXfDduQ9hQ== X-Received: by 2002:aa7:d752:0:b0:499:bcfc:f47b with SMTP id a18-20020aa7d752000000b00499bcfcf47bmr7436081eds.16.1673422276146; Tue, 10 Jan 2023 23:31:16 -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 ed6-20020a056402294600b00499e5659988sm593193edb.68.2023.01.10.23.31.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 23:31:15 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski Cc: Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Miquel Raynal , Michael Walle , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, u-boot@lists.denx.de, =?utf-8?b?UmFmYcWCIE1p?= =?utf-8?b?xYJlY2tp?= Subject: [PATCH V2 3/6] dt-bindings: nvmem: convert U-Boot env vars to NVMEM layout Date: Wed, 11 Jan 2023 08:30:59 +0100 Message-Id: <20230111073102.8147-3-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230111073102.8147-1-zajec5@gmail.com> References: <20230111073102.8147-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230110_233118_633376_79E40167 X-CRM114-Status: GOOD ( 16.16 ) 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 From: Rafał Miłecki U-Boot environment variables can be found of various underlaying storage entities. This binding should be defined as a layout on top on NVMEM device not a NVMEM device itself. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring --- .../bindings/nvmem/layouts/nvmem-layout.yaml | 1 + .../nvmem/{ => layouts}/u-boot,env.yaml | 29 ++++++++++--------- MAINTAINERS | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) rename Documentation/devicetree/bindings/nvmem/{ => layouts}/u-boot,env.yaml (77%) diff --git a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml index 8512ee538c4c..8835b1781a9f 100644 --- a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml +++ b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml @@ -20,6 +20,7 @@ description: | oneOf: - $ref: kontron,sl28-vpd.yaml - $ref: onie,tlv-layout.yaml + - $ref: u-boot,env.yaml properties: compatible: true diff --git a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml b/Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml similarity index 77% rename from Documentation/devicetree/bindings/nvmem/u-boot,env.yaml rename to Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml index cbc5c69fd405..fb273b174fe7 100644 --- a/Documentation/devicetree/bindings/nvmem/u-boot,env.yaml +++ b/Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml @@ -1,10 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 --- -$id: http://devicetree.org/schemas/nvmem/u-boot,env.yaml# +$id: http://devicetree.org/schemas/nvmem/layouts/u-boot,env.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: U-Boot environment variables +title: NVMEM layout of U-Boot environment variables description: | U-Boot uses environment variables to store device parameters and @@ -14,16 +14,11 @@ description: | Data is stored using U-Boot specific formats (variant specific header and NUL separated key-value pairs). - Environment data can be stored on various storage entities, e.g.: + Environment data can be stored on NVMEM devices of various underlaying storage + entities, e.g.: 1. Raw flash partition 2. UBI volume - This binding allows marking storage device (as containing env data) and - specifying used format. - - Right now only flash partition case is covered but it may be extended to e.g. - UBI volumes in the future. - Variables can be defined as NVMEM device subnodes. maintainers: @@ -67,11 +62,14 @@ examples: read-only; }; - env: partition@40000 { - compatible = "u-boot,env"; + partition@40000 { reg = <0x40000 0x10000>; - mac: ethaddr { + nvmem-layout { + compatible = "u-boot,env"; + + mac: ethaddr { + }; }; }; }; @@ -87,9 +85,12 @@ examples: label = "u-boot"; partition-u-boot-env { - compatible = "brcm,env"; - ethaddr { + nvmem-layout { + compatible = "brcm,env"; + + ethaddr { + }; }; }; }; diff --git a/MAINTAINERS b/MAINTAINERS index 2a1368722c45..2e13ee875c77 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -21136,7 +21136,7 @@ F: drivers/media/pci/tw686x/ U-BOOT ENVIRONMENT VARIABLES M: Rafał Miłecki S: Maintained -F: Documentation/devicetree/bindings/nvmem/u-boot,env.yaml +F: Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml F: drivers/nvmem/u-boot-env.c UACCE ACCELERATOR FRAMEWORK