xref: /freebsd/sys/contrib/device-tree/Bindings/mmc/renesas,sdhi.yaml (revision 354d7675fe12ace9cde344cb79c7ded792802f88)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: "http://devicetree.org/schemas/mmc/renesas,sdhi.yaml#"
5c66ec88fSEmmanuel 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
595def4c47SEmmanuel Vadot              - renesas,sdhi-r8a779a0  # R-Car V3U
60*354d7675SEmmanuel Vadot              - renesas,sdhi-r9a07g044 # RZ/G2{L,LC}
61c66ec88fSEmmanuel Vadot          - const: renesas,rcar-gen3-sdhi # R-Car Gen3 or RZ/G2
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot  reg:
64c66ec88fSEmmanuel Vadot    maxItems: 1
65c66ec88fSEmmanuel Vadot
66c66ec88fSEmmanuel Vadot  interrupts:
67c66ec88fSEmmanuel Vadot    minItems: 1
68c66ec88fSEmmanuel Vadot    maxItems: 3
69c66ec88fSEmmanuel Vadot
70*354d7675SEmmanuel Vadot  clocks: true
71c66ec88fSEmmanuel Vadot
72*354d7675SEmmanuel Vadot  clock-names: true
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadot  dmas:
75c66ec88fSEmmanuel Vadot    minItems: 4
76c66ec88fSEmmanuel Vadot    maxItems: 4
77c66ec88fSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot  dma-names:
79c66ec88fSEmmanuel Vadot    minItems: 4
80c66ec88fSEmmanuel Vadot    maxItems: 4
81c66ec88fSEmmanuel Vadot    items:
82c66ec88fSEmmanuel Vadot      enum:
83c66ec88fSEmmanuel Vadot        - tx
84c66ec88fSEmmanuel Vadot        - rx
85c66ec88fSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot  power-domains:
87c66ec88fSEmmanuel Vadot    maxItems: 1
88c66ec88fSEmmanuel Vadot
89c66ec88fSEmmanuel Vadot  resets:
90c66ec88fSEmmanuel Vadot    maxItems: 1
91c66ec88fSEmmanuel Vadot
92c66ec88fSEmmanuel Vadot  pinctrl-0:
93c66ec88fSEmmanuel Vadot    minItems: 1
94c66ec88fSEmmanuel Vadot    maxItems: 2
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadot  pinctrl-1:
97c66ec88fSEmmanuel Vadot    maxItems: 1
98c66ec88fSEmmanuel Vadot
99*354d7675SEmmanuel Vadot  pinctrl-names: true
100*354d7675SEmmanuel Vadot
101*354d7675SEmmanuel Vadot  max-frequency: true
102*354d7675SEmmanuel Vadot
103*354d7675SEmmanuel VadotallOf:
104*354d7675SEmmanuel Vadot  - $ref: "mmc-controller.yaml"
105*354d7675SEmmanuel Vadot
106*354d7675SEmmanuel Vadot  - if:
107*354d7675SEmmanuel Vadot      properties:
108*354d7675SEmmanuel Vadot        compatible:
109*354d7675SEmmanuel Vadot          contains:
110*354d7675SEmmanuel Vadot            const: renesas,sdhi-r9a07g044
111*354d7675SEmmanuel Vadot    then:
112*354d7675SEmmanuel Vadot      properties:
113*354d7675SEmmanuel Vadot        clocks:
114*354d7675SEmmanuel Vadot          items:
115*354d7675SEmmanuel Vadot            - description: IMCLK, SDHI channel main clock1.
116*354d7675SEmmanuel Vadot            - description: IMCLK2, SDHI channel main clock2. When this clock is
117*354d7675SEmmanuel Vadot                           turned off, external SD card detection cannot be
118*354d7675SEmmanuel Vadot                           detected.
119*354d7675SEmmanuel Vadot            - description: CLK_HS, SDHI channel High speed clock which operates
120*354d7675SEmmanuel Vadot                           4 times that of SDHI channel main clock1.
121*354d7675SEmmanuel Vadot            - description: ACLK, SDHI channel bus clock.
122*354d7675SEmmanuel Vadot        clock-names:
123*354d7675SEmmanuel Vadot          items:
124*354d7675SEmmanuel Vadot            - const: imclk
125*354d7675SEmmanuel Vadot            - const: imclk2
126*354d7675SEmmanuel Vadot            - const: clk_hs
127*354d7675SEmmanuel Vadot            - const: aclk
128*354d7675SEmmanuel Vadot      required:
129*354d7675SEmmanuel Vadot        - clock-names
130*354d7675SEmmanuel Vadot        - resets
131*354d7675SEmmanuel Vadot    else:
132*354d7675SEmmanuel Vadot      properties:
133*354d7675SEmmanuel Vadot        clocks:
134*354d7675SEmmanuel Vadot          minItems: 1
135*354d7675SEmmanuel Vadot          maxItems: 2
136*354d7675SEmmanuel Vadot        clock-names:
137*354d7675SEmmanuel Vadot          minItems: 1
138*354d7675SEmmanuel Vadot          items:
139*354d7675SEmmanuel Vadot            - const: core
140*354d7675SEmmanuel Vadot            - const: cd
141*354d7675SEmmanuel Vadot
142*354d7675SEmmanuel Vadot  - if:
143*354d7675SEmmanuel Vadot      properties:
144*354d7675SEmmanuel Vadot        compatible:
145*354d7675SEmmanuel Vadot          contains:
146*354d7675SEmmanuel Vadot            const: renesas,sdhi-mmc-r8a77470
147*354d7675SEmmanuel Vadot    then:
148*354d7675SEmmanuel Vadot      properties:
149*354d7675SEmmanuel Vadot        pinctrl-names:
150*354d7675SEmmanuel Vadot          items:
151*354d7675SEmmanuel Vadot            - const: state_uhs
152*354d7675SEmmanuel Vadot    else:
153*354d7675SEmmanuel Vadot      properties:
154c66ec88fSEmmanuel Vadot        pinctrl-names:
155c66ec88fSEmmanuel Vadot          minItems: 1
156c66ec88fSEmmanuel Vadot          items:
157c66ec88fSEmmanuel Vadot            - const: default
158c66ec88fSEmmanuel Vadot            - const: state_uhs
159c66ec88fSEmmanuel Vadot
160*354d7675SEmmanuel Vadot  - if:
161c66ec88fSEmmanuel Vadot      properties:
162c66ec88fSEmmanuel Vadot        compatible:
1635def4c47SEmmanuel Vadot          contains:
164c66ec88fSEmmanuel Vadot            enum:
165c66ec88fSEmmanuel Vadot              - renesas,sdhi-r7s72100
166c66ec88fSEmmanuel Vadot              - renesas,sdhi-r7s9210
167c66ec88fSEmmanuel Vadot    then:
168c66ec88fSEmmanuel Vadot      required:
169c66ec88fSEmmanuel Vadot        - clock-names
170c66ec88fSEmmanuel Vadot      description:
171c66ec88fSEmmanuel Vadot        The internal card detection logic that exists in these controllers is
172c66ec88fSEmmanuel Vadot        sectioned off to be run by a separate second clock source to allow
173c66ec88fSEmmanuel Vadot        the main core clock to be turned off to save power.
174c66ec88fSEmmanuel Vadot
175*354d7675SEmmanuel Vadotrequired:
176*354d7675SEmmanuel Vadot  - compatible
177*354d7675SEmmanuel Vadot  - reg
178*354d7675SEmmanuel Vadot  - interrupts
179*354d7675SEmmanuel Vadot  - clocks
180*354d7675SEmmanuel Vadot  - power-domains
181*354d7675SEmmanuel Vadot
182c66ec88fSEmmanuel VadotunevaluatedProperties: false
183c66ec88fSEmmanuel Vadot
184c66ec88fSEmmanuel Vadotexamples:
185c66ec88fSEmmanuel Vadot  - |
186c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
187c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
188c66ec88fSEmmanuel Vadot    #include <dt-bindings/power/r8a7790-sysc.h>
189c66ec88fSEmmanuel Vadot
190c66ec88fSEmmanuel Vadot    sdhi0: mmc@ee100000 {
191c66ec88fSEmmanuel Vadot            compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
192c66ec88fSEmmanuel Vadot            reg = <0xee100000 0x328>;
193c66ec88fSEmmanuel Vadot            interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
194c66ec88fSEmmanuel Vadot            clocks = <&cpg CPG_MOD 314>;
195c66ec88fSEmmanuel Vadot            dmas = <&dmac0 0xcd>, <&dmac0 0xce>, <&dmac1 0xcd>, <&dmac1 0xce>;
196c66ec88fSEmmanuel Vadot            dma-names = "tx", "rx", "tx", "rx";
197c66ec88fSEmmanuel Vadot            max-frequency = <195000000>;
198c66ec88fSEmmanuel Vadot            power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
199c66ec88fSEmmanuel Vadot            resets = <&cpg 314>;
200c66ec88fSEmmanuel Vadot    };
201c66ec88fSEmmanuel Vadot
202c66ec88fSEmmanuel Vadot    sdhi1: mmc@ee120000 {
203c66ec88fSEmmanuel Vadot             compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
204c66ec88fSEmmanuel Vadot             reg = <0xee120000 0x328>;
205c66ec88fSEmmanuel Vadot             interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
206c66ec88fSEmmanuel Vadot             clocks = <&cpg CPG_MOD 313>;
207c66ec88fSEmmanuel Vadot             dmas = <&dmac0 0xc9>, <&dmac0 0xca>, <&dmac1 0xc9>, <&dmac1 0xca>;
208c66ec88fSEmmanuel Vadot             dma-names = "tx", "rx", "tx", "rx";
209c66ec88fSEmmanuel Vadot             max-frequency = <195000000>;
210c66ec88fSEmmanuel Vadot             power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
211c66ec88fSEmmanuel Vadot             resets = <&cpg 313>;
212c66ec88fSEmmanuel Vadot    };
213c66ec88fSEmmanuel Vadot
214c66ec88fSEmmanuel Vadot    sdhi2: mmc@ee140000 {
215c66ec88fSEmmanuel Vadot             compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
216c66ec88fSEmmanuel Vadot             reg = <0xee140000 0x100>;
217c66ec88fSEmmanuel Vadot             interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
218c66ec88fSEmmanuel Vadot             clocks = <&cpg CPG_MOD 312>;
219c66ec88fSEmmanuel Vadot             dmas = <&dmac0 0xc1>, <&dmac0 0xc2>, <&dmac1 0xc1>, <&dmac1 0xc2>;
220c66ec88fSEmmanuel Vadot             dma-names = "tx", "rx", "tx", "rx";
221c66ec88fSEmmanuel Vadot             max-frequency = <97500000>;
222c66ec88fSEmmanuel Vadot             power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
223c66ec88fSEmmanuel Vadot             resets = <&cpg 312>;
224c66ec88fSEmmanuel Vadot     };
225c66ec88fSEmmanuel Vadot
226c66ec88fSEmmanuel Vadot     sdhi3: mmc@ee160000 {
227c66ec88fSEmmanuel Vadot              compatible = "renesas,sdhi-r8a7790", "renesas,rcar-gen2-sdhi";
228c66ec88fSEmmanuel Vadot              reg = <0xee160000 0x100>;
229c66ec88fSEmmanuel Vadot              interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
230c66ec88fSEmmanuel Vadot              clocks = <&cpg CPG_MOD 311>;
231c66ec88fSEmmanuel Vadot              dmas = <&dmac0 0xd3>, <&dmac0 0xd4>, <&dmac1 0xd3>, <&dmac1 0xd4>;
232c66ec88fSEmmanuel Vadot              dma-names = "tx", "rx", "tx", "rx";
233c66ec88fSEmmanuel Vadot              max-frequency = <97500000>;
234c66ec88fSEmmanuel Vadot              power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
235c66ec88fSEmmanuel Vadot              resets = <&cpg 311>;
236c66ec88fSEmmanuel Vadot    };
237