Skip to content

Commit 4e96945

Browse files
vwaxmiquelraynal
authored andcommitted
dt-bindings: reserved-memory: Support MTD/block device
Add bindings to allow MTD/block devices to be used in reserved-memory regions using the "phram" (MTD in PHysical RAM) driver. This allows things like partitioning to be specified via the existing devicetree bindings. Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220412135302.1682890-3-vincent.whitchurch@axis.com
1 parent 82e214f commit 4e96945

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

  • Documentation/devicetree/bindings/reserved-memory
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/reserved-memory/phram.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MTD/block device in RAM
8+
9+
description: |
10+
Specifies that the reserved memory region can be used as an MTD or block
11+
device.
12+
13+
The "phram" node is named after the "MTD in PHysical RAM" driver which
14+
provides an implementation of this functionality in Linux.
15+
16+
maintainers:
17+
- Vincent Whitchurch <vincent.whitchurch@axis.com>
18+
19+
allOf:
20+
- $ref: "reserved-memory.yaml"
21+
- $ref: "/schemas/mtd/mtd.yaml"
22+
23+
properties:
24+
compatible:
25+
const: phram
26+
27+
reg:
28+
description: region of memory that can be used as an MTD/block device
29+
30+
required:
31+
- compatible
32+
- reg
33+
34+
unevaluatedProperties: false
35+
36+
examples:
37+
- |
38+
reserved-memory {
39+
#address-cells = <1>;
40+
#size-cells = <1>;
41+
42+
phram: flash@12340000 {
43+
compatible = "phram";
44+
label = "rootfs";
45+
reg = <0x12340000 0x00800000>;
46+
};
47+
};

0 commit comments

Comments
 (0)