Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp806122pxb; Thu, 17 Feb 2022 15:24:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2Lh3kT1hmmm5V/0Mk81UdJeRMKU1bZaxcNoQMsDftloZ54geYS1NCPJ1yPM5XDgXMBcvz X-Received: by 2002:a17:90b:4c42:b0:1ba:1b5:917b with SMTP id np2-20020a17090b4c4200b001ba01b5917bmr9653062pjb.166.1645140266223; Thu, 17 Feb 2022 15:24:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645140266; cv=none; d=google.com; s=arc-20160816; b=wQnzumrekeh8xg3Lr9GZTio+M5ku/RIDmce5ogb5Q8luFfofzQ81orz1JWMVfpTLRC NKUUCONXrKQJDrksoOnrAv+77MFUWkDUHb1xgqR0FIjBXykHhlytEaTmRH2twWPOoi4S 3VHQuDR3/w2rIQJgbhob5khwAjHYepSWBI+5p7yNHX/0BTeTQyD7KZeH6NMBCMhxl6Pk eatIQGEgpO9iZ1AzExqbkD0dosRYJnfaRqTwU8yOdWDIwBQ0n4wQIRxk+aKyE4wfMQVu 70w441h+jmJ5La8QguSnF0jOjwl6wUBLTH7awmJFNFrkzN2J0U0nh0jh7n3LydhvotB0 DKRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GYdaQ5jy/NjTyMvDV32bwWns8WFyzYMJab8GKqSN5xQ=; b=qMCumgSX67Ta8GlZYEaoF6ZA6grCN5tv30A1vQ9I/grU3tzqLC/kgUux+UjZOJ7f8m jGP8Ej9hO3OsacPC4gkcRryaN9CmCFgUDTWqW2d5wS1PbfJteOsIfJR0XrF5oL+JcTCq Pfyc5JE2GMCD7kAKcq3gr3VDH5jjLiRjTG29w8hOCmfl2VAMIPZh60m77xs+goP5X+hQ NNqQ1C7Z72ZTanDkcnU5d3YGJGjfmGzrjtNTkLQpSkP6con6unF1/S8HGgPWhRM7rI6+ DVfeMBahZqBWz25XrLG2u6TxYPcj99RqmlKvlOdsxy9beNoBP3V4rWZ4EOns7pQyBdFl 74zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="d/JvqoJ9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id il16si2142473pjb.62.2022.02.17.15.24.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 15:24:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="d/JvqoJ9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1B2B555774; Thu, 17 Feb 2022 15:10:00 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241058AbiBQVQ0 (ORCPT + 99 others); Thu, 17 Feb 2022 16:16:26 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239098AbiBQVQY (ORCPT ); Thu, 17 Feb 2022 16:16:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F43C54F9E; Thu, 17 Feb 2022 13:16:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9F51261239; Thu, 17 Feb 2022 21:16:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FAD2C340EC; Thu, 17 Feb 2022 21:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645132568; bh=lzNUZg4/G1tEmDvLX1MFUWisYWeHMVVhEOzHv56p/jA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=d/JvqoJ9efgG0vPVIvBXF9uNOrKqRwS17mhCZnVqaUNDyYwlSzhKO6T/iigyE3MOg uR6Ua+/FNCNyAS6KT6kV4aBppd+PUHAm3uvWTmml6O6DDWSnPvbY/dv7EMNt0QpS1e QMpBa5oXuQDP3fKLzqv+zFyy0JSmlvhnptxi7o0bNOBRkI+EqR81rKIDLTcnxNMrLv xi5zd58j3n8ZS2NCwQJxe+6X5vKDDyXNMx8D/6u7Kx5D8vySNWegAk9MW4g8Z6ZZIw IxqiBBBLZw38mLqG/P59ofMP+y8P6dpS1QpvrF/KGszcMdiUUfeOvy7MchaVPFWovs Vv5h7AbNfMZkQ== Received: by mail-ej1-f49.google.com with SMTP id p9so10225502ejd.6; Thu, 17 Feb 2022 13:16:07 -0800 (PST) X-Gm-Message-State: AOAM530qzqtGv/AgqwqYf1QTVG9KZOPe1on9kDylvxmULpU9KLgN/7x3 NvOQ8oIatAUeheDRPNzE/pg94DTaTPdwCIQr0A== X-Received: by 2002:a17:906:a40f:b0:6c9:e255:7926 with SMTP id l15-20020a170906a40f00b006c9e2557926mr3760578ejz.27.1645132566329; Thu, 17 Feb 2022 13:16:06 -0800 (PST) MIME-Version: 1.0 References: <20220217120856.2910-1-zajec5@gmail.com> In-Reply-To: <20220217120856.2910-1-zajec5@gmail.com> From: Rob Herring Date: Thu, 17 Feb 2022 15:15:54 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC *RFC*] dt-bindings: add U-Boot chosen for environment data phandle To: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Krzysztof Kozlowski , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Tom Rini , Ricardo Salveti , Michal Simek , Jorge Ramirez-Ortiz , U-Boot Mailing List , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Thu, Feb 17, 2022 at 6:09 AM Rafa=C5=82 Mi=C5=82ecki = wrote: > > From: Rafa=C5=82 Mi=C5=82ecki > > 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=C5=82 Mi=C5=82ecki > --- > .../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/Docum= entation/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=C5=82 Mi=C5=82ecki > + > +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 =3D <&env>; You should look at the u-boot config support: https://github.com/devicetree-org/dt-schema/commit/0986f729eff0f40a66e85ab9= dfb37681bf025ac4