From patchwork Tue Mar 5 20:23:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 1908447 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=devicetree+bounces-48570-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tq6V91DNgz23qV for ; Wed, 6 Mar 2024 07:24:17 +1100 (AEDT) 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 39DDC1C22409 for ; Tue, 5 Mar 2024 20:24:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54F32129A6B; Tue, 5 Mar 2024 20:24:05 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 7136D128374; Tue, 5 Mar 2024 20:24:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709670245; cv=none; b=nNLFUoC7r73QL8uUDzw1Ykc9xlOyWZ7oUuBfL9rX86czAIUX+ub/IfVkUrDvPYhpD9BcAnHszowrQCWLu0j7Xu2d2Ks28x2Er7z5Ac7xFaaNaVX8hb+1b8uefl9atTx9GVNPyRoKxQfUg7P2HCkwgM8cGEGnKfHfXs4mno3IV98= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709670245; c=relaxed/simple; bh=Ca48xLzAr4W59Rv2KeDaSbg/Ud1Fwzb1jEB+9rC9fZw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ibjNZhB/BGzo42Kc2ZDQIQYB+wHmAO7pg3u4XTTEl+/82+w0WpRgGddJRbXiTdadSMt39humTL1tIgP1lekI3nrX0nIVUiYdf5oM2UrhZoB8jPKCAgsS700TCnuO0nuI9Z/yQZbjUmlTXrLk6ZpVPzttUe8DqJcpUld2VjIYVoM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rhbJt-0001ME-0P; Tue, 05 Mar 2024 20:23:25 +0000 Date: Tue, 5 Mar 2024 20:23:20 +0000 From: Daniel Golle To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Jens Axboe , Daniel Golle , 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 Cc: Diping Zhang , Jianhui Zhao , Jieying Zeng , Chad Monroe , Adam Fox , John Crispin Subject: [RFC PATCH v2 1/8] dt-bindings: block: add basic bindings for block devices Message-ID: References: Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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. + + uuid: + $ref: /schemas/types.yaml#/definitions/string + description: + Matches partition by PARTUUID if present. + + 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 diff --git a/Documentation/devicetree/bindings/block/partitions.yaml b/Documentation/devicetree/bindings/block/partitions.yaml new file mode 100644 index 0000000000000..fd84c3ba8493b --- /dev/null +++ b/Documentation/devicetree/bindings/block/partitions.yaml @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/block/partitions.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Partitions on block devices + +description: | + This binding is generic and describes the content of the partitions container + node. + +maintainers: + - Daniel Golle + +patternProperties: + "^block-partition-.+$": + $ref: partition.yaml + +unevaluatedProperties: false From patchwork Tue Mar 5 20:24:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 1908448 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.48.161; helo=sy.mirrors.kernel.org; envelope-from=devicetree+bounces-48574-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tq6WX4PDcz1yX4 for ; Wed, 6 Mar 2024 07:25:28 +1100 (AEDT) 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8D18FB23AD0 for ; Tue, 5 Mar 2024 20:25:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26EF212AAE3; Tue, 5 Mar 2024 20:24:35 +0000 (UTC) X-Original-To: devicetree@vger.kernel.org Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 8505312AAD1; Tue, 5 Mar 2024 20:24:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709670275; cv=none; b=TarUmwS1Zv4Qp5iBvdPUPxAqk8omJh5dyvNv2fTWPfheuSQbhk4bFQu1l7eiY4WtCdOJcH7rIwHTqOuqxnIsuJK53QkJMURVHw6G25d6OIbKqqOOCUKYS+p2JpriKhsYE91wmZeRA7Fd5V4uo+B/KskxrWv8LJfS5gMpmYCX7aI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709670275; c=relaxed/simple; bh=VQOLGE5b1WT05ny2MJKIquB+OOdiTR6lMQ9qYMzFM0I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iIyhLFCvFduvwysxcmwwT7Fi50OWeI2pFmST+fbsbDFkAUEC40EPYDCjR36C1BTwc37oaVcz4Ax8kbZbY+YuPHjn1KlqdZCYSjof494rtGdfVp4MkS9s+ZJSS+TPXQ1G88zjhqOT7JVVQWyVJPKKtTWDwoqm6whry64q/voJSmI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rhbKe-0001Ol-0z; Tue, 05 Mar 2024 20:24:12 +0000 Date: Tue, 5 Mar 2024 20:24:08 +0000 From: Daniel Golle To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Jens Axboe , Daniel Golle , 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 Cc: Diping Zhang , Jianhui Zhao , Jieying Zeng , Chad Monroe , Adam Fox , John Crispin Subject: [RFC PATCH v2 5/8] dt-bindings: mmc: mmc-card: add block device nodes Message-ID: References: Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Add nodes representing the block devices exposed by an MMC device including an example involving nvmem-cells. Signed-off-by: Daniel Golle --- .../devicetree/bindings/mmc/mmc-card.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mmc-card.yaml b/Documentation/devicetree/bindings/mmc/mmc-card.yaml index fd347126449ac..95ccbda871d24 100644 --- a/Documentation/devicetree/bindings/mmc/mmc-card.yaml +++ b/Documentation/devicetree/bindings/mmc/mmc-card.yaml @@ -26,6 +26,18 @@ properties: Use this to indicate that the mmc-card has a broken hpi implementation, and that hpi should not be used. + block: + $ref: /schemas/block/block-device.yaml# + description: + Represents the block storage provided by an SD card or the + main hardware partition of an eMMC. + +patternProperties: + '^boot[0-9]+': + $ref: /schemas/block/block-device.yaml# + description: + Represents a boot hardware partition on an eMMC. + required: - compatible - reg @@ -42,6 +54,39 @@ examples: compatible = "mmc-card"; reg = <0>; broken-hpi; + + block { + partitions { + cal_data: block-partition-rf { + partnum = <3>; + partname = "rf"; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom@0 { + reg = <0x0 0x1000>; + }; + }; + }; + }; + }; + + boot1 { + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr: macaddr@a { + compatible = "mac-base"; + reg = <0xa 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; }; };