qcom,cpr.yaml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/power/avs/qcom,cpr.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Qualcomm Core Power Reduction (CPR)
  7. maintainers:
  8. - Niklas Cassel <nks@flawful.org>
  9. description: |
  10. CPR (Core Power Reduction) is a technology to reduce core power on a CPU
  11. or other device. Each OPP of a device corresponds to a "corner" that has
  12. a range of valid voltages for a particular frequency. While the device is
  13. running at a particular frequency, CPR monitors dynamic factors such as
  14. temperature, etc. and suggests adjustments to the voltage to save power
  15. and meet silicon characteristic requirements.
  16. properties:
  17. compatible:
  18. items:
  19. - enum:
  20. - qcom,qcs404-cpr
  21. - const: qcom,cpr
  22. reg:
  23. description: Base address and size of the RBCPR register region.
  24. maxItems: 1
  25. interrupts:
  26. maxItems: 1
  27. clocks:
  28. items:
  29. - description: Reference clock.
  30. clock-names:
  31. items:
  32. - const: ref
  33. vdd-apc-supply:
  34. description: APC regulator supply.
  35. '#power-domain-cells':
  36. const: 0
  37. operating-points-v2:
  38. description: |
  39. A phandle to the OPP table containing the performance states
  40. supported by the CPR power domain.
  41. acc-syscon:
  42. $ref: /schemas/types.yaml#/definitions/phandle
  43. description: A phandle to the syscon used for writing ACC settings.
  44. nvmem-cells:
  45. items:
  46. - description: Corner 1 quotient offset
  47. - description: Corner 2 quotient offset
  48. - description: Corner 3 quotient offset
  49. - description: Corner 1 initial voltage
  50. - description: Corner 2 initial voltage
  51. - description: Corner 3 initial voltage
  52. - description: Corner 1 quotient
  53. - description: Corner 2 quotient
  54. - description: Corner 3 quotient
  55. - description: Corner 1 ring oscillator
  56. - description: Corner 2 ring oscillator
  57. - description: Corner 3 ring oscillator
  58. - description: Fuse revision
  59. nvmem-cell-names:
  60. items:
  61. - const: cpr_quotient_offset1
  62. - const: cpr_quotient_offset2
  63. - const: cpr_quotient_offset3
  64. - const: cpr_init_voltage1
  65. - const: cpr_init_voltage2
  66. - const: cpr_init_voltage3
  67. - const: cpr_quotient1
  68. - const: cpr_quotient2
  69. - const: cpr_quotient3
  70. - const: cpr_ring_osc1
  71. - const: cpr_ring_osc2
  72. - const: cpr_ring_osc3
  73. - const: cpr_fuse_revision
  74. required:
  75. - compatible
  76. - reg
  77. - interrupts
  78. - clocks
  79. - clock-names
  80. - vdd-apc-supply
  81. - '#power-domain-cells'
  82. - operating-points-v2
  83. - nvmem-cells
  84. - nvmem-cell-names
  85. additionalProperties: false
  86. examples:
  87. - |
  88. #include <dt-bindings/interrupt-controller/arm-gic.h>
  89. cpr_opp_table: opp-table-cpr {
  90. compatible = "operating-points-v2-qcom-level";
  91. cpr_opp1: opp1 {
  92. opp-level = <1>;
  93. qcom,opp-fuse-level = <1>;
  94. };
  95. cpr_opp2: opp2 {
  96. opp-level = <2>;
  97. qcom,opp-fuse-level = <2>;
  98. };
  99. cpr_opp3: opp3 {
  100. opp-level = <3>;
  101. qcom,opp-fuse-level = <3>;
  102. };
  103. };
  104. power-controller@b018000 {
  105. compatible = "qcom,qcs404-cpr", "qcom,cpr";
  106. reg = <0x0b018000 0x1000>;
  107. interrupts = <0 15 IRQ_TYPE_EDGE_RISING>;
  108. clocks = <&xo_board>;
  109. clock-names = "ref";
  110. vdd-apc-supply = <&pms405_s3>;
  111. #power-domain-cells = <0>;
  112. operating-points-v2 = <&cpr_opp_table>;
  113. acc-syscon = <&tcsr>;
  114. nvmem-cells = <&cpr_efuse_quot_offset1>,
  115. <&cpr_efuse_quot_offset2>,
  116. <&cpr_efuse_quot_offset3>,
  117. <&cpr_efuse_init_voltage1>,
  118. <&cpr_efuse_init_voltage2>,
  119. <&cpr_efuse_init_voltage3>,
  120. <&cpr_efuse_quot1>,
  121. <&cpr_efuse_quot2>,
  122. <&cpr_efuse_quot3>,
  123. <&cpr_efuse_ring1>,
  124. <&cpr_efuse_ring2>,
  125. <&cpr_efuse_ring3>,
  126. <&cpr_efuse_revision>;
  127. nvmem-cell-names = "cpr_quotient_offset1",
  128. "cpr_quotient_offset2",
  129. "cpr_quotient_offset3",
  130. "cpr_init_voltage1",
  131. "cpr_init_voltage2",
  132. "cpr_init_voltage3",
  133. "cpr_quotient1",
  134. "cpr_quotient2",
  135. "cpr_quotient3",
  136. "cpr_ring_osc1",
  137. "cpr_ring_osc2",
  138. "cpr_ring_osc3",
  139. "cpr_fuse_revision";
  140. };