aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-4430sdp.c
diff options
context:
space:
mode:
authorBalaji T K <balajitk@ti.com>2010-05-12 04:27:30 -0400
committerTony Lindgren <tony@atomide.com>2010-05-20 14:21:21 -0400
commit6e30a7dbc946132525ca12ce16f0f2105096624a (patch)
tree4454d63aad42a3f62fd6a2920d3c8268f190a99d /arch/arm/mach-omap2/board-4430sdp.c
parentbaeb73e8027b8a62b32c11afc3035cf6cc0927dd (diff)
omap4: add i2c1 peripherals data
This patch adds i2c1 peripherals data to omap4430 sdp board file. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c177
1 files changed, 176 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 41fed9235f81..921cde3d79e0 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -19,6 +19,8 @@
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/usb/otg.h> 20#include <linux/usb/otg.h>
21#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
22#include <linux/i2c/twl.h>
23#include <linux/regulator/machine.h>
22 24
23#include <mach/hardware.h> 25#include <mach/hardware.h>
24#include <mach/omap4-common.h> 26#include <mach/omap4-common.h>
@@ -135,13 +137,186 @@ static struct omap_musb_board_data musb_board_data = {
135 .mode = MUSB_PERIPHERAL, 137 .mode = MUSB_PERIPHERAL,
136 .power = 100, 138 .power = 100,
137}; 139};
140static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
141 {
142 .supply = "vmmc",
143 },
144 {
145 .supply = "vmmc",
146 },
147 {
148 .supply = "vmmc",
149 },
150 {
151 .supply = "vmmc",
152 },
153 {
154 .supply = "vmmc",
155 },
156};
157
158static struct regulator_init_data sdp4430_vaux1 = {
159 .constraints = {
160 .min_uV = 1000000,
161 .max_uV = 3000000,
162 .apply_uV = true,
163 .valid_modes_mask = REGULATOR_MODE_NORMAL
164 | REGULATOR_MODE_STANDBY,
165 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
166 | REGULATOR_CHANGE_MODE
167 | REGULATOR_CHANGE_STATUS,
168 },
169};
170
171static struct regulator_init_data sdp4430_vaux2 = {
172 .constraints = {
173 .min_uV = 1200000,
174 .max_uV = 2800000,
175 .apply_uV = true,
176 .valid_modes_mask = REGULATOR_MODE_NORMAL
177 | REGULATOR_MODE_STANDBY,
178 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
179 | REGULATOR_CHANGE_MODE
180 | REGULATOR_CHANGE_STATUS,
181 },
182};
183
184static struct regulator_init_data sdp4430_vaux3 = {
185 .constraints = {
186 .min_uV = 1000000,
187 .max_uV = 3000000,
188 .apply_uV = true,
189 .valid_modes_mask = REGULATOR_MODE_NORMAL
190 | REGULATOR_MODE_STANDBY,
191 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
192 | REGULATOR_CHANGE_MODE
193 | REGULATOR_CHANGE_STATUS,
194 },
195};
196
197/* VMMC1 for MMC1 card */
198static struct regulator_init_data sdp4430_vmmc = {
199 .constraints = {
200 .min_uV = 1200000,
201 .max_uV = 3000000,
202 .apply_uV = true,
203 .valid_modes_mask = REGULATOR_MODE_NORMAL
204 | REGULATOR_MODE_STANDBY,
205 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
206 | REGULATOR_CHANGE_MODE
207 | REGULATOR_CHANGE_STATUS,
208 },
209 .num_consumer_supplies = 5,
210 .consumer_supplies = sdp4430_vmmc_supply,
211};
212
213static struct regulator_init_data sdp4430_vpp = {
214 .constraints = {
215 .min_uV = 1800000,
216 .max_uV = 2500000,
217 .apply_uV = true,
218 .valid_modes_mask = REGULATOR_MODE_NORMAL
219 | REGULATOR_MODE_STANDBY,
220 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
221 | REGULATOR_CHANGE_MODE
222 | REGULATOR_CHANGE_STATUS,
223 },
224};
225
226static struct regulator_init_data sdp4430_vusim = {
227 .constraints = {
228 .min_uV = 1200000,
229 .max_uV = 2900000,
230 .apply_uV = true,
231 .valid_modes_mask = REGULATOR_MODE_NORMAL
232 | REGULATOR_MODE_STANDBY,
233 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
234 | REGULATOR_CHANGE_MODE
235 | REGULATOR_CHANGE_STATUS,
236 },
237};
238
239static struct regulator_init_data sdp4430_vana = {
240 .constraints = {
241 .min_uV = 2100000,
242 .max_uV = 2100000,
243 .apply_uV = true,
244 .valid_modes_mask = REGULATOR_MODE_NORMAL
245 | REGULATOR_MODE_STANDBY,
246 .valid_ops_mask = REGULATOR_CHANGE_MODE
247 | REGULATOR_CHANGE_STATUS,
248 },
249};
250
251static struct regulator_init_data sdp4430_vcxio = {
252 .constraints = {
253 .min_uV = 1800000,
254 .max_uV = 1800000,
255 .apply_uV = true,
256 .valid_modes_mask = REGULATOR_MODE_NORMAL
257 | REGULATOR_MODE_STANDBY,
258 .valid_ops_mask = REGULATOR_CHANGE_MODE
259 | REGULATOR_CHANGE_STATUS,
260 },
261};
262
263static struct regulator_init_data sdp4430_vdac = {
264 .constraints = {
265 .min_uV = 1800000,
266 .max_uV = 1800000,
267 .apply_uV = true,
268 .valid_modes_mask = REGULATOR_MODE_NORMAL
269 | REGULATOR_MODE_STANDBY,
270 .valid_ops_mask = REGULATOR_CHANGE_MODE
271 | REGULATOR_CHANGE_STATUS,
272 },
273};
274
275static struct regulator_init_data sdp4430_vusb = {
276 .constraints = {
277 .min_uV = 3300000,
278 .max_uV = 3300000,
279 .apply_uV = true,
280 .valid_modes_mask = REGULATOR_MODE_NORMAL
281 | REGULATOR_MODE_STANDBY,
282 .valid_ops_mask = REGULATOR_CHANGE_MODE
283 | REGULATOR_CHANGE_STATUS,
284 },
285};
286
287static struct twl4030_platform_data sdp4430_twldata = {
288 .irq_base = TWL6030_IRQ_BASE,
289 .irq_end = TWL6030_IRQ_END,
290
291 /* Regulators */
292 .vmmc = &sdp4430_vmmc,
293 .vpp = &sdp4430_vpp,
294 .vusim = &sdp4430_vusim,
295 .vana = &sdp4430_vana,
296 .vcxio = &sdp4430_vcxio,
297 .vdac = &sdp4430_vdac,
298 .vusb = &sdp4430_vusb,
299 .vaux1 = &sdp4430_vaux1,
300 .vaux2 = &sdp4430_vaux2,
301 .vaux3 = &sdp4430_vaux3,
302};
303
304static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = {
305 {
306 I2C_BOARD_INFO("twl6030", 0x48),
307 .flags = I2C_CLIENT_WAKE,
308 .irq = OMAP44XX_IRQ_SYS_1N,
309 .platform_data = &sdp4430_twldata,
310 },
311};
138static int __init omap4_i2c_init(void) 312static int __init omap4_i2c_init(void)
139{ 313{
140 /* 314 /*
141 * Phoenix Audio IC needs I2C1 to 315 * Phoenix Audio IC needs I2C1 to
142 * start with 400 KHz or less 316 * start with 400 KHz or less
143 */ 317 */
144 omap_register_i2c_bus(1, 400, NULL, 0); 318 omap_register_i2c_bus(1, 400, sdp4430_i2c_boardinfo,
319 ARRAY_SIZE(sdp4430_i2c_boardinfo));
145 omap_register_i2c_bus(2, 400, NULL, 0); 320 omap_register_i2c_bus(2, 400, NULL, 0);
146 omap_register_i2c_bus(3, 400, NULL, 0); 321 omap_register_i2c_bus(3, 400, NULL, 0);
147 omap_register_i2c_bus(4, 400, NULL, 0); 322 omap_register_i2c_bus(4, 400, NULL, 0);