xref: /freebsd/sys/contrib/device-tree/Bindings/mmc/renesas,sdhi.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/renesas,sdhi.yaml#
5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Renesas SDHI SD/MMC controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Wolfram Sang <wsa+renesas@sang-engineering.com>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotproperties:
13c66ec88fSEmmanuel Vadot  compatible:
14c66ec88fSEmmanuel Vadot    oneOf:
15c66ec88fSEmmanuel Vadot      - items:
16c66ec88fSEmmanuel Vadot          - const: renesas,sdhi-sh73a0  # R-Mobile APE6
17c66ec88fSEmmanuel Vadot      - items:
18c66ec88fSEmmanuel Vadot          - const: renesas,sdhi-r7s72100 # RZ/A1H
19c66ec88fSEmmanuel Vadot      - items:
20c66ec88fSEmmanuel Vadot          - const: renesas,sdhi-r7s9210 # SH-Mobile AG5
21c66ec88fSEmmanuel Vadot      - items:
22c66ec88fSEmmanuel Vadot          - const: renesas,sdhi-r8a73a4 # R-Mobile APE6
23c66ec88fSEmmanuel Vadot      - items:
24c66ec88fSEmmanuel Vadot          - const: renesas,sdhi-r8a7740 # R-Mobile A1
25c66ec88fSEmmanuel Vadot      - items:
26c66ec88fSEmmanuel Vadot          - enum:
27c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7778 # R-Car M1
28c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7779 # R-Car H1
29c66ec88fSEmmanuel Vadot          - const: renesas,rcar-gen1-sdhi # R-Car Gen1
30c66ec88fSEmmanuel Vadot      - items:
31c66ec88fSEmmanuel Vadot          - enum:
32c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7742  # RZ/G1H
33c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7743  # RZ/G1M
34c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7744  # RZ/G1N
35c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7745  # RZ/G1E
36c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a77470 # RZ/G1C
37c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7790  # R-Car H2
38c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7791  # R-Car M2-W
39c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7792  # R-Car V2H
40c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7793  # R-Car M2-N
41c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7794  # R-Car E2
42c66ec88fSEmmanuel Vadot          - const: renesas,rcar-gen2-sdhi # R-Car Gen2 and RZ/G1
43c66ec88fSEmmanuel Vadot      - items:
44c66ec88fSEmmanuel Vadot          - const: renesas,sdhi-mmc-r8a77470 # RZ/G1C (SDHI/MMC IP)
45c66ec88fSEmmanuel Vadot      - items:
46c66ec88fSEmmanuel Vadot          - enum:
47c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a774a1  # RZ/G2M
48c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a774b1  # RZ/G2N
49c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a774c0  # RZ/G2E
506be33864SEmmanuel Vadot              - renesas,sdhi-r8a774e1  # RZ/G2H
51c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7795   # R-Car H3
52c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a7796   # R-Car M3-W
53c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a77961  # R-Car M3-W+
54c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a77965  # R-Car M3-N
55c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a77970  # R-Car V3M
56c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a77980  # R-Car V3H
57c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a77990  # R-Car E3
58c66ec88fSEmmanuel Vadot              - renesas,sdhi-r8a77995  # R-Car D3
59*8d13bc63SEmmanuel Vadot              - renesas,sdhi-r9a07g043 # RZ/G2UL and RZ/Five
60354d7675SEmmanuel Vadot              - renesas,sdhi-r9a07g044 # RZ/G2{L,LC}
61c9ccf3a3SEmmanuel Vadot              - renesas,sdhi-r9a07g054 # RZ/V2L
6284943d6fSEmmanuel Vadot              - renesas,sdhi-r9a08g045 # RZ/G3S
63cb7aa33aSEmmanuel Vadot              - renesas,sdhi-r9a09g011 # RZ/V2M
64c66ec88fSEmmanuel Vadot          - const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2
65b97ee269SEmmanuel Vadot      - items:
66b97ee269SEmmanuel Vadot          - enum:
67b97ee269SEmmanuel Vadot              - renesas,sdhi-r8a779a0  # R-Car V3U
68b97ee269SEmmanuel Vadot              - renesas,sdhi-r8a779f0  # R-Car S4-8
698bab661aSEmmanuel Vadot              - renesas,sdhi-r8a779g0  # R-Car V4H
70b97ee269SEmmanuel Vadot          - const: renesas,rcar-gen4-sdhi # R-Car Gen4
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel Vadot  reg:
73c66ec88fSEmmanuel Vadot    maxItems: 1
74c66ec88fSEmmanuel Vadot
75c66ec88fSEmmanuel Vadot  interrupts:
76c66ec88fSEmmanuel Vadot    minItems: 1
77c66ec88fSEmmanuel Vadot    maxItems: 3
78c66ec88fSEmmanuel Vadot
79354d7675SEmmanuel Vadot  clocks: true
80c66ec88fSEmmanuel Vadot
81354d7675SEmmanuel Vadot  clock-names: true
82c66ec88fSEmmanuel Vadot
83c66ec88fSEmmanuel Vadot  dmas:
84c66ec88fSEmmanuel Vadot    minItems: 4
85c66ec88fSEmmanuel Vadot    maxItems: 4
86c66ec88fSEmmanuel Vadot
87c66ec88fSEmmanuel Vadot  dma-names:
88c66ec88fSEmmanuel Vadot    minItems: 4
89c66ec88fSEmmanuel Vadot    maxItems: 4
90c66ec88fSEmmanuel Vadot    items:
91c66ec88fSEmmanuel Vadot      enum:
92c66ec88fSEmmanuel Vadot        - tx
93c66ec88fSEmmanuel Vadot        - rx
94c66ec88fSEmmanuel Vadot
957ef62cebSEmmanuel Vadot  iommus:
967ef62cebSEmmanuel Vadot    maxItems: 1
977ef62cebSEmmanuel Vadot
98c66ec88fSEmmanuel Vadot  power-domains:
99c66ec88fSEmmanuel Vadot    maxItems: 1
100c66ec88fSEmmanuel Vadot
101c66ec88fSEmmanuel Vadot  resets:
102c66ec88fSEmmanuel Vadot    maxItems: 1
103c66ec88fSEmmanuel Vadot
104c66ec88fSEmmanuel Vadot  pinctrl-0:
105c66ec88fSEmmanuel Vadot    minItems: 1
106c66ec88fSEmmanuel Vadot    maxItems: 2
107c66ec88fSEmmanuel Vadot
108c66ec88fSEmmanuel Vadot  pinctrl-1:
109c66ec88fSEmmanuel Vadot    maxItems: 1
110c66ec88fSEmmanuel Vadot
111354d7675SEmmanuel Vadot  pinctrl-names: true
112354d7675SEmmanuel Vadot
113354d7675SEmmanuel Vadot  max-frequency: true
114354d7675SEmmanuel Vadot
115354d7675SEmmanuel VadotallOf:
116cb7aa33aSEmmanuel Vadot  - $ref: mmc-controller.yaml
117354d7675SEmmanuel Vadot
118354d7675SEmmanuel Vadot  - if:
119354d7675SEmmanuel Vadot      properties:
120354d7675SEmmanuel Vadot        compatible:
121354d7675SEmmanuel Vadot          contains:
122c9ccf3a3SEmmanuel Vadot            enum:
123c9ccf3a3SEmmanuel Vadot              - renesas,sdhi-r9a07g043
124c9ccf3a3SEmmanuel Vadot              - renesas,sdhi-r9a07g044
125c9ccf3a3SEmmanuel Vadot              - renesas,sdhi-r9a07g054
12684943d6fSEmmanuel Vadot              - renesas,sdhi-r9a08g045
127cb7aa33aSEmmanuel Vadot              - renesas,sdhi-r9a09g011
128354d7675SEmmanuel Vadot    then:
129354d7675SEmmanuel Vadot      properties:
130354d7675SEmmanuel Vadot        clocks:
131354d7675SEmmanuel Vadot          items:
132354d7675SEmmanuel Vadot            - description: IMCLK, SDHI channel main clock1.
133e67e8565SEmmanuel Vadot            - description: CLK_HS, SDHI channel High speed clock which operates
134e67e8565SEmmanuel Vadot                           4 times that of SDHI channel main clock1.
135354d7675SEmmanuel Vadot            - description: IMCLK2, SDHI channel main clock2. When this clock is
136354d7675SEmmanuel Vadot                           turned off, external SD card detection cannot be
137354d7675SEmmanuel Vadot                           detected.
138354d7675SEmmanuel Vadot            - description: ACLK, SDHI channel bus clock.
139354d7675SEmmanuel Vadot        clock-names:
140354d7675SEmmanuel Vadot          items:
141e67e8565SEmmanuel Vadot            - const: core
142e67e8565SEmmanuel Vadot            - const: clkh
143e67e8565SEmmanuel Vadot            - const: cd
144354d7675SEmmanuel Vadot            - const: aclk
145354d7675SEmmanuel Vadot      required:
146354d7675SEmmanuel Vadot        - clock-names
147354d7675SEmmanuel Vadot        - resets
148354d7675SEmmanuel Vadot    else:
149e67e8565SEmmanuel Vadot      if:
150e67e8565SEmmanuel Vadot        properties:
151e67e8565SEmmanuel Vadot          compatible:
152e67e8565SEmmanuel Vadot            contains:
153e67e8565SEmmanuel Vadot              enum:
154e67e8565SEmmanuel Vadot                - renesas,rcar-gen2-sdhi
155e67e8565SEmmanuel Vadot                - renesas,rcar-gen3-sdhi
156b97ee269SEmmanuel Vadot                - renesas,rcar-gen4-sdhi
157e67e8565SEmmanuel Vadot      then:
158e67e8565SEmmanuel Vadot        properties:
159e67e8565SEmmanuel Vadot          clocks:
160e67e8565SEmmanuel Vadot            minItems: 1
161e67e8565SEmmanuel Vadot            maxItems: 3
162e67e8565SEmmanuel Vadot          clock-names:
163e67e8565SEmmanuel Vadot            minItems: 1
164e67e8565SEmmanuel Vadot            uniqueItems: true
165e67e8565SEmmanuel Vadot            items:
166e67e8565SEmmanuel Vadot              - const: core
167e67e8565SEmmanuel Vadot              - enum: [ clkh, cd ]
168e67e8565SEmmanuel Vadot              - const: cd
169e67e8565SEmmanuel Vadot      else:
170354d7675SEmmanuel Vadot        properties:
171354d7675SEmmanuel Vadot          clocks:
172354d7675SEmmanuel Vadot            minItems: 1
173354d7675SEmmanuel Vadot            maxItems: 2
174354d7675SEmmanuel Vadot          clock-names:
175354d7675SEmmanuel Vadot            minItems: 1
176354d7675SEmmanuel Vadot            items:
177354d7675SEmmanuel Vadot              - const: core
178354d7675SEmmanuel Vadot              - const: cd
179354d7675SEmmanuel Vadot
180354d7675SEmmanuel Vadot  - if:
181354d7675SEmmanuel Vadot      properties:
182354d7675SEmmanuel Vadot        compatible:
183354d7675SEmmanuel Vadot          contains:
184354d7675SEmmanuel Vadot            const: renesas,sdhi-mmc-r8a77470
185354d7675SEmmanuel Vadot    then:
186354d7675SEmmanuel Vadot      properties:
187354d7675SEmmanuel Vadot        pinctrl-names:
188354d7675SEmmanuel Vadot          items:
189354d7675SEmmanuel Vadot            - const: state_uhs
190354d7675SEmmanuel Vadot    else:
191354d7675SEmmanuel Vadot      properties:
192c66ec88fSEmmanuel Vadot        pinctrl-names:
193c66ec88fSEmmanuel Vadot          minItems: 1
194c66ec88fSEmmanuel Vadot          items:
195c66ec88fSEmmanuel Vadot            - const: default
196c66ec88fSEmmanuel Vadot            - const: state_uhs
197c66ec88fSEmmanuel Vadot
198354d7675SEmmanuel Vadot  - if:
199c66ec88fSEmmanuel Vadot      properties:
200c66ec88fSEmmanuel Vadot        compatible:
2015def4c47SEmmanuel Vadot          contains:
202c66ec88fSEmmanuel Vadot            enum:
203c66ec88fSEmmanuel Vadot              - renesas,sdhi-r7s72100
204c66ec88fSEmmanuel Vadot              - renesas,sdhi-r7s9210
205c66ec88fSEmmanuel Vadot    then:
206c66ec88fSEmmanuel Vadot      required:
207c66ec88fSEmmanuel Vadot        - clock-names
208c66ec88fSEmmanuel Vadot      description:
209c66ec88fSEmmanuel Vadot        The internal card detection logic that exists in these controllers is
210c66ec88fSEmmanuel Vadot        sectioned off to be run by a separate second clock source to allow
211c66ec88fSEmmanuel Vadot        the main core clock to be turned off to save power.
212c66ec88fSEmmanuel Vadot
213354d7675SEmmanuel Vadotrequired:
214354d7675SEmmanuel Vadot  - compatible
215354d7675SEmmanuel Vadot  - reg
216354d7675SEmmanuel Vadot  - interrupts
217354d7675SEmmanuel Vadot  - clocks
218354d7675SEmmanuel Vadot  - power-domains
219354d7675SEmmanuel Vadot
220c66ec88fSEmmanuel VadotunevaluatedProperties: false
221c66ec88fSEmmanuel Vadot
222c66ec88fSEmmanuel Vadotexamples:
223c66ec88fSEmmanuel Vadot  - |
224c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
225c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
226c66ec88fSEmmanuel Vadot    #include <dt-bindings/power/r8a7790-sysc.h>
227c66ec88fSEmmanuel Vadot
228c66ec88fSEmmanuel Vadot    sdhi0: mmc@ee100000 {
229c66ec88fSEmmanuel Vadot            compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
230c66ec88fSEmmanuel Vadot            reg = <0xee100000 0x328>;
231c66ec88fSEmmanuel Vadot            interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
232c66ec88fSEmmanuel Vadot            clocks = <&cpg CPG_MOD 314>;
233c66ec88fSEmmanuel Vadot            dmas = <&dmac0 0xcd>, <&dmac0 0xce>, <&dmac1 0xcd>, <&dmac1 0xce>;
234c66ec88fSEmmanuel Vadot            dma-names = "tx", "rx", "tx", "rx";
235c66ec88fSEmmanuel Vadot            max-frequency = <195000000>;
236c66ec88fSEmmanuel Vadot            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
237c66ec88fSEmmanuel Vadot            resets = <&cpg 314>;
238c66ec88fSEmmanuel Vadot    };
239c66ec88fSEmmanuel Vadot
240c66ec88fSEmmanuel Vadot    sdhi1: mmc@ee120000 {
241c66ec88fSEmmanuel Vadot             compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
242c66ec88fSEmmanuel Vadot             reg = <0xee120000 0x328>;
243c66ec88fSEmmanuel Vadot             interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
244c66ec88fSEmmanuel Vadot             clocks = <&cpg CPG_MOD 313>;
245c66ec88fSEmmanuel Vadot             dmas = <&dmac0 0xc9>, <&dmac0 0xca>, <&dmac1 0xc9>, <&dmac1 0xca>;
246c66ec88fSEmmanuel Vadot             dma-names = "tx", "rx", "tx", "rx";
247c66ec88fSEmmanuel Vadot             max-frequency = <195000000>;
248c66ec88fSEmmanuel Vadot             power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
249c66ec88fSEmmanuel Vadot             resets = <&cpg 313>;
250c66ec88fSEmmanuel Vadot    };
251c66ec88fSEmmanuel Vadot
252c66ec88fSEmmanuel Vadot    sdhi2: mmc@ee140000 {
253c66ec88fSEmmanuel Vadot             compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
254c66ec88fSEmmanuel Vadot             reg = <0xee140000 0x100>;
255c66ec88fSEmmanuel Vadot             interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
256c66ec88fSEmmanuel Vadot             clocks = <&cpg CPG_MOD 312>;
257c66ec88fSEmmanuel Vadot             dmas = <&dmac0 0xc1>, <&dmac0 0xc2>, <&dmac1 0xc1>, <&dmac1 0xc2>;
258c66ec88fSEmmanuel Vadot             dma-names = "tx", "rx", "tx", "rx";
259c66ec88fSEmmanuel Vadot             max-frequency = <97500000>;
260c66ec88fSEmmanuel Vadot             power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
261c66ec88fSEmmanuel Vadot             resets = <&cpg 312>;
262c66ec88fSEmmanuel Vadot     };
263c66ec88fSEmmanuel Vadot
264c66ec88fSEmmanuel Vadot     sdhi3: mmc@ee160000 {
265c66ec88fSEmmanuel Vadot              compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
266c66ec88fSEmmanuel Vadot              reg = <0xee160000 0x100>;
267c66ec88fSEmmanuel Vadot              interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
268c66ec88fSEmmanuel Vadot              clocks = <&cpg CPG_MOD 311>;
269c66ec88fSEmmanuel Vadot              dmas = <&dmac0 0xd3>, <&dmac0 0xd4>, <&dmac1 0xd3>, <&dmac1 0xd4>;
270c66ec88fSEmmanuel Vadot              dma-names = "tx", "rx", "tx", "rx";
271c66ec88fSEmmanuel Vadot              max-frequency = <97500000>;
272c66ec88fSEmmanuel Vadot              power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
273c66ec88fSEmmanuel Vadot              resets = <&cpg 311>;
274c66ec88fSEmmanuel Vadot    };
275