static void __init tegra_ventana_init(void)
{
	struct board_info BoardInfo;
	tegra_booting_info();
	ventana_setup_misc();
	tegra_clk_init_from_table(ventana_clk_init_table);
	ventana_pinmux_init();
	ventana_i2c_init();
        snprintf(ventana_chipid, sizeof(ventana_chipid), "%016llx", tegra_chip_uid());
	ventana_uart_init();

	if(ASUS3GAvailable()) {
		tegra_ehci2_device.dev.platform_data
			= &ventana_ehci2_ulpi_platform_data;
	}

	platform_add_devices(ventana_devices, ARRAY_SIZE(ventana_devices));

	ventana_sdhci_init();
	//ventana_charge_init();
	ventana_regulator_init();
	//ventana_charger_init();

	tegra_get_board_info(&BoardInfo);

#if defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9) || defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9_EP102)
       pr_info("Initializing Atmel touch driver\n");
       ventana_touch_init_atmel();
#elif defined(CONFIG_TOUCHSCREEN_PANJIT_I2C)
       pr_info("Initializing Panjit touch driver\n");
       ventana_touch_init_panjit();
#endif


#ifdef CONFIG_KEYBOARD_GPIO
	ventana_keys_init();
#endif

#ifdef CONFIG_DSP_FM34
	ventana_dsp_init();
#endif
	ventana_usb_init();
	ventana_gps_init();
	ventana_panel_init();
	ventana_sensors_init();
	//ventana_bt_rfkill();
	ventana_power_off_init();
	ventana_emc_init();

	ventana_setup_bluesleep();
//	tegra_release_bootloader_fb();
}
Example #2
0
unsigned int ASUSWiMAXAvailable()
{
	unsigned int ret = 0;

	if (ASUS3GAvailable()) return ret;	/* 3G module is equipped */

	if (!HW_DRF_VAL(TEGRA_DEVKIT, MISC_HW, PROJECT, ventana_hw)) {
		//Only TF101 has WiMAX SKU definition
		return HW_DRF_VAL(TEGRA_DEVKIT, MISC_HW, WIMAX, ventana_hw);
	}

	return ret;
}
Example #3
0
static void ASUSGetProjectName()
{
	unsigned int ret = 0;
	ret = HW_DRF_VAL(TEGRA_DEVKIT, MISC_HW, PROJECT, ventana_hw);

	if(ret == 0) { //TF101
		if(ASUS3GAvailable()) {
			strcpy(ventana_projectname,"TF101G");
		}
		else {
			if(ASUSWiMAXAvailable())
				strcpy(ventana_projectname,"TF101-WiMAX");
			else
				strcpy(ventana_projectname,"TF101");
		}
	}
	else if(ret == 1) { //SL101
		strcpy(ventana_projectname,"SL101");
	}
	else {
		pr_err("[MISC]: Illegal project identification.\n");
		strcpy(ventana_projectname,"unknown project name");
	}
}
Example #4
0
static void __init tegra_ventana_init(void)
{
#if defined(CONFIG_TOUCHSCREEN_PANJIT_I2C) || \
	defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9) || defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9_EP102)
	struct board_info BoardInfo;
#endif
	tegra_booting_info();
	tegra_common_init();
	ventana_setup_misc();
	tegra_clk_init_from_table(ventana_clk_init_table);
	ventana_pinmux_init();
	ventana_i2c_init();
        ventana_uart_init();
	snprintf(ventana_chipid, sizeof(ventana_chipid), "%016llx",
	    tegra_chip_uid());
	snprintf(usb_serial_num, sizeof(usb_serial_num), "%llx", tegra_chip_uid());
	andusb_plat.serial_number = kstrdup(usb_serial_num, GFP_KERNEL);
	if (ASUSGetProjectID() == 102) {
		andusb_plat.products[0].product_id = USB_SL101_PRODUCT_ID_MTP;
		andusb_plat.products[1].product_id = USB_SL101_PRODUCT_ID_MTP_ADB;
		andusb_plat.products[2].product_id = USB_SL101_PRODUCT_ID_RNDIS;
		andusb_plat.products[3].product_id = USB_SL101_PRODUCT_ID_RNDIS_ADB;
	}

	tegra_i2s_device1.dev.platform_data = &tegra_audio_pdata[0];
	tegra_i2s_device2.dev.platform_data = &tegra_audio_pdata[1];
	tegra_spdif_device.dev.platform_data = &tegra_spdif_pdata;
	tegra_das_device.dev.platform_data = &tegra_das_pdata;

	//disable for wifi sku
	if (ASUS3GAvailable()) {
               tegra_ehci2_device.dev.platform_data
                       = &ventana_ehci2_ulpi_platform_data;
	}

	platform_add_devices(ventana_devices, ARRAY_SIZE(ventana_devices));

	if ((ASUSGetProjectID() != 103) && (!console_none_on_cmdline)) {
		//register debug uart resource only if
		//"console=ttyXX" is specified and running target platform
		//is not JN101(EP103)
		platform_device_register(&debug_uart);
		tegra_gpio_enable(TEGRA_GPIO_PB0);
		gpio_request(TEGRA_GPIO_PB0, "UART4_RXD");
		//limit RXD of UART debug console.
		gpio_direction_output(TEGRA_GPIO_PB0, 1);
	}

	ventana_sdhci_init();
	//ventana_charge_init();
	ventana_regulator_init();

#if defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9) || defined(CONFIG_TOUCHSCREEN_ATMEL_MT_T9_EP102)
       pr_info("Initializing Atmel touch driver\n");
       ventana_touch_init_atmel();
#elif defined(CONFIG_TOUCHSCREEN_PANJIT_I2C)
       pr_info("Initializing Panjit touch driver\n");
       ventana_touch_init_panjit();
#endif

#ifdef CONFIG_TOUCHSCREEN_CYTTSP_I2C
ventana_touch_init();
#endif
#ifdef CONFIG_KEYBOARD_GPIO
	ventana_keys_init();
#endif
#ifdef CONFIG_KEYBOARD_TEGRA
	ventana_kbc_init();
#endif
#ifdef CONFIG_DSP_FM34
	ventana_dsp_init();
#endif

	ventana_wired_jack_init();
	ventana_usb_init();
	ventana_gps_init();
	ventana_panel_init();
	ventana_sensors_init();
	ventana_bt_rfkill();
	ventana_power_off_init();
	ventana_emc_init();
#ifdef CONFIG_BT_BLUESLEEP
	tegra_setup_bluesleep();
#endif
}