static void __init omap3_stalker_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);

	omap3_stalker_i2c_init();

	platform_add_devices(omap3_stalker_devices,
			     ARRAY_SIZE(omap3_stalker_devices));

	spi_register_board_info(omap3stalker_spi_board_info,
				ARRAY_SIZE(omap3stalker_spi_board_info));

	omap_serial_init();
	usb_musb_init(&musb_board_data);
	usb_ehci_init(&ehci_pdata);
	ads7846_dev_init();

	omap_mux_init_gpio(21, OMAP_PIN_OUTPUT);
	omap_mux_init_gpio(18, OMAP_PIN_INPUT_PULLUP);

	omap3stalker_init_eth();
	omap3_stalker_display_init();
/* Ensure SDRC pins are mux'd for self-refresh */
	omap_mux_init_signal("sdr_cke0", OMAP_PIN_OUTPUT);
	omap_mux_init_signal("sdr_cke1", OMAP_PIN_OUTPUT);
}
static void __init board_init(void)
{
	omap_board_config = board_config;
	omap_board_config_size = ARRAY_SIZE(board_config);

	archos_accel_init(&board_mma7456l_pdata);
	omap_i2c_init();

#ifdef CONFIG_OMAP3_PM
	prcm_init();
#endif

	init_buffer_pbias();

	if (archos_lcd_panel_init(&board_dss_data) < 0)
		pr_err("archos_lcd_panel_init failed!\n");
	if (archos_tvout_venc_init(&board_dss_data) < 0)
		pr_err("archos_tvout_venc_init failed\n");
	if (archos_tvout_hdmi_init(&board_dss_data) < 0)
		pr_err("archos_tvout_hdmi_init failed\n");
	if (archos_tvout_extdac_init(&board_dss_data) < 0)
		pr_err("archos_tvout_extdac_init failed\n");
	
	platform_device_register(&board_dss_device);

	platform_device_register(&omap_tvp_isp_device);

#ifdef CONFIG_ARCHOS_NAND_MOD
	{
	/* fixup for nand support of hw version 1.1 */
	u32 ret = gpmc_cs_read_reg(0, GPMC_CS_CONFIG1);
	if (hardware_rev == 1 && (ret & 0xC00) == GPMC_CONFIG1_DEVICETYPE_NAND) {
		usb_config.rev[1].enable_usb_musb.nb = 161;
		usb_config.rev[1].enable_usb_musb.mux_cfg = K26_3430_GPIO161;
		usb_config.rev[1].enable_usb_ehci.nb = 167;
		usb_config.rev[1].enable_usb_ehci.mux_cfg = B23_3430_GPIO167;
	}
	}
#endif
	
	archosg7_init();
	archos_flash_init();
	archos_atmega_init();
	ads7846_dev_init();
	omap_serial_init();
	usb_musb_init();
	usb_ehci_init();
	archos_usb2sata_init();
	archos_audio_gpio_init();
	archos_keys_init();
	archos_wifi_bt_init();

	omap_cfg_reg(AH26_3430_GPIO2);
	
	pm_power_off = archos_power_off;
}
static void __init omap3_evm_init(void)
{
	omap3_evm_get_revision();

	if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
		omap3evm_twldata.vaux2 = &omap3evm_vaux2;
	else
		omap3evm_twldata.vusb = &omap3_evm_vusb;

	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);

	omap3_evm_i2c_init();

	platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));

	spi_register_board_info(omap3evm_spi_board_info,
				ARRAY_SIZE(omap3evm_spi_board_info));

	omap_serial_init();

	/* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
	usb_nop_xceiv_register();

	if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
		/* enable EHCI VBUS using GPIO22 */
		omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP);
		gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS");
		gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0);
		gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1);

		/* Select EHCI port on main board */
		omap_mux_init_gpio(61, OMAP_PIN_INPUT_PULLUP);
		gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port");
		gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0);
		gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0);

		/* setup EHCI phy reset config */
		omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
		ehci_pdata.reset_gpio_port[1] = 21;

		/* EVM REV >= E can supply 500mA with EXTVBUS programming */
		musb_board_data.power = 500;
		musb_board_data.extvbus = 1;
	} else {
		/* setup EHCI phy reset on MDC */
		omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
		ehci_pdata.reset_gpio_port[1] = 135;
	}
	usb_musb_init(&musb_board_data);
	usb_ehci_init(&ehci_pdata);
	ads7846_dev_init();
	omap3evm_init_smsc911x();
	omap3_evm_display_init();
}
Esempio n. 4
0
static void __init omap_nokia770_init(void)
{
	platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices));
	spi_register_board_info(nokia770_spi_board_info,
				ARRAY_SIZE(nokia770_spi_board_info));
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);
	hwa742_dev_init();
	ads7846_dev_init();
	mipid_dev_init();
	omap1_usb_init(&nokia770_usb_config);
	nokia770_mmc_init();
}
void __init eukrea_mbimx27_baseboard_init(void)
{
	mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins,
		ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27");

	imx27_add_imx_uart1(&uart_pdata);
	imx27_add_imx_uart2(&uart_pdata);
#if !defined(MACH_EUKREA_CPUIMX27_USEUART4)
	imx27_add_imx_uart3(&uart_pdata);
#endif

	imx27_add_imx_fb(&eukrea_mbimx27_fb_data);
	imx27_add_mxc_mmc(0, &sdhc_pdata);

	i2c_register_board_info(0, eukrea_mbimx27_i2c_devices,
				ARRAY_SIZE(eukrea_mbimx27_i2c_devices));

	imx27_add_imx_ssi(0, &eukrea_mbimx27_ssi_pdata);

#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
	|| defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
	/*                                     */
	mxc_gpio_mode(GPIO_PORTD | 25 | GPIO_GPIO | GPIO_IN);
	ads7846_dev_init();
#endif

	/*              */
	mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
	imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data);
	spi_register_board_info(eukrea_mbimx27_spi_board_info,
			ARRAY_SIZE(eukrea_mbimx27_spi_board_info));

	/*                    */
	mxc_gpio_mode(GPIO_PORTF | 16 | GPIO_GPIO | GPIO_OUT);
	mxc_gpio_mode(GPIO_PORTF | 19 | GPIO_GPIO | GPIO_OUT);
	/*           */
	mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_OUT);
	gpio_request(GPIO_PORTE | 5, "backlight");
	platform_device_register(&eukrea_mbimx27_bl_dev);
	/*           */
	mxc_gpio_mode(GPIO_PORTA | 25 | GPIO_GPIO | GPIO_OUT);
	gpio_request(GPIO_PORTA | 25, "lcd_enable");
	platform_device_register(&eukrea_mbimx27_lcd_powerdev);

	imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data);

	gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info);
}
static void __init board_init(void)
{
	int num_displays = 0;

	omap_board_config = board_config;
	omap_board_config_size = ARRAY_SIZE(board_config);

	msecure_init();
	/* offmode config, before I2C config! */
	board_offmode_config();	
	omap_i2c_init();
	/* Fix to prevent VIO leakage on wl127x */
	wl127x_vio_leakage_fix();

#if defined CONFIG_OMAP2_DSS
	if (archos_lcd_panel_init(&board_lcd_device) == 0) {
		board_dss_devices[num_displays++] = &board_lcd_device;
		board_dss_data.default_device = &board_lcd_device;
	}
#ifdef CONFIG_OMAP2_DSS_DUMMY
	board_dss_devices[num_displays++] = &board_dummy_device;
	board_dss_data.default_device = &board_dummy_device;
#endif /* CONFIG_OMAP2_DSS_DUMMY */
	board_dss_data.num_devices = num_displays;
#endif/* CONFIG_OMAP2_DSS */

	platform_add_devices(board_devices, ARRAY_SIZE(board_devices));

	omap_cfg_reg(R3_3611_UART2_RX);
	omap_cfg_reg(Y3_3611_UART1_RX);
	omap_cfg_reg(AA2_3611_UART1_CTS);
	omap_serial_init();
	usb_musb_init();

	archos_accel_init(&board_mma7660fc_pdata);

	ads7846_dev_init();

	archos_mmc1_setup_gpios(&mmc[0], &board_vmmc_ext);
	twl4030_mmc_init(mmc);
	board_vmmc_ext_supply.dev = mmc[0].dev;
	board_vmmc2_supply.dev = mmc[1].dev;

	archos_audio_gpio_init();
	archos_leds_init();
	archos_keys_init();
	enable_board_wakeup_source();
}
Esempio n. 7
0
static void __init omap_nokia770_init(void)
{
	nokia770_config[0].data = &nokia770_usb_config;

	platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices));
	spi_register_board_info(nokia770_spi_board_info,
				ARRAY_SIZE(nokia770_spi_board_info));
	omap_board_config = nokia770_config;
	omap_board_config_size = ARRAY_SIZE(nokia770_config);
	omap_gpio_init();
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);
	omap_dsp_init();
	ads7846_dev_init();
	mipid_dev_init();
}
Esempio n. 8
0
static void __init omap_ldp_init(void)
{
	omap_i2c_init();
	platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
	omap_board_config = ldp_config;
	omap_board_config_size = ARRAY_SIZE(ldp_config);
	ts_gpio = 54;
	ldp_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
	spi_register_board_info(ldp_spi_board_info,
				ARRAY_SIZE(ldp_spi_board_info));
	msecure_init();
	ads7846_dev_init();
	omap_serial_init();
	usb_musb_init();
	twl4030_mmc_init(mmc);
}
Esempio n. 9
0
static void __init omap_ldp_init(void)
{
	omap_i2c_init();
	platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
	ts_gpio = 54;
	ldp_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
	spi_register_board_info(ldp_spi_board_info,
				ARRAY_SIZE(ldp_spi_board_info));
	ads7846_dev_init();
	omap_serial_init();
	usb_musb_init();

	twl4030_mmc_init(mmc);
	/* link regulators to MMC adapters */
	ldp_vmmc1_supply.dev = mmc[0].dev;
}
Esempio n. 10
0
static void __init omap3_evm_init(void)
{
	omap3_evm_get_revision();
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);

	omap3_evm_i2c_init();

	platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));

	spi_register_board_info(omap3evm_spi_board_info,
				ARRAY_SIZE(omap3evm_spi_board_info));

	omap_serial_init();
