arm,pl18x.yaml 7.1 KB

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