|
| 1 | +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/mmc/arm,pl18x.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: ARM PrimeCell MultiMedia Card Interface (MMCI) PL180 and PL181 |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Linus Walleij <[email protected]> |
| 11 | + |
| 12 | + |
| 13 | +description: |
| 14 | + The ARM PrimeCells MMCI PL180 and PL181 provides an interface for |
| 15 | + reading and writing to MultiMedia and SD cards alike. Over the years |
| 16 | + vendors have use the VHDL code from ARM to create derivative MMC/SD/SDIO |
| 17 | + host controllers with very similar characteristics. |
| 18 | + |
| 19 | +allOf: |
| 20 | + - $ref: /schemas/arm/primecell.yaml# |
| 21 | + - $ref: mmc-controller.yaml# |
| 22 | + |
| 23 | +# We need a select here so we don't match all nodes with 'arm,primecell' |
| 24 | +select: |
| 25 | + properties: |
| 26 | + compatible: |
| 27 | + contains: |
| 28 | + enum: |
| 29 | + - arm,pl180 |
| 30 | + - arm,pl181 |
| 31 | + - arm,pl18x |
| 32 | + required: |
| 33 | + - compatible |
| 34 | + |
| 35 | +properties: |
| 36 | + compatible: |
| 37 | + oneOf: |
| 38 | + - description: The first version of the block, simply called |
| 39 | + PL180 and found in the ARM Integrator IM/PD1 logic module. |
| 40 | + items: |
| 41 | + - const: arm,pl180 |
| 42 | + - const: arm,primecell |
| 43 | + - description: The improved version of the block, found in the |
| 44 | + ARM Versatile and later reference designs. Further revisions |
| 45 | + exist but get detected at runtime by reading some magic numbers |
| 46 | + in the PrimeCell ID registers. |
| 47 | + items: |
| 48 | + - const: arm,pl181 |
| 49 | + - const: arm,primecell |
| 50 | + - description: Wildcard entry that will let the operating system |
| 51 | + inspect the PrimeCell ID registers to determine which hardware |
| 52 | + variant of PL180 or PL181 this is. |
| 53 | + items: |
| 54 | + - const: arm,pl18x |
| 55 | + - const: arm,primecell |
| 56 | + |
| 57 | + clocks: |
| 58 | + description: One or two clocks, the "apb_pclk" and the "MCLK" |
| 59 | + which is the core block clock. The names are not compulsory. |
| 60 | + minItems: 1 |
| 61 | + maxItems: 2 |
| 62 | + |
| 63 | + power-domains: true |
| 64 | + |
| 65 | + resets: |
| 66 | + maxItems: 1 |
| 67 | + |
| 68 | + reg: |
| 69 | + description: the MMIO memory window must be exactly 4KB (0x1000) and the |
| 70 | + layout should provide the PrimeCell ID registers so that the device can |
| 71 | + be discovered. On ST Micro variants, a second register window may be |
| 72 | + defined if a delay block is present and used for tuning. |
| 73 | + |
| 74 | + interrupts: |
| 75 | + description: The first interrupt is the command interrupt and corresponds |
| 76 | + to the event at the end of a command. The second interrupt is the |
| 77 | + PIO (polled I/O) interrupt and occurs when the FIFO needs to be |
| 78 | + emptied as part of a bulk read from the card. Some variants have these |
| 79 | + two interrupts wired into the same line (logic OR) and in that case |
| 80 | + only one interrupt may be provided. |
| 81 | + minItems: 1 |
| 82 | + maxItems: 2 |
| 83 | + |
| 84 | + st,sig-dir-dat0: |
| 85 | + $ref: /schemas/types.yaml#/definitions/flag |
| 86 | + description: ST Micro-specific property, bus signal direction pins used for |
| 87 | + DAT[0]. |
| 88 | + |
| 89 | + st,sig-dir-dat2: |
| 90 | + $ref: /schemas/types.yaml#/definitions/flag |
| 91 | + description: ST Micro-specific property, bus signal direction pins used for |
| 92 | + DAT[2]. |
| 93 | + |
| 94 | + st,sig-dir-dat31: |
| 95 | + $ref: /schemas/types.yaml#/definitions/flag |
| 96 | + description: ST Micro-specific property, bus signal direction pins used for |
| 97 | + DAT[3] and DAT[1]. |
| 98 | + |
| 99 | + st,sig-dir-dat74: |
| 100 | + $ref: /schemas/types.yaml#/definitions/flag |
| 101 | + description: ST Micro-specific property, bus signal direction pins used for |
| 102 | + DAT[7] and DAT[4]. |
| 103 | + |
| 104 | + st,sig-dir-cmd: |
| 105 | + $ref: /schemas/types.yaml#/definitions/flag |
| 106 | + description: ST Micro-specific property, CMD signal direction used for |
| 107 | + pin CMD. |
| 108 | + |
| 109 | + st,sig-pin-fbclk: |
| 110 | + $ref: /schemas/types.yaml#/definitions/flag |
| 111 | + description: ST Micro-specific property, feedback clock FBCLK signal pin |
| 112 | + in use. |
| 113 | + |
| 114 | + st,sig-dir: |
| 115 | + $ref: /schemas/types.yaml#/definitions/flag |
| 116 | + description: ST Micro-specific property, signal direction polarity used for |
| 117 | + pins CMD, DAT[0], DAT[1], DAT[2] and DAT[3]. |
| 118 | + |
| 119 | + st,neg-edge: |
| 120 | + $ref: /schemas/types.yaml#/definitions/flag |
| 121 | + description: ST Micro-specific property, data and command phase relation, |
| 122 | + generated on the sd clock falling edge. |
| 123 | + |
| 124 | + st,use-ckin: |
| 125 | + $ref: /schemas/types.yaml#/definitions/flag |
| 126 | + description: ST Micro-specific property, use CKIN pin from an external |
| 127 | + driver to sample the receive data (for example with a voltage switch |
| 128 | + transceiver). |
| 129 | + |
| 130 | +unevaluatedProperties: false |
| 131 | + |
| 132 | +required: |
| 133 | + - compatible |
| 134 | + - reg |
| 135 | + - interrupts |
| 136 | + |
| 137 | +examples: |
| 138 | + - | |
| 139 | + #include <dt-bindings/interrupt-controller/irq.h> |
| 140 | + #include <dt-bindings/gpio/gpio.h> |
| 141 | +
|
| 142 | + mmc@5000 { |
| 143 | + compatible = "arm,pl180", "arm,primecell"; |
| 144 | + reg = <0x5000 0x1000>; |
| 145 | + interrupts-extended = <&vic 22 &sic 1>; |
| 146 | + clocks = <&xtal24mhz>, <&pclk>; |
| 147 | + clock-names = "mclk", "apb_pclk"; |
| 148 | + }; |
| 149 | +
|
| 150 | + mmc@80126000 { |
| 151 | + compatible = "arm,pl18x", "arm,primecell"; |
| 152 | + reg = <0x80126000 0x1000>; |
| 153 | + interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>; |
| 154 | + dmas = <&dma 29 0 0x2>, <&dma 29 0 0x0>; |
| 155 | + dma-names = "rx", "tx"; |
| 156 | + clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>; |
| 157 | + clock-names = "sdi", "apb_pclk"; |
| 158 | + max-frequency = <100000000>; |
| 159 | + bus-width = <4>; |
| 160 | + cap-sd-highspeed; |
| 161 | + cap-mmc-highspeed; |
| 162 | + cd-gpios = <&gpio2 31 0x4>; |
| 163 | + st,sig-dir-dat0; |
| 164 | + st,sig-dir-dat2; |
| 165 | + st,sig-dir-cmd; |
| 166 | + st,sig-pin-fbclk; |
| 167 | + vmmc-supply = <&ab8500_ldo_aux3_reg>; |
| 168 | + vqmmc-supply = <&vmmci>; |
| 169 | + }; |
| 170 | +
|
| 171 | + mmc@101f6000 { |
| 172 | + compatible = "arm,pl18x", "arm,primecell"; |
| 173 | + reg = <0x101f6000 0x1000>; |
| 174 | + clocks = <&sdiclk>, <&pclksdi>; |
| 175 | + clock-names = "mclk", "apb_pclk"; |
| 176 | + interrupt-parent = <&vica>; |
| 177 | + interrupts = <22>; |
| 178 | + max-frequency = <400000>; |
| 179 | + bus-width = <4>; |
| 180 | + cap-mmc-highspeed; |
| 181 | + cap-sd-highspeed; |
| 182 | + full-pwr-cycle; |
| 183 | + st,sig-dir-dat0; |
| 184 | + st,sig-dir-dat2; |
| 185 | + st,sig-dir-dat31; |
| 186 | + st,sig-dir-cmd; |
| 187 | + st,sig-pin-fbclk; |
| 188 | + vmmc-supply = <&vmmc_regulator>; |
| 189 | + }; |
| 190 | +
|
| 191 | + mmc@52007000 { |
| 192 | + compatible = "arm,pl18x", "arm,primecell"; |
| 193 | + arm,primecell-periphid = <0x10153180>; |
| 194 | + reg = <0x52007000 0x1000>; |
| 195 | + interrupts = <49>; |
| 196 | + interrupt-names = "cmd_irq"; |
| 197 | + clocks = <&rcc 0>; |
| 198 | + clock-names = "apb_pclk"; |
| 199 | + resets = <&rcc 1>; |
| 200 | + cap-sd-highspeed; |
| 201 | + cap-mmc-highspeed; |
| 202 | + max-frequency = <120000000>; |
| 203 | + }; |
0 commit comments