1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mmc/renesas,mmcif.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Renesas Multi Media Card Interface (MMCIF) Controller
8
9maintainers:
10  - Wolfram Sang <wsa+renesas@sang-engineering.com>
11
12allOf:
13  - $ref: "mmc-controller.yaml"
14
15properties:
16  compatible:
17    items:
18      - enum:
19          - renesas,mmcif-r7s72100 # RZ/A1H
20          - renesas,mmcif-r8a73a4  # R-Mobile APE6
21          - renesas,mmcif-r8a7740  # R-Mobile A1
22          - renesas,mmcif-r8a7742  # RZ/G1H
23          - renesas,mmcif-r8a7743  # RZ/G1M
24          - renesas,mmcif-r8a7744  # RZ/G1N
25          - renesas,mmcif-r8a7745  # RZ/G1E
26          - renesas,mmcif-r8a7778  # R-Car M1A
27          - renesas,mmcif-r8a7790  # R-Car H2
28          - renesas,mmcif-r8a7791  # R-Car M2-W
29          - renesas,mmcif-r8a7793  # R-Car M2-N
30          - renesas,mmcif-r8a7794  # R-Car E2
31          - renesas,mmcif-sh73a0   # SH-Mobile AG5
32      - const: renesas,sh-mmcif
33
34  reg:
35    maxItems: 1
36
37  interrupts: true
38
39  clocks:
40    maxItems: 1
41
42  power-domains:
43    maxItems: 1
44
45  resets:
46    maxItems: 1
47
48  dmas:
49    minItems: 2
50    maxItems: 4
51    description:
52      Must contain a list of pairs of references to DMA specifiers, one for
53      transmission, and one for reception.
54
55  dma-names:
56    minItems: 2
57    maxItems: 4
58    items:
59      enum:
60        - tx
61        - rx
62
63  max-frequency: true
64
65required:
66  - compatible
67  - reg
68  - interrupts
69  - clocks
70  - power-domains
71
72if:
73  properties:
74    compatible:
75      contains:
76        const: renesas,mmcif-r7s72100
77then:
78  properties:
79    interrupts:
80      items:
81        - description: Error interrupt
82        - description: Normal operation interrupt
83        - description: Card detection interrupt
84else:
85  if:
86    properties:
87      compatible:
88        contains:
89          enum:
90            - renesas,mmcif-r8a7740
91            - renesas,mmcif-sh73a0
92  then:
93    properties:
94      interrupts:
95        items:
96          - description: Error interrupt
97          - description: Normal operation interrupt
98  else:
99    if:
100      properties:
101        compatible:
102          contains:
103            enum:
104              - renesas,mmcif-r8a73a4
105              - renesas,mmcif-r8a7778
106    then:
107      properties:
108        interrupts:
109          maxItems: 1
110    else:
111      properties:
112        interrupts:
113          maxItems: 1
114      required:
115        - resets
116
117unevaluatedProperties: false
118
119examples:
120  - |
121    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
122    #include <dt-bindings/interrupt-controller/arm-gic.h>
123    #include <dt-bindings/power/r8a7790-sysc.h>
124
125    mmcif0: mmc@ee200000 {
126            compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
127            reg = <0xee200000 0x80>;
128            interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
129            clocks = <&cpg CPG_MOD 315>;
130            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
131            resets = <&cpg 315>;
132            dmas = <&dmac0 0xd1>, <&dmac0 0xd2>, <&dmac1 0xd1>, <&dmac1 0xd2>;
133            dma-names = "tx", "rx", "tx", "rx";
134            max-frequency = <97500000>;
135    };
136