19 #include <linux/kernel.h>
22 #include <linux/input.h>
50 #include <mach/hardware.h>
57 #define CM_T35_GPIO_PENDOWN 57
58 #define SB_T35_USB_HUB_RESET_GPIO 167
60 #define CM_T35_SMSC911X_CS 5
61 #define CM_T35_SMSC911X_GPIO 163
62 #define SB_T35_SMSC911X_CS 4
63 #define SB_T35_SMSC911X_GPIO 65
65 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
95 static void __init cm_t35_init_ethernet(
void)
106 static inline void __init cm_t35_init_ethernet(
void) {
return; }
109 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
112 static struct gpio_led cm_t35_leds[] = {
115 .name =
"cm-t35:green",
116 .default_trigger =
"heartbeat",
130 .platform_data = &cm_t35_led_pdata,
134 static void __init cm_t35_init_led(
void)
139 static inline void cm_t35_init_led(
void) {}
142 #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
160 .name =
"uboot environment",
177 .
parts = cm_t35_nand_partitions,
178 .nr_parts =
ARRAY_SIZE(cm_t35_nand_partitions),
182 static void __init cm_t35_init_nand(
void)
185 pr_err(
"CM-T35: Unable to register NAND device\n");
188 static inline void cm_t35_init_nand(
void) {}
191 #define CM_T35_LCD_EN_GPIO 157
192 #define CM_T35_LCD_BL_GPIO 58
193 #define CM_T35_DVI_EN_GPIO 54
195 static int lcd_enabled;
196 static int dvi_enabled;
231 .
name =
"toppoly_tdo35s",
232 .platform_enable = cm_t35_panel_enable_lcd,
233 .platform_disable = cm_t35_panel_disable_lcd,
239 .driver_name =
"generic_dpi_panel",
241 .phy.dpi.data_lines = 18,
251 .driver_name =
"tfp410",
253 .phy.dpi.data_lines = 24,
258 .driver_name =
"venc",
261 .platform_enable = cm_t35_panel_enable_tv,
262 .platform_disable = cm_t35_panel_disable_tv,
272 .num_devices =
ARRAY_SIZE(cm_t35_dss_devices),
273 .devices = cm_t35_dss_devices,
274 .default_device = &cm_t35_dvi_device,
287 .modalias =
"tdo24m",
290 .max_speed_hz = 1000000,
291 .controller_data = &tdo24m_mcspi_config,
292 .platform_data = &tdo24m_config,
296 static struct gpio cm_t35_dss_gpios[] __initdata = {
301 static void __init cm_t35_init_display(
void)
311 pr_err(
"CM-T35: failed to request DSS control GPIOs\n");
323 pr_err(
"CM-T35: failed to register DSS device\n");
353 .num_consumer_supplies =
ARRAY_SIZE(cm_t35_vmmc1_supply),
354 .consumer_supplies = cm_t35_vmmc1_supply,
368 .num_consumer_supplies =
ARRAY_SIZE(cm_t35_vsim_supply),
369 .consumer_supplies = cm_t35_vsim_supply,
381 .num_consumer_supplies =
ARRAY_SIZE(cm_t35_vio_supplies),
382 .consumer_supplies = cm_t35_vio_supplies,
392 .keymap = cm_t35_keymap,
397 .keymap_data = &cm_t35_keymap_data,
417 .ocr_mask = 0x00100000,
430 .reset_gpio_port[2] = -
EINVAL
433 static void __init cm_t35_init_usbh(
void)
440 pr_err(
"SB-T35: usb hub rst gpio request failed: %d\n", err);
450 static int cm_t35_twl_gpio_setup(
struct device *
dev,
unsigned gpio,
453 int wlan_rst = gpio + 2;
456 gpio_export(wlan_rst, 0);
462 pr_err(
"CM-T35: could not obtain gpio for WiFi reset\n");
467 omap_hsmmc_late_init(mmc);
473 .setup = cm_t35_twl_gpio_setup,
477 .use_poweroff =
true,
482 .keypad = &cm_t35_kp_data,
483 .gpio = &cm_t35_gpio_data,
484 .vmmc1 = &cm_t35_vmmc1,
485 .vsim = &cm_t35_vsim,
487 .power = &cm_t35_power_data,
490 #if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
521 .
subdevs = cm_t35_isp_primary_subdevs,
530 .subdevs = cm_t35_isp_secondary_subdevs,
545 static void __init cm_t35_init_camera(
void)
548 pr_warn(
"CM-T3x: Failed registering camera device!\n");
552 static inline void cm_t35_init_camera(
void) {}
555 static void __init cm_t35_init_i2c(
void)
561 omap3_pmic_init(
"tps65930", &cm_t35_twldata);
566 #ifdef CONFIG_OMAP_MUX
674 static void __init cm_t3x_common_dss_mux_init(
int mux_mode)
676 omap_mux_init_signal(
"dss_data18", mux_mode);
677 omap_mux_init_signal(
"dss_data19", mux_mode);
678 omap_mux_init_signal(
"dss_data20", mux_mode);
679 omap_mux_init_signal(
"dss_data21", mux_mode);
680 omap_mux_init_signal(
"dss_data22", mux_mode);
681 omap_mux_init_signal(
"dss_data23", mux_mode);
684 static void __init cm_t35_init_mux(
void)
688 omap_mux_init_signal(
"dss_data0.dss_data0", mux_mode);
689 omap_mux_init_signal(
"dss_data1.dss_data1", mux_mode);
690 omap_mux_init_signal(
"dss_data2.dss_data2", mux_mode);
691 omap_mux_init_signal(
"dss_data3.dss_data3", mux_mode);
692 omap_mux_init_signal(
"dss_data4.dss_data4", mux_mode);
693 omap_mux_init_signal(
"dss_data5.dss_data5", mux_mode);
694 cm_t3x_common_dss_mux_init(mux_mode);
697 static void __init cm_t3730_init_mux(
void)
701 omap_mux_init_signal(
"sys_boot0", mux_mode);
702 omap_mux_init_signal(
"sys_boot1", mux_mode);
703 omap_mux_init_signal(
"sys_boot3", mux_mode);
704 omap_mux_init_signal(
"sys_boot4", mux_mode);
705 omap_mux_init_signal(
"sys_boot5", mux_mode);
706 omap_mux_init_signal(
"sys_boot6", mux_mode);
707 cm_t3x_common_dss_mux_init(mux_mode);
710 static inline void cm_t35_init_mux(
void) {}
711 static inline void cm_t3730_init_mux(
void) {}
714 static void __init cm_t3x_common_init(
void)
719 mt46h32m32lf6_sdrc_params);
720 omap_hsmmc_init(mmc);
723 cm_t35_init_ethernet();
725 cm_t35_init_display();
730 cm_t35_init_camera();
733 static void __init cm_t35_init(
void)
735 cm_t3x_common_init();
740 static void __init cm_t3730_init(
void)
742 cm_t3x_common_init();
747 .atag_offset = 0x100,
752 .handle_irq = omap3_intc_handle_irq,
753 .init_machine = cm_t35_init,
760 .atag_offset = 0x100,
765 .handle_irq = omap3_intc_handle_irq,
766 .init_machine = cm_t3730_init,