arm,scmi.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. System Control and Management Interface (SCMI) Message Protocol
  2. ----------------------------------------------------------
  3. The SCMI is intended to allow agents such as OSPM to manage various functions
  4. that are provided by the hardware platform it is running on, including power
  5. and performance functions.
  6. This binding is intended to define the interface the firmware implementing
  7. the SCMI as described in ARM document number ARM DEN 0056A ("ARM System Control
  8. and Management Interface Platform Design Document")[0] provide for OSPM in
  9. the device tree.
  10. Required properties:
  11. The scmi node with the following properties shall be under the /firmware/ node.
  12. - compatible : shall be "arm,scmi" or "arm,scmi-smc" for smc/hvc transports
  13. - mboxes: List of phandle and mailbox channel specifiers. It should contain
  14. exactly one or two mailboxes, one for transmitting messages("tx")
  15. and another optional for receiving the notifications("rx") if
  16. supported.
  17. - shmem : List of phandle pointing to the shared memory(SHM) area as per
  18. generic mailbox client binding.
  19. - #address-cells : should be '1' if the device has sub-nodes, maps to
  20. protocol identifier for a given sub-node.
  21. - #size-cells : should be '0' as 'reg' property doesn't have any size
  22. associated with it.
  23. - arm,smc-id : SMC id required when using smc or hvc transports
  24. Optional properties:
  25. - mbox-names: shall be "tx" or "rx" depending on mboxes entries.
  26. See Documentation/devicetree/bindings/mailbox/mailbox.txt for more details
  27. about the generic mailbox controller and client driver bindings.
  28. The mailbox is the only permitted method of calling the SCMI firmware.
  29. Mailbox doorbell is used as a mechanism to alert the presence of a
  30. messages and/or notification.
  31. Each protocol supported shall have a sub-node with corresponding compatible
  32. as described in the following sections. If the platform supports dedicated
  33. communication channel for a particular protocol, the 3 properties namely:
  34. mboxes, mbox-names and shmem shall be present in the sub-node corresponding
  35. to that protocol.
  36. Clock/Performance bindings for the clocks/OPPs based on SCMI Message Protocol
  37. ------------------------------------------------------------
  38. This binding uses the common clock binding[1].
  39. Required properties:
  40. - #clock-cells : Should be 1. Contains the Clock ID value used by SCMI commands.
  41. Power domain bindings for the power domains based on SCMI Message Protocol
  42. ------------------------------------------------------------
  43. This binding for the SCMI power domain providers uses the generic power
  44. domain binding[2].
  45. Required properties:
  46. - #power-domain-cells : Should be 1. Contains the device or the power
  47. domain ID value used by SCMI commands.
  48. Sensor bindings for the sensors based on SCMI Message Protocol
  49. --------------------------------------------------------------
  50. SCMI provides an API to access the various sensors on the SoC.
  51. Required properties:
  52. - #thermal-sensor-cells: should be set to 1. This property follows the
  53. thermal device tree bindings[3].
  54. Valid cell values are raw identifiers (Sensor ID)
  55. as used by the firmware. Refer to platform details
  56. for your implementation for the IDs to use.
  57. Reset signal bindings for the reset domains based on SCMI Message Protocol
  58. ------------------------------------------------------------
  59. This binding for the SCMI reset domain providers uses the generic reset
  60. signal binding[5].
  61. Required properties:
  62. - #reset-cells : Should be 1. Contains the reset domain ID value used
  63. by SCMI commands.
  64. SRAM and Shared Memory for SCMI
  65. -------------------------------
  66. A small area of SRAM is reserved for SCMI communication between application
  67. processors and SCP.
  68. The properties should follow the generic mmio-sram description found in [4]
  69. Each sub-node represents the reserved area for SCMI.
  70. Required sub-node properties:
  71. - reg : The base offset and size of the reserved area with the SRAM
  72. - compatible : should be "arm,scmi-shmem" for Non-secure SRAM based
  73. shared memory
  74. [0] http://infocenter.arm.com/help/topic/com.arm.doc.den0056a/index.html
  75. [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
  76. [2] Documentation/devicetree/bindings/power/power-domain.yaml
  77. [3] Documentation/devicetree/bindings/thermal/thermal.txt
  78. [4] Documentation/devicetree/bindings/sram/sram.yaml
  79. [5] Documentation/devicetree/bindings/reset/reset.txt
  80. Example:
  81. sram@50000000 {
  82. compatible = "mmio-sram";
  83. reg = <0x0 0x50000000 0x0 0x10000>;
  84. #address-cells = <1>;
  85. #size-cells = <1>;
  86. ranges = <0 0x0 0x50000000 0x10000>;
  87. cpu_scp_lpri: scp-shmem@0 {
  88. compatible = "arm,scmi-shmem";
  89. reg = <0x0 0x200>;
  90. };
  91. cpu_scp_hpri: scp-shmem@200 {
  92. compatible = "arm,scmi-shmem";
  93. reg = <0x200 0x200>;
  94. };
  95. };
  96. mailbox@40000000 {
  97. ....
  98. #mbox-cells = <1>;
  99. reg = <0x0 0x40000000 0x0 0x10000>;
  100. };
  101. firmware {
  102. ...
  103. scmi {
  104. compatible = "arm,scmi";
  105. mboxes = <&mailbox 0 &mailbox 1>;
  106. mbox-names = "tx", "rx";
  107. shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
  108. #address-cells = <1>;
  109. #size-cells = <0>;
  110. scmi_devpd: protocol@11 {
  111. reg = <0x11>;
  112. #power-domain-cells = <1>;
  113. };
  114. scmi_dvfs: protocol@13 {
  115. reg = <0x13>;
  116. #clock-cells = <1>;
  117. };
  118. scmi_clk: protocol@14 {
  119. reg = <0x14>;
  120. #clock-cells = <1>;
  121. };
  122. scmi_sensors0: protocol@15 {
  123. reg = <0x15>;
  124. #thermal-sensor-cells = <1>;
  125. };
  126. scmi_reset: protocol@16 {
  127. reg = <0x16>;
  128. #reset-cells = <1>;
  129. };
  130. };
  131. };
  132. cpu@0 {
  133. ...
  134. reg = <0 0>;
  135. clocks = <&scmi_dvfs 0>;
  136. };
  137. hdlcd@7ff60000 {
  138. ...
  139. reg = <0 0x7ff60000 0 0x1000>;
  140. clocks = <&scmi_clk 4>;
  141. power-domains = <&scmi_devpd 1>;
  142. resets = <&scmi_reset 10>;
  143. };
  144. thermal-zones {
  145. soc_thermal {
  146. polling-delay-passive = <100>;
  147. polling-delay = <1000>;
  148. /* sensor ID */
  149. thermal-sensors = <&scmi_sensors0 3>;
  150. ...
  151. };
  152. };