39 #include <mach/hardware.h>
40 #include <mach/common.h>
47 #define SD1_EN_GPIO IMX_GPIO_NR(2, 25)
48 #define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23)
49 #define SPI2_SS0 IMX_GPIO_NR(4, 21)
50 #define PMIC_INT IMX_GPIO_NR(3, 14)
51 #define SPI1_SS0 IMX_GPIO_NR(4, 28)
52 #define SD1_CD IMX_GPIO_NR(2, 26)
53 #define LCD_RESET IMX_GPIO_NR(1, 3)
54 #define LCD_ENABLE IMX_GPIO_NR(1, 31)
55 #define CSI_PWRDWN IMX_GPIO_NR(4, 19)
56 #define CSI_RESET IMX_GPIO_NR(3, 6)
168 static struct gpio mx27_3ds_camera_gpios[] = {
181 static const uint32_t mx27_3ds_keymap[] = {
194 .keymap = mx27_3ds_keymap,
205 static void mx27_3ds_sdhc1_exit(
struct device *dev,
void *data)
211 .init = mx27_3ds_sdhc1_init,
212 .exit = mx27_3ds_sdhc1_exit,
215 static void mx27_3ds_sdhc1_enable_level_translator(
void)
223 static int otg_phy_init(
void)
238 .init = mx27_3ds_otg_init,
251 if (!
strcmp(options,
"host"))
252 otg_mode_host =
true;
253 else if (!
strcmp(options,
"device"))
254 otg_mode_host =
false;
256 pr_info(
"otg_mode neither \"host\" nor \"device\". "
257 "Defaulting to device\n");
260 __setup(
"otg_mode=", mx27_3ds_otg_mode);
283 .num_consumer_supplies =
ARRAY_SIZE(vmmc1_consumers),
284 .consumer_supplies = vmmc1_consumers,
297 .num_consumer_supplies =
ARRAY_SIZE(vgen_consumers),
298 .consumer_supplies = vgen_consumers,
313 .num_consumer_supplies =
ARRAY_SIZE(vvib_consumers),
314 .consumer_supplies = vvib_consumers,
320 .init_data = &vmmc1_init,
323 .init_data = &vgen_init,
326 .init_data = &gpo_init,
329 .init_data = &gpo_init,
332 .init_data = &vvib_init,
344 .regulators = mx27_3ds_regulators,
345 .num_regulators =
ARRAY_SIZE(mx27_3ds_regulators),
350 .codec = &mx27_3ds_codec,
358 static int spi1_chipselect[] = {
SPI1_SS0};
361 .chipselect = spi1_chipselect,
362 .num_chipselect =
ARRAY_SIZE(spi1_chipselect),
365 static int spi2_chipselect[] = {
SPI2_SS0};
369 .num_chipselect =
ARRAY_SIZE(spi2_chipselect),
372 static int mx27_3ds_camera_power(
struct device *dev,
int on)
375 pr_debug(
"%s: %s the camera\n", __func__, on ?
"ENABLE" :
"DISABLE");
396 { .supply =
"cmos_vcore" },
397 { .supply =
"cmos_2v8" },
402 .board_info = &mx27_3ds_i2c_camera,
404 .power = mx27_3ds_camera_power,
405 .regulators = mx27_3ds_camera_regs,
406 .num_regulators =
ARRAY_SIZE(mx27_3ds_camera_regs),
410 .name =
"soc-camera-pdrv",
413 .platform_data = &iclink_ov2640,
442 .mode = mx27_3ds_modes,
458 .max_speed_hz = 1000000,
461 .platform_data = &mc13783_pdata,
465 .modalias =
"l4f00242t03",
466 .max_speed_hz = 5000000,
469 .platform_data = &mx27_3ds_lcd_pdata,
485 static void __init mx27pdk_init(
void)
492 mx27_3ds_sdhc1_enable_level_translator();
518 pr_warn(
"Init of the debugboard failed, all devices on the debugboard are unusable.\n");
526 pr_err(
"Failed to request camera gpios");
533 imx_add_platform_device(
"imx_mc13783", 0,
NULL, 0,
NULL, 0);
536 static void __init mx27pdk_timer_init(
void)
541 static struct sys_timer mx27pdk_timer = {
542 .init = mx27pdk_timer_init,
547 .atag_offset = 0x100,
552 .timer = &mx27pdk_timer,
553 .init_machine = mx27pdk_init,