summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
blob: cd823a3ef2130bb0c0669af2b95d5ad683a267ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/mmc/snps,dwcmshc-sdhci.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Synopsys Designware Mobile Storage Host Controller

maintainers:
  - Ulf Hansson <ulf.hansson@linaro.org>
  - Jisheng Zhang <Jisheng.Zhang@synaptics.com>

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - rockchip,rk3528-dwcmshc
              - rockchip,rk3562-dwcmshc
              - rockchip,rk3576-dwcmshc
          - const: rockchip,rk3588-dwcmshc
      - items:
          - const: sophgo,sg2044-dwcmshc
          - const: sophgo,sg2042-dwcmshc
      - enum:
          - canaan,k230-emmc
          - canaan,k230-sdio
          - hpe,gsc-dwcmshc
          - rockchip,rk3568-dwcmshc
          - rockchip,rk3588-dwcmshc
          - snps,dwcmshc-sdhci
          - sophgo,cv1800b-dwcmshc
          - sophgo,sg2002-dwcmshc
          - sophgo,sg2042-dwcmshc
          - thead,th1520-dwcmshc
          - eswin,eic7700-dwcmshc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    minItems: 1
    maxItems: 5

  clock-names:
    minItems: 1
    maxItems: 5

  power-domains:
    maxItems: 1

  resets:
    minItems: 4
    maxItems: 5

  reset-names:
    minItems: 4
    maxItems: 5

  canaan,usb-phy:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: Phandle to the Canaan K230 USB PHY node required for
                 k230-emmc/sdio.

  rockchip,txclk-tapnum:
    description: Specify the number of delay for tx sampling.
    $ref: /schemas/types.yaml#/definitions/uint8

  eswin,hsp-sp-csr:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    items:
      - items:
          - description: Phandle to HSP(High-Speed Peripheral) device
          - description: Offset of the stability status register for internal
                         clock.
          - description: Offset of the stability register for host regulator
                         voltage.
    description:
      HSP CSR is to control and get status of different high-speed peripherals
      (such as Ethernet, USB, SATA, etc.) via register, which can tune
      board-level's parameters of PHY, etc.

  eswin,drive-impedance-ohms:
    description: Specifies the drive impedance in Ohm.
    enum: [33, 40, 50, 66, 100]

  hpe,gxp-sysreg:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    items:
      - items:
          - description: phandle to HPE GXP SoC system register block (syscon)
          - description: offset of the MSHCCS register within the syscon block
    description:
      Phandle to the HPE GXP SoC system register block (syscon) and
      offset of the MSHCCS register used to configure clock
      synchronisation for HS200 tuning.

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names

allOf:
  - $ref: mmc-controller.yaml#

  - if:
      properties:
        compatible:
          contains:
            enum:
              - canaan,k230-emmc
              - canaan,k230-sdio
    then:
      properties:
        clocks:
          minItems: 5
        clock-names:
          items:
            - const: core
            - const: bus
            - const: axi
            - const: block
            - const: timer
      required:
        - canaan,usb-phy

  - if:
      properties:
        compatible:
          contains:
            const: hpe,gsc-dwcmshc

    then:
      properties:
        clocks:
          items:
            - description: core clock
        clock-names:
          items:
            - const: core
      required:
        - hpe,gxp-sysreg
    else:
      properties:
        hpe,gxp-sysreg: false

  - if:
      properties:
        compatible:
          contains:
            const: sophgo,sg2042-dwcmshc

    then:
      properties:
        clocks:
          items:
            - description: core clock
            - description: bus clock
            - description: timer clock
        clock-names:
          items:
            - const: core
            - const: bus
            - const: timer
    else:
      properties:
        clocks:
          minItems: 1
          items:
            - description: core clock
            - description: bus clock for optional
            - description: axi clock for rockchip specified
            - description: block clock for rockchip specified
            - description: timer clock for rockchip specified
        clock-names:
          minItems: 1
          items:
            - const: core
            - const: bus
            - const: axi
            - const: block
            - const: timer

  - if:
      properties:
        compatible:
          contains:
            const: eswin,eic7700-dwcmshc
    then:
      properties:
        resets:
          minItems: 4
          maxItems: 4
        reset-names:
          items:
            - const: axi
            - const: phy
            - const: prstn
            - const: txrx
      required:
        - eswin,hsp-sp-csr
        - eswin,drive-impedance-ohms
    else:
      properties:
        resets:
          minItems: 5
          maxItems: 5
        reset-names:
          items:
            - const: core
            - const: bus
            - const: axi
            - const: block
            - const: timer

  - if:
      properties:
        compatible:
          contains:
            const: rockchip,rk3576-dwcmshc

    then:
      required:
        - power-domains

unevaluatedProperties: false

examples:
  - |
    mmc@fe310000 {
      compatible = "rockchip,rk3568-dwcmshc";
      reg = <0xfe310000 0x10000>;
      interrupts = <0 25 0x4>;
      clocks = <&cru 17>, <&cru 18>, <&cru 19>, <&cru 20>, <&cru 21>;
      clock-names = "core", "bus", "axi", "block", "timer";
      bus-width = <8>;
      #address-cells = <1>;
      #size-cells = <0>;
    };
  - |
    mmc@aa0000 {
      compatible = "snps,dwcmshc-sdhci";
      reg = <0xaa000 0x1000>;
      interrupts = <0 25 0x4>;
      clocks = <&cru 17>, <&cru 18>;
      clock-names = "core", "bus";
      bus-width = <8>;
      #address-cells = <1>;
      #size-cells = <0>;
    };

...