Ejemplo n.º 1
0
static void __init omap_zoom_init(void)
{
	if (machine_is_omap_zoom2()) {
		omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	} else if (machine_is_omap_zoom3()) {
		omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
		omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT);
		usbhs_init(&usbhs_bdata);
	}

	board_nand_init(zoom_nand_partitions,
			ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS,
			NAND_BUSWIDTH_16, nand_default_timings);
	zoom_debugboard_init();
	zoom_peripherals_init();

	if (machine_is_omap_zoom2())
		omap_sdrc_init(mt46h32m32lf6_sdrc_params,
					  mt46h32m32lf6_sdrc_params);
	else if (machine_is_omap_zoom3())
		omap_sdrc_init(h8mbx00u0mer0em_sdrc_params,
					  h8mbx00u0mer0em_sdrc_params);

	zoom_display_init();
}
Ejemplo n.º 2
0
static int __init zoom2_soc_init(void)
{
	int ret;

	if (!machine_is_omap_zoom2())
		return -ENODEV;
	printk(KERN_INFO "Zoom2 SoC init\n");

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

	platform_set_drvdata(zoom2_snd_device, &snd_soc_zoom2);
	ret = platform_device_add(zoom2_snd_device);
	if (ret)
		goto err1;

	BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0);
	gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0);

	BUG_ON(gpio_request(ZOOM2_HEADSET_EXTMUTE_GPIO, "ext_mute") < 0);
	gpio_direction_output(ZOOM2_HEADSET_EXTMUTE_GPIO, 0);

	return 0;

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

	return ret;
}
Ejemplo n.º 3
0
static int __init zoom2_soc_init(void)
{
	int ret;

	if (!machine_is_omap_zoom2())
		return -ENODEV;
;

	zoom2_snd_device = platform_device_alloc("soc-audio", -1);
	if (!zoom2_snd_device) {
;
		return -ENOMEM;
	}

	platform_set_drvdata(zoom2_snd_device, &snd_soc_zoom2);
	ret = platform_device_add(zoom2_snd_device);
	if (ret)
		goto err1;

	BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0);
	gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0);

	BUG_ON(gpio_request(ZOOM2_HEADSET_EXTMUTE_GPIO, "ext_mute") < 0);
	gpio_direction_output(ZOOM2_HEADSET_EXTMUTE_GPIO, 0);

	return 0;

err1:
;
	platform_device_put(zoom2_snd_device);

	return ret;
}
Ejemplo n.º 4
0
static int __init config_wakeup12_sequence(u8 address)
{
	int err = 0;

	/* Set SLEEP to ACTIVE SEQ address for P1 and P2 */
	err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, address,
				  R_SEQ_ADD_SA12);

	/* P1/P2/P3 LVL_WAKEUP should be on LEVEL */
	err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, LVL_WAKEUP,
					R_P1_SW_EVENTS);
	err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, LVL_WAKEUP,
					R_P2_SW_EVENTS);

	if (machine_is_omap_3430sdp() || machine_is_omap_ldp() ||
	    machine_is_omap_zoom2()) {
		u8 data;
		/* Disabling AC charger effect on sleep-active transitions */
		err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
						R_CFG_P1_TRANSITION);
		data &= ~(1<<1);
		err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
						R_CFG_P1_TRANSITION);
	}

	if (err)
		printk(KERN_ERR "TWL4030 wakeup sequence for P1 and P2" \
				"config error\n");

	return err;
}
Ejemplo n.º 5
0
static void __init omap_zoom_init_early(void)
{
	omap2_init_common_infrastructure();
	if (machine_is_omap_zoom2())
		omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
					  mt46h32m32lf6_sdrc_params);
	else if (machine_is_omap_zoom3())
		omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
					  h8mbx00u0mer0em_sdrc_params);
}
Ejemplo n.º 6
0
static int __init omap_i2c_init(void)
{
	if (machine_is_omap_zoom2()) {
		zoom_audio_data.ramp_delay_value = 3;	/* 161 ms */
		zoom_audio_data.hs_extmute = 1;
		zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute;
	}
	omap_register_i2c_bus(1, 2400, zoom_i2c_boardinfo,
			ARRAY_SIZE(zoom_i2c_boardinfo));
	omap_register_i2c_bus(2, 400, NULL, 0);
	omap_register_i2c_bus(3, 400, NULL, 0);
	return 0;
}
Ejemplo n.º 7
0
static int __init omap_i2c_init(void)
{
	omap3_pmic_get_config(&zoom_twldata,
			TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
			TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
			TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);

	if (machine_is_omap_zoom2())
		zoom_twldata.audio->codec->ramp_delay_value = 3; /* 161 ms */

	omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata);
	omap_register_i2c_bus(2, 400, NULL, 0);
	omap_register_i2c_bus(3, 400, NULL, 0);
	return 0;
}
static void __init omap_zoom_init(void)
{
	if (machine_is_omap_zoom2()) {
		omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	} else if (machine_is_omap_zoom3()) {
		omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
		omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT);
		usbhs_init(&usbhs_bdata);
	}

	board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions),
						ZOOM_NAND_CS, NAND_BUSWIDTH_16);
	zoom_debugboard_init();
	zoom_peripherals_init();
	zoom_display_init();
}
Ejemplo n.º 9
0
static int __init zoom2_soc_init(void)
{
	int ret;

	if (!machine_is_omap_zoom2()) {
		pr_debug("Not Zoom2!\n");
	//	return -ENODEV;
	}
	printk(KERN_INFO "Zoom2 SoC init\n");

	snd_soc_register_dai(&gpak_dai);

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

	platform_set_drvdata(zoom2_snd_device, &zoom2_snd_devdata);
	zoom2_snd_devdata.dev = &zoom2_snd_device->dev;
	*(unsigned int *)zoom2_dai[0].cpu_dai->private_data = 2; /* McBSP3 */
#ifdef CONFIG_SND_OMAP_SOC_ZOOM2_AUDIO
	*(unsigned int *)zoom2_dai[1].cpu_dai->private_data = 0; /* GPAK */
	*(unsigned int *)zoom2_dai[2].cpu_dai->private_data = 1; /* McBSP2 */
#endif
	ret = platform_device_add(zoom2_snd_device);
	if (ret)
		goto err1;

#if 0
	BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0);
	gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0);

	BUG_ON(gpio_request(ZOOM2_HEADSET_EXTMUTE_GPIO, "ext_mute") < 0);
	gpio_direction_output(ZOOM2_HEADSET_EXTMUTE_GPIO, 0);
