aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorBengt Jonsson <bengt.g.jonsson@stericsson.com>2011-03-09 07:34:17 -0500
committerLinus Walleij <linus.walleij@linaro.org>2011-03-28 02:47:19 -0400
commitdfa3a824de631e6833ffa9a7befc08186b027799 (patch)
tree25818be1b1cc65c2017b2ff1d6a7fe1c7a04a401 /arch/arm/mach-ux500
parent3ef374a22bdf91fb3b4213200aadd054f81c3499 (diff)
mach-ux500: provide ab8500 init vector
This adds an ab8500 regulator initialization vector for the HREF/MOP500 series of boards. This also sets the display regulator to be on at boot so we don't loose our splash screen when the board comes up. Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c177
-rw-r--r--arch/arm/mach-ux500/board-mop500.c2
2 files changed, 179 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 875c91b2f8a4..d4f33ebaf637 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -62,6 +62,182 @@ static struct regulator_consumer_supply ab8500_vana_consumers[] = {
62 REGULATOR_SUPPLY("vsmps2", "mcde.0"), 62 REGULATOR_SUPPLY("vsmps2", "mcde.0"),
63}; 63};
64 64
65/* ab8500 regulator register initialization */
66struct ab8500_regulator_reg_init
67ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
68 /*
69 * VanaRequestCtrl = HP/LP depending on VxRequest
70 * VextSupply1RequestCtrl = HP/LP depending on VxRequest
71 */
72 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0x00),
73 /*
74 * VextSupply2RequestCtrl = HP/LP depending on VxRequest
75 * VextSupply3RequestCtrl = HP/LP depending on VxRequest
76 * Vaux1RequestCtrl = HP/LP depending on VxRequest
77 * Vaux2RequestCtrl = HP/LP depending on VxRequest
78 */
79 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0x00),
80 /*
81 * Vaux3RequestCtrl = HP/LP depending on VxRequest
82 * SwHPReq = Control through SWValid disabled
83 */
84 INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x00),
85 /*
86 * VanaSysClkReq1HPValid = disabled
87 * Vaux1SysClkReq1HPValid = disabled
88 * Vaux2SysClkReq1HPValid = disabled
89 * Vaux3SysClkReq1HPValid = disabled
90 */
91 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x00),
92 /*
93 * VextSupply1SysClkReq1HPValid = disabled
94 * VextSupply2SysClkReq1HPValid = disabled
95 * VextSupply3SysClkReq1HPValid = SysClkReq1 controlled
96 */
97 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x40),
98 /*
99 * VanaHwHPReq1Valid = disabled
100 * Vaux1HwHPreq1Valid = disabled
101 * Vaux2HwHPReq1Valid = disabled
102 * Vaux3HwHPReqValid = disabled
103 */
104 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0x00),
105 /*
106 * VextSupply1HwHPReq1Valid = disabled
107 * VextSupply2HwHPReq1Valid = disabled
108 * VextSupply3HwHPReq1Valid = disabled
109 */
110 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x00),
111 /*
112 * VanaHwHPReq2Valid = disabled
113 * Vaux1HwHPReq2Valid = disabled
114 * Vaux2HwHPReq2Valid = disabled
115 * Vaux3HwHPReq2Valid = disabled
116 */
117 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0x00),
118 /*
119 * VextSupply1HwHPReq2Valid = disabled
120 * VextSupply2HwHPReq2Valid = disabled
121 * VextSupply3HwHPReq2Valid = HWReq2 controlled
122 */
123 INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x04),
124 /*
125 * VanaSwHPReqValid = disabled
126 * Vaux1SwHPReqValid = disabled
127 */
128 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0x00),
129 /*
130 * Vaux2SwHPReqValid = disabled
131 * Vaux3SwHPReqValid = disabled
132 * VextSupply1SwHPReqValid = disabled
133 * VextSupply2SwHPReqValid = disabled
134 * VextSupply3SwHPReqValid = disabled
135 */
136 INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x00),
137 /*
138 * SysClkReq2Valid1 = SysClkReq2 controlled
139 * SysClkReq3Valid1 = disabled
140 * SysClkReq4Valid1 = SysClkReq4 controlled
141 * SysClkReq5Valid1 = disabled
142 * SysClkReq6Valid1 = SysClkReq6 controlled
143 * SysClkReq7Valid1 = disabled
144 * SysClkReq8Valid1 = disabled
145 */
146 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0x2a),
147 /*
148 * SysClkReq2Valid2 = disabled
149 * SysClkReq3Valid2 = disabled
150 * SysClkReq4Valid2 = disabled
151 * SysClkReq5Valid2 = disabled
152 * SysClkReq6Valid2 = SysClkReq6 controlled
153 * SysClkReq7Valid2 = disabled
154 * SysClkReq8Valid2 = disabled
155 */
156 INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0x20),
157 /*
158 * VTVoutEna = disabled
159 * Vintcore12Ena = disabled
160 * Vintcore12Sel = 1.25 V
161 * Vintcore12LP = inactive (HP)
162 * VTVoutLP = inactive (HP)
163 */
164 INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0x10),
165 /*
166 * VaudioEna = disabled
167 * VdmicEna = disabled
168 * Vamic1Ena = disabled
169 * Vamic2Ena = disabled
170 */
171 INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x00),
172 /*
173 * Vamic1_dzout = high-Z when Vamic1 is disabled
174 * Vamic2_dzout = high-Z when Vamic2 is disabled
175 */
176 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x00),
177 /*
178 * VPll = Hw controlled
179 * VanaRegu = force off
180 */
181 INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x02),
182 /*
183 * VrefDDREna = disabled
184 * VrefDDRSleepMode = inactive (no pulldown)
185 */
186 INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x00),
187 /*
188 * VextSupply1Regu = HW control
189 * VextSupply2Regu = HW control
190 * VextSupply3Regu = HW control
191 * ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0
192 * ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0
193 */
194 INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0x2a),
195 /*
196 * Vaux1Regu = force HP
197 * Vaux2Regu = force off
198 */
199 INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x01),
200 /*
201 * Vaux3regu = force off
202 */
203 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x00),
204 /*
205 * Vsmps1 = 1.15V
206 */
207 INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x24),
208 /*
209 * Vaux1Sel = 2.5 V
210 */
211 INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x08),
212 /*
213 * Vaux2Sel = 2.9 V
214 */
215 INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0d),
216 /*
217 * Vaux3Sel = 2.91 V
218 */
219 INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07),
220 /*
221 * VextSupply12LP = disabled (no LP)
222 */
223 INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x00),
224 /*
225 * Vaux1Disch = short discharge time
226 * Vaux2Disch = short discharge time
227 * Vaux3Disch = short discharge time
228 * Vintcore12Disch = short discharge time
229 * VTVoutDisch = short discharge time
230 * VaudioDisch = short discharge time
231 */
232 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0x00),
233 /*
234 * VanaDisch = short discharge time
235 * VdmicPullDownEna = pulldown disabled when Vdmic is disabled
236 * VdmicDisch = short discharge time
237 */
238 INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x00),
239};
240
65/* AB8500 regulators */ 241/* AB8500 regulators */
66struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { 242struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
67 /* supplies to the display/camera */ 243 /* supplies to the display/camera */
@@ -72,6 +248,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
72 .max_uV = 2900000, 248 .max_uV = 2900000,
73 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 249 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
74 REGULATOR_CHANGE_STATUS, 250 REGULATOR_CHANGE_STATUS,
251 .boot_on = 1, /* must be on for display */
75 }, 252 },
76 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers), 253 .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
77 .consumer_supplies = ab8500_vaux1_consumers, 254 .consumer_supplies = ab8500_vaux1_consumers,
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 6ac0164db6e8..a10abc7d8eee 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -67,6 +67,8 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
67 67
68static struct ab8500_platform_data ab8500_platdata = { 68static struct ab8500_platform_data ab8500_platdata = {
69 .irq_base = MOP500_AB8500_IRQ_BASE, 69 .irq_base = MOP500_AB8500_IRQ_BASE,
70 .regulator_reg_init = ab8500_regulator_reg_init,
71 .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init),
70 .regulator = ab8500_regulators, 72 .regulator = ab8500_regulators,
71 .num_regulator = ARRAY_SIZE(ab8500_regulators), 73 .num_regulator = ARRAY_SIZE(ab8500_regulators),
72 .gpio = &ab8500_gpio_pdata, 74 .gpio = &ab8500_gpio_pdata,