Exemplo n.º 1
0
void __init evt_peripherals_init(void)
{
//&*&*&*SJ1_20110419, Add /proc file to display software and hardware version.
#if defined (CONFIG_PROCFS_DISPLAY_SW_HW_VERSION)
	get_share_region();	
#endif
//&*&*&*SJ2_20110419, Add /proc file to display software and hardware version.

//&*&*&*BC1_110615: fix the issue that system can not enter off mode
	twl4030_get_scripts(&evt_t2scripts_data);
//&*&*&*BC2_110615: fix the issue that system can not enter off mode

    
#ifdef CONFIG_ANDROID_RAM_CONSOLE
    platform_device_register(&ram_console_device);
#endif
    
    omap_i2c_init();
    platform_add_devices( evt_board_devices, ARRAY_SIZE(evt_board_devices) );
    platform_add_devices( evt_board_devices_2, ARRAY_SIZE(evt_board_devices_2) );
    
#ifdef CONFIG_ENCORE_MODEM_MGR
    if (is_encore_3g()) {
        platform_device_register(&encore_modem_mgr_device);
    }
#endif 

#ifdef CONFIG_SND_SOC_TLV320DAC3100
    audio_dac_3100_dev_init();
#endif
/***++++20110115, jimmySu add backlight driver for PWM***/
#ifdef CONFIG_LEDS_OMAP_DISPLAY
	gptimer8 = (unsigned long)ioremap(0x4903E000, 16);
//&*&*&*HC1_20110826, modify pwm init sequence
	//zoom_pwm_init();
	omap_set_primary_brightness(100);
//&*&*&*HC2_20110826, modify pwm init sequence
#endif // CONFIG_LEDS_OMAP_DISPLAY
/***-----20110115, jimmySu add backlight driver for PWM***/


    /* NOTE: Please deselect CONFIG_MACH_OMAP_USE_UART3 in order to init 
    *  only UART1 and UART2, all in the name of saving some power.
    */
    omap_serial_init(omap_serial_platform_data);
    evt_lcd_panel_init();
//    kxtf9_dev_init();

#ifdef CONFIG_BATTERY_MAX17042
    max17042_dev_init();
#endif

    usb_musb_init(&musb_board_data);

//&*&*&*SJ1_20110607
#if defined (CONFIG_ANDROID_FACTORY_DEFAULT_REBOOT)
	android_factory_default_init();
#endif
//&*&*&*SJ2_20110607
}
static void __init omap_boxer_init(void)
{
	/*we need to have this enable function here to light up the BL*/
	boxer_panel_enable_lcd(&boxer_lcd_device);
	omap_i2c_init();
	/* Fix to prevent VIO leakage on wl127x */
//	wl127x_vio_leakage_fix();

	platform_add_devices(boxer_devices, ARRAY_SIZE(boxer_devices));

	omap_board_config = boxer_config;
	omap_board_config_size = ARRAY_SIZE(boxer_config);

	spi_register_board_info(boxer_spi_board_info,
				ARRAY_SIZE(boxer_spi_board_info));
#ifdef  CONFIG_TOUCHSCREEN_PIXCIR_I2C
	pixcir_dev_init();
#endif
#ifdef CONFIG_TOUCHSCREEN_CYTTSP_I2C
//    cyttsp_dev_init();
#endif

#ifdef CONFIG_INPUT_KXTF9
	kxtf9_dev_init();
#endif /* CONFIG_INPUT_KXTF9 */

#ifdef CONFIG_BATTERY_MAX17042
	max17042_dev_init();
#endif

#if defined(CONFIG_SND_SOC_DAC3100) || defined(CONFIG_SND_SOC_DAC3100_MODULE) || defined(CONFIG_SND_OMAP_SOC_OMAP3_EDP)
        audio_dac_3100_dev_init();
#endif
//	synaptics_dev_init();
//	msecure_init();
//	ldp_flash_init();
	omap_serial_init();
	usb_musb_init();
	boxer_backlight_init();
#if defined(CONFIG_USB_ANDROID) || defined(CONFIG_USB_ANDROID_MODULE)
	platform_device_register(&usb_mass_storage_device);
	// Set the device serial number passed in from the bootloader.
	if (system_serial_high != 0 || system_serial_low != 0) {
		snprintf(adb_serial_number, sizeof(adb_serial_number), "%08x%08x", system_serial_high, system_serial_low);
		adb_serial_number[16] = '\0';
		android_usb_pdata.serial_number = adb_serial_number;
	}
	platform_device_register(&android_usb_device);
#endif
        BUG_ON(!cpu_is_omap3630());
}
Exemplo n.º 3
0
void __init encore_peripherals_init(void)
{
	platform_add_devices(encore_board_devices,
		ARRAY_SIZE(encore_board_devices));
	omap_i2c_init();
	platform_device_register(&omap_vwlan_device);
	usb_musb_init(NULL);
	omap_serial_init();

	encore_init_charger();
	kxtf9_dev_init();
#ifdef CONFIG_BATTERY_MAX17042
        max17042_dev_init();
#endif
}
Exemplo n.º 4
0
static int __init omap4_i2c_init(void)
{
	omap_i2c_hwspinlock_init(1, 0, &sdp4430_i2c_1_bus_pdata);
	omap_i2c_hwspinlock_init(2, 1, &sdp4430_i2c_2_bus_pdata);
	omap_i2c_hwspinlock_init(3, 2, &sdp4430_i2c_3_bus_pdata);
	omap_i2c_hwspinlock_init(4, 3, &sdp4430_i2c_4_bus_pdata);

	omap_register_i2c_bus_board_data(1, &sdp4430_i2c_1_bus_pdata);
	omap_register_i2c_bus_board_data(2, &sdp4430_i2c_2_bus_pdata);
	omap_register_i2c_bus_board_data(3, &sdp4430_i2c_3_bus_pdata);
	omap_register_i2c_bus_board_data(4, &sdp4430_i2c_4_bus_pdata);

	omap4_pmic_init("twl6030", &tablet_twldata); //	i2c_register_board_info(1, &sdp4430_i2c_boardinfo, 1);

#ifdef CONFIG_INPUT_KXTF9
	kxtf9_gpio_for_irq = 66;
	sdp4430_i2c_boardinfo[I2C_INDEX_1_KXTF9].irq = OMAP_GPIO_IRQ(kxtf9_gpio_for_irq);
	kxtf9_dev_init();
#endif //CONFIG_INPUT_KXTF9
#ifdef CONFIG_BATTERY_MAX17042
	max17042_gpio_for_irq = 65;
	sdp4430_i2c_boardinfo[I2C_INDEX_1_MAX17042].irq = OMAP_GPIO_IRQ(max17042_gpio_for_irq);
	max17042_dev_init();
#endif //CONFIG_BATTERY_MAX17042
	i2c_register_board_info(1, sdp4430_i2c_boardinfo, ARRAY_SIZE(sdp4430_i2c_boardinfo));
	i2c_register_board_info(2, tablet_i2c_3_boardinfo, ARRAY_SIZE(tablet_i2c_3_boardinfo));
	omap_register_i2c_bus(2, 400, NULL, 0);
	omap_register_i2c_bus(3, 400, NULL, 0);
	omap_register_i2c_bus(4, 400, NULL, 0);

	omap2_i2c_pullup(3, I2C_PULLUP_STD_860_OM_FAST_500_OM);

	/*
	 * 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();

	/*
	 * Drive MSECURE high for TWL6030 write access.
	 */
	omap_mux_init_signal("fref_clk0_out.gpio_wk6", OMAP_PIN_OUTPUT);
	gpio_request(6, "msecure");
	gpio_direction_output(6, 1);

	return 0;
}
void __init acclaim_peripherals_init(void)
{
	int status;
	int package = OMAP_PACKAGE_CBS;
	ulong sdram_size = get_sdram_size();

	ramconsole_init();

	if (omap_rev() == OMAP4430_REV_ES1_0)
		package = OMAP_PACKAGE_CBL;
	omap4_mux_init(board_mux, package);
	acclaim_board_init();

	if (sdram_vendor() == SAMSUNG_SDRAM) {
		if (sdram_size == SZ_512M) {
			omap_emif_setup_device_details(&emif_devices_512_samsung, &emif_devices_512_samsung);
		} else if (sdram_size == SZ_1G) {
			omap_emif_setup_device_details(&emif_devices_samsung, &emif_devices_samsung);
		} else {
			pr_err("sdram memory size does not exist, default to using 1024MB \n");
			omap_emif_setup_device_details(&emif_devices_samsung, &emif_devices_samsung);
		}
		printk(KERN_INFO"Samsung DDR Memory \n");
	} else if (sdram_vendor() == ELPIDA_SDRAM) {
		if (sdram_size == SZ_512M) {
			omap_emif_setup_device_details(&emif_devices_512_elpida, &emif_devices_512_elpida);
		} else if (sdram_size == SZ_1G) {
			omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida);
		} else {
			pr_err("sdram memory size does not exist, default to using 1024MB \n");
			omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida);
		}
		printk(KERN_INFO"Elpida DDR Memory \n");
	} else if (sdram_vendor() == HYNIX_SDRAM) {
		/* Re-use ELPIDA timings as they are absolutely the same */
		if (sdram_size == SZ_512M) {
			omap_emif_setup_device_details(&emif_devices_512_elpida, &emif_devices_512_elpida);
		} else if (sdram_size == SZ_1G) {
			omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida);
		} else {
			pr_err("sdram memory size does not exist, default to using 1024MB \n");
			omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida);
		}
		printk(KERN_INFO"Hynix DDR Memory \n");
	} else
		pr_err("Memory type does not exist\n");

	omap_init_emif_timings();

	enable_rtc_gpio();
	omap4_i2c_init();
	platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
	acclaim_init_charger();

	wake_lock_init(&uart_lock, WAKE_LOCK_SUSPEND, "uart_wake_lock");
	omap_serial_init(omap_serial_platform_data);
	omap4_twl6030_hsmmc_init(mmc);

#ifdef CONFIG_TIWLAN_SDIO
	config_wlan_mux();
#else
	//omap4_4430sdp_wifi_init();
#endif

	kxtf9_dev_init();
#ifdef CONFIG_BATTERY_MAX17042
	max17042_dev_init();
#endif

	usb_uhhtll_init(&usbhs_pdata);
	usb_musb_init(&musb_board_data);

	status = omap4_keypad_initialization(&sdp4430_keypad_data);
	if (status)
		pr_err("Keypad initialization failed: %d\n", status);

	spi_register_board_info(sdp4430_spi_board_info,
			ARRAY_SIZE(sdp4430_spi_board_info));

	acclaim_panel_init();
	enable_board_wakeup_source();
	omap_voltage_register_pmic(&omap_pmic_core, "core");
	omap_voltage_register_pmic(&omap_pmic_mpu, "mpu");
	omap_voltage_register_pmic(&omap_pmic_iva, "iva");
	omap_voltage_init_vc(&vc_config);
}