psci.txt 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 to
  18. 0.2. For these cases function IDs must be provided.
  19. * "arm,psci-0.2" : for implementations complying to PSCI 0.2. Function
  20. IDs are not required and should be ignored by an OS with PSCI 0.2
  21. support, but are permitted to be present for compatibility with
  22. existing software when "arm,psci" is later in the compatible list.
  23. - method : The method of calling the PSCI firmware. Permitted
  24. values are:
  25. "smc" : SMC #0, with the register assignments specified
  26. in this binding.
  27. "hvc" : HVC #0, with the register assignments specified
  28. in this binding.
  29. Main node optional properties:
  30. - cpu_suspend : Function ID for CPU_SUSPEND operation
  31. - cpu_off : Function ID for CPU_OFF operation
  32. - cpu_on : Function ID for CPU_ON operation
  33. - migrate : Function ID for MIGRATE operation
  34. Device tree nodes that require usage of PSCI CPU_SUSPEND function (ie idle
  35. state nodes, as per bindings in [1]) must specify the following properties:
  36. - arm,psci-suspend-param
  37. Usage: Required for state nodes[1] if the corresponding
  38. idle-states node entry-method property is set
  39. to "psci".
  40. Value type: <u32>
  41. Definition: power_state parameter to pass to the PSCI
  42. suspend call.
  43. Example:
  44. Case 1: PSCI v0.1 only.
  45. psci {
  46. compatible = "arm,psci";
  47. method = "smc";
  48. cpu_suspend = <0x95c10000>;
  49. cpu_off = <0x95c10001>;
  50. cpu_on = <0x95c10002>;
  51. migrate = <0x95c10003>;
  52. };
  53. Case 2: PSCI v0.2 only
  54. psci {
  55. compatible = "arm,psci-0.2";
  56. method = "smc";
  57. };
  58. Case 3: PSCI v0.2 and PSCI v0.1.
  59. A DTB may provide IDs for use by kernels without PSCI 0.2 support,
  60. enabling firmware and hypervisors to support existing and new kernels.
  61. These IDs will be ignored by kernels with PSCI 0.2 support, which will
  62. use the standard PSCI 0.2 IDs exclusively.
  63. psci {
  64. compatible = "arm,psci-0.2", "arm,psci";
  65. method = "hvc";
  66. cpu_on = < arbitrary value >;
  67. cpu_off = < arbitrary value >;
  68. ...
  69. };
  70. [1] Kernel documentation - ARM idle states bindings
  71. Documentation/devicetree/bindings/arm/idle-states.txt