Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp611090lqi; Thu, 7 Mar 2024 06:51:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVcAhBiXeljIbGRv/RWFESFV3gq4iSK6Exn8UHYgXNoX87jRIFfvgNrVv+P8vpmOKJIS7ozbtCrPa0ZO6cBaekx0aSFWmLf8jERz5dFiA== X-Google-Smtp-Source: AGHT+IFWlCj3Wa8MhAviE/KSE0/2nBuQFEPzZzFnVr6Zhg89FiluKB5y4UBIx8JW2RMVG1eUmR2q X-Received: by 2002:a50:c354:0:b0:563:ccd1:26bd with SMTP id q20-20020a50c354000000b00563ccd126bdmr15569edb.2.1709823078504; Thu, 07 Mar 2024 06:51:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709823078; cv=pass; d=google.com; s=arc-20160816; b=yzZreCc36ojl2N9iOup+YW7cn4Hs5wRIF64BGsZNbWD9pBgvd0O4zUhYIfaW03y4s8 XNic1Z5eobqAxZNwq3IcVbrgMohgpEAVx7WQWxVOcTbVXTLXggVCKok7fd3wDav3A/qs ym7E09LUpbUBPVxcEsmG87wLh+JvilLfru2ohlWgGxUe2GbT59r7Ub55jJgwGZekdZyy zkyKCHoPVnbNUFFFT3Cctv7cHSVgz3Ozbia96Ld7gNcKMTdZhOoo76BKZVQJR3KuPu3l qa6lw3B9j9x3R75j6+dczxrvVbJH41OpY2HkDzEPGt8cEgD6IDIV+XJtIjvJNl/nFgpd O5YQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=V5CInyhZJCBz9ttwbelJGo59cVCNQTA43rYKast6mxs=; fh=tZ18rvGvS+ZG3Yfs75AwiEZilIK8xWxaAO/llfbi5gg=; b=zC970zzPg4Gito4f64qp6bPEiklkQeR+QHJyn0TiUrfzkWYWPFFDzMKNhXQc2C7WCv ZszKwT1hsQ51iJmfSUY3WE/eNbejSjwc+PYUX1SF14++0oA0WJQKaAZ7egex1mkuVvGp fqcL1IkUgPuy1QCCiUz8JETupna8H7bqm0hoLYhWHHDaXa/PVKq/fi6pqBVRg5nenrYk 0wwxVQiEhTje8x1queUTNgbjNIAWGInnWFSUPZmlezF10xMq5EP4PwXQXdnUL2K+5Ykt epbX/kM/3xNXJxA8Lt9eEWy8vlBUTHYLi1Dq6XxIlPS5ThjGCVAtqrHu59GpQ2ctnQu4 hbeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A9Ry2aqE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-95770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p11-20020a05640243cb00b005682503eaebsi63700edc.476.2024.03.07.06.51.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 06:51:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A9Ry2aqE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-95770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 196A81F21A48 for ; Thu, 7 Mar 2024 14:51:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E08212DD99; Thu, 7 Mar 2024 14:51:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A9Ry2aqE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 248AD8526A; Thu, 7 Mar 2024 14:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709823065; cv=none; b=qM3iHAm3oBGU1halIKpUc8u6MY1UmK6Upoc8w4IKVEQuQb+25EjoKYHbd1OLSsv8osblSSCkvNKIKyqVmofRUYKOJa4G64+Ev8TdHA9ZvHB/Thwp5pZ6yxbf3Q7SJmtKYH17NUBaqQAyMn9yKowTdK4AWEOxpIsu6YGnZUoxmJU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709823065; c=relaxed/simple; bh=+8ei9aDD5izWfXGOrU5GYMqyDqmFCVXE9yaNWpl1EQQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OvqCRPoIBj4HUspeNOLuU9/gt2ztKDJMCNv2NvXNQhflNg+gn2EoSpusGKpADyFK9gia9/xH8+17xZmHJCWs4G9HuQPxGBr6byG4+ZX/N07cLzGIbkiuO2d0LzDX+3Wa3uRTS6KF496lUvyMe8/kMX/SK8S1+ZRvzCQFW+Ajr+o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A9Ry2aqE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65331C433F1; Thu, 7 Mar 2024 14:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709823064; bh=+8ei9aDD5izWfXGOrU5GYMqyDqmFCVXE9yaNWpl1EQQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A9Ry2aqEF7O9gBMf2orqRux/n+eQVd4ovBevC9rvzK2/WMu2MMDrcMkd/6FNJY/2T dASWKh3BZ47i/0b/Sle3ZmhgMkcoWF+StNGl0jz9hs+BJsq0Twtn0NiPn9damkYiIt QeUb/v6NZ1JB02rAdXIgOYCSGZmv/TFkkClA7ghFrrSw6gw+92o3C6BWiY152DyUPE kJ7aFN9bdtgKStEJX8uRTzdaPzo4hFSbzt1hHYPkmAp62Fwo2iS3XZm5WEzSqCEPZQ 6Onm0MBcewJaBGfjjYmtF+68SjGJ0k5jSMZwFQqrGJoB8CTVTEB+oSU5jXiYo/qntK XQkpMfZ3DMxIA== Date: Thu, 7 Mar 2024 08:51:02 -0600 From: Rob Herring To: Daniel Golle Cc: Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Jens Axboe , Dave Chinner , Jan Kara , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Christian Brauner , Li Lingfeng , Damien Le Moal , Min Li , Adrian Hunter , Hannes Reinecke , Christian Loehle , Avri Altman , Bean Huo , Yeqi Fu , Victor Shih , Christophe JAILLET , "Ricardo B. Marliere" , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-block@vger.kernel.org, Diping Zhang , Jianhui Zhao , Jieying Zeng , Chad Monroe , Adam Fox , John Crispin Subject: Re: [RFC PATCH v2 1/8] dt-bindings: block: add basic bindings for block devices Message-ID: <20240307145102.GA2550133-robh@kernel.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Mar 05, 2024 at 08:23:20PM +0000, Daniel Golle wrote: > Add bindings for block devices which are used to allow referencing > nvmem bits on them. > > Signed-off-by: Daniel Golle > --- > .../bindings/block/block-device.yaml | 22 ++++++++ > .../devicetree/bindings/block/partition.yaml | 51 +++++++++++++++++++ > .../devicetree/bindings/block/partitions.yaml | 20 ++++++++ > 3 files changed, 93 insertions(+) > create mode 100644 Documentation/devicetree/bindings/block/block-device.yaml > create mode 100644 Documentation/devicetree/bindings/block/partition.yaml > create mode 100644 Documentation/devicetree/bindings/block/partitions.yaml > > diff --git a/Documentation/devicetree/bindings/block/block-device.yaml b/Documentation/devicetree/bindings/block/block-device.yaml > new file mode 100644 > index 0000000000000..c83ea525650ba > --- /dev/null > +++ b/Documentation/devicetree/bindings/block/block-device.yaml > @@ -0,0 +1,22 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/block/block-device.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: block storage device > + > +description: | > + This binding is generic and describes a block-oriented storage device. > + > +maintainers: > + - Daniel Golle > + > +properties: > + partitions: > + $ref: /schemas/block/partitions.yaml > + > + nvmem-layout: > + $ref: /schemas/nvmem/layouts/nvmem-layout.yaml# > + > +unevaluatedProperties: false > diff --git a/Documentation/devicetree/bindings/block/partition.yaml b/Documentation/devicetree/bindings/block/partition.yaml > new file mode 100644 > index 0000000000000..df561dd33cbc9 > --- /dev/null > +++ b/Documentation/devicetree/bindings/block/partition.yaml > @@ -0,0 +1,51 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/block/partition.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Partition on a block device > + > +description: | > + This binding describes a partition on a block storage device. > + Partitions may be matched by a combination of partition number, name, > + and UUID. > + > +maintainers: > + - Daniel Golle > + > +properties: > + $nodename: > + pattern: '^block-partition-.+$' > + > + partnum: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + Matches partition by number if present. > + > + partname: > + $ref: /schemas/types.yaml#/definitions/string > + description: > + Matches partition by PARTNAME if present. Why do we need something new here? The existing fixed-partitions can already define block device partitions. It just matches by address/offset which works whether its MBR or GPT. Also, in DT we always have an address when there is an address. I'm sure you want to statically define this and have it work even if the partitions move, but sorry... > + > + uuid: > + $ref: /schemas/types.yaml#/definitions/string > + description: > + Matches partition by PARTUUID if present. If this remains it will need some work in the dtschema tools. The reason is json-schema already has support for UUIDs as a defined 'format' key value and we should use that. > + > + nvmem-layout: > + $ref: /schemas/nvmem/layouts/nvmem-layout.yaml# > + description: > + This container may reference an NVMEM layout parser. > + > +anyOf: > + - required: > + - partnum > + > + - required: > + - partname > + > + - required: > + - uuid > + > +unevaluatedProperties: false