blob: d1613d950d68ce5d0b5ae8cc11dd86446d14d415 [file] [log] [blame]
Matt Wagantallf5cc3892012-06-07 19:47:02 -07001/*
2 * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/platform_device.h>
17#include <mach/rpm-regulator.h>
18#include <mach/msm_bus_board.h>
19#include <mach/msm_bus.h>
20
Patrick Daly02db5a82012-08-24 14:22:06 -070021#include "mach/socinfo.h"
Matt Wagantallf5cc3892012-06-07 19:47:02 -070022#include "acpuclock.h"
23#include "acpuclock-krait.h"
24
Matt Wagantall1f3762d2012-06-08 19:08:48 -070025static struct hfpll_data hfpll_data __initdata = {
Matt Wagantallf5cc3892012-06-07 19:47:02 -070026 .mode_offset = 0x00,
27 .l_offset = 0x08,
28 .m_offset = 0x0C,
29 .n_offset = 0x10,
30 .config_offset = 0x04,
31 .config_val = 0x7845C665,
32 .has_droop_ctl = true,
33 .droop_offset = 0x14,
34 .droop_val = 0x0108C000,
Matt Wagantall87465f52012-07-23 22:03:06 -070035 .low_vdd_l_max = 22,
36 .nom_vdd_l_max = 42,
37 .vdd[HFPLL_VDD_NONE] = 0,
38 .vdd[HFPLL_VDD_LOW] = 945000,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070039 .vdd[HFPLL_VDD_NOM] = 1050000,
Matt Wagantall87465f52012-07-23 22:03:06 -070040 .vdd[HFPLL_VDD_HIGH] = 1150000,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070041};
42
Matt Wagantall1f3762d2012-06-08 19:08:48 -070043static struct scalable scalable[] __initdata = {
Matt Wagantallf5cc3892012-06-07 19:47:02 -070044 [CPU0] = {
45 .hfpll_phys_base = 0x00903200,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070046 .aux_clk_sel_phys = 0x02088014,
47 .aux_clk_sel = 3,
Matt Wagantalla133dbf2012-09-27 19:56:57 -070048 .sec_clk_sel = 2,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070049 .l2cpmr_iaddr = 0x4501,
Matt Wagantall6d9c4162012-07-16 18:58:16 -070050 .vreg[VREG_CORE] = { "krait0", 1300000 },
Matt Wagantallf5cc3892012-06-07 19:47:02 -070051 .vreg[VREG_MEM] = { "krait0_mem", 1150000 },
52 .vreg[VREG_DIG] = { "krait0_dig", 1150000 },
53 .vreg[VREG_HFPLL_A] = { "krait0_hfpll", 1800000 },
54 },
55 [CPU1] = {
56 .hfpll_phys_base = 0x00903240,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070057 .aux_clk_sel_phys = 0x02098014,
58 .aux_clk_sel = 3,
Matt Wagantalla133dbf2012-09-27 19:56:57 -070059 .sec_clk_sel = 2,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070060 .l2cpmr_iaddr = 0x5501,
Matt Wagantall6d9c4162012-07-16 18:58:16 -070061 .vreg[VREG_CORE] = { "krait1", 1300000 },
Matt Wagantallf5cc3892012-06-07 19:47:02 -070062 .vreg[VREG_MEM] = { "krait1_mem", 1150000 },
63 .vreg[VREG_DIG] = { "krait1_dig", 1150000 },
64 .vreg[VREG_HFPLL_A] = { "krait1_hfpll", 1800000 },
65 },
66 [CPU2] = {
67 .hfpll_phys_base = 0x00903280,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070068 .aux_clk_sel_phys = 0x020A8014,
69 .aux_clk_sel = 3,
Matt Wagantalla133dbf2012-09-27 19:56:57 -070070 .sec_clk_sel = 2,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070071 .l2cpmr_iaddr = 0x6501,
Matt Wagantall6d9c4162012-07-16 18:58:16 -070072 .vreg[VREG_CORE] = { "krait2", 1300000 },
Matt Wagantallf5cc3892012-06-07 19:47:02 -070073 .vreg[VREG_MEM] = { "krait2_mem", 1150000 },
74 .vreg[VREG_DIG] = { "krait2_dig", 1150000 },
75 .vreg[VREG_HFPLL_A] = { "krait2_hfpll", 1800000 },
76 },
77 [CPU3] = {
78 .hfpll_phys_base = 0x009032C0,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070079 .aux_clk_sel_phys = 0x020B8014,
80 .aux_clk_sel = 3,
Matt Wagantalla133dbf2012-09-27 19:56:57 -070081 .sec_clk_sel = 2,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070082 .l2cpmr_iaddr = 0x7501,
Matt Wagantall6d9c4162012-07-16 18:58:16 -070083 .vreg[VREG_CORE] = { "krait3", 1300000 },
Matt Wagantallf5cc3892012-06-07 19:47:02 -070084 .vreg[VREG_MEM] = { "krait3_mem", 1150000 },
85 .vreg[VREG_DIG] = { "krait3_dig", 1150000 },
86 .vreg[VREG_HFPLL_A] = { "krait3_hfpll", 1800000 },
87 },
88 [L2] = {
89 .hfpll_phys_base = 0x00903300,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070090 .aux_clk_sel_phys = 0x02011028,
91 .aux_clk_sel = 3,
Matt Wagantalla133dbf2012-09-27 19:56:57 -070092 .sec_clk_sel = 2,
Matt Wagantallf5cc3892012-06-07 19:47:02 -070093 .l2cpmr_iaddr = 0x0500,
94 .vreg[VREG_HFPLL_A] = { "l2_hfpll", 1800000 },
95 },
96};
97
Patrick Daly02db5a82012-08-24 14:22:06 -070098/*
99 * The correct maximum rate for 8064ab in 600 MHZ.
100 * We rely on the RPM rounding requests up here.
101*/
Matt Wagantall1f3762d2012-06-08 19:08:48 -0700102static struct msm_bus_paths bw_level_tbl[] __initdata = {
Matt Wagantallf5cc3892012-06-07 19:47:02 -0700103 [0] = BW_MBPS(640), /* At least 80 MHz on bus. */
104 [1] = BW_MBPS(1064), /* At least 133 MHz on bus. */
105 [2] = BW_MBPS(1600), /* At least 200 MHz on bus. */
106 [3] = BW_MBPS(2128), /* At least 266 MHz on bus. */
107 [4] = BW_MBPS(3200), /* At least 400 MHz on bus. */
108 [5] = BW_MBPS(4264), /* At least 533 MHz on bus. */
109};
110
Matt Wagantall1f3762d2012-06-08 19:08:48 -0700111static struct msm_bus_scale_pdata bus_scale_data __initdata = {
Matt Wagantallf5cc3892012-06-07 19:47:02 -0700112 .usecase = bw_level_tbl,
113 .num_usecases = ARRAY_SIZE(bw_level_tbl),
114 .active_only = 1,
115 .name = "acpuclk-8064",
116};
117
Patrick Daly02db5a82012-08-24 14:22:06 -0700118static struct l2_level l2_freq_tbl[] __initdata = {
Matt Wagantalla133dbf2012-09-27 19:56:57 -0700119 [0] = { { 384000, PLL_8, 0, 0x00 }, 950000, 1050000, 1 },
120 [1] = { { 432000, HFPLL, 2, 0x20 }, 1050000, 1050000, 2 },
121 [2] = { { 486000, HFPLL, 2, 0x24 }, 1050000, 1050000, 2 },
122 [3] = { { 540000, HFPLL, 2, 0x28 }, 1050000, 1050000, 2 },
123 [4] = { { 594000, HFPLL, 1, 0x16 }, 1050000, 1050000, 2 },
124 [5] = { { 648000, HFPLL, 1, 0x18 }, 1050000, 1050000, 4 },
125 [6] = { { 702000, HFPLL, 1, 0x1A }, 1050000, 1050000, 4 },
126 [7] = { { 756000, HFPLL, 1, 0x1C }, 1150000, 1150000, 4 },
127 [8] = { { 810000, HFPLL, 1, 0x1E }, 1150000, 1150000, 4 },
128 [9] = { { 864000, HFPLL, 1, 0x20 }, 1150000, 1150000, 4 },
129 [10] = { { 918000, HFPLL, 1, 0x22 }, 1150000, 1150000, 5 },
130 [11] = { { 972000, HFPLL, 1, 0x24 }, 1150000, 1150000, 5 },
131 [12] = { { 1026000, HFPLL, 1, 0x26 }, 1150000, 1150000, 5 },
132 [13] = { { 1080000, HFPLL, 1, 0x28 }, 1150000, 1150000, 5 },
133 [14] = { { 1134000, HFPLL, 1, 0x2A }, 1150000, 1150000, 5 },
134 [15] = { { 1188000, HFPLL, 1, 0x2C }, 1150000, 1150000, 5 },
Patrick Daly02db5a82012-08-24 14:22:06 -0700135 /* L2 Level 16 is for 8064ab only */
136 [16] = { { 1242000, HFPLL, 1, 0x2E }, 1150000, 1150000, 5 },
Stephen Boyd2b73ee02012-09-11 21:08:13 -0700137 { }
Matt Wagantallf5cc3892012-06-07 19:47:02 -0700138};
139
Patrick Daly02db5a82012-08-24 14:22:06 -0700140static struct acpu_level tbl_slow[] __initdata = {
Matt Wagantalla133dbf2012-09-27 19:56:57 -0700141 { 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 950000 },
142 { 0, { 432000, HFPLL, 2, 0x20 }, L2(6), 975000 },
143 { 1, { 486000, HFPLL, 2, 0x24 }, L2(6), 975000 },
144 { 0, { 540000, HFPLL, 2, 0x28 }, L2(6), 1000000 },
145 { 1, { 594000, HFPLL, 1, 0x16 }, L2(6), 1000000 },
146 { 0, { 648000, HFPLL, 1, 0x18 }, L2(6), 1025000 },
147 { 1, { 702000, HFPLL, 1, 0x1A }, L2(6), 1025000 },
148 { 0, { 756000, HFPLL, 1, 0x1C }, L2(6), 1075000 },
149 { 1, { 810000, HFPLL, 1, 0x1E }, L2(6), 1075000 },
150 { 0, { 864000, HFPLL, 1, 0x20 }, L2(6), 1100000 },
151 { 1, { 918000, HFPLL, 1, 0x22 }, L2(6), 1100000 },
152 { 0, { 972000, HFPLL, 1, 0x24 }, L2(6), 1125000 },
153 { 1, { 1026000, HFPLL, 1, 0x26 }, L2(6), 1125000 },
154 { 0, { 1080000, HFPLL, 1, 0x28 }, L2(15), 1175000 },
155 { 1, { 1134000, HFPLL, 1, 0x2A }, L2(15), 1175000 },
156 { 0, { 1188000, HFPLL, 1, 0x2C }, L2(15), 1200000 },
157 { 1, { 1242000, HFPLL, 1, 0x2E }, L2(15), 1200000 },
158 { 0, { 1296000, HFPLL, 1, 0x30 }, L2(15), 1225000 },
159 { 1, { 1350000, HFPLL, 1, 0x32 }, L2(15), 1225000 },
160 { 0, { 1404000, HFPLL, 1, 0x34 }, L2(15), 1237500 },
161 { 1, { 1458000, HFPLL, 1, 0x36 }, L2(15), 1237500 },
162 { 1, { 1512000, HFPLL, 1, 0x38 }, L2(15), 1250000 },
Matt Wagantallf5cc3892012-06-07 19:47:02 -0700163 { 0, { 0 } }
164};
165
Patrick Daly02db5a82012-08-24 14:22:06 -0700166static struct acpu_level tbl_nom[] __initdata = {
Matt Wagantalla133dbf2012-09-27 19:56:57 -0700167 { 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 900000 },
168 { 0, { 432000, HFPLL, 2, 0x20 }, L2(6), 925000 },
169 { 1, { 486000, HFPLL, 2, 0x24 }, L2(6), 925000 },
170 { 0, { 540000, HFPLL, 2, 0x28 }, L2(6), 950000 },
171 { 1, { 594000, HFPLL, 1, 0x16 }, L2(6), 950000 },
172 { 0, { 648000, HFPLL, 1, 0x18 }, L2(6), 975000 },
173 { 1, { 702000, HFPLL, 1, 0x1A }, L2(6), 975000 },
174 { 0, { 756000, HFPLL, 1, 0x1C }, L2(6), 1025000 },
175 { 1, { 810000, HFPLL, 1, 0x1E }, L2(6), 1025000 },
176 { 0, { 864000, HFPLL, 1, 0x20 }, L2(6), 1050000 },
177 { 1, { 918000, HFPLL, 1, 0x22 }, L2(6), 1050000 },
178 { 0, { 972000, HFPLL, 1, 0x24 }, L2(6), 1075000 },
179 { 1, { 1026000, HFPLL, 1, 0x26 }, L2(6), 1075000 },
180 { 0, { 1080000, HFPLL, 1, 0x28 }, L2(15), 1125000 },
181 { 1, { 1134000, HFPLL, 1, 0x2A }, L2(15), 1125000 },
182 { 0, { 1188000, HFPLL, 1, 0x2C }, L2(15), 1150000 },
183 { 1, { 1242000, HFPLL, 1, 0x2E }, L2(15), 1150000 },
184 { 0, { 1296000, HFPLL, 1, 0x30 }, L2(15), 1175000 },
185 { 1, { 1350000, HFPLL, 1, 0x32 }, L2(15), 1175000 },
186 { 0, { 1404000, HFPLL, 1, 0x34 }, L2(15), 1187500 },
187 { 1, { 1458000, HFPLL, 1, 0x36 }, L2(15), 1187500 },
188 { 1, { 1512000, HFPLL, 1, 0x38 }, L2(15), 1200000 },
Matt Wagantallf5cc3892012-06-07 19:47:02 -0700189 { 0, { 0 } }
190};
191
Patrick Daly02db5a82012-08-24 14:22:06 -0700192static struct acpu_level tbl_fast[] __initdata = {
Matt Wagantalla133dbf2012-09-27 19:56:57 -0700193 { 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 850000 },
194 { 0, { 432000, HFPLL, 2, 0x20 }, L2(6), 875000 },
195 { 1, { 486000, HFPLL, 2, 0x24 }, L2(6), 875000 },
196 { 0, { 540000, HFPLL, 2, 0x28 }, L2(6), 900000 },
197 { 1, { 594000, HFPLL, 1, 0x16 }, L2(6), 900000 },
198 { 0, { 648000, HFPLL, 1, 0x18 }, L2(6), 925000 },
199 { 1, { 702000, HFPLL, 1, 0x1A }, L2(6), 925000 },
200 { 0, { 756000, HFPLL, 1, 0x1C }, L2(6), 975000 },
201 { 1, { 810000, HFPLL, 1, 0x1E }, L2(6), 975000 },
202 { 0, { 864000, HFPLL, 1, 0x20 }, L2(6), 1000000 },
203 { 1, { 918000, HFPLL, 1, 0x22 }, L2(6), 1000000 },
204 { 0, { 972000, HFPLL, 1, 0x24 }, L2(6), 1025000 },
205 { 1, { 1026000, HFPLL, 1, 0x26 }, L2(6), 1025000 },
206 { 0, { 1080000, HFPLL, 1, 0x28 }, L2(15), 1075000 },
207 { 1, { 1134000, HFPLL, 1, 0x2A }, L2(15), 1075000 },
208 { 0, { 1188000, HFPLL, 1, 0x2C }, L2(15), 1100000 },
209 { 1, { 1242000, HFPLL, 1, 0x2E }, L2(15), 1100000 },
210 { 0, { 1296000, HFPLL, 1, 0x30 }, L2(15), 1125000 },
211 { 1, { 1350000, HFPLL, 1, 0x32 }, L2(15), 1125000 },
212 { 0, { 1404000, HFPLL, 1, 0x34 }, L2(15), 1137500 },
213 { 1, { 1458000, HFPLL, 1, 0x36 }, L2(15), 1137500 },
214 { 1, { 1512000, HFPLL, 1, 0x38 }, L2(15), 1150000 },
Matt Wagantallf5cc3892012-06-07 19:47:02 -0700215 { 0, { 0 } }
216};
217
Patrick Daly02db5a82012-08-24 14:22:06 -0700218static struct acpu_level tbl_slow_1p7[] __initdata = {
219 { 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 950000 },
220 { 0, { 432000, HFPLL, 2, 0x20 }, L2(6), 975000 },
221 { 1, { 486000, HFPLL, 2, 0x24 }, L2(6), 975000 },
222 { 0, { 540000, HFPLL, 2, 0x28 }, L2(6), 1000000 },
223 { 1, { 594000, HFPLL, 1, 0x16 }, L2(6), 1000000 },
224 { 0, { 648000, HFPLL, 1, 0x18 }, L2(6), 1025000 },
225 { 1, { 702000, HFPLL, 1, 0x1A }, L2(6), 1025000 },
226 { 0, { 756000, HFPLL, 1, 0x1C }, L2(6), 1075000 },
227 { 1, { 810000, HFPLL, 1, 0x1E }, L2(6), 1075000 },
228 { 0, { 864000, HFPLL, 1, 0x20 }, L2(6), 1100000 },
229 { 1, { 918000, HFPLL, 1, 0x22 }, L2(6), 1100000 },
230 { 0, { 972000, HFPLL, 1, 0x24 }, L2(6), 1125000 },
231 { 1, { 1026000, HFPLL, 1, 0x26 }, L2(6), 1125000 },
232 { 0, { 1080000, HFPLL, 1, 0x28 }, L2(15), 1175000 },
233 { 1, { 1134000, HFPLL, 1, 0x2A }, L2(15), 1175000 },
234 { 0, { 1188000, HFPLL, 1, 0x2C }, L2(15), 1200000 },
235 { 1, { 1242000, HFPLL, 1, 0x2E }, L2(15), 1200000 },
236 { 0, { 1296000, HFPLL, 1, 0x30 }, L2(15), 1225000 },
237 { 1, { 1350000, HFPLL, 1, 0x32 }, L2(15), 1225000 },
238 { 0, { 1404000, HFPLL, 1, 0x34 }, L2(15), 1237500 },
239 { 1, { 1458000, HFPLL, 1, 0x36 }, L2(15), 1237500 },
240 { 1, { 1512000, HFPLL, 1, 0x38 }, L2(15), 1250000 },
241 { 1, { 1566000, HFPLL, 1, 0x3A }, L2(15), 1250000 },
242 { 1, { 1620000, HFPLL, 1, 0x3C }, L2(15), 1250000 },
243 { 1, { 1674000, HFPLL, 1, 0x3E }, L2(15), 1250000 },
244 { 0, { 0 } }
245};
246
247static struct acpu_level tbl_slow_2p0[] __initdata = {
248 { 1, { 384000, PLL_8, 0, 0x00 }, L2(0), 950000 },
249 { 0, { 432000, HFPLL, 2, 0x20 }, L2(6), 975000 },
250 { 1, { 486000, HFPLL, 2, 0x24 }, L2(6), 975000 },
251 { 0, { 540000, HFPLL, 2, 0x28 }, L2(6), 1000000 },
252 { 1, { 594000, HFPLL, 1, 0x16 }, L2(6), 1000000 },
253 { 0, { 648000, HFPLL, 1, 0x18 }, L2(6), 1025000 },
254 { 1, { 702000, HFPLL, 1, 0x1A }, L2(6), 1025000 },
255 { 0, { 756000, HFPLL, 1, 0x1C }, L2(6), 1075000 },
256 { 1, { 810000, HFPLL, 1, 0x1E }, L2(6), 1075000 },
257 { 0, { 864000, HFPLL, 1, 0x20 }, L2(6), 1100000 },
258 { 1, { 918000, HFPLL, 1, 0x22 }, L2(6), 1100000 },
259 { 0, { 972000, HFPLL, 1, 0x24 }, L2(6), 1125000 },
260 { 1, { 1026000, HFPLL, 1, 0x26 }, L2(6), 1125000 },
261 { 0, { 1080000, HFPLL, 1, 0x28 }, L2(15), 1175000 },
262 { 1, { 1134000, HFPLL, 1, 0x2A }, L2(15), 1175000 },
263 { 0, { 1188000, HFPLL, 1, 0x2C }, L2(15), 1200000 },
264 { 1, { 1242000, HFPLL, 1, 0x2E }, L2(15), 1200000 },
265 { 0, { 1296000, HFPLL, 1, 0x30 }, L2(15), 1225000 },
266 { 1, { 1350000, HFPLL, 1, 0x32 }, L2(15), 1225000 },
267 { 0, { 1404000, HFPLL, 1, 0x34 }, L2(15), 1237500 },
268 { 1, { 1458000, HFPLL, 1, 0x36 }, L2(15), 1237500 },
269 { 1, { 1512000, HFPLL, 1, 0x38 }, L2(15), 1250000 },
270 { 1, { 1566000, HFPLL, 1, 0x3A }, L2(15), 1250000 },
271 { 1, { 1620000, HFPLL, 1, 0x3C }, L2(15), 1250000 },
272 { 1, { 1674000, HFPLL, 1, 0x3E }, L2(15), 1250000 },
273 { 1, { 1728000, HFPLL, 1, 0x40 }, L2(15), 1250000 },
274 { 1, { 1782000, HFPLL, 1, 0x42 }, L2(15), 1250000 },
275 { 1, { 1836000, HFPLL, 1, 0x44 }, L2(15), 1250000 },
276 { 1, { 1890000, HFPLL, 1, 0x46 }, L2(15), 1250000 },
277 { 1, { 1944000, HFPLL, 1, 0x48 }, L2(15), 1250000 },
278 { 1, { 1998000, HFPLL, 1, 0x4A }, L2(15), 1250000 },
279 { 0, { 0 } }
280};
281
282static struct pvs_table pvs_tables[NUM_SPEED_BINS][NUM_PVS] __initdata = {
283 [0][PVS_SLOW] = {tbl_slow, sizeof(tbl_slow), 0 },
284 [0][PVS_NOMINAL] = {tbl_nom, sizeof(tbl_nom), 25000 },
285 [0][PVS_FAST] = {tbl_fast, sizeof(tbl_fast), 25000 },
286 [0][PVS_FASTER] = {tbl_fast, sizeof(tbl_fast), 25000 },
287
288 [1][0] = { tbl_slow_1p7, sizeof(tbl_slow_1p7), 0 },
289 [1][1] = { tbl_slow_1p7, sizeof(tbl_slow_1p7), 0 },
290 [1][2] = { tbl_slow_1p7, sizeof(tbl_slow_1p7), 0 },
291 [1][3] = { tbl_slow_1p7, sizeof(tbl_slow_1p7), 0 },
292 [1][4] = { tbl_slow_1p7, sizeof(tbl_slow_1p7), 0 },
293 [1][5] = { tbl_slow_1p7, sizeof(tbl_slow_1p7), 0 },
294 [1][6] = { tbl_slow_1p7, sizeof(tbl_slow_1p7), 0 },
295
296 [2][0] = { tbl_slow_2p0, sizeof(tbl_slow_2p0), 0 },
297 [2][1] = { tbl_slow_2p0, sizeof(tbl_slow_2p0), 0 },
298 [2][2] = { tbl_slow_2p0, sizeof(tbl_slow_2p0), 0 },
299 [2][3] = { tbl_slow_2p0, sizeof(tbl_slow_2p0), 0 },
300 [2][4] = { tbl_slow_2p0, sizeof(tbl_slow_2p0), 0 },
301 [2][5] = { tbl_slow_2p0, sizeof(tbl_slow_2p0), 0 },
302 [2][6] = { tbl_slow_2p0, sizeof(tbl_slow_2p0), 0 },
Matt Wagantall1f3762d2012-06-08 19:08:48 -0700303};
304
305static struct acpuclk_krait_params acpuclk_8064_params __initdata = {
306 .scalable = scalable,
307 .scalable_size = sizeof(scalable),
308 .hfpll_data = &hfpll_data,
309 .pvs_tables = pvs_tables,
Matt Wagantallf5cc3892012-06-07 19:47:02 -0700310 .l2_freq_tbl = l2_freq_tbl,
Matt Wagantall1f3762d2012-06-08 19:08:48 -0700311 .l2_freq_tbl_size = sizeof(l2_freq_tbl),
312 .bus_scale = &bus_scale_data,
Matt Wagantall519e94f2012-09-17 17:51:06 -0700313 .pte_efuse_phys = 0x007000C0,
Matt Wagantallb7c231b2012-07-24 18:40:17 -0700314 .stby_khz = 384000,
Matt Wagantallf5cc3892012-06-07 19:47:02 -0700315};
316
317static int __init acpuclk_8064_probe(struct platform_device *pdev)
318{
Patrick Daly02db5a82012-08-24 14:22:06 -0700319 if (cpu_is_apq8064ab() ||
320 SOCINFO_VERSION_MAJOR(socinfo_get_version()) == 2) {
321 acpuclk_8064_params.hfpll_data->low_vdd_l_max = 37;
322 acpuclk_8064_params.hfpll_data->nom_vdd_l_max = 74;
323 }
324
Matt Wagantallf5cc3892012-06-07 19:47:02 -0700325 return acpuclk_krait_init(&pdev->dev, &acpuclk_8064_params);
326}
327
328static struct platform_driver acpuclk_8064_driver = {
329 .driver = {
330 .name = "acpuclk-8064",
331 .owner = THIS_MODULE,
332 },
333};
334
335static int __init acpuclk_8064_init(void)
336{
337 return platform_driver_probe(&acpuclk_8064_driver,
338 acpuclk_8064_probe);
339}
340device_initcall(acpuclk_8064_init);