#ifdef CONFIG_NOP_USB_XCEIV
	/* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
	usb_nop_xceiv_register();
#endif
	if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
		/* enable EHCI VBUS using GPIO22 */
		omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP);
		gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS");
		gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0);
		gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1);

		/* Select EHCI port on main board */
		omap_mux_init_gpio(61, OMAP_PIN_INPUT_PULLUP);
		gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port");
		gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0);
		gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0);

		/* setup EHCI phy reset config */
		omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
		ehci_pdata.reset_gpio_port[1] = 21;

	} else {
		/* setup EHCI phy reset on MDC */
		omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
		ehci_pdata.reset_gpio_port[1] = 135;

		/* MDC also need VUSB1V5 regulator */
		ehci_pdata.aux[1] = 1;
	}
	usb_musb_init();
	usb_ehci_init(&ehci_pdata);
	ads7846_dev_init();
	omap3evm_init_smsc911x();
}
static void __init omap3_evm_init(void)
{
	omap3_evm_i2c_init();

	platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));

	spi_register_board_info(omap3evm_spi_board_info,
				ARRAY_SIZE(omap3evm_spi_board_info));

	omap_serial_init();
#ifdef CONFIG_NOP_USB_XCEIV
	/* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
	usb_nop_xceiv_register();
#endif
	usb_musb_init();
	ads7846_dev_init();
}
Esempio n. 12
0
static void __init omap_3430sdp_init(void)
{
	omap3430_i2c_init();
	platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
	if (omap_rev() > OMAP3430_REV_ES1_0)
		ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
	else
		ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV1;
	sdp3430_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
	spi_register_board_info(sdp3430_spi_board_info,
				ARRAY_SIZE(sdp3430_spi_board_info));
	ads7846_dev_init();
	omap_serial_init();
	usb_musb_init();
	board_smc91x_init();
	enable_board_wakeup_source();
}
Esempio n. 13
0
static void __init omap_3430sdp_init(void)
{
	platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
	omap_board_config = sdp3430_config;
	omap_board_config_size = ARRAY_SIZE(sdp3430_config);
	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0))
		ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV2;
	else
		ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV1;
	sdp3430_spi_board_info[0].irq = OMAP_GPIO_IRQ(ts_gpio);
	spi_register_board_info(sdp3430_spi_board_info,
				ARRAY_SIZE(sdp3430_spi_board_info));
	ads7846_dev_init();
	sdp3430_flash_init();
	omap_serial_init();
	sdp3430_usb_init();
	sdp_mmc_init();
}
Esempio n. 14
0
static void __init board_init(void)
{
	int num_displays = 0;
	
	omap_board_config = board_config;
	omap_board_config_size = ARRAY_SIZE(board_config);

	msecure_init();
	/* offmode config, before I2C config! */
	board_offmode_config();
	omap_i2c_init();
	
	/* Fix to prevent VIO leakage on wl127x */
	wl127x_vio_leakage_fix();
	
