Beispiel #1
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);

	omap_serial_init();
	omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);

	/* 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(OMAP3_EVM_EHCI_VBUS, OMAP_PIN_INPUT_PULLUP);
		/* Select EHCI port on main board */
		omap_mux_init_gpio(OMAP3_EVM_EHCI_SELECT,
				   OMAP_PIN_INPUT_PULLUP);
		gpio_request_array(omap3_evm_ehci_gpios,
				   ARRAY_SIZE(omap3_evm_ehci_gpios));

		/* 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);
	omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL);
	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
}
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 overo_init(void)
{
	overo_i2c_init();
	platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
	omap_board_config = overo_config;
	omap_board_config_size = ARRAY_SIZE(overo_config);
	omap_serial_init();
	twl4030_mmc_init(mmc);
	usb_musb_init();
	usb_ehci_init();
	overo_flash_init();

	if ((gpio_request(OVERO_GPIO_W2W_NRESET,
			  "OVERO_GPIO_W2W_NRESET") == 0) &&
	    (gpio_direction_output(OVERO_GPIO_W2W_NRESET, 1) == 0)) {
		gpio_export(OVERO_GPIO_W2W_NRESET, 0);
		gpio_set_value(OVERO_GPIO_W2W_NRESET, 0);
		udelay(10);
		gpio_set_value(OVERO_GPIO_W2W_NRESET, 1);
	} else {
		printk(KERN_ERR "could not obtain gpio for "
					"OVERO_GPIO_W2W_NRESET\n");
	}

	if ((gpio_request(OVERO_GPIO_BT_XGATE, "OVERO_GPIO_BT_XGATE") == 0) &&
	    (gpio_direction_output(OVERO_GPIO_BT_XGATE, 0) == 0))
		gpio_export(OVERO_GPIO_BT_XGATE, 0);
	else
		printk(KERN_ERR "could not obtain gpio for OVERO_GPIO_BT_XGATE\n");

	if ((gpio_request(OVERO_GPIO_BT_NRESET, "OVERO_GPIO_BT_NRESET") == 0) &&
	    (gpio_direction_output(OVERO_GPIO_BT_NRESET, 1) == 0)) {
		gpio_export(OVERO_GPIO_BT_NRESET, 0);
		gpio_set_value(OVERO_GPIO_BT_NRESET, 0);
		mdelay(6);
		gpio_set_value(OVERO_GPIO_BT_NRESET, 1);
	} else {
		printk(KERN_ERR "could not obtain gpio for "
					"OVERO_GPIO_BT_NRESET\n");
	}

	if ((gpio_request(OVERO_GPIO_USBH_CPEN, "OVERO_GPIO_USBH_CPEN") == 0) &&
	    (gpio_direction_output(OVERO_GPIO_USBH_CPEN, 1) == 0))
		gpio_export(OVERO_GPIO_USBH_CPEN, 0);
	else
		printk(KERN_ERR "could not obtain gpio for "
					"OVERO_GPIO_USBH_CPEN\n");

	if ((gpio_request(OVERO_GPIO_USBH_NRESET,
			  "OVERO_GPIO_USBH_NRESET") == 0) &&
	    (gpio_direction_output(OVERO_GPIO_USBH_NRESET, 1) == 0))
		gpio_export(OVERO_GPIO_USBH_NRESET, 0);
	else
		printk(KERN_ERR "could not obtain gpio for "
					"OVERO_GPIO_USBH_NRESET\n");
}
Beispiel #4
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);
	omap_serial_init();
	twl4030_mmc_init(mmc);
	usb_musb_init();
}
void __init latona_peripherals_init(void)
{
      
	omap_i2c_init();
	atmel_dev_init();
	omap_serial_init(omap_serial_platform_data);
	usb_musb_init(&musb_board_data);
	enable_board_wakeup_source();
	
}
Beispiel #6
0
static void __init rx51_init(void)
{
	omap_serial_init();
	usb_musb_init();
	rx51_peripherals_init();

	
	omap_cfg_reg(H16_34XX_SDRC_CKE0);
	omap_cfg_reg(H17_34XX_SDRC_CKE1);
}
static void __init omap_palmte_init(void)
{
	omap_board_config = palmte_config;
	omap_board_config_size = ARRAY_SIZE(palmte_config);

	platform_add_devices(devices, ARRAY_SIZE(devices));

	omap_serial_init();
	palmte_gpio_setup();
}
static void __init rx51_init(void)
{
	omap_serial_init();
	usb_musb_init();
	rx51_peripherals_init();

	/* Ensure SDRC pins are mux'd for self-refresh */
	omap_cfg_reg(H16_34XX_SDRC_CKE0);
	omap_cfg_reg(H17_34XX_SDRC_CKE1);
}
Beispiel #9
0
static void __init cm_t3517_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	omap_serial_init();
	cm_t3517_init_leds();
	cm_t3517_init_nand();
	cm_t3517_init_rtc();
	cm_t3517_init_usbh();
	cm_t3517_init_hecc();
}
static void __init omap_sdp_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
	omap_serial_init();
	zoom_peripherals_init();
	board_smc91x_init();
	board_flash_init(sdp_flash_partitions, chip_sel_sdp);
	enable_board_wakeup_source();
	usb_ehci_init(&ehci_pdata);
}
Beispiel #11
0
static void __init rx51_init(void)
{
	omap_board_config = rx51_config;
	omap_board_config_size = ARRAY_SIZE(rx51_config);
	omap_serial_init();
	usb_musb_init();
	rx51_flash_init();
	rx51_peripherals_init();
	rx51_video_init();
}
Beispiel #12
0
static void __init am3517_evm_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	platform_add_devices(am3517_evm_devices,
				ARRAY_SIZE(am3517_evm_devices));

	omap_serial_init();
	usb_musb_init();
	usb_ehci_init(&ehci_pdata);
}
Beispiel #13
0
static void __init h2_init(void)
{
	h2_init_smc91x();

	/* Here we assume the NOR boot config:  NOR on CS3 (possibly swapped
	 * to address 0 by a dip switch), NAND on CS2B.  The NAND driver will
	 * notice whether a NAND chip is enabled at probe time.
	 *
	 * FIXME revC boards (and H3) support NAND-boot, with a dip switch to
	 * put NOR on CS2B and NAND (which on H2 may be 16bit) on CS3.  Try
	 * detecting that in code here, to avoid probing every possible flash
	 * configuration...
	 */
	h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys();
	h2_nor_resource.end += SZ_32M - 1;

	h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
	h2_nand_resource.end += SZ_4K - 1;
	if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
		BUG();
	gpio_direction_input(H2_NAND_RB_GPIO_PIN);

	omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
	omap_cfg_reg(M8_1610_FLASH_CS2B_WE);

	/* MMC:  card detect and WP */
	/* omap_cfg_reg(U19_ARMIO1); */		/* CD */
	omap_cfg_reg(BALLOUT_V8_ARMIO3);	/* WP */

	/* Mux pins for keypad */
	omap_cfg_reg(F18_1610_KBC0);
	omap_cfg_reg(D20_1610_KBC1);
	omap_cfg_reg(D19_1610_KBC2);
	omap_cfg_reg(E18_1610_KBC3);
	omap_cfg_reg(C21_1610_KBC4);
	omap_cfg_reg(G18_1610_KBR0);
	omap_cfg_reg(F19_1610_KBR1);
	omap_cfg_reg(H14_1610_KBR2);
	omap_cfg_reg(E20_1610_KBR3);
	omap_cfg_reg(E19_1610_KBR4);
	omap_cfg_reg(N19_1610_KBR5);

	h2_smc91x_resources[1].start = gpio_to_irq(0);
	h2_smc91x_resources[1].end = gpio_to_irq(0);
	platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
	omap_serial_init();
	h2_i2c_board_info[0].irq = gpio_to_irq(58);
	h2_i2c_board_info[1].irq = gpio_to_irq(2);
	omap_register_i2c_bus(1, 100, h2_i2c_board_info,
			      ARRAY_SIZE(h2_i2c_board_info));
	omap1_usb_init(&h2_usb_config);
	h2_mmc_init();

	omapfb_set_lcd_config(&h2_lcd_config);
}
static void __init omap3_devkit8500_init(void)
{
    omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
    omap_hsmmc_init(mmc); //HS MMC
    omap3_devkit8500_i2c_init();  //require recheck for omap3_devkit8500_i2c_init()

    /*[OMAP_DISPLAY DISABLED]*/
    omap_display_init(&devkit8500_dss_data);


    /*
     * Platform Devices Registeration
     * Leds, Keys, ....
     */
	platform_add_devices(omap3_devkit8500_devices,
			ARRAY_SIZE(omap3_devkit8500_devices));



    /* [TOUCH SCREEN CONTROLLER] */
	//omap_ads7846_init(2, OMAP3_DEVKIT8500_TS_GPIO, 0xA, NULL);    /* in datasheet SPI2_CS0 */

	/* [SERIAL PORTS] */
    omap_serial_init();

    /* [RAM Initialization] */
    omap_sdrc_init(mt46h32m32lf6_sdrc_params,mt46h32m32lf6_sdrc_params);



    /* [NAND Init] */
    board_nand_init(devkit8500_nand_partitions,
    			ARRAY_SIZE(devkit8500_nand_partitions), NAND_CS,
    			NAND_BUSWIDTH_16, NULL);

    omap_twl4030_audio_init("omap3devkit8500", NULL);


    /* [USB HOST] */
    usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
    usbhs_init(&usbhs_bdata);

    /* [USB OTG] */
    usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
    usb_musb_init(NULL);

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

    /* [ETHERNET] */
    omap_dm9000_init();


}
Beispiel #15
0
void __init black_peripherals_init(void)
{
	black_mmc1_gpio_init();
	omap_i2c_init();
	platform_add_devices(black_devices, ARRAY_SIZE(black_devices));

//--[[ LGE_UBIQUIX_MODIFIED_START : [email protected] [2011.07.11] - Merged from black_gb_docomo
	black_synaptics_dev_init();
//--]] LGE_UBIQUIX_MODIFIED_END : [email protected] [2011.07.11]- Merged from black_gb_docomo

/* LGE_CHANGE_S, [email protected], 2011-03-03, Porting for MPLv3.3.3 */
#if defined(CONFIG_MPU_SENSORS_MPU3050) || defined(CONFIG_MPU_SENSORS_MPU3050_MODULE)
	mpu3050_dev_init();
#endif
/* LGE_CHANGE_E, [email protected], 2011-03-03, Porting for MPLv3.3.3 */

// [email protected] Adapted to new interface of omap_serial_init() in 2.6.35 kernel [START]
//	omap_serial_init();
	omap_serial_init(omap_serial_platform_data);	
// [email protected] Adapted to new interface of omap_serial_init() in 2.6.35 kernel [END]
#ifdef CONFIG_INPUT_HALLEFFECT_BU52014HV
	sniper_hall_effect_init();
#endif
#ifdef CONFIG_PANEL_BLACK
	black_lcd_tv_panel_init();
#endif
	usb_musb_init(&musb_board_data);
// [email protected] Added function to initialize SYS_NIRQ pin [START]
	enable_board_wakeup_source();
// [email protected] Added function to initialize SYS_NIRQ pin [END]
	black_cam_init();

#ifdef CONFIG_LGE_SPI
	black_ipc_spi_init();
#endif

//--[[ LGE_UBIQUIX_MODIFIED_START : [email protected] [2011.07.01] - TDMB
#ifdef CONFIG_SPI_TDMB
	black_tdmb_spi_init();
#endif

/* S, 20110810, [email protected], Enable Fuelgauge. */
#if defined (CONFIG_FUELGAUGE_MAX17043)
	max17043_init();
#endif
/* E, 20110810, [email protected], Enable Fuelgauge. */

//--[[ LGE_UBIQUIX_MODIFIED_START : [email protected] [2011.07.11] - Black Key Touch & Key Touch LED
#if defined (CONFIG_LEDS_BD2802_LGE)
	bd2802_init();
#endif
//--]] LGE_UBIQUIX_MODIFIED_END : [email protected] [2011.07.11]- Black Key Touch & Key Touch LED

//--]] LGE_UBIQUIX_MODIFIED_END : [email protected] [2011.07.01] - TDMB
}
static void __init overo_init(void)
{
	int ret;

	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	overo_i2c_init();
	omap_display_init(&overo_dss_data);
	omap_serial_init();
	omap_sdrc_init(mt46h32m32lf6_sdrc_params,
				  mt46h32m32lf6_sdrc_params);
	omap_nand_flash_init(0, overo_nand_partitions,
			     ARRAY_SIZE(overo_nand_partitions));
	usb_musb_init(NULL);
	usbhs_init(&usbhs_bdata);
	overo_spi_init();
	overo_init_smsc911x();
	overo_display_init();
	overo_init_led();
	overo_init_keys();

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

	ret = gpio_request_one(OVERO_GPIO_W2W_NRESET, GPIOF_OUT_INIT_HIGH,
			       "OVERO_GPIO_W2W_NRESET");
	if (ret == 0) {
		gpio_export(OVERO_GPIO_W2W_NRESET, 0);
		gpio_set_value(OVERO_GPIO_W2W_NRESET, 0);
		udelay(10);
		gpio_set_value(OVERO_GPIO_W2W_NRESET, 1);
	} else {
		printk(KERN_ERR "could not obtain gpio for "
					"OVERO_GPIO_W2W_NRESET\n");
	}

	ret = gpio_request_array(overo_bt_gpios, ARRAY_SIZE(overo_bt_gpios));
	if (ret) {
		pr_err("%s: could not obtain BT gpios\n", __func__);
	} else {
		gpio_export(OVERO_GPIO_BT_XGATE, 0);
		gpio_export(OVERO_GPIO_BT_NRESET, 0);
		gpio_set_value(OVERO_GPIO_BT_NRESET, 0);
		mdelay(6);
		gpio_set_value(OVERO_GPIO_BT_NRESET, 1);
	}

	ret = gpio_request_one(OVERO_GPIO_USBH_CPEN, GPIOF_OUT_INIT_HIGH,
			       "OVERO_GPIO_USBH_CPEN");
	if (ret == 0)
		gpio_export(OVERO_GPIO_USBH_CPEN, 0);
	else
		printk(KERN_ERR "could not obtain gpio for "
					"OVERO_GPIO_USBH_CPEN\n");
}
Beispiel #17
0
static void __init innovator_init(void)
{
	if (cpu_is_omap1510())
		omap1510_fpga_init_irq();
	innovator_init_smc91x();

#ifdef CONFIG_ARCH_OMAP15XX
	if (cpu_is_omap1510()) {
		unsigned char reg;

		/* mux pins for uarts */
		omap_cfg_reg(UART1_TX);
		omap_cfg_reg(UART1_RTS);
		omap_cfg_reg(UART2_TX);
		omap_cfg_reg(UART2_RTS);
		omap_cfg_reg(UART3_TX);
		omap_cfg_reg(UART3_RX);

		reg = fpga_read(OMAP1510_FPGA_POWER);
		reg |= OMAP1510_FPGA_PCR_COM1_EN;
		fpga_write(reg, OMAP1510_FPGA_POWER);
		udelay(10);

		reg = fpga_read(OMAP1510_FPGA_POWER);
		reg |= OMAP1510_FPGA_PCR_COM2_EN;
		fpga_write(reg, OMAP1510_FPGA_POWER);
		udelay(10);

		platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices));
		spi_register_board_info(innovator1510_boardinfo,
				ARRAY_SIZE(innovator1510_boardinfo));
	}
