Exemple #1
0
static int __init igep2_soc_init(void)
{
	int ret;

	if (!machine_is_igep0020())
		return -ENODEV;
	printk(KERN_INFO "IGEP v2 SoC init\n");

	igep2_snd_device = platform_device_alloc("soc-audio", -1);
	if (!igep2_snd_device) {
		printk(KERN_ERR "Platform device allocation failed\n");
		return -ENOMEM;
	}

	platform_set_drvdata(igep2_snd_device, &snd_soc_card_igep2);

	ret = platform_device_add(igep2_snd_device);
	if (ret)
		goto err1;

	return 0;

err1:
	printk(KERN_ERR "Unable to add platform device\n");
	platform_device_put(igep2_snd_device);

	return ret;
}
static void __init igep_i2c_init(void)
{
	int ret;

	omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB,
			      TWL_COMMON_REGULATOR_VPLL2);
	igep_twldata.vpll2->constraints.apply_uV = true;
	igep_twldata.vpll2->constraints.name = "VDVI";

	if (machine_is_igep0020()) {
		/*
		 * Bus 3 is attached to the DVI port where devices like the
		 * pico DLP projector don't work reliably with 400kHz
		 */
		ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
					    ARRAY_SIZE(igep2_i2c3_boardinfo));
		if (ret)
			pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);

		igep_twldata.keypad	= &igep2_keypad_pdata;
		/* Get common pmic data */
		omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO, 0);
	}

	omap3_pmic_init("twl4030", &igep_twldata);
}
Exemple #3
0
static void __init igep_init(void)
{
	regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies));
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);

	/* Get IGEP2 hardware revision */
	igep2_get_revision();

	omap_hsmmc_init(mmc);

	/* Register I2C busses and drivers */
	igep_i2c_init();
	platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices));
	omap_serial_init();
	omap_sdrc_init(m65kxxxxam_sdrc_params,
				  m65kxxxxam_sdrc_params);
	usb_musb_init(NULL);

	igep_flash_init();
	igep_leds_init();

	/*
	 * WLAN-BT combo module from MuRata which has a Marvell WLAN
	 * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface.
	 */
	igep_wlan_bt_init();

	if (machine_is_igep0020()) {
		omap_display_init(&igep2_dss_data);
		igep2_init_smsc911x();
		usbhs_init(&igep2_usbhs_bdata);
	} else {
		usbhs_init(&igep3_usbhs_bdata);
	}
}
Exemple #4
0
static int __init igep2_soc_init(void)
{
	int ret;

	if (!machine_is_igep0020()) {
		pr_debug("Not IGEP v2!\n");
		return -ENODEV;
	}
	printk(KERN_INFO "IGEP v2 SoC init\n");

	igep2_snd_device = platform_device_alloc("soc-audio", -1);
	if (!igep2_snd_device) {
		printk(KERN_ERR "Platform device allocation failed\n");
		return -ENOMEM;
	}

	platform_set_drvdata(igep2_snd_device, &igep2_snd_devdata);
	igep2_snd_devdata.dev = &igep2_snd_device->dev;
	*(unsigned int *)igep2_dai.cpu_dai->private_data = 1; /* McBSP2 */

	ret = platform_device_add(igep2_snd_device);
	if (ret)
		goto err1;

	return 0;

err1:
	printk(KERN_ERR "Unable to add platform device\n");
	platform_device_put(igep2_snd_device);

	return ret;
}
Exemple #5
0
void  igep_init(void)
{
	regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies));
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);

	/* Get IGEP3 hardware revision */
	igep3_get_revision();

	omap_hsmmc_init(mmc);

	/* Register I2C busses and drivers */
	igep_i2c_init();
	platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices));
#if 0
	omap_serial_init();
	omap_sdrc_init(m65kxxxxam_sdrc_params,
				  m65kxxxxam_sdrc_params);
#endif
	usb_musb_init(NULL);
#if 0
	igep_flash_init();
	igep_leds_init();
#endif
	/* Add twl4030 common data */
	omap3_pmic_get_config(&twl4030_pdata, TWL_COMMON_PDATA_USB |
			TWL_COMMON_PDATA_AUDIO | TWL_COMMON_PDATA_MADC,
			TWL_COMMON_REGULATOR_VPLL2);

	igep00x0_pmic_get_config(&twl4030_pdata, 0,
			TWL_IGEP00X0_REGULATOR_VMMC1 |
			TWL_IGEP00X0_REGULATOR_VIO);

	omap_pmic_init(1, 2600, "twl4030", INT_34XX_SYS_NIRQ, &twl4030_pdata);


	platform_device_register(&igep00x0_vdd33_device);
	/*
	 * WLAN-BT combo module from MuRata which has a Marvell WLAN
	 * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface.
	 */
	igep00x0_wifi_bt_init(GPIO_WIFI_NPD, GPIO_WIFI_NRESET,
			GPIO_BT_NRESET, 0);

	if (machine_is_igep0020()) {
		omap_display_init(&igep2_dss_data);
		igep2_init_smsc911x();
		usbhs_init(&igep2_usbhs_bdata);
	} else {
		usbhs_init(&igep3_usbhs_bdata);
	}
}
static void __init igep_leds_init(void)
{
	if (machine_is_igep0020()) {
		igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
		igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
		igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
	} else {
		igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED;
		igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN;
		igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED;
	}

	platform_device_register(&igep_led_device);
}
static inline void igep_leds_init(void)
{
	int i;

	if (machine_is_igep0020()) {
		igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
		igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
		igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
	} else {
		igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED;
		igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN;
		igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED;
	}

	if (gpio_request_array(igep_gpio_leds, ARRAY_SIZE(igep_gpio_leds))) {
		pr_warning("IGEP v2: Could not obtain leds gpios\n");
		return;
	}

	for (i = 0; i < ARRAY_SIZE(igep_gpio_leds); i++)
		gpio_export(igep_gpio_leds[i].gpio, 0);
}