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: 1594202 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=U+ehdluw; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Jztst56kyz9sFk for ; Thu, 17 Feb 2022 23:09:20 +1100 (AEDT) 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-Google-Smtp-Source: ABdhPJxSdQt17vUP+C9eEr/kMKsTaGB2mrogkx4RsuJLkwn5hr9mf8Cb16I1wO92LK9/rkn0r+BKaw== 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"; + }; + };