arasan,sdhci.yaml 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mmc/arasan,sdhci.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Arasan SDHCI Controller
  7. maintainers:
  8. - Adrian Hunter <adrian.hunter@intel.com>
  9. allOf:
  10. - $ref: mmc-controller.yaml#
  11. - if:
  12. properties:
  13. compatible:
  14. contains:
  15. const: arasan,sdhci-5.1
  16. then:
  17. required:
  18. - phys
  19. - phy-names
  20. - if:
  21. properties:
  22. compatible:
  23. contains:
  24. enum:
  25. - xlnx,zynqmp-8.9a
  26. - xlnx,versal-8.9a
  27. - xlnx,versal-net-emmc
  28. then:
  29. properties:
  30. clock-output-names:
  31. oneOf:
  32. - items:
  33. - const: clk_out_sd0
  34. - const: clk_in_sd0
  35. - items:
  36. - const: clk_out_sd1
  37. - const: clk_in_sd1
  38. properties:
  39. compatible:
  40. oneOf:
  41. - const: arasan,sdhci-8.9a # generic Arasan SDHCI 8.9a PHY
  42. - const: arasan,sdhci-4.9a # generic Arasan SDHCI 4.9a PHY
  43. - const: arasan,sdhci-5.1 # generic Arasan SDHCI 5.1 PHY
  44. - items:
  45. - const: rockchip,rk3399-sdhci-5.1 # rk3399 eMMC PHY
  46. - const: arasan,sdhci-5.1
  47. description:
  48. For this device it is strongly suggested to include
  49. arasan,soc-ctl-syscon.
  50. - items:
  51. - const: xlnx,zynqmp-8.9a # ZynqMP SDHCI 8.9a PHY
  52. - const: arasan,sdhci-8.9a
  53. description:
  54. For this device it is strongly suggested to include
  55. clock-output-names and '#clock-cells'.
  56. - items:
  57. - const: xlnx,versal-8.9a # Versal SDHCI 8.9a PHY
  58. - const: arasan,sdhci-8.9a
  59. description:
  60. For this device it is strongly suggested to include
  61. clock-output-names and '#clock-cells'.
  62. - const: xlnx,versal-net-emmc # Versal Net eMMC PHY
  63. description:
  64. For this device it is strongly suggested to include
  65. clock-output-names and '#clock-cells'.
  66. - items:
  67. - const: intel,lgm-sdhci-5.1-emmc # Intel LGM eMMC PHY
  68. - const: arasan,sdhci-5.1
  69. description:
  70. For this device it is strongly suggested to include
  71. arasan,soc-ctl-syscon.
  72. - items:
  73. - const: intel,lgm-sdhci-5.1-sdxc # Intel LGM SDXC PHY
  74. - const: arasan,sdhci-5.1
  75. description:
  76. For this device it is strongly suggested to include
  77. arasan,soc-ctl-syscon.
  78. - items:
  79. - const: intel,keembay-sdhci-5.1-emmc # Intel Keem Bay eMMC PHY
  80. - const: arasan,sdhci-5.1
  81. description:
  82. For this device it is strongly suggested to include
  83. arasan,soc-ctl-syscon.
  84. - const: intel,keembay-sdhci-5.1-sd # Intel Keem Bay SD controller
  85. description:
  86. For this device it is strongly suggested to include
  87. arasan,soc-ctl-syscon.
  88. - const: intel,keembay-sdhci-5.1-sdio # Intel Keem Bay SDIO controller
  89. description:
  90. For this device it is strongly suggested to include
  91. arasan,soc-ctl-syscon.
  92. reg:
  93. maxItems: 1
  94. clocks:
  95. minItems: 2
  96. maxItems: 3
  97. clock-names:
  98. minItems: 2
  99. items:
  100. - const: clk_xin
  101. - const: clk_ahb
  102. - const: gate
  103. interrupts:
  104. maxItems: 1
  105. phys:
  106. maxItems: 1
  107. phy-names:
  108. const: phy_arasan
  109. resets:
  110. maxItems: 1
  111. arasan,soc-ctl-syscon:
  112. $ref: /schemas/types.yaml#/definitions/phandle
  113. description:
  114. A phandle to a syscon device (see ../mfd/syscon.txt) used to access
  115. core corecfg registers. Offsets of registers in this syscon are
  116. determined based on the main compatible string for the device.
  117. clock-output-names:
  118. minItems: 1
  119. maxItems: 2
  120. description:
  121. Name of the card clock which will be exposed by this device.
  122. '#clock-cells':
  123. enum: [0, 1]
  124. description:
  125. With this property in place we will export one or two clocks
  126. representing the Card Clock. These clocks are expected to be
  127. consumed by our PHY.
  128. xlnx,fails-without-test-cd:
  129. $ref: /schemas/types.yaml#/definitions/flag
  130. description:
  131. When present, the controller doesn't work when the CD line is not
  132. connected properly, and the line is not connected properly.
  133. Test mode can be used to force the controller to function.
  134. xlnx,int-clock-stable-broken:
  135. $ref: /schemas/types.yaml#/definitions/flag
  136. description:
  137. When present, the controller always reports that the internal clock
  138. is stable even when it is not.
  139. xlnx,mio-bank:
  140. $ref: /schemas/types.yaml#/definitions/uint32
  141. enum: [0, 1, 2]
  142. default: 0
  143. description:
  144. The MIO bank number in which the command and data lines are configured.
  145. iommus:
  146. maxItems: 1
  147. power-domains:
  148. maxItems: 1
  149. dependencies:
  150. '#clock-cells': [ clock-output-names ]
  151. required:
  152. - compatible
  153. - reg
  154. - interrupts
  155. - clocks
  156. - clock-names
  157. unevaluatedProperties: false
  158. examples:
  159. - |
  160. mmc@e0100000 {
  161. compatible = "arasan,sdhci-8.9a";
  162. reg = <0xe0100000 0x1000>;
  163. clock-names = "clk_xin", "clk_ahb";
  164. clocks = <&clkc 21>, <&clkc 32>;
  165. interrupt-parent = <&gic>;
  166. interrupts = <0 24 4>;
  167. };
  168. - |
  169. mmc@e2800000 {
  170. compatible = "arasan,sdhci-5.1";
  171. reg = <0xe2800000 0x1000>;
  172. clock-names = "clk_xin", "clk_ahb";
  173. clocks = <&cru 8>, <&cru 18>;
  174. interrupt-parent = <&gic>;
  175. interrupts = <0 24 4>;
  176. phys = <&emmc_phy>;
  177. phy-names = "phy_arasan";
  178. };
  179. - |
  180. #include <dt-bindings/clock/rk3399-cru.h>
  181. #include <dt-bindings/interrupt-controller/arm-gic.h>
  182. #include <dt-bindings/interrupt-controller/irq.h>
  183. mmc@fe330000 {
  184. compatible = "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1";
  185. reg = <0xfe330000 0x10000>;
  186. interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
  187. clocks = <&cru SCLK_EMMC>, <&cru ACLK_EMMC>;
  188. clock-names = "clk_xin", "clk_ahb";
  189. arasan,soc-ctl-syscon = <&grf>;
  190. assigned-clocks = <&cru SCLK_EMMC>;
  191. assigned-clock-rates = <200000000>;
  192. clock-output-names = "emmc_cardclock";
  193. phys = <&emmc_phy>;
  194. phy-names = "phy_arasan";
  195. #clock-cells = <0>;
  196. };
  197. - |
  198. mmc@ff160000 {
  199. compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
  200. interrupt-parent = <&gic>;
  201. interrupts = <0 48 4>;
  202. reg = <0xff160000 0x1000>;
  203. clocks = <&clk200>, <&clk200>, <&clk1200>;
  204. clock-names = "clk_xin", "clk_ahb", "gate";
  205. clock-output-names = "clk_out_sd0", "clk_in_sd0";
  206. #clock-cells = <1>;
  207. clk-phase-sd-hs = <63>, <72>;
  208. };
  209. - |
  210. mmc@f1040000 {
  211. compatible = "xlnx,versal-8.9a", "arasan,sdhci-8.9a";
  212. interrupt-parent = <&gic>;
  213. interrupts = <0 126 4>;
  214. reg = <0xf1040000 0x10000>;
  215. clocks = <&clk200>, <&clk200>, <&clk1200>;
  216. clock-names = "clk_xin", "clk_ahb", "gate";
  217. clock-output-names = "clk_out_sd0", "clk_in_sd0";
  218. #clock-cells = <1>;
  219. clk-phase-sd-hs = <132>, <60>;
  220. };
  221. - |
  222. #define LGM_CLK_EMMC5
  223. #define LGM_CLK_NGI
  224. #define LGM_GCLK_EMMC
  225. mmc@ec700000 {
  226. compatible = "intel,lgm-sdhci-5.1-emmc", "arasan,sdhci-5.1";
  227. reg = <0xec700000 0x300>;
  228. interrupt-parent = <&ioapic1>;
  229. interrupts = <44 1>;
  230. clocks = <&cgu0 LGM_CLK_EMMC5>, <&cgu0 LGM_CLK_NGI>,
  231. <&cgu0 LGM_GCLK_EMMC>;
  232. clock-names = "clk_xin", "clk_ahb", "gate";
  233. clock-output-names = "emmc_cardclock";
  234. #clock-cells = <0>;
  235. phys = <&emmc_phy>;
  236. phy-names = "phy_arasan";
  237. arasan,soc-ctl-syscon = <&sysconf>;
  238. };
  239. - |
  240. #define LGM_CLK_SDIO
  241. #define LGM_GCLK_SDXC
  242. mmc@ec600000 {
  243. compatible = "intel,lgm-sdhci-5.1-sdxc", "arasan,sdhci-5.1";
  244. reg = <0xec600000 0x300>;
  245. interrupt-parent = <&ioapic1>;
  246. interrupts = <43 1>;
  247. clocks = <&cgu0 LGM_CLK_SDIO>, <&cgu0 LGM_CLK_NGI>,
  248. <&cgu0 LGM_GCLK_SDXC>;
  249. clock-names = "clk_xin", "clk_ahb", "gate";
  250. clock-output-names = "sdxc_cardclock";
  251. #clock-cells = <0>;
  252. phys = <&sdxc_phy>;
  253. phy-names = "phy_arasan";
  254. arasan,soc-ctl-syscon = <&sysconf>;
  255. };
  256. - |
  257. #define KEEM_BAY_PSS_AUX_EMMC
  258. #define KEEM_BAY_PSS_EMMC
  259. mmc@33000000 {
  260. compatible = "intel,keembay-sdhci-5.1-emmc", "arasan,sdhci-5.1";
  261. interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
  262. reg = <0x33000000 0x300>;
  263. clock-names = "clk_xin", "clk_ahb";
  264. clocks = <&scmi_clk KEEM_BAY_PSS_AUX_EMMC>,
  265. <&scmi_clk KEEM_BAY_PSS_EMMC>;
  266. phys = <&emmc_phy>;
  267. phy-names = "phy_arasan";
  268. assigned-clocks = <&scmi_clk KEEM_BAY_PSS_AUX_EMMC>;
  269. assigned-clock-rates = <200000000>;
  270. clock-output-names = "emmc_cardclock";
  271. #clock-cells = <0>;
  272. arasan,soc-ctl-syscon = <&mmc_phy_syscon>;
  273. };
  274. - |
  275. #define KEEM_BAY_PSS_AUX_SD0
  276. #define KEEM_BAY_PSS_SD0
  277. mmc@31000000 {
  278. compatible = "intel,keembay-sdhci-5.1-sd";
  279. interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
  280. reg = <0x31000000 0x300>;
  281. clock-names = "clk_xin", "clk_ahb";
  282. clocks = <&scmi_clk KEEM_BAY_PSS_AUX_SD0>,
  283. <&scmi_clk KEEM_BAY_PSS_SD0>;
  284. arasan,soc-ctl-syscon = <&sd0_phy_syscon>;
  285. };