1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mmc/socionext,uniphier-sd.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: UniPhier SD/SDIO/eMMC controller
8
9maintainers:
10  - Masahiro Yamada <yamada.masahiro@socionext.com>
11
12properties:
13  compatible:
14    description: version 2.91, 3.1, 3.1.1, respectively
15    enum:
16      - socionext,uniphier-sd-v2.91
17      - socionext,uniphier-sd-v3.1
18      - socionext,uniphier-sd-v3.1.1
19
20  reg:
21    maxItems: 1
22
23  interrupts:
24    maxItems: 1
25
26  clocks:
27    maxItems: 1
28
29  reset-names:
30    description: |
31      There are three reset signals at maximum
32        host:   mandatory for all variants
33        bridge: exist only for version 2.91
34        hw:     optional. exist if eMMC hw reset line is available
35    oneOf:
36      - const: host
37      - items:
38        - const: host
39        - const: bridge
40      - items:
41        - const: host
42        - const: hw
43      - items:
44        - const: host
45        - const: bridge
46        - const: hw
47
48  resets:
49    minItems: 1
50    maxItems: 3
51
52allOf:
53  - $ref: mmc-controller.yaml
54
55  - if:
56      properties:
57        compatible:
58          contains:
59            const: socionext,uniphier-sd-v2.91
60    then:
61      properties:
62        reset-names:
63          contains:
64            const: bridge
65    else:
66      properties:
67        reset-names:
68          not:
69            contains:
70              const: bridge
71
72required:
73  - compatible
74  - reg
75  - interrupts
76  - clocks
77  - reset-names
78  - resets
79
80examples:
81  - |
82    sd: mmc@5a400000 {
83        compatible = "socionext,uniphier-sd-v2.91";
84        reg = <0x5a400000 0x200>;
85        interrupts = <0 76 4>;
86        pinctrl-names = "default", "uhs";
87        pinctrl-0 = <&pinctrl_sd>;
88        pinctrl-1 = <&pinctrl_sd_uhs>;
89        clocks = <&mio_clk 0>;
90        reset-names = "host", "bridge";
91        resets = <&mio_rst 0>, <&mio_rst 3>;
92        dma-names = "rx-tx";
93        dmas = <&dmac 4>;
94        bus-width = <4>;
95        cap-sd-highspeed;
96        sd-uhs-sdr12;
97        sd-uhs-sdr25;
98        sd-uhs-sdr50;
99    };
100