From patchwork Thu Feb 17 12:08:56 2022 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: 543379 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp321295imn; Thu, 17 Feb 2022 04:09:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0bd/cEnHV9qXT0Lj5KKyoiwihe+J33yMldvOfnfp1FiG/KWTQB6IpiEitc6jfBS7q28Oo X-Received: by 2002:a17:906:3117:b0:6cd:f81b:e295 with SMTP id 23-20020a170906311700b006cdf81be295mr1984454ejx.511.1645099757654; Thu, 17 Feb 2022 04:09:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645099757; cv=none; d=google.com; s=arc-20160816; b=uMzsX0EB12yFAOx5AVPWTUr8sR9YIGKIfO0tZielf29uCqme8zJLYrvJjjGeOftYTY 5bvPdM9piNMWtvdjjIrx/zgyJVHCZ2XeJI71h0GuOKJGpyBiPnyRqTj7XPdtWIcMIanE kqbT4lUFxWeB5kpQgeZaYikPPF1iKPV9bLduW8RBeUwuVTHYlPr1+ClDuAA+7gcf+9ch QvBVZKKo3aKpBEz4sCk5Uq60rwVeSb0qxQSvQlmKkxccU1jKvniihEV6nbB+fDxp498t tM9MGeq4pcc7VRB/yTaZrDeS1Ta8Hl3DcxNnsckNjI+8/q+PY5zYKVUOdDtt0m2qJYc/ aEWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=o61zkZsaE0vJ73sO4uibEGQryzO/LSOJ+6q66VT7/0s=; b=BQdLURFO5f1HyQAEuzdWDrpEBeyaJm0Wq/9GtYWJmZy+ILiJxTnTGMNCEP9fybdFO2 N9L+CTxIYI+Gld9+Num/Mxtz1rP1y0lJQn4wXAoZjo/3rZ076/DEnzfsOLWdPJY26Xt4 8E1g5ZEGaMMD+/Rfwxm6LbTlPaaGVwY84vWf9PO6h1fH7GrSGKTrqffamYsLhEnTMyYP Pe0j6cNfsfmdag9wXwzCvOfADfWKO3tbyefFVCfHtfP0WxtAmZdlTO73fQERt4DozdBZ rmRN4k5k8QsQfS95NNOnGehB/Yi5KZYkAMm8Lb9ak3r1tGLAJQkUkRimoGi/n+Kx/4ss hEkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U+ehdluw; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id e13si4540359edz.46.2022.02.17.04.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 04:09:17 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U+ehdluw; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6F0A783B69; Thu, 17 Feb 2022 13:09:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="U+ehdluw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7CCF283AA5; Thu, 17 Feb 2022 13:09:12 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F388E83B69 for ; Thu, 17 Feb 2022 13:09:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=zajec5@gmail.com Received: by mail-lf1-x129.google.com with SMTP id g39so9514699lfv.10 for ; Thu, 17 Feb 2022 04:09:03 -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=o61zkZsaE0vJ73sO4uibEGQryzO/LSOJ+6q66VT7/0s=; b=U+ehdluwKGz6WTZzeethEyl9CiEaqVsJUllKJVE7EakT4m/rsuE6oVApqbWAINtIMd f/A1S//YnRgPtDFTEsEPl2hAzuwYq8/vhpzf3MCq9Bnl8arbv5etqZKKeHLfM0b8AIhP qD7SotQBhlY0uVPf3WW+gJGmOK4kI614sLxbe9VnZ0MpjzrPZcs3OQ0M73+t3KmGhTXG JItv68B1Ap2AyASWGXkdLpf/ptd9myAsXCM1UC+mQ5P0yAk2Sobpg0sBY3KCdS19+Bud 6o+PNUC9iaWxRU+a1jMj3vX5lAHHMShbdSovnoSa9cwveWhHw4Ow3O2UTYBgOAWrQmr9 20KQ== 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=o61zkZsaE0vJ73sO4uibEGQryzO/LSOJ+6q66VT7/0s=; b=voMSnN5a+ukVeSdTYp8O96rxMNCZrgJmJBZiczDrAVOiqy+n6/ILjD96e78xJTI1Dz kwlgU3QimzVdlOZftXu5XptKB9jWRL1yx+nmkcqeCQwFZ39JbMuPvDJ0ApaNKDsisPIY TpyYO+sxB+Bdr8jrUQmN1vmS60BTwDtqV2nm4qg8OaUR4Fwaz6m2UnAGtRoR9Wups7/M npNPlMQSI+N1nkCKcl4v6fFNm2Aa1ValI38Z7HlhFaBWMl45Zb3Db61TudMI7Zq3b9X+ 6gDSxnO35D/qg+5lCDIkcuTS1wgeuMZnuSiWndOGHZMg3SYKSTOqqfPGA/eN0+ikhCJZ n1KQ== X-Gm-Message-State: AOAM531FRrCsqk6dvNQE7EjDNvqobzIz8LVOe45ZAWDktKlxDdNXpq6r fuZHOtdxPLmOrZ+2nhu04yk= X-Received: by 2002:ac2:5fb2:0:b0:443:14a8:d89b with SMTP id s18-20020ac25fb2000000b0044314a8d89bmr1868860lfe.6.1645099742985; Thu, 17 Feb 2022 04:09:02 -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 t4sm1106625ljh.67.2022.02.17.04.09.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 04:09:02 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Rob Herring , Krzysztof Kozlowski Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Rini , Ricardo Salveti , Michal Simek , Jorge Ramirez-Ortiz , u-boot@lists.denx.de, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH RFC *RFC*] dt-bindings: add U-Boot chosen for environment data phandle Date: Thu, 17 Feb 2022 13:08:56 +0100 Message-Id: <20220217120856.2910-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean From: Rafał Miłecki This is RFC and request for a help & discussion. While reviewing patch for U-Boot env binding it has been mentioned that: 1. /Processing/ whole DT in U-Boot may be too much work Handling flash devices, partitions, their formats & NVMEM may require too many U-Boot drivers involved. 2. It'd be nice to have env data storage devices pointed in chosen I wrote this hacky PATCH to give a rough idea how it could look like. Please review this and let me know: 1. If solution with chosen + phandles is acceptable 2. How to properly name .yaml file 3. Where it put it Signed-off-by: Rafał Miłecki --- .../devicetree/bindings/u-boot,chosen.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/u-boot,chosen.yaml diff --git a/Documentation/devicetree/bindings/u-boot,chosen.yaml b/Documentation/devicetree/bindings/u-boot,chosen.yaml new file mode 100644 index 000000000000..8369da91193d --- /dev/null +++ b/Documentation/devicetree/bindings/u-boot,chosen.yaml @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/u-boot,chosen.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: U-Boot setup + +maintainers: + - Rafał Miłecki + +properties: + u-boot,env: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + A list of storage volumes containing U-Boot environment data. + + Env data can be stored on various kinds of storage devices, e.g.: + 1. Raw flash partition + 2. UBI volume + +additionalProperties: true + +examples: + - | + chosen { + u-boot,env = <&env>; + }; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + env: partition@0 { + reg = <0x0000000 0x1000>; + label = "u-boot-env"; + }; + };