From patchwork Tue Apr 5 13:03:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Whitchurch X-Patchwork-Id: 1613490 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=axis.com header.i=@axis.com header.a=rsa-sha256 header.s=axis-central1 header.b=BN7xY1k3; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4KXryq555Bz9s07 for ; Wed, 6 Apr 2022 01:24:03 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355238AbiDEPZv (ORCPT ); Tue, 5 Apr 2022 11:25:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384292AbiDEORz (ORCPT ); Tue, 5 Apr 2022 10:17:55 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFEF52E09C; Tue, 5 Apr 2022 06:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1649163839; x=1680699839; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DqLQ/tqybbZnxatnOYByhvJNRJCuF0z9AxMtXu1mnFM=; b=BN7xY1k3tnaA8FsLsMcHISuo5ayWMEKb1NRR/sF1Q1hb2t2nQWsiPvDI v8BBNuJ4vprWFxbGQSlnpY6q+VyUJs1lEEgqegfs2iZ7TZxbIYRHLyibN eReB0awLH423zCVP4uJKOjNbsAfFSFn5T0VemaMiMyzwIBD475ZRVkTbc 1KscjZaRmuaIVorI8WuVbPaqwKFLvH/g+6rsXMMD6Qgyr/RQ7QCK+TzlO TUDUTK6nXcABuxsdZhAwUf/KKdhswKx4FZynpO1GQaMsj1IvvHgxgqlm/ 0t2F8YOzNA8dEBVMLGnjzWstZ3WWeRzWOwlX5DPKtmFhOymMBB2O90mJ/ g==; From: Vincent Whitchurch To: , , , CC: , Vincent Whitchurch , , , , , , Subject: [PATCH v2 2/4] dt-bindings: reserved-memory: Add phram Date: Tue, 5 Apr 2022 15:03:48 +0200 Message-ID: <20220405130350.1640985-3-vincent.whitchurch@axis.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220405130350.1640985-1-vincent.whitchurch@axis.com> References: <20220405130350.1640985-1-vincent.whitchurch@axis.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: devicetree@vger.kernel.org Add bindings to allow MTD/block devices to be created in reserved-memory regions using the "phram" driver. This allows things like partitioning to be specified via the existing devicetree bindings. Signed-off-by: Vincent Whitchurch --- Notes: v2: - Add note on what "phram" means. - Use /schemas/mtd/mtd.yaml instead of relative pathUse /schemas/mtd/mtd.yaml instead of relative path. .../bindings/reserved-memory/phram.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/reserved-memory/phram.yaml diff --git a/Documentation/devicetree/bindings/reserved-memory/phram.yaml b/Documentation/devicetree/bindings/reserved-memory/phram.yaml new file mode 100644 index 000000000000..318415b56afe --- /dev/null +++ b/Documentation/devicetree/bindings/reserved-memory/phram.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reserved-memory/phram.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MTD/block device in RAM + +description: | + Use the reserved memory region as an MTD or block device. The "phram" node + is named after the "MTD in PHysical RAM" driver which provides an + implementation of this functionality in Linux. + + If no-map is not set, cached mappings will be used for the memory region. + +maintainers: + - Vincent Whitchurch + +allOf: + - $ref: "reserved-memory.yaml" + - $ref: "/schemas/mtd/mtd.yaml" + +properties: + compatible: + const: phram + + reg: + description: region of memory that contains the MTD/block device + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + + phram: flash@12340000 { + compatible = "phram"; + label = "rootfs"; + reg = <0x12340000 0x00800000>; + }; + };