Ejemplo n.º 1
0
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();
}
Ejemplo n.º 2
0
static void tablet_set_osc_timings(void)
{
	/* Device Oscilator
	 * tstart = 2ms + 2ms = 4ms.
	 * tshut = Not defined in oscillator data sheet so setting to 1us
	 */
	omap_pm_set_osc_lp_time(4000, 1);
}
static void board_set_osc_timings(void)
{
	/* Device Oscilator
	 * tstart = 2ms + 2ms = 4ms.
	 * tshut = Not defined in oscillator data sheet so setting to 1us
	 * FIXME: check our oscillator data sheet and match numbers
	 */
	omap_pm_set_osc_lp_time(4000, 1);
}
Ejemplo n.º 4
0
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();

}
Ejemplo n.º 5
0
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();
}