arm,scpi.yaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. # Copyright 2021 ARM Ltd.
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/firmware/arm,scpi.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: System Control and Power Interface (SCPI) Message Protocol
  8. maintainers:
  9. - Sudeep Holla <sudeep.holla@arm.com>
  10. description: |
  11. Firmware implementing the SCPI described in ARM document number ARM DUI
  12. 0922B ("ARM Compute Subsystem SCP: Message Interface Protocols")[0] can be
  13. used by Linux to initiate various system control and power operations.
  14. This binding is intended to define the interface the firmware implementing
  15. the SCPI provide for OSPM in the device tree.
  16. [0] http://infocenter.arm.com/help/topic/com.arm.doc.dui0922b/index.html
  17. properties:
  18. $nodename:
  19. const: scpi
  20. compatible:
  21. description:
  22. SCPI compliant firmware complying to SCPI v1.0 and above OR
  23. SCPI compliant firmware complying to all unversioned releases
  24. prior to SCPI v1.0
  25. oneOf:
  26. - const: arm,scpi # SCPI v1.0 and above
  27. - const: arm,scpi-pre-1.0 # Unversioned SCPI before v1.0
  28. - items:
  29. - enum:
  30. - amlogic,meson-gxbb-scpi
  31. - const: arm,scpi-pre-1.0
  32. mboxes:
  33. description:
  34. List of phandle and mailbox channel specifiers. All the channels reserved
  35. by remote SCP firmware for use by SCPI message protocol should be
  36. specified in any order.
  37. minItems: 1
  38. maxItems: 4
  39. shmem:
  40. description:
  41. List of phandle pointing to the shared memory(SHM) area between the
  42. processors using these mailboxes for IPC, one for each mailbox SHM can
  43. be any memory reserved for the purpose of this communication between the
  44. processors.
  45. minItems: 1
  46. maxItems: 4
  47. power-controller:
  48. type: object
  49. description:
  50. This sub-node represents SCPI power domain controller.
  51. properties:
  52. compatible:
  53. const: arm,scpi-power-domains
  54. '#power-domain-cells':
  55. const: 1
  56. num-domains:
  57. $ref: /schemas/types.yaml#/definitions/uint32
  58. description:
  59. Total number of power domains provided by SCPI. This is needed as
  60. the SCPI message protocol lacks a mechanism to query this
  61. information at runtime.
  62. required:
  63. - compatible
  64. - '#power-domain-cells'
  65. - num-domains
  66. additionalProperties: false
  67. sensors:
  68. type: object
  69. description: |
  70. This sub-node represents SCPI sensors controller.
  71. properties:
  72. compatible:
  73. oneOf:
  74. - const: arm,scpi-sensors
  75. - items:
  76. - enum:
  77. - amlogic,meson-gxbb-scpi-sensors
  78. - const: arm,scpi-sensors
  79. '#thermal-sensor-cells':
  80. const: 1
  81. required:
  82. - compatible
  83. - '#thermal-sensor-cells'
  84. additionalProperties: false
  85. clocks:
  86. type: object
  87. description:
  88. This is the container node. Each sub-node represents one of the types
  89. of clock controller - indexed or full range.
  90. properties:
  91. compatible:
  92. const: arm,scpi-clocks
  93. patternProperties:
  94. "^clocks-[0-9a-f]+$":
  95. type: object
  96. description: |
  97. This sub-node represents one of the types of clock controller
  98. - indexed or full range.
  99. "arm,scpi-dvfs-clocks" - all the clocks that are variable and index
  100. based. These clocks don't provide an entire range of values between
  101. the limits but only discrete points within the range. The firmware
  102. provides the mapping for each such operating frequency and the index
  103. associated with it. The firmware also manages the voltage scaling
  104. appropriately with the clock scaling.
  105. "arm,scpi-variable-clocks" - all the clocks that are variable and
  106. provide full range within the specified range. The firmware provides
  107. the range of values within a specified range.
  108. properties:
  109. compatible:
  110. enum:
  111. - arm,scpi-dvfs-clocks
  112. - arm,scpi-variable-clocks
  113. '#clock-cells':
  114. const: 1
  115. clock-output-names: true
  116. clock-indices:
  117. $ref: /schemas/types.yaml#/definitions/uint32-array
  118. description:
  119. The identifying number for the clocks(i.e.clock_id) in the node.
  120. It can be non linear and hence provide the mapping of identifiers
  121. into the clock-output-names array.
  122. required:
  123. - compatible
  124. - '#clock-cells'
  125. - clock-output-names
  126. - clock-indices
  127. additionalProperties: false
  128. required:
  129. - compatible
  130. additionalProperties: false
  131. additionalProperties: false
  132. required:
  133. - compatible
  134. - mboxes
  135. - shmem
  136. examples:
  137. - |
  138. firmware {
  139. scpi {
  140. compatible = "arm,scpi";
  141. mboxes = <&mhuA 1>;
  142. shmem = <&cpu_scp_hpri>; /* HP-NonSecure */
  143. scpi_devpd: power-controller {
  144. compatible = "arm,scpi-power-domains";
  145. num-domains = <2>;
  146. #power-domain-cells = <1>;
  147. };
  148. clocks {
  149. compatible = "arm,scpi-clocks";
  150. scpi_dvfs: clocks-0 {
  151. compatible = "arm,scpi-dvfs-clocks";
  152. #clock-cells = <1>;
  153. clock-indices = <0>, <1>, <2>;
  154. clock-output-names = "atlclk", "aplclk","gpuclk";
  155. };
  156. scpi_clk: clocks-1 {
  157. compatible = "arm,scpi-variable-clocks";
  158. #clock-cells = <1>;
  159. clock-indices = <3>, <4>;
  160. clock-output-names = "pxlclk0", "pxlclk1";
  161. };
  162. };
  163. scpi_sensors: sensors {
  164. compatible = "arm,scpi-sensors";
  165. #thermal-sensor-cells = <1>;
  166. };
  167. };
  168. };
  169. soc {
  170. #address-cells = <2>;
  171. #size-cells = <2>;
  172. sram@50000000 {
  173. compatible = "mmio-sram";
  174. reg = <0x0 0x50000000 0x0 0x10000>;
  175. #address-cells = <1>;
  176. #size-cells = <1>;
  177. ranges = <0 0x0 0x50000000 0x10000>;
  178. cpu_scp_lpri: scp-sram-section@0 {
  179. compatible = "arm,scp-shmem";
  180. reg = <0x0 0x200>;
  181. };
  182. cpu_scp_hpri: scp-sram-section@200 {
  183. compatible = "arm,scp-shmem";
  184. reg = <0x200 0x200>;
  185. };
  186. };
  187. };
  188. - |
  189. firmware {
  190. scpi {
  191. compatible = "amlogic,meson-gxbb-scpi", "arm,scpi-pre-1.0";
  192. mboxes = <&mailbox 1>, <&mailbox 2>;
  193. shmem = <&cpu_scp_lpri>, <&cpu_scp_hpri>;
  194. scpi_sensors1: sensors {
  195. compatible = "amlogic,meson-gxbb-scpi-sensors", "arm,scpi-sensors";
  196. #thermal-sensor-cells = <1>;
  197. };
  198. };
  199. };
  200. ...