mediatek,smi-common.yaml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. # Copyright (c) 2020 MediaTek Inc.
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/memory-controllers/mediatek,smi-common.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: SMI (Smart Multimedia Interface) Common
  8. maintainers:
  9. - Yong Wu <yong.wu@mediatek.com>
  10. description: |
  11. The hardware block diagram please check bindings/iommu/mediatek,iommu.yaml
  12. MediaTek SMI have two generations of HW architecture, here is the list
  13. which generation the SoCs use:
  14. generation 1: mt2701 and mt7623.
  15. generation 2: mt2712, mt6779, mt8167, mt8173, mt8183, mt8186, mt8188, mt8192 and mt8195.
  16. There's slight differences between the two SMI, for generation 2, the
  17. register which control the iommu port is at each larb's register base. But
  18. for generation 1, the register is at smi ao base(smi always on register
  19. base). Besides that, the smi async clock should be prepared and enabled for
  20. SMI generation 1 to transform the smi clock into emi clock domain, but that is
  21. not needed for SMI generation 2.
  22. properties:
  23. compatible:
  24. oneOf:
  25. - enum:
  26. - mediatek,mt2701-smi-common
  27. - mediatek,mt2712-smi-common
  28. - mediatek,mt6779-smi-common
  29. - mediatek,mt6795-smi-common
  30. - mediatek,mt8167-smi-common
  31. - mediatek,mt8173-smi-common
  32. - mediatek,mt8183-smi-common
  33. - mediatek,mt8186-smi-common
  34. - mediatek,mt8188-smi-common-vdo
  35. - mediatek,mt8188-smi-common-vpp
  36. - mediatek,mt8192-smi-common
  37. - mediatek,mt8195-smi-common-vdo
  38. - mediatek,mt8195-smi-common-vpp
  39. - mediatek,mt8195-smi-sub-common
  40. - mediatek,mt8365-smi-common
  41. - description: for mt7623
  42. items:
  43. - const: mediatek,mt7623-smi-common
  44. - const: mediatek,mt2701-smi-common
  45. reg:
  46. maxItems: 1
  47. power-domains:
  48. maxItems: 1
  49. clocks:
  50. description: |
  51. apb and smi are mandatory. the async is only for generation 1 smi HW.
  52. gals(global async local sync) also is optional, see below.
  53. minItems: 2
  54. items:
  55. - description: apb is Advanced Peripheral Bus clock, It's the clock for
  56. setting the register.
  57. - description: smi is the clock for transfer data and command.
  58. - description: Either asynchronous clock to help transform the smi clock
  59. into the emi clock domain on Gen1 h/w, or the path0 clock of gals.
  60. - description: gals1 is the path1 clock of gals.
  61. clock-names:
  62. minItems: 2
  63. maxItems: 4
  64. mediatek,smi:
  65. $ref: /schemas/types.yaml#/definitions/phandle
  66. description: a phandle to the smi-common node above. Only for sub-common.
  67. required:
  68. - compatible
  69. - reg
  70. - power-domains
  71. - clocks
  72. - clock-names
  73. allOf:
  74. - if: # only for gen1 HW
  75. properties:
  76. compatible:
  77. contains:
  78. enum:
  79. - mediatek,mt2701-smi-common
  80. then:
  81. properties:
  82. clocks:
  83. minItems: 3
  84. maxItems: 3
  85. clock-names:
  86. items:
  87. - const: apb
  88. - const: smi
  89. - const: async
  90. - if: # only for sub common
  91. properties:
  92. compatible:
  93. contains:
  94. enum:
  95. - mediatek,mt8195-smi-sub-common
  96. then:
  97. required:
  98. - mediatek,smi
  99. properties:
  100. clocks:
  101. minItems: 3
  102. maxItems: 3
  103. clock-names:
  104. items:
  105. - const: apb
  106. - const: smi
  107. - const: gals0
  108. else:
  109. properties:
  110. mediatek,smi: false
  111. - if: # for gen2 HW that have gals
  112. properties:
  113. compatible:
  114. enum:
  115. - mediatek,mt6779-smi-common
  116. - mediatek,mt8183-smi-common
  117. - mediatek,mt8186-smi-common
  118. - mediatek,mt8192-smi-common
  119. - mediatek,mt8195-smi-common-vdo
  120. - mediatek,mt8195-smi-common-vpp
  121. - mediatek,mt8365-smi-common
  122. then:
  123. properties:
  124. clocks:
  125. minItems: 4
  126. maxItems: 4
  127. clock-names:
  128. items:
  129. - const: apb
  130. - const: smi
  131. - const: gals0
  132. - const: gals1
  133. - if: # for gen2 HW that don't have gals
  134. properties:
  135. compatible:
  136. enum:
  137. - mediatek,mt2712-smi-common
  138. - mediatek,mt6795-smi-common
  139. - mediatek,mt8167-smi-common
  140. - mediatek,mt8173-smi-common
  141. then:
  142. properties:
  143. clocks:
  144. minItems: 2
  145. maxItems: 2
  146. clock-names:
  147. items:
  148. - const: apb
  149. - const: smi
  150. additionalProperties: false
  151. examples:
  152. - |+
  153. #include <dt-bindings/clock/mt8173-clk.h>
  154. #include <dt-bindings/power/mt8173-power.h>
  155. smi_common: smi@14022000 {
  156. compatible = "mediatek,mt8173-smi-common";
  157. reg = <0x14022000 0x1000>;
  158. power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
  159. clocks = <&mmsys CLK_MM_SMI_COMMON>,
  160. <&mmsys CLK_MM_SMI_COMMON>;
  161. clock-names = "apb", "smi";
  162. };