psci.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. * Power State Coordination Interface (PSCI)
  2. Firmware implementing the PSCI functions described in ARM document number
  3. ARM DEN 0022A ("Power State Coordination Interface System Software on ARM
  4. processors") can be used by Linux to initiate various CPU-centric power
  5. operations.
  6. Issue A of the specification describes functions for CPU suspend, hotplug
  7. and migration of secure software.
  8. Functions are invoked by trapping to the privilege level of the PSCI
  9. firmware (specified as part of the binding below) and passing arguments
  10. in a manner similar to that specified by AAPCS:
  11. r0 => 32-bit Function ID / return value
  12. {r1 - r3} => Parameters
  13. Note that the immediate field of the trapping instruction must be set
  14. to #0.
  15. Main node required properties:
  16. - compatible : should contain at least one of:
  17. * "arm,psci" : For implementations complying to PSCI versions prior
  18. to 0.2.
  19. For these cases function IDs must be provided.
  20. * "arm,psci-0.2" : For implementations complying to PSCI 0.2.
  21. Function IDs are not required and should be ignored by
  22. an OS with PSCI 0.2 support, but are permitted to be
  23. present for compatibility with existing software when
  24. "arm,psci" is later in the compatible list.
  25. * "arm,psci-1.0" : For implementations complying to PSCI 1.0.
  26. PSCI 1.0 is backward compatible with PSCI 0.2 with
  27. minor specification updates, as defined in the PSCI
  28. specification[2].
  29. - method : The method of calling the PSCI firmware. Permitted
  30. values are:
  31. "smc" : SMC #0, with the register assignments specified
  32. in this binding.
  33. "hvc" : HVC #0, with the register assignments specified
  34. in this binding.
  35. Main node optional properties:
  36. - cpu_suspend : Function ID for CPU_SUSPEND operation
  37. - cpu_off : Function ID for CPU_OFF operation
  38. - cpu_on : Function ID for CPU_ON operation
  39. - migrate : Function ID for MIGRATE operation
  40. Device tree nodes that require usage of PSCI CPU_SUSPEND function (ie idle
  41. state nodes, as per bindings in [1]) must specify the following properties:
  42. - arm,psci-suspend-param
  43. Usage: Required for state nodes[1] if the corresponding
  44. idle-states node entry-method property is set
  45. to "psci".
  46. Value type: <u32>
  47. Definition: power_state parameter to pass to the PSCI
  48. suspend call.
  49. Example:
  50. Case 1: PSCI v0.1 only.
  51. psci {
  52. compatible = "arm,psci";
  53. method = "smc";
  54. cpu_suspend = <0x95c10000>;
  55. cpu_off = <0x95c10001>;
  56. cpu_on = <0x95c10002>;
  57. migrate = <0x95c10003>;
  58. };
  59. Case 2: PSCI v0.2 only
  60. psci {
  61. compatible = "arm,psci-0.2";
  62. method = "smc";
  63. };
  64. Case 3: PSCI v0.2 and PSCI v0.1.
  65. A DTB may provide IDs for use by kernels without PSCI 0.2 support,
  66. enabling firmware and hypervisors to support existing and new kernels.
  67. These IDs will be ignored by kernels with PSCI 0.2 support, which will
  68. use the standard PSCI 0.2 IDs exclusively.
  69. psci {
  70. compatible = "arm,psci-0.2", "arm,psci";
  71. method = "hvc";
  72. cpu_on = < arbitrary value >;
  73. cpu_off = < arbitrary value >;
  74. ...
  75. };
  76. [1] Kernel documentation - ARM idle states bindings
  77. Documentation/devicetree/bindings/arm/idle-states.txt
  78. [2] Power State Coordination Interface (PSCI) specification
  79. http://infocenter.arm.com/help/topic/com.arm.doc.den0022c/DEN0022C_Power_State_Coordination_Interface.pdf