#if defined CONFIG_OMAP2_DSS
	if (archos_lcd_panel_init(&board_lcd_device) == 0) {
		board_dss_devices[num_displays++] = &board_lcd_device;
		board_dss_data.default_device = &board_lcd_device;
	}
	board_dss_devices[num_displays++] = &board_tv_device;
	board_dss_data.num_devices = num_displays;
	panel_tv_init();
#endif

	platform_add_devices(board_devices, ARRAY_SIZE(board_devices));

	omap_cfg_reg(H20_3430_UART3_RX_IRRX);
	omap_serial_init();
	usb_musb_init();

	archos_accel_init(&board_mma7660fc_pdata);

	ads7846_dev_init();

	twl4030_mmc_init(mmc);
	board_vmmc2_supply.dev = mmc[0].dev;

	archos_audio_gpio_init();
	archos_camera_ov7675_init();
	archos_leds_init();
	archos_keys_init();
	enable_board_wakeup_source();
}
static void __init board_init(void)
{
	omap_board_config = board_config;
	omap_board_config_size = ARRAY_SIZE(board_config);

	archos_accel_init(&board_mma7456l_pdata);
	omap_i2c_init();

#ifdef CONFIG_OMAP3_PM
	prcm_init();
#endif

	init_buffer_pbias();

	if (archos_lcd_panel_init(&board_dss_data) < 0)
		pr_err("archos_lcd_panel_init failed!\n");
	if (archos_tvout_venc_init(&board_dss_data) < 0)
		pr_err("archos_tvout_venc_init failed\n");
	if (archos_tvout_hdmi_init(&board_dss_data) < 0)
		pr_err("archos_tvout_hdmi_init failed\n");
	if (archos_tvout_extdac_init(&board_dss_data) < 0)
		pr_err("archos_tvout_extdac_init failed\n");
	
	platform_device_register(&board_dss_device);

	platform_device_register(&omap_tvp_isp_device);

	archosg7_init();
	archos_flash_init();
	archos_atmega_init();
	ads7846_dev_init();
	omap_serial_init();
	usb_musb_init();
	hsmmc_init();
	usb_ehci_init();
	archos_usbhdd_init();
	archos_audio_gpio_init();
	archos_keys_init();
	archos_wifi_bt_init();

	omap_cfg_reg(AH26_3430_GPIO2);
	
	pm_power_off = archos_power_off;
}
Esempio n. 16
0
static void __init omap_3430sdp_init(void)
{
	omap3430_i2c_init();
	platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
	omap_board_config = sdp3430_config;
	omap_board_config_size = ARRAY_SIZE(sdp3430_config);
	if (omap_rev() > OMAP3430_REV_ES1_0)
		ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV2;
	else
		ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV1;
	sdp3430_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
	spi_register_board_info(sdp3430_spi_board_info,
				ARRAY_SIZE(sdp3430_spi_board_info));
	ads7846_dev_init();
	sdp3430_flash_init();
	msecure_init();
	omap_serial_init();
	usb_musb_init();
	usb_ehci_init();
}
Esempio n. 17
0
static void __init omap_ldp_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	ldp_init_smsc911x();
	omap_i2c_init();
	platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
	ts_gpio = 54;
	ldp_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
	spi_register_board_info(ldp_spi_board_info,
				ARRAY_SIZE(ldp_spi_board_info));
	ads7846_dev_init();
	omap_serial_init();
	usb_musb_init(&musb_board_data);
	board_nand_init(ldp_nand_partitions,
		ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS);

	omap2_hsmmc_init(mmc);
	/* link regulators to MMC adapters */
	ldp_vmmc1_supply.dev = mmc[0].dev;
}
static void __init omap_3430sdp_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	omap3430_i2c_init();
	platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
	if (omap_rev() > OMAP3430_REV_ES1_0)
		ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
	else
		ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV1;
	sdp3430_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
	spi_register_board_info(sdp3430_spi_board_info,
				ARRAY_SIZE(sdp3430_spi_board_info));
	ads7846_dev_init();
	omap_serial_init();
	usb_musb_init(&musb_board_data);
	board_smc91x_init();
	board_flash_init(sdp_flash_partitions, chip_sel_3430);
	sdp3430_display_init();
	enable_board_wakeup_source();
	usb_ehci_init(&ehci_pdata);
}
Esempio n. 19
0
static void __init omap_nokia770_init(void)
{
	/* On Nokia 770, the SleepX signal is masked with an
	 * MPUIO line by default.  It has to be unmasked for it
	 * to become functional */

	/* SleepX mask direction */
	omap_writew((omap_readw(0xfffb5008) & ~2), 0xfffb5008);
	/* Unmask SleepX signal */
	omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);

	platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices));
	spi_register_board_info(nokia770_spi_board_info,
				ARRAY_SIZE(nokia770_spi_board_info));
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);
	hwa742_dev_init();
	ads7846_dev_init();
	mipid_dev_init();
	omap1_usb_init(&nokia770_usb_config);
	nokia770_mmc_init();
}
Esempio n. 20
0
static void __init omap_2430sdp_init(void)
{
	omap2430_i2c_init();

	platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
	omap_board_config = sdp2430_config;
	omap_board_config_size = ARRAY_SIZE(sdp2430_config);
	omap_serial_init();

	msecure_init();

	sdp2430_flash_init();
	usb_musb_init(NULL);

	spi_register_board_info(sdp2430_spi_board_info,
				ARRAY_SIZE(sdp2430_spi_board_info));
	ads7846_dev_init();
	twl4030_mmc_init(mmc);

	/* turn off secondary LCD backlight */
	gpio_direction_output(SECONDARY_LCD_GPIO, 0);
}
Esempio n. 21
0
static void __init omap_3430sdp_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	omap_board_config = sdp3430_config;
	omap_board_config_size = ARRAY_SIZE(sdp3430_config);
	omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
	omap3430_i2c_init();
	omap_display_init(&sdp3430_dss_data);
	if (omap_rev() > OMAP3430_REV_ES1_0)
		ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
	else
		ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV1;
	sdp3430_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
	spi_register_board_info(sdp3430_spi_board_info,
				ARRAY_SIZE(sdp3430_spi_board_info));
	ads7846_dev_init();
	board_serial_init();
	usb_musb_init(&musb_board_data);
	board_smc91x_init();
	board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
	sdp3430_display_init();
	enable_board_wakeup_source();
	usbhs_init(&usbhs_bdata);
}
Esempio n. 22
0
static void __init VAR_SOM_OM3X_init(void)
{
	VAR_SOM_OM3X_twldata.vaux2 = &VAR_SOM_OM3X_vaux2;

	omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
	
	// USB phy enable
	if (gpio_request(24,"GPIO24")<0)
		printk(KERN_ERR "Can't get GPIO24 for USB phy reset\n");
	gpio_direction_output(24, 1);
	gpio_set_value(24, 1);


	// SMSC 9221 interrupt
	if (gpio_request(29,"GPIO29")<0)
		printk(KERN_ERR "Can't get GPIO29 for ETH0\n");
	gpio_direction_input(29);

#if 0
#ifdef VER_2_1
	omap_mux_init_gpio(VAR_SOM_OM3X_USB3_PWR_ENn, OMAP_PIN_INPUT_PULLUP);
	if (gpio_request(VAR_SOM_OM3X_USB3_PWR_ENn,"USB3_PWR_ENn")<0)
		printk(KERN_ERR "Can't get 167 for USB3 power enable\n");
	gpio_direction_output(VAR_SOM_OM3X_USB3_PWR_ENn, 1);
	gpio_set_value(VAR_SOM_OM3X_USB3_PWR_ENn, 1);
#endif
#endif

	VAR_SOM_OM3X_i2c_init();

	platform_add_devices(VAR_SOM_OM3X_devices, ARRAY_SIZE(VAR_SOM_OM3X_devices));

#if defined (CONFIG_TOUCHSCREEN_CTW6120) || defined (CONFIG_TOUCHSCREEN_ADS7846)
	spi_register_board_info(VAR_SOM_OM3X_spi_board_info,
				ARRAY_SIZE(VAR_SOM_OM3X_spi_board_info));
#endif

	omap_serial_init();
#ifdef CONFIG_NOP_USB_XCEIV
	usb_nop_xceiv_register();
#endif

	omap_mux_init_gpio(VAR_SOM_OM3X_DVI_PANEL_EN_GPIO, OMAP_PIN_INPUT_PULLUP);


	usb_musb_init();

	usb_ehci_init(&ehci_pdata);
	VAR_SOM_OM3X_flash_init();
		ads7846_dev_init();
	ctw6120_dev_init();
	VAR_SOM_OM3X_init_smsc911x();

#ifdef CONFIG_PANEL_VARISCITE
	VAR_SOM_OM3X_display_init();
#endif
	/* Ensure SDRC pins are mux'd for self-refresh */
	omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
	omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);

	/* Push Buttons */
	bp_add_device_buttons();
}
Esempio n. 23
0
static void __init board_init(void)
{
	int num_displays = 0;

	init_buffer_pbias();

	omap_board_config = board_config;
	omap_board_config_size = ARRAY_SIZE(board_config);

	archos_leds_init();	// set it here mask hugly transitions 

	/* before omap_i2c_init() or IRQ will not forwarded to driver */
	if (display_config.nrev > hardware_rev)
		archos_hdmi_gpio_init(&display_config.rev[hardware_rev]);

	msecure_init();
	/* offmode config, before I2C config! */
	board_offmode_config();
	omap_i2c_init();
	/* Fix to prevent VIO leakage on wl127x */
	wl127x_vio_leakage_fix();

#if defined CONFIG_OMAP2_DSS
	if (archos_lcd_panel_init(&board_lcd_device) == 0) {
		board_dss_devices[num_displays++] = &board_lcd_device;
		board_dss_data.default_device = &board_lcd_device;
	}
	board_dss_devices[num_displays++] = &board_hdmi_device;
#ifdef CONFIG_OMAP2_DSS_DUMMY
	board_dss_devices[num_displays++] = &board_dummy_device;
	board_dss_data.default_device = &board_dummy_device;
#endif /* CONFIG_OMAP2_DSS_DUMMY */
	board_dss_data.num_devices = num_displays;
#endif/* CONFIG_OMAP2_DSS */

	platform_add_devices(board_devices, ARRAY_SIZE(board_devices));

	omap_cfg_reg(H20_3430_UART3_RX_IRRX);
	omap_serial_init();

	usb_musb_init();

	archos_usb_ehci_init();

	archos_accel_init(&board_mma7660fc_pdata);

	if ( hardware_rev < 2 ) {
		ads7846_dev_init();
	}

	twl4030_mmc_init(mmc);
	board_vmmc2_supply.dev = mmc[0].dev;
	
	archos_audio_gpio_init();

	archos_usb2sata_init();

	archos_camera_ov7675_init();
	archos_keys_init();
	enable_board_wakeup_source();
}
/*
 * system init for baseboard usage. Will be called by cpuimx27 init.
 *
 * Add platform devices present on this baseboard and init
 * them from CPU side as far as required to use them later on
 */
