opp-v2.yaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/opp/opp-v2.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Generic OPP (Operating Performance Points)
  7. maintainers:
  8. - Viresh Kumar <viresh.kumar@linaro.org>
  9. allOf:
  10. - $ref: opp-v2-base.yaml#
  11. properties:
  12. compatible:
  13. const: operating-points-v2
  14. unevaluatedProperties: false
  15. examples:
  16. - |
  17. /*
  18. * Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states
  19. * together.
  20. */
  21. cpus {
  22. #address-cells = <1>;
  23. #size-cells = <0>;
  24. cpu@0 {
  25. compatible = "arm,cortex-a9";
  26. device_type = "cpu";
  27. reg = <0>;
  28. next-level-cache = <&L2>;
  29. clocks = <&clk_controller 0>;
  30. clock-names = "cpu";
  31. cpu-supply = <&cpu_supply0>;
  32. operating-points-v2 = <&cpu0_opp_table0>;
  33. };
  34. cpu@1 {
  35. compatible = "arm,cortex-a9";
  36. device_type = "cpu";
  37. reg = <1>;
  38. next-level-cache = <&L2>;
  39. clocks = <&clk_controller 0>;
  40. clock-names = "cpu";
  41. cpu-supply = <&cpu_supply0>;
  42. operating-points-v2 = <&cpu0_opp_table0>;
  43. };
  44. };
  45. cpu0_opp_table0: opp-table {
  46. compatible = "operating-points-v2";
  47. opp-shared;
  48. opp-1000000000 {
  49. opp-hz = /bits/ 64 <1000000000>;
  50. opp-microvolt = <975000 970000 985000>;
  51. opp-microamp = <70000>;
  52. clock-latency-ns = <300000>;
  53. opp-suspend;
  54. };
  55. opp-1100000000 {
  56. opp-hz = /bits/ 64 <1100000000>;
  57. opp-microvolt = <1000000 980000 1010000>;
  58. opp-microamp = <80000>;
  59. clock-latency-ns = <310000>;
  60. };
  61. opp-1200000000 {
  62. opp-hz = /bits/ 64 <1200000000>;
  63. opp-microvolt = <1025000>;
  64. clock-latency-ns = <290000>;
  65. turbo-mode;
  66. };
  67. };
  68. - |
  69. /*
  70. * Example 2: Single cluster, Quad-core Qualcom-krait, switches DVFS states
  71. * independently.
  72. */
  73. cpus {
  74. #address-cells = <1>;
  75. #size-cells = <0>;
  76. cpu@0 {
  77. compatible = "qcom,krait";
  78. device_type = "cpu";
  79. reg = <0>;
  80. next-level-cache = <&L2>;
  81. clocks = <&clk_controller 0>;
  82. clock-names = "cpu";
  83. cpu-supply = <&cpu_supply0>;
  84. operating-points-v2 = <&cpu_opp_table>;
  85. };
  86. cpu@1 {
  87. compatible = "qcom,krait";
  88. device_type = "cpu";
  89. reg = <1>;
  90. next-level-cache = <&L2>;
  91. clocks = <&clk_controller 1>;
  92. clock-names = "cpu";
  93. cpu-supply = <&cpu_supply1>;
  94. operating-points-v2 = <&cpu_opp_table>;
  95. };
  96. cpu@2 {
  97. compatible = "qcom,krait";
  98. device_type = "cpu";
  99. reg = <2>;
  100. next-level-cache = <&L2>;
  101. clocks = <&clk_controller 2>;
  102. clock-names = "cpu";
  103. cpu-supply = <&cpu_supply2>;
  104. operating-points-v2 = <&cpu_opp_table>;
  105. };
  106. cpu@3 {
  107. compatible = "qcom,krait";
  108. device_type = "cpu";
  109. reg = <3>;
  110. next-level-cache = <&L2>;
  111. clocks = <&clk_controller 3>;
  112. clock-names = "cpu";
  113. cpu-supply = <&cpu_supply3>;
  114. operating-points-v2 = <&cpu_opp_table>;
  115. };
  116. };
  117. cpu_opp_table: opp-table {
  118. compatible = "operating-points-v2";
  119. /*
  120. * Missing opp-shared property means CPUs switch DVFS states
  121. * independently.
  122. */
  123. opp-1000000000 {
  124. opp-hz = /bits/ 64 <1000000000>;
  125. opp-microvolt = <975000 970000 985000>;
  126. opp-microamp = <70000>;
  127. clock-latency-ns = <300000>;
  128. opp-suspend;
  129. };
  130. opp-1100000000 {
  131. opp-hz = /bits/ 64 <1100000000>;
  132. opp-microvolt = <1000000 980000 1010000>;
  133. opp-microamp = <80000>;
  134. clock-latency-ns = <310000>;
  135. };
  136. opp-1200000000 {
  137. opp-hz = /bits/ 64 <1200000000>;
  138. opp-microvolt = <1025000>;
  139. opp-microamp = <90000>;
  140. clock-latency-ns = <290000>;
  141. turbo-mode;
  142. };
  143. };
  144. - |
  145. /*
  146. * Example 3: Dual-cluster, Dual-core per cluster. CPUs within a cluster switch
  147. * DVFS state together.
  148. */
  149. cpus {
  150. #address-cells = <1>;
  151. #size-cells = <0>;
  152. cpu@0 {
  153. compatible = "arm,cortex-a7";
  154. device_type = "cpu";
  155. reg = <0>;
  156. next-level-cache = <&L2>;
  157. clocks = <&clk_controller 0>;
  158. clock-names = "cpu";
  159. cpu-supply = <&cpu_supply0>;
  160. operating-points-v2 = <&cluster0_opp>;
  161. };
  162. cpu@1 {
  163. compatible = "arm,cortex-a7";
  164. device_type = "cpu";
  165. reg = <1>;
  166. next-level-cache = <&L2>;
  167. clocks = <&clk_controller 0>;
  168. clock-names = "cpu";
  169. cpu-supply = <&cpu_supply0>;
  170. operating-points-v2 = <&cluster0_opp>;
  171. };
  172. cpu@100 {
  173. compatible = "arm,cortex-a15";
  174. device_type = "cpu";
  175. reg = <100>;
  176. next-level-cache = <&L2>;
  177. clocks = <&clk_controller 1>;
  178. clock-names = "cpu";
  179. cpu-supply = <&cpu_supply1>;
  180. operating-points-v2 = <&cluster1_opp>;
  181. };
  182. cpu@101 {
  183. compatible = "arm,cortex-a15";
  184. device_type = "cpu";
  185. reg = <101>;
  186. next-level-cache = <&L2>;
  187. clocks = <&clk_controller 1>;
  188. clock-names = "cpu";
  189. cpu-supply = <&cpu_supply1>;
  190. operating-points-v2 = <&cluster1_opp>;
  191. };
  192. };
  193. cluster0_opp: opp-table-0 {
  194. compatible = "operating-points-v2";
  195. opp-shared;
  196. opp-1000000000 {
  197. opp-hz = /bits/ 64 <1000000000>;
  198. opp-microvolt = <975000 970000 985000>;
  199. opp-microamp = <70000>;
  200. clock-latency-ns = <300000>;
  201. opp-suspend;
  202. };
  203. opp-1100000000 {
  204. opp-hz = /bits/ 64 <1100000000>;
  205. opp-microvolt = <1000000 980000 1010000>;
  206. opp-microamp = <80000>;
  207. clock-latency-ns = <310000>;
  208. };
  209. opp-1200000000 {
  210. opp-hz = /bits/ 64 <1200000000>;
  211. opp-microvolt = <1025000>;
  212. opp-microamp = <90000>;
  213. clock-latency-ns = <290000>;
  214. turbo-mode;
  215. };
  216. };
  217. cluster1_opp: opp-table-1 {
  218. compatible = "operating-points-v2";
  219. opp-shared;
  220. opp-1300000000 {
  221. opp-hz = /bits/ 64 <1300000000>;
  222. opp-microvolt = <1050000 1045000 1055000>;
  223. opp-microamp = <95000>;
  224. clock-latency-ns = <400000>;
  225. opp-suspend;
  226. };
  227. opp-1400000000 {
  228. opp-hz = /bits/ 64 <1400000000>;
  229. opp-microvolt = <1075000>;
  230. opp-microamp = <100000>;
  231. clock-latency-ns = <400000>;
  232. };
  233. opp-1500000000 {
  234. opp-hz = /bits/ 64 <1500000000>;
  235. opp-microvolt = <1100000 1010000 1110000>;
  236. opp-microamp = <95000>;
  237. clock-latency-ns = <400000>;
  238. turbo-mode;
  239. };
  240. };
  241. - |
  242. /* Example 4: Handling multiple regulators */
  243. cpus {
  244. #address-cells = <1>;
  245. #size-cells = <0>;
  246. cpu@0 {
  247. compatible = "foo,cpu-type";
  248. device_type = "cpu";
  249. reg = <0>;
  250. vcc0-supply = <&cpu_supply0>;
  251. vcc1-supply = <&cpu_supply1>;
  252. vcc2-supply = <&cpu_supply2>;
  253. operating-points-v2 = <&cpu0_opp_table4>;
  254. };
  255. };
  256. cpu0_opp_table4: opp-table-0 {
  257. compatible = "operating-points-v2";
  258. opp-shared;
  259. opp-1000000000 {
  260. opp-hz = /bits/ 64 <1000000000>;
  261. opp-microvolt = <970000>, /* Supply 0 */
  262. <960000>, /* Supply 1 */
  263. <960000>; /* Supply 2 */
  264. opp-microamp = <70000>, /* Supply 0 */
  265. <70000>, /* Supply 1 */
  266. <70000>; /* Supply 2 */
  267. clock-latency-ns = <300000>;
  268. };
  269. /* OR */
  270. opp-1000000001 {
  271. opp-hz = /bits/ 64 <1000000001>;
  272. opp-microvolt = <975000 970000 985000>, /* Supply 0 */
  273. <965000 960000 975000>, /* Supply 1 */
  274. <965000 960000 975000>; /* Supply 2 */
  275. opp-microamp = <70000>, /* Supply 0 */
  276. <70000>, /* Supply 1 */
  277. <70000>; /* Supply 2 */
  278. clock-latency-ns = <300000>;
  279. };
  280. /* OR */
  281. opp-1000000002 {
  282. opp-hz = /bits/ 64 <1000000002>;
  283. opp-microvolt = <975000 970000 985000>, /* Supply 0 */
  284. <965000 960000 975000>, /* Supply 1 */
  285. <965000 960000 975000>; /* Supply 2 */
  286. opp-microamp = <70000>, /* Supply 0 */
  287. <0>, /* Supply 1 doesn't need this */
  288. <70000>; /* Supply 2 */
  289. clock-latency-ns = <300000>;
  290. };
  291. };
  292. - |
  293. /*
  294. * Example 5: opp-supported-hw
  295. * (example: three level hierarchy of versions: cuts, substrate and process)
  296. */
  297. cpus {
  298. #address-cells = <1>;
  299. #size-cells = <0>;
  300. cpu@0 {
  301. compatible = "arm,cortex-a7";
  302. device_type = "cpu";
  303. reg = <0>;
  304. cpu-supply = <&cpu_supply>;
  305. operating-points-v2 = <&cpu0_opp_table_slow>;
  306. };
  307. };
  308. cpu0_opp_table_slow: opp-table {
  309. compatible = "operating-points-v2";
  310. opp-shared;
  311. opp-600000000 {
  312. /*
  313. * Supports all substrate and process versions for 0xF
  314. * cuts, i.e. only first four cuts.
  315. */
  316. opp-supported-hw = <0xF 0xFFFFFFFF 0xFFFFFFFF>;
  317. opp-hz = /bits/ 64 <600000000>;
  318. };
  319. opp-800000000 {
  320. /*
  321. * Supports:
  322. * - cuts: only one, 6th cut (represented by 6th bit).
  323. * - substrate: supports 16 different substrate versions
  324. * - process: supports 9 different process versions
  325. */
  326. opp-supported-hw = <0x20 0xff0000ff 0x0000f4f0>;
  327. opp-hz = /bits/ 64 <800000000>;
  328. };
  329. opp-900000000 {
  330. /*
  331. * Supports:
  332. * - All cuts and substrate where process version is 0x2.
  333. * - All cuts and process where substrate version is 0x2.
  334. */
  335. opp-supported-hw = <0xFFFFFFFF 0xFFFFFFFF 0x02>,
  336. <0xFFFFFFFF 0x01 0xFFFFFFFF>;
  337. opp-hz = /bits/ 64 <900000000>;
  338. };
  339. };
  340. - |
  341. /*
  342. * Example 6: opp-microvolt-<name>, opp-microamp-<name>:
  343. * (example: device with two possible microvolt ranges: slow and fast)
  344. */
  345. cpus {
  346. #address-cells = <1>;
  347. #size-cells = <0>;
  348. cpu@0 {
  349. compatible = "arm,cortex-a7";
  350. device_type = "cpu";
  351. reg = <0>;
  352. operating-points-v2 = <&cpu0_opp_table6>;
  353. };
  354. };
  355. cpu0_opp_table6: opp-table-0 {
  356. compatible = "operating-points-v2";
  357. opp-shared;
  358. opp-1000000000 {
  359. opp-hz = /bits/ 64 <1000000000>;
  360. opp-microvolt-slow = <915000 900000 925000>;
  361. opp-microvolt-fast = <975000 970000 985000>;
  362. opp-microamp-slow = <70000>;
  363. opp-microamp-fast = <71000>;
  364. };
  365. opp-1200000000 {
  366. opp-hz = /bits/ 64 <1200000000>;
  367. opp-microvolt-slow = <915000 900000 925000>, /* Supply vcc0 */
  368. <925000 910000 935000>; /* Supply vcc1 */
  369. opp-microvolt-fast = <975000 970000 985000>, /* Supply vcc0 */
  370. <965000 960000 975000>; /* Supply vcc1 */
  371. opp-microamp = <70000>; /* Will be used for both slow/fast */
  372. };
  373. };
  374. - |
  375. /*
  376. * Example 7: Single cluster Quad-core ARM cortex A53, OPP points from firmware,
  377. * distinct clock controls but two sets of clock/voltage/current lines.
  378. */
  379. cpus {
  380. #address-cells = <2>;
  381. #size-cells = <0>;
  382. cpu@0 {
  383. compatible = "arm,cortex-a53";
  384. device_type = "cpu";
  385. reg = <0x0 0x100>;
  386. next-level-cache = <&A53_L2>;
  387. clocks = <&dvfs_controller 0>;
  388. operating-points-v2 = <&cpu_opp0_table>;
  389. };
  390. cpu@1 {
  391. compatible = "arm,cortex-a53";
  392. device_type = "cpu";
  393. reg = <0x0 0x101>;
  394. next-level-cache = <&A53_L2>;
  395. clocks = <&dvfs_controller 1>;
  396. operating-points-v2 = <&cpu_opp0_table>;
  397. };
  398. cpu@2 {
  399. compatible = "arm,cortex-a53";
  400. device_type = "cpu";
  401. reg = <0x0 0x102>;
  402. next-level-cache = <&A53_L2>;
  403. clocks = <&dvfs_controller 2>;
  404. operating-points-v2 = <&cpu_opp1_table>;
  405. };
  406. cpu@3 {
  407. compatible = "arm,cortex-a53";
  408. device_type = "cpu";
  409. reg = <0x0 0x103>;
  410. next-level-cache = <&A53_L2>;
  411. clocks = <&dvfs_controller 3>;
  412. operating-points-v2 = <&cpu_opp1_table>;
  413. };
  414. };
  415. cpu_opp0_table: opp-table-0 {
  416. compatible = "operating-points-v2";
  417. opp-shared;
  418. };
  419. cpu_opp1_table: opp-table-1 {
  420. compatible = "operating-points-v2";
  421. opp-shared;
  422. };
  423. ...