#endif
	return 0;

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

	return ret;
}
Ejemplo n.º 10
0
static int __init omap_i2c_init(void)
{
	omap3_pmic_get_config(&zoom_twldata,
			TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
			TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
			TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);

	if (machine_is_omap_zoom2()) {
		struct twl4030_codec_data *codec_data;
		codec_data = zoom_twldata.audio->codec;

		codec_data->ramp_delay_value = 3;	/* 161 ms */
		codec_data->hs_extmute = 1;
		codec_data->set_hs_extmute = zoom2_set_hs_extmute;
	}
	omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
	omap_register_i2c_bus(2, 400, NULL, 0);
	omap_register_i2c_bus(3, 400, NULL, 0);
	return 0;
}
static int __init omap_i2c_init(void)
{
    omap3_pmic_get_config(&zoom_twldata,
                          TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
                          TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
                          TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);

    if (machine_is_omap_zoom2()) {
        struct twl4030_codec_data *codec_data;
        codec_data = zoom_twldata.audio->codec;

        codec_data->ramp_delay_value = 3;	/* 161 ms */
        codec_data->hs_extmute = 1;
        codec_data->hs_extmute_gpio = ZOOM2_HEADSET_EXTMUTE_GPIO;
    }
    omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata);
    omap_register_i2c_bus(2, 400, NULL, 0);
    omap_register_i2c_bus(3, 400, NULL, 0);
    return 0;
}
Ejemplo n.º 12
0
static int __init zoom2_soc_init(void)
{
	int ret;

	if (!machine_is_omap_zoom2()) {
		pr_debug("Not ZOOM2!\n");
		return -ENODEV;
	}
	printk(KERN_INFO "ZOOM2 SoC init\n");

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

	platform_set_drvdata(zoom2_snd_device, &zoom2_snd_devdata);
	zoom2_snd_devdata.dev = &zoom2_snd_device->dev;

	*(unsigned int *)zoom2_dai[0].cpu_dai->private_data = 1; /* McBSP2 */
#ifdef CONFIG_SND_SOC_TWL4030_FM
	*(unsigned int *)zoom2_dai[1].cpu_dai->private_data = 3; /* McBSP4 */
#endif

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

	if (gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0)
		BUG();
	gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0);

	return 0;

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

	return ret;
}
Ejemplo n.º 13
0
static void __init omap_zoom_init(void)
{
	if (machine_is_omap_zoom2()) {
		omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	} else if (machine_is_omap_zoom3()) {
		omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
		omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT);
		omap_mux_init_gpio(ZOOM3_McBSP3_BT_GPIO, OMAP_PIN_OUTPUT);
		usbhs_init(&usbhs_bdata);
	}

	board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions),
						ZOOM_NAND_CS, NAND_BUSWIDTH_16);
	zoom3_wifi_init();
	zoom_debugboard_init();
	zoom_peripherals_init();
	zoom_display_init();
	omap_register_ion();
	/* Added to register zoom devices */
	platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices));
	wl127x_vio_leakage_fix();
}