xref: /freebsd/sys/contrib/device-tree/Bindings/mmc/snps,dwcmshc-sdhci.yaml (revision 9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b)
1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mmc/snps,dwcmshc-sdhci.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Synopsys Designware Mobile Storage Host Controller
8
9maintainers:
10  - Ulf Hansson <ulf.hansson@linaro.org>
11  - Jisheng Zhang <Jisheng.Zhang@synaptics.com>
12
13properties:
14  compatible:
15    oneOf:
16      - items:
17          - enum:
18              - rockchip,rk3528-dwcmshc
19              - rockchip,rk3562-dwcmshc
20              - rockchip,rk3576-dwcmshc
21          - const: rockchip,rk3588-dwcmshc
22      - items:
23          - const: sophgo,sg2044-dwcmshc
24          - const: sophgo,sg2042-dwcmshc
25      - enum:
26          - rockchip,rk3568-dwcmshc
27          - rockchip,rk3588-dwcmshc
28          - snps,dwcmshc-sdhci
29          - sophgo,cv1800b-dwcmshc
30          - sophgo,sg2002-dwcmshc
31          - sophgo,sg2042-dwcmshc
32          - thead,th1520-dwcmshc
33
34  reg:
35    maxItems: 1
36
37  interrupts:
38    maxItems: 1
39
40  clocks:
41    minItems: 1
42    maxItems: 5
43
44  clock-names:
45    minItems: 1
46    maxItems: 5
47
48  power-domains:
49    maxItems: 1
50
51  resets:
52    maxItems: 5
53
54  reset-names:
55    items:
56      - const: core
57      - const: bus
58      - const: axi
59      - const: block
60      - const: timer
61
62  rockchip,txclk-tapnum:
63    description: Specify the number of delay for tx sampling.
64    $ref: /schemas/types.yaml#/definitions/uint8
65
66required:
67  - compatible
68  - reg
69  - interrupts
70  - clocks
71  - clock-names
72
73allOf:
74  - $ref: mmc-controller.yaml#
75
76  - if:
77      properties:
78        compatible:
79          contains:
80            const: sophgo,sg2042-dwcmshc
81
82    then:
83      properties:
84        clocks:
85          items:
86            - description: core clock
87            - description: bus clock
88            - description: timer clock
89        clock-names:
90          items:
91            - const: core
92            - const: bus
93            - const: timer
94    else:
95      properties:
96        clocks:
97          minItems: 1
98          items:
99            - description: core clock
100            - description: bus clock for optional
101            - description: axi clock for rockchip specified
102            - description: block clock for rockchip specified
103            - description: timer clock for rockchip specified
104        clock-names:
105          minItems: 1
106          items:
107            - const: core
108            - const: bus
109            - const: axi
110            - const: block
111            - const: timer
112
113  - if:
114      properties:
115        compatible:
116          contains:
117            const: rockchip,rk3576-dwcmshc
118
119    then:
120      required:
121        - power-domains
122
123unevaluatedProperties: false
124
125examples:
126  - |
127    mmc@fe310000 {
128      compatible = "rockchip,rk3568-dwcmshc";
129      reg = <0xfe310000 0x10000>;
130      interrupts = <0 25 0x4>;
131      clocks = <&cru 17>, <&cru 18>, <&cru 19>, <&cru 20>, <&cru 21>;
132      clock-names = "core", "bus", "axi", "block", "timer";
133      bus-width = <8>;
134      #address-cells = <1>;
135      #size-cells = <0>;
136    };
137  - |
138    mmc@aa0000 {
139      compatible = "snps,dwcmshc-sdhci";
140      reg = <0xaa000 0x1000>;
141      interrupts = <0 25 0x4>;
142      clocks = <&cru 17>, <&cru 18>;
143      clock-names = "core", "bus";
144      bus-width = <8>;
145      #address-cells = <1>;
146      #size-cells = <0>;
147    };
148
149...
150