void __init eukrea_mbimx27_baseboard_init(void)
{
	mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins,
		ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27");

#if defined(CONFIG_SND_SOC_EUKREA_TLV320) \
	|| defined(CONFIG_SND_SOC_EUKREA_TLV320_MODULE)
	/* SSI unit master I2S codec connected to SSI_PINS_4*/
	mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0,
			MXC_AUDMUX_V1_PCR_SYN |
			MXC_AUDMUX_V1_PCR_TFSDIR |
			MXC_AUDMUX_V1_PCR_TCLKDIR |
			MXC_AUDMUX_V1_PCR_RFSDIR |
			MXC_AUDMUX_V1_PCR_RCLKDIR |
			MXC_AUDMUX_V1_PCR_TFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) |
			MXC_AUDMUX_V1_PCR_RFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) |
			MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4)
	);
	mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR3_SSI_PINS_4,
			MXC_AUDMUX_V1_PCR_SYN |
			MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR1_SSI0)
	);
#endif

	imx27_add_imx_uart1(&uart_pdata);
	imx27_add_imx_uart2(&uart_pdata);
#if !defined(MACH_EUKREA_CPUIMX27_USEUART4)
	imx27_add_imx_uart3(&uart_pdata);
#endif

	mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data);
	mxc_register_device(&mxc_sdhc_device0, &sdhc_pdata);

	i2c_register_board_info(0, eukrea_mbimx27_i2c_devices,
				ARRAY_SIZE(eukrea_mbimx27_i2c_devices));

	mxc_register_device(&imx_ssi_device0, &eukrea_mbimx27_ssi_pdata);

