122-mfd-devicetree-bindings-Add-Qualcomm-RPM-DT-binding.patch 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. From aa0c4b815045420ea54d5ae5362f5a0190609d46 Mon Sep 17 00:00:00 2001
  2. From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
  3. Date: Wed, 26 Nov 2014 13:50:59 -0800
  4. Subject: [PATCH] mfd: devicetree: bindings: Add Qualcomm RPM DT binding
  5. Add binding for the Qualcomm Resource Power Manager (RPM) found in 8660,
  6. 8960 and 8064 based devices.
  7. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
  8. Signed-off-by: Lee Jones <lee.jones@linaro.org>
  9. ---
  10. Documentation/devicetree/bindings/mfd/qcom-rpm.txt | 70 ++++++++++
  11. include/dt-bindings/mfd/qcom-rpm.h | 154 +++++++++++++++++++++
  12. 2 files changed, 224 insertions(+)
  13. create mode 100644 Documentation/devicetree/bindings/mfd/qcom-rpm.txt
  14. create mode 100644 include/dt-bindings/mfd/qcom-rpm.h
  15. --- /dev/null
  16. +++ b/Documentation/devicetree/bindings/mfd/qcom-rpm.txt
  17. @@ -0,0 +1,70 @@
  18. +Qualcomm Resource Power Manager (RPM)
  19. +
  20. +This driver is used to interface with the Resource Power Manager (RPM) found in
  21. +various Qualcomm platforms. The RPM allows each component in the system to vote
  22. +for state of the system resources, such as clocks, regulators and bus
  23. +frequencies.
  24. +
  25. +- compatible:
  26. + Usage: required
  27. + Value type: <string>
  28. + Definition: must be one of:
  29. + "qcom,rpm-apq8064"
  30. + "qcom,rpm-msm8660"
  31. + "qcom,rpm-msm8960"
  32. +
  33. +- reg:
  34. + Usage: required
  35. + Value type: <prop-encoded-array>
  36. + Definition: base address and size of the RPM's message ram
  37. +
  38. +- interrupts:
  39. + Usage: required
  40. + Value type: <prop-encoded-array>
  41. + Definition: three entries specifying the RPM's:
  42. + 1. acknowledgement interrupt
  43. + 2. error interrupt
  44. + 3. wakeup interrupt
  45. +
  46. +- interrupt-names:
  47. + Usage: required
  48. + Value type: <string-array>
  49. + Definition: must be the three strings "ack", "err" and "wakeup", in order
  50. +
  51. +- #address-cells:
  52. + Usage: required
  53. + Value type: <u32>
  54. + Definition: must be 1
  55. +
  56. +- #size-cells:
  57. + Usage: required
  58. + Value type: <u32>
  59. + Definition: must be 0
  60. +
  61. +- qcom,ipc:
  62. + Usage: required
  63. + Value type: <prop-encoded-array>
  64. +
  65. + Definition: three entries specifying the outgoing ipc bit used for
  66. + signaling the RPM:
  67. + - phandle to a syscon node representing the apcs registers
  68. + - u32 representing offset to the register within the syscon
  69. + - u32 representing the ipc bit within the register
  70. +
  71. +
  72. += EXAMPLE
  73. +
  74. + #include <dt-bindings/mfd/qcom-rpm.h>
  75. +
  76. + rpm@108000 {
  77. + compatible = "qcom,rpm-msm8960";
  78. + reg = <0x108000 0x1000>;
  79. + qcom,ipc = <&apcs 0x8 2>;
  80. +
  81. + interrupts = <0 19 0>, <0 21 0>, <0 22 0>;
  82. + interrupt-names = "ack", "err", "wakeup";
  83. +
  84. + #address-cells = <1>;
  85. + #size-cells = <0>;
  86. + };
  87. +
  88. --- /dev/null
  89. +++ b/include/dt-bindings/mfd/qcom-rpm.h
  90. @@ -0,0 +1,154 @@
  91. +/*
  92. + * This header provides constants for the Qualcomm RPM bindings.
  93. + */
  94. +
  95. +#ifndef _DT_BINDINGS_MFD_QCOM_RPM_H
  96. +#define _DT_BINDINGS_MFD_QCOM_RPM_H
  97. +
  98. +/*
  99. + * Constants use to identify individual resources in the RPM.
  100. + */
  101. +#define QCOM_RPM_APPS_FABRIC_ARB 1
  102. +#define QCOM_RPM_APPS_FABRIC_CLK 2
  103. +#define QCOM_RPM_APPS_FABRIC_HALT 3
  104. +#define QCOM_RPM_APPS_FABRIC_IOCTL 4
  105. +#define QCOM_RPM_APPS_FABRIC_MODE 5
  106. +#define QCOM_RPM_APPS_L2_CACHE_CTL 6
  107. +#define QCOM_RPM_CFPB_CLK 7
  108. +#define QCOM_RPM_CXO_BUFFERS 8
  109. +#define QCOM_RPM_CXO_CLK 9
  110. +#define QCOM_RPM_DAYTONA_FABRIC_CLK 10
  111. +#define QCOM_RPM_DDR_DMM 11
  112. +#define QCOM_RPM_EBI1_CLK 12
  113. +#define QCOM_RPM_HDMI_SWITCH 13
  114. +#define QCOM_RPM_MMFPB_CLK 14
  115. +#define QCOM_RPM_MM_FABRIC_ARB 15
  116. +#define QCOM_RPM_MM_FABRIC_CLK 16
  117. +#define QCOM_RPM_MM_FABRIC_HALT 17
  118. +#define QCOM_RPM_MM_FABRIC_IOCTL 18
  119. +#define QCOM_RPM_MM_FABRIC_MODE 19
  120. +#define QCOM_RPM_PLL_4 20
  121. +#define QCOM_RPM_PM8058_LDO0 21
  122. +#define QCOM_RPM_PM8058_LDO1 22
  123. +#define QCOM_RPM_PM8058_LDO2 23
  124. +#define QCOM_RPM_PM8058_LDO3 24
  125. +#define QCOM_RPM_PM8058_LDO4 25
  126. +#define QCOM_RPM_PM8058_LDO5 26
  127. +#define QCOM_RPM_PM8058_LDO6 27
  128. +#define QCOM_RPM_PM8058_LDO7 28
  129. +#define QCOM_RPM_PM8058_LDO8 29
  130. +#define QCOM_RPM_PM8058_LDO9 30
  131. +#define QCOM_RPM_PM8058_LDO10 31
  132. +#define QCOM_RPM_PM8058_LDO11 32
  133. +#define QCOM_RPM_PM8058_LDO12 33
  134. +#define QCOM_RPM_PM8058_LDO13 34
  135. +#define QCOM_RPM_PM8058_LDO14 35
  136. +#define QCOM_RPM_PM8058_LDO15 36
  137. +#define QCOM_RPM_PM8058_LDO16 37
  138. +#define QCOM_RPM_PM8058_LDO17 38
  139. +#define QCOM_RPM_PM8058_LDO18 39
  140. +#define QCOM_RPM_PM8058_LDO19 40
  141. +#define QCOM_RPM_PM8058_LDO20 41
  142. +#define QCOM_RPM_PM8058_LDO21 42
  143. +#define QCOM_RPM_PM8058_LDO22 43
  144. +#define QCOM_RPM_PM8058_LDO23 44
  145. +#define QCOM_RPM_PM8058_LDO24 45
  146. +#define QCOM_RPM_PM8058_LDO25 46
  147. +#define QCOM_RPM_PM8058_LVS0 47
  148. +#define QCOM_RPM_PM8058_LVS1 48
  149. +#define QCOM_RPM_PM8058_NCP 49
  150. +#define QCOM_RPM_PM8058_SMPS0 50
  151. +#define QCOM_RPM_PM8058_SMPS1 51
  152. +#define QCOM_RPM_PM8058_SMPS2 52
  153. +#define QCOM_RPM_PM8058_SMPS3 53
  154. +#define QCOM_RPM_PM8058_SMPS4 54
  155. +#define QCOM_RPM_PM8821_LDO1 55
  156. +#define QCOM_RPM_PM8821_SMPS1 56
  157. +#define QCOM_RPM_PM8821_SMPS2 57
  158. +#define QCOM_RPM_PM8901_LDO0 58
  159. +#define QCOM_RPM_PM8901_LDO1 59
  160. +#define QCOM_RPM_PM8901_LDO2 60
  161. +#define QCOM_RPM_PM8901_LDO3 61
  162. +#define QCOM_RPM_PM8901_LDO4 62
  163. +#define QCOM_RPM_PM8901_LDO5 63
  164. +#define QCOM_RPM_PM8901_LDO6 64
  165. +#define QCOM_RPM_PM8901_LVS0 65
  166. +#define QCOM_RPM_PM8901_LVS1 66
  167. +#define QCOM_RPM_PM8901_LVS2 67
  168. +#define QCOM_RPM_PM8901_LVS3 68
  169. +#define QCOM_RPM_PM8901_MVS 69
  170. +#define QCOM_RPM_PM8901_SMPS0 70
  171. +#define QCOM_RPM_PM8901_SMPS1 71
  172. +#define QCOM_RPM_PM8901_SMPS2 72
  173. +#define QCOM_RPM_PM8901_SMPS3 73
  174. +#define QCOM_RPM_PM8901_SMPS4 74
  175. +#define QCOM_RPM_PM8921_CLK1 75
  176. +#define QCOM_RPM_PM8921_CLK2 76
  177. +#define QCOM_RPM_PM8921_LDO1 77
  178. +#define QCOM_RPM_PM8921_LDO2 78
  179. +#define QCOM_RPM_PM8921_LDO3 79
  180. +#define QCOM_RPM_PM8921_LDO4 80
  181. +#define QCOM_RPM_PM8921_LDO5 81
  182. +#define QCOM_RPM_PM8921_LDO6 82
  183. +#define QCOM_RPM_PM8921_LDO7 83
  184. +#define QCOM_RPM_PM8921_LDO8 84
  185. +#define QCOM_RPM_PM8921_LDO9 85
  186. +#define QCOM_RPM_PM8921_LDO10 86
  187. +#define QCOM_RPM_PM8921_LDO11 87
  188. +#define QCOM_RPM_PM8921_LDO12 88
  189. +#define QCOM_RPM_PM8921_LDO13 89
  190. +#define QCOM_RPM_PM8921_LDO14 90
  191. +#define QCOM_RPM_PM8921_LDO15 91
  192. +#define QCOM_RPM_PM8921_LDO16 92
  193. +#define QCOM_RPM_PM8921_LDO17 93
  194. +#define QCOM_RPM_PM8921_LDO18 94
  195. +#define QCOM_RPM_PM8921_LDO19 95
  196. +#define QCOM_RPM_PM8921_LDO20 96
  197. +#define QCOM_RPM_PM8921_LDO21 97
  198. +#define QCOM_RPM_PM8921_LDO22 98
  199. +#define QCOM_RPM_PM8921_LDO23 99
  200. +#define QCOM_RPM_PM8921_LDO24 100
  201. +#define QCOM_RPM_PM8921_LDO25 101
  202. +#define QCOM_RPM_PM8921_LDO26 102
  203. +#define QCOM_RPM_PM8921_LDO27 103
  204. +#define QCOM_RPM_PM8921_LDO28 104
  205. +#define QCOM_RPM_PM8921_LDO29 105
  206. +#define QCOM_RPM_PM8921_LVS1 106
  207. +#define QCOM_RPM_PM8921_LVS2 107
  208. +#define QCOM_RPM_PM8921_LVS3 108
  209. +#define QCOM_RPM_PM8921_LVS4 109
  210. +#define QCOM_RPM_PM8921_LVS5 110
  211. +#define QCOM_RPM_PM8921_LVS6 111
  212. +#define QCOM_RPM_PM8921_LVS7 112
  213. +#define QCOM_RPM_PM8921_MVS 113
  214. +#define QCOM_RPM_PM8921_NCP 114
  215. +#define QCOM_RPM_PM8921_SMPS1 115
  216. +#define QCOM_RPM_PM8921_SMPS2 116
  217. +#define QCOM_RPM_PM8921_SMPS3 117
  218. +#define QCOM_RPM_PM8921_SMPS4 118
  219. +#define QCOM_RPM_PM8921_SMPS5 119
  220. +#define QCOM_RPM_PM8921_SMPS6 120
  221. +#define QCOM_RPM_PM8921_SMPS7 121
  222. +#define QCOM_RPM_PM8921_SMPS8 122
  223. +#define QCOM_RPM_PXO_CLK 123
  224. +#define QCOM_RPM_QDSS_CLK 124
  225. +#define QCOM_RPM_SFPB_CLK 125
  226. +#define QCOM_RPM_SMI_CLK 126
  227. +#define QCOM_RPM_SYS_FABRIC_ARB 127
  228. +#define QCOM_RPM_SYS_FABRIC_CLK 128
  229. +#define QCOM_RPM_SYS_FABRIC_HALT 129
  230. +#define QCOM_RPM_SYS_FABRIC_IOCTL 130
  231. +#define QCOM_RPM_SYS_FABRIC_MODE 131
  232. +#define QCOM_RPM_USB_OTG_SWITCH 132
  233. +#define QCOM_RPM_VDDMIN_GPIO 133
  234. +
  235. +/*
  236. + * Constants used to select force mode for regulators.
  237. + */
  238. +#define QCOM_RPM_FORCE_MODE_NONE 0
  239. +#define QCOM_RPM_FORCE_MODE_LPM 1
  240. +#define QCOM_RPM_FORCE_MODE_HPM 2
  241. +#define QCOM_RPM_FORCE_MODE_AUTO 3
  242. +#define QCOM_RPM_FORCE_MODE_BYPASS 4
  243. +
  244. +#endif