From patchwork Fri Jan 27 12:57:06 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: 49371 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp824321wrn; Fri, 27 Jan 2023 05:10:23 -0800 (PST) X-Google-Smtp-Source: AK7set/EqFdLIvq4t+8M3H8XyXbtHksWZu14+IVzQd84ixZGZal/GwI9oEQnR3jbyaQ0ZcVpjqZz X-Received: by 2002:a17:90a:14a5:b0:22b:b25a:d0a0 with SMTP id k34-20020a17090a14a500b0022bb25ad0a0mr6561497pja.15.1674825023576; Fri, 27 Jan 2023 05:10:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674825023; cv=none; d=google.com; s=arc-20160816; b=Jlcki7FN2B48wu8aDUQ8B7G5zg+U6q/vBdtIsuQGtBztRNrFqX2rzC3kqQwhHqUapo ngc+D574CSADKTD6bHrxnBEDj/KspkmqLK4QzIcLV1kqO71A6sEMOfXdrxgD09/qPVlY 1CmI43e1mtevGXa61ww9/X4RNjp7BrPNhkOLC9R2nU7dbWKd7MjqABuzbwZQ0orwAJCd L7bvrm9cj6/ciZquJLQ3QNHSqLGSknLeTYWuOxDw5kWMGZpbktvGU4iL05KASDEHH407 WrtgIUcpEFaUJqpjVUW+7MZfHOkpjZusaj2O+RL5WU2TAlur+KzkMj5iBCe+0JW3nFtw dFbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lu06/R6jtaPsdOb+3M2mEKtYsdSHx6tfbfAcrndOQiY=; b=rpo0hY7EVEpb93qqTWvg2VQQN3RNhGGfPN3aGNX2UpH3c3I4cquEV0SEg+4+OGqtp6 RiYUh/tEvEmEEFPS5Xb1E/dT1ydCKl4DKRpUROciaJWGYGfLRcJsAxjHCfckdKXu8LCR nol7V3bKQuQGj1akO7s87glYItkM+xT+hZ2oks0OIy+WCmKcPkppfu3kZ58tw6TM1NWR ThtjLsy0JYPNZxHH/msZmKb2uv6sAFjwl0rI2/tllg/Xi/iw+3eaKH7FCE8qlfxQ2sWz zlgYY4gaFnvbXofbkIbtPNQB5nalpmg+jlSxiQ2E27jehDVFo5/drD+vxq3L+M56FrxF srxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RDP38X1z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mv10-20020a17090b198a00b0022bfa408e6fsi4416809pjb.44.2023.01.27.05.10.11; Fri, 27 Jan 2023 05:10:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RDP38X1z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232344AbjA0M5c (ORCPT + 99 others); Fri, 27 Jan 2023 07:57:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234467AbjA0M50 (ORCPT ); Fri, 27 Jan 2023 07:57:26 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64B317D299; Fri, 27 Jan 2023 04:57:24 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id p26so2233320ejx.13; Fri, 27 Jan 2023 04:57:24 -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=lu06/R6jtaPsdOb+3M2mEKtYsdSHx6tfbfAcrndOQiY=; b=RDP38X1zJPgqzvN1XCkEq4SVPmTQJgz+TtoZ7p0KPbx1HzpefwgV2vrv9+u3ztby+C qEuJMPPnNz01zSJ+T+PdJoEC6KDvVw4vaT0vM1cAwh4t5HDF7UiAmhA5k0+R0bCU9NKn CIr0AQlSY9uqDjDhm3imWKkQQeDamC2guKI8dJTdCR0mASfR1Et9eG8Mhj4r3GJcFUtS SDhDg7+5ElZpS0RIMNnMuu4LlCtXGXsrT0GXlR7tlOOkpZ5/AkzbbReCT9bDTGlPWXba 8xgLTnW16ajKyA4K7/LcpvJcvIqTPg+0v2/R8gaMmkqll+bDZQMn6SOPUY8tv+m5Wvtf Q3Pg== 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=lu06/R6jtaPsdOb+3M2mEKtYsdSHx6tfbfAcrndOQiY=; b=zMBJYIxTCYJ/drcfRGBtXI49E1swbBnfqoU7LUApdHOUaEFitHMr3Ro9BUGS/tHoXl RycYyGEv3R1k40nMa4XG8HKe9I/XH0Nls0a49AqXntpEV6fAQaSDQmdp9kDrgIFU2dFM gLwC1MS0N6cdquBO9o7DspKixSMGjHqLtHAPOPBqAlBbcmeqThyCP/TBAujunUnhPjib HDXDc8Df4QmL1vxSVPQiQW8pGg+b4JuRtSiwXcADZ0WDHTgtYWCK8uJJ7mcGOTNNsu+b Kyl2c3t08yRNolsxxJegRZwArJN9lg8c4LtPeXnt2Dqrkx5HUYM9DpLKbqCBNUgdwoF1 rpjQ== X-Gm-Message-State: AO0yUKU0DbCETvjKjOdCynCN4rxmixMSIPWLW29mBjcBByTnJqUckHnj eiOSZhetRFlif+l6bncdwmZsNvSCkw8= X-Received: by 2002:a17:907:7f25:b0:87a:4802:cb4f with SMTP id qf37-20020a1709077f2500b0087a4802cb4fmr3981598ejc.76.1674824242666; Fri, 27 Jan 2023 04:57:22 -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 y5-20020a056402358500b00482e0c55e2bsm2248136edc.93.2023.01.27.04.57.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 04:57:22 -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?= , Rob Herring Subject: [PATCH V3 3/6] dt-bindings: nvmem: convert U-Boot env vars to NVMEM layout Date: Fri, 27 Jan 2023 13:57:06 +0100 Message-Id: <20230127125709.32191-3-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230127125709.32191-1-zajec5@gmail.com> References: <20230127125709.32191-1-zajec5@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756181324168530407?= X-GMAIL-MSGID: =?utf-8?q?1756181324168530407?= 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 35385df2302c..1373154c0b49 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -21214,7 +21214,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