#endif
#ifdef CONFIG_ARCH_OMAP16XX
	if (!cpu_is_omap1510()) {
		platform_add_devices(innovator1610_devices, ARRAY_SIZE(innovator1610_devices));
	}
#endif

#ifdef CONFIG_ARCH_OMAP15XX
	if (cpu_is_omap1510()) {
		omap1_usb_init(&innovator1510_usb_config);
		omapfb_set_lcd_config(&innovator1510_lcd_config);
	}
#endif
#ifdef CONFIG_ARCH_OMAP16XX
	if (cpu_is_omap1610()) {
		omap1_usb_init(&h2_usb_config);
		omapfb_set_lcd_config(&innovator1610_lcd_config);
	}
#endif
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);
	innovator_mmc_init();
}
void __init zoom_peripherals_init(void)
{
	if (wl12xx_set_platform_data(&omap_zoom_wlan_data))
		pr_err("error setting wl12xx data\n");

	omap_i2c_init();
	platform_device_register(&omap_vwlan_device);
	usb_musb_init(&musb_board_data);
	enable_board_wakeup_source();
	omap_serial_init();
}
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();
}
Beispiel #20
0
static void __init overo_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	omap_board_config = overo_config;
	omap_board_config_size = ARRAY_SIZE(overo_config);
	overo_i2c_init();
	platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
	omap_serial_init();
	overo_flash_init();
	usb_musb_init(&musb_board_data);
	usbhs_init(&usbhs_bdata);
	overo_ads7846_init();
	overo_init_smsc911x();

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

	if ((gpio_request(OVERO_GPIO_W2W_NRESET,
			  "OVERO_GPIO_W2W_NRESET") == 0) &&
	    (gpio_direction_output(OVERO_GPIO_W2W_NRESET, 1) == 0)) {
		gpio_export(OVERO_GPIO_W2W_NRESET, 0);
		gpio_set_value(OVERO_GPIO_W2W_NRESET, 0);
		udelay(10);
		gpio_set_value(OVERO_GPIO_W2W_NRESET, 1);
	} else {
		printk(KERN_ERR "could not obtain gpio for "
					"OVERO_GPIO_W2W_NRESET\n");
	}

	if ((gpio_request(OVERO_GPIO_BT_XGATE, "OVERO_GPIO_BT_XGATE") == 0) &&
	    (gpio_direction_output(OVERO_GPIO_BT_XGATE, 0) == 0))
		gpio_export(OVERO_GPIO_BT_XGATE, 0);
	else
		printk(KERN_ERR "could not obtain gpio for OVERO_GPIO_BT_XGATE\n");

	if ((gpio_request(OVERO_GPIO_BT_NRESET, "OVERO_GPIO_BT_NRESET") == 0) &&
	    (gpio_direction_output(OVERO_GPIO_BT_NRESET, 1) == 0)) {
		gpio_export(OVERO_GPIO_BT_NRESET, 0);
		gpio_set_value(OVERO_GPIO_BT_NRESET, 0);
		mdelay(6);
		gpio_set_value(OVERO_GPIO_BT_NRESET, 1);
	} else {
		printk(KERN_ERR "could not obtain gpio for "
					"OVERO_GPIO_BT_NRESET\n");
	}

	if ((gpio_request(OVERO_GPIO_USBH_CPEN, "OVERO_GPIO_USBH_CPEN") == 0) &&
	    (gpio_direction_output(OVERO_GPIO_USBH_CPEN, 1) == 0))
		gpio_export(OVERO_GPIO_USBH_CPEN, 0);
	else
		printk(KERN_ERR "could not obtain gpio for "
					"OVERO_GPIO_USBH_CPEN\n");
}
Beispiel #21
0
static void __init omap_generic_init(void)
{
	struct device_node *node = of_find_matching_node(NULL, intc_match);
	if (node)
		irq_domain_add_simple(node, 0);

	omap_serial_init();
	omap_sdrc_init(NULL, NULL);

	of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
}
Beispiel #22
0
static void __init omap3_evm_init(void)
{
	struct omap_board_mux *obm;

	omap3_evm_get_revision();
	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

	obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
	omap3_mux_init(obm, OMAP_PACKAGE_CBB);

	omap_board_config = omap3_evm_config;
	omap_board_config_size = ARRAY_SIZE(omap3_evm_config);

	omap_mux_init_gpio(63, OMAP_PIN_INPUT);
	omap_hsmmc_init(mmc);

	omap3_evm_i2c_init();

	omap_display_init(&omap3_evm_dss_data);

	omap_serial_init();
	omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);

	/* 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(OMAP3_EVM_EHCI_VBUS, OMAP_PIN_INPUT_PULLUP);
		/* Select EHCI port on main board */
		omap_mux_init_gpio(OMAP3_EVM_EHCI_SELECT,
				   OMAP_PIN_INPUT_PULLUP);
		gpio_request_array(omap3_evm_ehci_gpios,
				   ARRAY_SIZE(omap3_evm_ehci_gpios));

		/* 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);
	omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL);
	omap3evm_init_smsc911x();
	omap3_evm_display_init();
	omap3_evm_wl12xx_init();
}
Beispiel #23
0
static void __init h3_init(void)
{
	h3_init_smc91x();

	/* Here we assume the NOR boot config:  NOR on CS3 (possibly swapped
	 * to address 0 by a dip switch), NAND on CS2B.  The NAND driver will
	 * notice whether a NAND chip is enabled at probe time.
	 *
	 * H3 support NAND-boot, with a dip switch to put NOR on CS2B and NAND
	 * (which on H2 may be 16bit) on CS3.  Try detecting that in code here,
	 * to avoid probing every possible flash configuration...
	 */
	nor_resource.end = nor_resource.start = omap_cs3_phys();
	nor_resource.end += SZ_32M - 1;

	nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS;
	nand_resource.end += SZ_4K - 1;
	if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0)
		BUG();
	gpio_direction_input(H3_NAND_RB_GPIO_PIN);

	/* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */
	/* GPIO10 pullup/down register, Enable pullup on GPIO10 */
	omap_cfg_reg(V2_1710_GPIO10);

	/* Mux pins for keypad */
	omap_cfg_reg(F18_1610_KBC0);
	omap_cfg_reg(D20_1610_KBC1);
	omap_cfg_reg(D19_1610_KBC2);
	omap_cfg_reg(E18_1610_KBC3);
	omap_cfg_reg(C21_1610_KBC4);
	omap_cfg_reg(G18_1610_KBR0);
	omap_cfg_reg(F19_1610_KBR1);
	omap_cfg_reg(H14_1610_KBR2);
	omap_cfg_reg(E20_1610_KBR3);
	omap_cfg_reg(E19_1610_KBR4);
	omap_cfg_reg(N19_1610_KBR5);

	smc91x_resources[1].start = gpio_to_irq(40);
	smc91x_resources[1].end = gpio_to_irq(40);
	platform_add_devices(devices, ARRAY_SIZE(devices));
	h3_spi_board_info[0].irq = gpio_to_irq(H3_TS_GPIO);
	spi_register_board_info(h3_spi_board_info,
				ARRAY_SIZE(h3_spi_board_info));
	omap_serial_init();
	h3_i2c_board_info[1].irq = gpio_to_irq(14);
	omap_register_i2c_bus(1, 100, h3_i2c_board_info,
			      ARRAY_SIZE(h3_i2c_board_info));
	omap1_usb_init(&h3_usb_config);
	h3_mmc_init();

	omapfb_set_lcd_config(&h3_lcd_config);
}
Beispiel #24
0
static void __init omap3_beagle_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	omap3_beagle_i2c_init();
	printk(KERN_INFO "*************INIT I2C**************\n");
	platform_add_devices(omap3_beagle_devices,
			ARRAY_SIZE(omap3_beagle_devices));
	omap_serial_init();
	
