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