#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
	|| defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
	/* ADS7846 Touchscreen controller init */
	mxc_gpio_mode(GPIO_PORTD | 25 | GPIO_GPIO | GPIO_IN);
	ads7846_dev_init();
#endif

#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
	/* SPI_CS0 init */
	mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
	imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data);
	spi_register_board_info(eukrea_mbimx27_spi_board_info,
			ARRAY_SIZE(eukrea_mbimx27_spi_board_info));
#endif

	/* Leds configuration */
	mxc_gpio_mode(GPIO_PORTF | 16 | GPIO_GPIO | GPIO_OUT);
	mxc_gpio_mode(GPIO_PORTF | 19 | GPIO_GPIO | GPIO_OUT);
	/* Backlight */
	mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_OUT);
	gpio_request(GPIO_PORTE | 5, "backlight");
	platform_device_register(&eukrea_mbimx27_bl_dev);
	/* LCD Reset */
	mxc_gpio_mode(GPIO_PORTA | 25 | GPIO_GPIO | GPIO_OUT);
	gpio_request(GPIO_PORTA | 25, "lcd_enable");
	platform_device_register(&eukrea_mbimx27_lcd_powerdev);

	mxc_register_device(&imx_kpp_device, &eukrea_mbimx27_keymap_data);

	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
}
Esempio n. 25
0
static void __init omap3_evm_init(void)
{
	omap3_evm_get_revision();

	if (cpu_is_omap3630())
		omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
	else
		omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);

	omap_board_config = omap3_evm_config;
	omap_board_config_size = ARRAY_SIZE(omap3_evm_config);

	omap3_evm_i2c_init();

	omap_display_init(&omap3_evm_dss_data);

	spi_register_board_info(omap3evm_spi_board_info,
				ARRAY_SIZE(omap3evm_spi_board_info));

	omap_serial_init();

	/* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
	usb_nop_xceiv_register();

	if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) {
		/* enable EHCI VBUS using GPIO22 */
		omap_mux_init_gpio(22, OMAP_PIN_INPUT_PULLUP);
		gpio_request(OMAP3_EVM_EHCI_VBUS, "enable EHCI VBUS");
		gpio_direction_output(OMAP3_EVM_EHCI_VBUS, 0);
		gpio_set_value(OMAP3_EVM_EHCI_VBUS, 1);

		/* Select EHCI port on main board */
		omap_mux_init_gpio(61, OMAP_PIN_INPUT_PULLUP);
		gpio_request(OMAP3_EVM_EHCI_SELECT, "select EHCI port");
		gpio_direction_output(OMAP3_EVM_EHCI_SELECT, 0);
		gpio_set_value(OMAP3_EVM_EHCI_SELECT, 0);

		/* setup EHCI phy reset config */
		omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
		usbhs_bdata.reset_gpio_port[1] = 21;

		/* EVM REV >= E can supply 500mA with EXTVBUS programming */
		musb_board_data.power = 500;
		musb_board_data.extvbus = 1;
	} else {
		/* setup EHCI phy reset on MDC */
		omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
		usbhs_bdata.reset_gpio_port[1] = 135;
	}
	usb_musb_init(&musb_board_data);
	usbhs_init(&usbhs_bdata);
	ads7846_dev_init();
	omap3evm_init_smsc911x();
	omap3_evm_display_init();

#ifdef CONFIG_WL12XX_PLATFORM_DATA
	/* WL12xx WLAN Init */
	if (wl12xx_set_platform_data(&omap3evm_wlan_data))
		pr_err("error setting wl12xx data\n");
	platform_device_register(&omap3evm_wlan_regulator);
#endif
}