void __init omap4_kona_pmic_init(void) { unsigned int gpio_sys_drm_msec = omap_muxtbl_get_gpio_by_name("SYS_DRM_MSEC"); /* Update oscillator information */ omap_pm_set_osc_lp_time(15000, 1); /* * This will allow unused regulator to be shutdown. This flag * should be set in the board file. Before regulators are registered. */ regulator_has_full_constraints(); platform_add_devices(kona_pmic_devices, ARRAY_SIZE(kona_pmic_devices)); i2c_register_board_info(1, kona_twl6034_i2c1_board_info, ARRAY_SIZE(kona_twl6034_i2c1_board_info)); /* * Drive MSECURE high for TWL6034 write access. */ gpio_request(gpio_sys_drm_msec, "SYS_DRM_MSEC"); gpio_direction_output(gpio_sys_drm_msec, 1); if (enable_sr) omap_enable_smartreflex_on_init(); /*enable off-mode*/ omap_pm_enable_off_mode(); }
static void __init omap_tablet_init(void) { int package = OMAP_PACKAGE_CBS; int tablet_rev = 0; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, NULL, package); acclaim_mem_init(); omap_board_config = tablet_config; omap_board_config_size = ARRAY_SIZE(tablet_config); tablet_rev = omap_init_board_version(0); omap4_create_board_props(); omap4_i2c_init(); #ifdef CONFIG_CHARGER_MAX8903 max8903_init_charger(); #endif //CONFIG_CHARGER_MAX8903 acclaim_touch_init(); omap_dmm_init(); acclaim_panel_init(); tablet_pmic_mux_init(); acclaim_button_init(); omap4_register_ion(); board_serial_init(); omap4_tablet_wifi_init(); omap4_twl6030_hsmmc_init(mmc); omap4_ehci_ohci_init(); usb_musb_init(&musb_board_data); omap_enable_smartreflex_on_init(); if (enable_suspend_off) omap_pm_enable_off_mode(); }
static void __init omap_tablet_init(void) { int status; int package = OMAP_PACKAGE_CBS; int tablet_rev = 0; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, NULL, package); omap_emif_setup_device_details(&emif_devices, &emif_devices); omap_board_config = tablet_config; omap_board_config_size = ARRAY_SIZE(tablet_config); tablet_rev = omap_init_board_version(0); omap4_create_board_props(); omap4_audio_conf(); omap4_i2c_init(); tablet_touch_init(); tablet_camera_mux_init(); omap_dmm_init(); tablet_panel_init(); tablet_pmic_mux_init(); tablet_set_osc_timings(); tablet_button_init(); omap4_register_ion(); board_serial_init(); omap4_tablet_wifi_init(); omap4_twl6030_hsmmc_init(mmc); tablet_sensor_init(); platform_add_devices(tablet4430_devices, ARRAY_SIZE(tablet4430_devices)); wake_lock_init(&st_wk_lock, WAKE_LOCK_SUSPEND, "st_wake_lock"); omap4_ehci_ohci_init(); usb_musb_init(&musb_board_data); status = omap_ethernet_init(); if (status) { pr_err("Ethernet initialization failed: %d\n", status); } else { tablet_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ); spi_register_board_info(tablet_spi_board_info, ARRAY_SIZE(tablet_spi_board_info)); } if (cpu_is_omap446x()) { /* Vsel0 = gpio, vsel1 = gnd */ status = omap_tps6236x_board_setup(true, TPS62361_GPIO, -1, OMAP_PIN_OFF_OUTPUT_HIGH, -1); if (status) pr_err("TPS62361 initialization failed: %d\n", status); } omap_enable_smartreflex_on_init(); if (enable_suspend_off) omap_pm_enable_off_mode(); }
static void __init acclaim_init(void) { int status; int package = OMAP_PACKAGE_CBS; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(acclaim_board_mux, NULL, package); acclaim_board_init(); acclaim_ram_init (); omap4_create_board_props(); acclaim_set_osc_timings(); acclaim_i2c_init(); acclaim_enable_rtc_gpio(); omap4_register_ion(); platform_add_devices(acclaim_devices, ARRAY_SIZE(acclaim_devices)); #ifdef CONFIG_CHARGER_MAX8903 acclaim_init_charger(); #endif acclaim_serial_init(); acclaim_twl6030_hsmmc_init(mmc); acclaim_wifi_init(); #ifdef CONFIG_INPUT_KXTF9 kxtf9_dev_init(); #endif #ifdef CONFIG_INPUT_KXTJ9 kxtj9_dev_init(); #endif #ifdef CONFIG_BATTERY_MAX17042 acclaim_max17042_dev_init(); #endif acclaim_ehci_ohci_init(); usb_musb_init(&musb_board_data); keyboard_mux_init(); status = omap4_keyboard_init(&acclaim_keypad_data); if (status) pr_err("Keypad initialization failed: %d\n", status); omap_dmm_init(); acclaim_panel_init(); omap_enable_smartreflex_on_init(); if (enable_suspend_off) omap_pm_enable_off_mode(); }
static int option_set(void *data, u64 val) { u32 *option = data; *option = val; if (option == &enable_off_mode) { if (val) omap_pm_enable_off_mode(); else omap_pm_disable_off_mode(); if (cpu_is_omap34xx()) omap3_pm_off_mode_enable(val); } return 0; }
void __init omap_ovation_init(void) { int package = OMAP_PACKAGE_CBS; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, NULL, package); /* Turn off the external FET for twl6032 charger */ gpio_request ( EXT_FET_EN , "EXT-FET-EN" ); gpio_direction_output ( EXT_FET_EN , 0 ); /* EVT1a bringup only */ if (system_rev == OVATION_EVT1A) { /* The GPIO for Charging level - 1=2A, 0=1A */ gpio_request(44, "ic_chg_level"); gpio_direction_output(44, 1); } ovation_mem_init(); omap_board_config = ovation_config; omap_board_config_size = ARRAY_SIZE(ovation_config); omap4_create_board_props(); omap4_audio_conf(); omap4_i2c_init(); ovation_lcd_touch_init(); ovation_touch_init(); omap_dmm_init(); ovation_panel_init(); ovation_pmic_mux_init(); ovation_button_init(); kxtj9_dev_init(); omap4_register_ion(); board_serial_init(); bn_wilink_init(); omap4_twl6030_hsmmc_init(mmc); usb_musb_init(&musb_board_data); omap_enable_smartreflex_on_init(); if (enable_suspend_off) omap_pm_enable_off_mode(); /* Enable GG bat_low irq to wake up device to inform framework to shutdown. */ omap_mux_init_gpio(BQ27500_BAT_LOW_GPIO, OMAP_PIN_INPUT | OMAP_PIN_OFF_WAKEUPENABLE); }
static int option_set(void *data, u64 val) { u32 *option = data; *option = val; if (option == &enable_off_mode) { if (val) omap_pm_enable_off_mode(); else omap_pm_disable_off_mode(); if (off_mode_enable_func) off_mode_enable_func(val); } if (option == &enable_oswr_mode) omap4_pm_oswr_mode_enable(val); return 0; }
static void __init omap_4430sdp_init(void) { int package = OMAP_PACKAGE_CBS; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, NULL, package); lpddr_init(); omap_board_config = sdp4430_config; omap_board_config_size = ARRAY_SIZE(sdp4430_config); omap_init_board_version(0); omap4_create_board_props(); blaze_pmic_mux_init(); omap4_i2c_init(); /* JossCheng, 20111221, Porting gyro sensor and e-compass {*/ #ifdef CONFIG_MPU_SENSORS_MPU6050B1 mpu6050b1_init(); #endif /* JossCheng, 20111221, Porting gyro sensor and e-compass }*/ //blaze_sensor_init(); // Anvoi, 2011/12/14, Porting Light sensor driver to ICS omap4_als_init(); // Anvoi, 2011/12/14, Porting Light sensor driver to ICS //blaze_touch_init(); omap4_register_ion(); /*SW5, Anvoi, 20111215, Config key VolumeUp/VolumeDown{*/ platform_add_devices(bowser_devices, ARRAY_SIZE(bowser_devices)); /*SW5, Anvoi, 20111215, Config key VolumeUp/VolumeDown}*/ #if defined (CONFIG_TATE_HALL_SENSORS) hall_init(); #endif board_serial_init(); omap4_twl6030_hsmmc_init(mmc); bowser_wifi_init(); omap4_sdp4430_bt_init(); omap4_ehci_ohci_init(); usb_musb_init(&musb_board_data); // BokeeLi, 2011/12/14, Porting proximity driver #ifdef CONFIG_INPUT_PIC12LF1822_PROXIMITY omap4_proximity_init(); #endif // BokeeLi, 2011/12/14, Porting proximity driver /*SW5, Jamestsai, 1213, enable cypress{*/ #if defined(CONFIG_TOUCHSCREEN_CYPRESS_TTSP) || (CONFIG_TOUCHSCREEN_ATMEL_MXT) || defined(CONFIG_TOUCHSCREEN_ATMEL_MXT_MODULE) omap4_touch_init(); #endif /*}SW5, Jamestsai, 1213, enable cypress*/ omap_dmm_init(); //omap_4430sdp_display_init(); bowser_panel_init(); omap_enable_smartreflex_on_init(); if (enable_suspend_off) omap_pm_enable_off_mode(); }
static void __init board_init(void) { int package = OMAP_PACKAGE_CBS; int status; omap_board_config = board_config; omap_board_config_size = ARRAY_SIZE(board_config); board_set_osc_timings(); if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, NULL, package); archos_memory_init(); omap4_i2c_init(); board_buttons_init(); board_xceiv_init(); archos_usb_musb_init(&archos_vbus_info); archos_audio_twl6040_init(&twl6040_codec); archos_accel_mma8453q_init(&board_mma8453q_pdata); archos_compass_init(&board_akm8975_pdata); archos_battery_twl4030_bci_init(&board_bci_data); omap4_leds_init(); platform_add_devices(a101s_devices, ARRAY_SIZE(a101s_devices)); board_touch_init(); wake_lock_init(&st_wk_lock, WAKE_LOCK_SUSPEND, "st_wake_lock"); board_serial_init(); board_wifi_init(); usb_musb_init(&musb_board_data); omap4_twl6030_hsmmc_init(mmc); archos_omap4_ehci_init(); archos_camera_mt9m114_init(); omap_dmm_init(); omap_board_display_init(); archos_hsusb_ext_regulator_init(); enable_board_wakeup_source(); hardware_comp.tps62361 = 1; /* Vsel0 = gpio, vsel1 = gnd */ status = omap_tps6236x_board_setup(true, TPS62361_GPIO, -1, OMAP_PIN_OFF_OUTPUT_HIGH, -1); if (status) pr_err("TPS62361 initialization failed: %d\n", status); omap_enable_smartreflex_on_init(); if (omap_rev() >= OMAP4430_REV_ES2_3) if (enable_suspend_off) omap_pm_enable_off_mode(); }
void __init omap4_espresso_pmic_init(void) { unsigned int gpio_sys_drm_msec = omap_muxtbl_get_gpio_by_name("SYS_DRM_MSEC"); /* Update oscillator information */ omap_pm_set_osc_lp_time(15000, 1); /* * This will allow unused regulator to be shutdown. This flag * should be set in the board file. Before regulators are registered. */ regulator_has_full_constraints(); espresso_audio_init(); platform_add_devices(espresso_pmic_devices, ARRAY_SIZE(espresso_pmic_devices)); if (system_rev < 7) espresso_vaux2.constraints.always_on = true; if (system_rev >= 6) { espresso_power_data.resource_config = espresso_rconfig; if (system_rev >= 7) espresso_twl6032_pdata.ldo5 = &espresso_vdd_io_1V8; i2c_register_board_info(1, espresso_twl6032_i2c1_board_info, ARRAY_SIZE(espresso_twl6032_i2c1_board_info)); } else { i2c_register_board_info(1, espresso_twl6030_i2c1_board_info, ARRAY_SIZE(espresso_twl6030_i2c1_board_info)); } if (system_rev >= 7) { espresso_vmmc.constraints.state_mem.disabled = false; espresso_vmmc.constraints.state_mem.enabled = false; espresso_vmmc_config.gpio = omap_muxtbl_get_gpio_by_name("TF_EN"); platform_device_register(&espresso_vmmc_device); } /* * Drive MSECURE high for TWL6030 write access. */ gpio_request(gpio_sys_drm_msec, "SYS_DRM_MSEC"); gpio_direction_output(gpio_sys_drm_msec, 1); if (enable_sr) omap_enable_smartreflex_on_init(); /*enable off-mode*/ omap_pm_enable_off_mode(); }
static void __init omap_4430sdp_init(void) { int status; int package = OMAP_PACKAGE_CBS; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, NULL, package); if (cpu_is_omap447x()) omap_emif_setup_device_details(&emif_devices_4470, &emif_devices_4470); else omap_emif_setup_device_details(&emif_devices, &emif_devices); omap_board_config = sdp4430_config; omap_board_config_size = ARRAY_SIZE(sdp4430_config); omap_init_board_version(0); omap4_audio_conf(); omap4_create_board_props(); blaze_pmic_mux_init(); blaze_set_osc_timings(); omap4_i2c_init(); blaze_sensor_init(); blaze_touch_init(); omap4_register_ion(); platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); wake_lock_init(&st_wk_lock, WAKE_LOCK_SUSPEND, "st_wake_lock"); board_serial_init(); omap4_sdp4430_wifi_init(); omap4_twl6030_hsmmc_init(mmc); /* blaze_modem_init shall be called before omap4_ehci_ohci_init */ if (!strcmp(modem_ipc, "hsi")) blaze_modem_init(true); else blaze_modem_init(false); omap4_ehci_ohci_init(); usb_musb_init(&musb_board_data); status = omap_ethernet_init(); if (status) { pr_err("Ethernet initialization failed: %d\n", status); } else { sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ); spi_register_board_info(sdp4430_spi_board_info, ARRAY_SIZE(sdp4430_spi_board_info)); } status = omap4_keyboard_init(&sdp4430_keypad_data); if (status) pr_err("Keypad initialization failed: %d\n", status); omap_dmm_init(); omap_4430sdp_display_init(); blaze_panel_init(); blaze_keypad_init(); init_duty_governor(); if (cpu_is_omap446x()) { /* Vsel0 = gpio, vsel1 = gnd */ status = omap_tps6236x_board_setup(true, TPS62361_GPIO, -1, OMAP_PIN_OFF_OUTPUT_HIGH, -1); if (status) pr_err("TPS62361 initialization failed: %d\n", status); } omap_enable_smartreflex_on_init(); if (enable_suspend_off) omap_pm_enable_off_mode(); }
void __init omap4_espresso10_pmic_init(void) { unsigned int board_type = omap4_espresso10_get_board_type(); unsigned int gpio_sys_drm_msec = omap_muxtbl_get_gpio_by_name("SYS_DRM_MSEC"); /* Update oscillator information */ omap_pm_set_osc_lp_time(15000, 1); /* * This will allow unused regulator to be shutdown. This flag * should be set in the board file. Before regulators are registered. */ regulator_has_full_constraints(); espresso10_audio_init(); platform_add_devices(espresso10_pmic_devices, ARRAY_SIZE(espresso10_pmic_devices)); /* * PMIC is change from twl6030 to twl6032 from rev0.2. * Espresso10 rev0.2 board have 5 as system_rev. * ldo4 is used for VAP_IO_2.8V and ldo is nc from rev0.3 * Espresso10 rev0.3 board have 6 as system_rev. */ if (system_rev >= 6) i2c_register_board_info(1, espresso10_twl6032_i2c1_board_info_rev03, ARRAY_SIZE(espresso10_twl6032_i2c1_board_info_rev03)); else if (system_rev == 5) i2c_register_board_info(1, espresso10_twl6032_i2c1_board_info_rev02, ARRAY_SIZE(espresso10_twl6032_i2c1_board_info_rev02)); else i2c_register_board_info(1, espresso10_twl6030_i2c1_board_info, ARRAY_SIZE(espresso10_twl6030_i2c1_board_info)); /* * Use external ldo for tflash from rev0.3 * Register fixed regulator to control ldo which is used by tflash. */ if (system_rev >= 6) { espresso10_vmmc_config.gpio = omap_muxtbl_get_gpio_by_name("TF_EN"); platform_device_register(&espresso10_vmmc_device); } /* * only best buy Wi-Fi verstion support MHL from rev0.4 * Set lodln regulator as VDAC regulator which is used by MHL. */ if (board_type == SEC_MACHINE_ESPRESSO10_USA_BBY && system_rev >= 7) espresso10_twl6032_pdata_rev03.ldoln = &espresso10_vdac; /* * Drive MSECURE high for TWL6030 write access. */ gpio_request(gpio_sys_drm_msec, "SYS_DRM_MSEC"); gpio_direction_output(gpio_sys_drm_msec, 1); if (enable_sr) omap_enable_smartreflex_on_init(); /*enable off-mode*/ omap_pm_enable_off_mode(); }