arm,mali-midgard.yaml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/gpu/arm,mali-midgard.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: ARM Mali Midgard GPU
  7. maintainers:
  8. - Rob Herring <robh@kernel.org>
  9. properties:
  10. $nodename:
  11. pattern: '^gpu@[a-f0-9]+$'
  12. compatible:
  13. oneOf:
  14. - items:
  15. - enum:
  16. - samsung,exynos5250-mali
  17. - const: arm,mali-t604
  18. - items:
  19. - enum:
  20. - samsung,exynos5420-mali
  21. - const: arm,mali-t628
  22. - items:
  23. - enum:
  24. - allwinner,sun50i-h6-mali
  25. - const: arm,mali-t720
  26. - items:
  27. - enum:
  28. - amlogic,meson-gxm-mali
  29. - realtek,rtd1295-mali
  30. - const: arm,mali-t820
  31. - items:
  32. - enum:
  33. - arm,juno-mali
  34. - const: arm,mali-t624
  35. - items:
  36. - enum:
  37. - rockchip,rk3288-mali
  38. - samsung,exynos5433-mali
  39. - const: arm,mali-t760
  40. - items:
  41. - enum:
  42. - samsung,exynos7-mali
  43. - const: samsung,exynos5433-mali
  44. - const: arm,mali-t760
  45. - items:
  46. - enum:
  47. - rockchip,rk3399-mali
  48. - const: arm,mali-t860
  49. # "arm,mali-t830"
  50. # "arm,mali-t880"
  51. reg:
  52. maxItems: 1
  53. interrupts:
  54. items:
  55. - description: Job interrupt
  56. - description: MMU interrupt
  57. - description: GPU interrupt
  58. interrupt-names:
  59. items:
  60. - const: job
  61. - const: mmu
  62. - const: gpu
  63. clocks:
  64. minItems: 1
  65. maxItems: 2
  66. clock-names:
  67. minItems: 1
  68. items:
  69. - const: core
  70. - const: bus
  71. mali-supply: true
  72. opp-table:
  73. type: object
  74. power-domains:
  75. maxItems: 1
  76. resets:
  77. minItems: 1
  78. maxItems: 2
  79. operating-points-v2: true
  80. "#cooling-cells":
  81. const: 2
  82. dma-coherent: true
  83. dynamic-power-coefficient:
  84. $ref: /schemas/types.yaml#/definitions/uint32
  85. description:
  86. A u32 value that represents the running time dynamic
  87. power coefficient in units of uW/MHz/V^2. The
  88. coefficient can either be calculated from power
  89. measurements or derived by analysis.
  90. The dynamic power consumption of the GPU is
  91. proportional to the square of the Voltage (V) and
  92. the clock frequency (f). The coefficient is used to
  93. calculate the dynamic power as below -
  94. Pdyn = dynamic-power-coefficient * V^2 * f
  95. where voltage is in V, frequency is in MHz.
  96. required:
  97. - compatible
  98. - reg
  99. - interrupts
  100. - interrupt-names
  101. - clocks
  102. additionalProperties: false
  103. allOf:
  104. - if:
  105. properties:
  106. compatible:
  107. contains:
  108. const: allwinner,sun50i-h6-mali
  109. then:
  110. properties:
  111. clocks:
  112. minItems: 2
  113. required:
  114. - clock-names
  115. - resets
  116. - if:
  117. properties:
  118. compatible:
  119. contains:
  120. const: amlogic,meson-gxm-mali
  121. then:
  122. properties:
  123. resets:
  124. minItems: 2
  125. required:
  126. - resets
  127. examples:
  128. - |
  129. #include <dt-bindings/interrupt-controller/irq.h>
  130. #include <dt-bindings/interrupt-controller/arm-gic.h>
  131. gpu@ffa30000 {
  132. compatible = "rockchip,rk3288-mali", "arm,mali-t760";
  133. reg = <0xffa30000 0x10000>;
  134. interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
  135. <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
  136. <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
  137. interrupt-names = "job", "mmu", "gpu";
  138. clocks = <&cru 0>;
  139. mali-supply = <&vdd_gpu>;
  140. operating-points-v2 = <&gpu_opp_table>;
  141. power-domains = <&power 0>;
  142. #cooling-cells = <2>;
  143. };
  144. gpu_opp_table: opp-table {
  145. compatible = "operating-points-v2";
  146. opp-533000000 {
  147. opp-hz = /bits/ 64 <533000000>;
  148. opp-microvolt = <1250000>;
  149. };
  150. opp-450000000 {
  151. opp-hz = /bits/ 64 <450000000>;
  152. opp-microvolt = <1150000>;
  153. };
  154. opp-400000000 {
  155. opp-hz = /bits/ 64 <400000000>;
  156. opp-microvolt = <1125000>;
  157. };
  158. opp-350000000 {
  159. opp-hz = /bits/ 64 <350000000>;
  160. opp-microvolt = <1075000>;
  161. };
  162. opp-266000000 {
  163. opp-hz = /bits/ 64 <266000000>;
  164. opp-microvolt = <1025000>;
  165. };
  166. opp-160000000 {
  167. opp-hz = /bits/ 64 <160000000>;
  168. opp-microvolt = <925000>;
  169. };
  170. opp-100000000 {
  171. opp-hz = /bits/ 64 <100000000>;
  172. opp-microvolt = <912500>;
  173. };
  174. };
  175. ...