xref: /linux/Documentation/devicetree/bindings/mmc/mmc-card.yaml (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mmc/mmc-card.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: MMC Card / eMMC Generic
8
9maintainers:
10  - Ulf Hansson <ulf.hansson@linaro.org>
11
12description: |
13  This documents describes the devicetree bindings for a mmc-host controller
14  child node describing a mmc-card / an eMMC.
15
16  It's possible to define a fixed partition table for an eMMC for the user
17  partition, the 2 BOOT partition (boot1/2) and the 4 GP (gp1/2/3/4) if supported
18  by the eMMC.
19
20properties:
21  compatible:
22    const: mmc-card
23
24  reg:
25    const: 0
26
27  broken-hpi:
28    $ref: /schemas/types.yaml#/definitions/flag
29    description:
30      Use this to indicate that the mmc-card has a broken hpi
31      implementation, and that hpi should not be used.
32
33patternProperties:
34  "^partitions(-boot[12]|-gp[14])?$":
35    $ref: /schemas/mtd/partitions/partitions.yaml
36
37    patternProperties:
38      "^partition@[0-9a-f]+$":
39        $ref: /schemas/mtd/partitions/partition.yaml
40
41        properties:
42          reg:
43            description: Must be multiple of 512 as it's converted
44              internally from bytes to SECTOR_SIZE (512 bytes)
45
46        required:
47          - reg
48
49        unevaluatedProperties: false
50
51required:
52  - compatible
53  - reg
54
55additionalProperties: false
56
57examples:
58  - |
59    mmc {
60        #address-cells = <1>;
61        #size-cells = <0>;
62
63        card@0 {
64            compatible = "mmc-card";
65            reg = <0>;
66            broken-hpi;
67
68            partitions {
69                compatible = "fixed-partitions";
70
71                #address-cells = <1>;
72                #size-cells = <1>;
73
74                partition@0 {
75                    label = "kernel"; /* Kernel */
76                    reg = <0x0 0x2000000>; /* 32 MB */
77                };
78
79                partition@2000000 {
80                    label = "rootfs";
81                    reg = <0x2000000 0x40000000>; /* 1GB */
82                };
83            };
84
85            partitions-boot1 {
86                compatible = "fixed-partitions";
87
88                #address-cells = <1>;
89                #size-cells = <1>;
90
91                partition@0 {
92                    label = "bl";
93                    reg = <0x0 0x2000000>; /* 32MB */
94                    read-only;
95                };
96            };
97        };
98    };
99
100...
101