//	omap_mux_init_gpio(170, OMAP_PIN_INPUT);
//	gpio_request(170, "DVI_nPD");
//	/* REVISIT leave DVI powered down until it's needed ... */
//	gpio_direction_output(170, true);
	
//added by haolong to fix reset io of smsc9514, 2012/04/10-------
	printk(KERN_ERR "#########pulldown gpio 40#######\n");
	if(omap_mux_init_gpio(40, OMAP_PIN_OUTPUT) < 0)
	{
			printk(KERN_ERR "Unable to mux HUB_RST\n");
	}
	if (gpio_request(40, "HUB_RST") < 0) {
			printk(KERN_ERR "Unable to get HUB_RST GPIO\n");
	}
	gpio_direction_output(40, 0);
//-------------------------------------------------------

	usb_musb_init();
	usb_ehci_init(&ehci_pdata);
	omap3beagle_flash_init();

	/* 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);
//--------------------------20111121 modified by haolong---------------------
//	if (gpio_request(129, "DVI reset") < 0) {
//		printk(KERN_ERR "Unable to get DVI reset GPIO\n");
//		return;
//	}

//	gpio_direction_output(129, 1);
//------------------------------------------------------------------------
//2012/04/17 modified by haolong
	omap_mux_set_gpio(OMAP_MUX_MODE4, 15);	
//	if(omap_mux_init_gpio(15, OMAP_PIN_OUTPUT) < 0)
//	{
//			printk(KERN_ERR "Unable to mux GPIO15_IRQ\n");
//	}
//	if (gpio_request(15, "GPIO15_IRQ") < 0) {
//			printk(KERN_ERR "Unable to get IRQ GPIO\n");
//	}
//	gpio_direction_output(15, 1);
//---------------------------
}
static void __init omap_palmtt_init(void)
{
	omap_mpu_wdt_mode(0);

	omap_board_config = palmtt_config;
	omap_board_config_size = ARRAY_SIZE(palmtt_config);

	platform_add_devices(palmtt_devices, ARRAY_SIZE(palmtt_devices));

	spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo));
	omap_serial_init();
}
static void __init cm_t3517_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
	omap_serial_init();
	omap_sdrc_init(NULL, NULL);
	cm_t3517_init_leds();
	cm_t3517_init_nand();
	cm_t3517_init_rtc();
	cm_t3517_init_usbh();
	cm_t3517_init_hecc();
	am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
}
Beispiel #27
0
static void __init omap_palmte_init(void)
{
	omap_board_config = palmte_config;
	omap_board_config_size = ARRAY_SIZE(palmte_config);

	platform_add_devices(palmte_devices, ARRAY_SIZE(palmte_devices));

	spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info));
	palmte_misc_gpio_setup();
	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);
}
Beispiel #28
0
static void __init omap_encore_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
	omap_i2c_init();
	omap_serial_init();
	usb_musb_init(NULL);

	omap_board_config = encore_config;
	omap_board_config_size = ARRAY_SIZE(encore_config);

	platform_add_devices(encore_devices, ARRAY_SIZE(encore_devices));
}
static void __init omap3pandora_init(void)
{
	omap3pandora_i2c_init();
	platform_add_devices(omap3pandora_devices,
			ARRAY_SIZE(omap3pandora_devices));
	omap_board_config = omap3pandora_config;
	omap_board_config_size = ARRAY_SIZE(omap3pandora_config);
	omap_serial_init();
	spi_register_board_info(omap3pandora_spi_board_info,
			ARRAY_SIZE(omap3pandora_spi_board_info));
	omap3pandora_ads7846_init();
}
Beispiel #30
0
static void __init ams_delta_init(void)
{
	iotable_init(ams_delta_io_desc, ARRAY_SIZE(ams_delta_io_desc));

	omap_board_config = ams_delta_config;
	omap_board_config_size = ARRAY_SIZE(ams_delta_config);
	omap_serial_init();

	/* Clear latch2 (NAND, LCD, modem enable) */
	ams_delta_latch2_write(~0, 0);

	platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));
}