void __init eukrea_mbimx51_baseboard_init(void)
{
	mxc_iomux_v3_setup_multiple_pads(mbimx51_pads,
					ARRAY_SIZE(mbimx51_pads));

	imx51_add_imx_uart(1, NULL);
	imx51_add_imx_uart(2, &uart_pdata);

	gpio_request(MBIMX51_LED0, "LED0");
	gpio_direction_output(MBIMX51_LED0, 1);
	gpio_free(MBIMX51_LED0);
	gpio_request(MBIMX51_LED1, "LED1");
	gpio_direction_output(MBIMX51_LED1, 1);
	gpio_free(MBIMX51_LED1);
	gpio_request(MBIMX51_LED2, "LED2");
	gpio_direction_output(MBIMX51_LED2, 1);
	gpio_free(MBIMX51_LED2);
	gpio_request(MBIMX51_LED3, "LED3");
	gpio_direction_output(MBIMX51_LED3, 1);
	gpio_free(MBIMX51_LED3);

	gpio_led_register_device(-1, &mbimx51_leds_info);

	imx51_add_imx_keypad(&mbimx51_map_data);

	gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq");
	gpio_direction_input(MBIMX51_TSC2007_GPIO);
	irq_set_irq_type(gpio_to_irq(MBIMX51_TSC2007_GPIO),
					IRQF_TRIGGER_FALLING);
	i2c_register_board_info(1, mbimx51_i2c_devices,
				ARRAY_SIZE(mbimx51_i2c_devices));

	imx51_add_sdhci_esdhc_imx(0, NULL);
	imx51_add_sdhci_esdhc_imx(1, NULL);
}
void __init eukrea_mbimxsd25_baseboard_init(void)
{
	if (mxc_iomux_v3_setup_multiple_pads(eukrea_mbimxsd_pads,
			ARRAY_SIZE(eukrea_mbimxsd_pads)))
		printk(KERN_ERR "error setting mbimxsd pads !\n");

	imx25_add_imx_uart1(&uart_pdata);
	imx25_add_imx_fb(&eukrea_mximxsd_fb_pdata);
	imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);

	imx25_add_flexcan1(NULL);
	imx25_add_sdhci_esdhc_imx(0, &sd1_pdata);

	gpio_request(GPIO_LED1, "LED1");
	gpio_direction_output(GPIO_LED1, 1);
	gpio_free(GPIO_LED1);

	gpio_request(GPIO_SWITCH1, "SWITCH1");
	gpio_direction_input(GPIO_SWITCH1);
	gpio_free(GPIO_SWITCH1);

	gpio_request(GPIO_LCDPWR, "LCDPWR");
	gpio_direction_output(GPIO_LCDPWR, 1);
	gpio_free(GPIO_SWITCH1);

	i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices,
				ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));

	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
	gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
	imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
}
Пример #3
0
/*
 * system init for baseboard usage. Will be called by cpuimx51sd 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_mbimxsd51_baseboard_init(void)
{
	if (mxc_iomux_v3_setup_multiple_pads(eukrea_mbimxsd_pads,
			ARRAY_SIZE(eukrea_mbimxsd_pads)))
		printk(KERN_ERR "error setting mbimxsd pads !\n");

	imx51_add_imx_uart(1, NULL);
	imx51_add_imx_uart(2, &uart_pdata);

	imx51_add_sdhci_esdhc_imx(0, NULL);

	gpio_request(GPIO_LED1, "LED1");
	gpio_direction_output(GPIO_LED1, 1);
	gpio_free(GPIO_LED1);

	gpio_request(GPIO_SWITCH1, "SWITCH1");
	gpio_direction_input(GPIO_SWITCH1);
	gpio_free(GPIO_SWITCH1);

	i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices,
				ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));

	gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
	imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
}
Пример #4
0
void __init ep93xx_init_devices(void)
{
	/* Disallow access to MaverickCrunch initially */
	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);

	/* Default all ports to GPIO */
	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
			       EP93XX_SYSCON_DEVCFG_GONK |
			       EP93XX_SYSCON_DEVCFG_EONIDE |
			       EP93XX_SYSCON_DEVCFG_GONIDE |
			       EP93XX_SYSCON_DEVCFG_HONIDE);

	/* Get the GPIO working early, other devices need it */
	platform_device_register(&ep93xx_gpio_device);

	amba_device_register(&uart1_device, &iomem_resource);
	amba_device_register(&uart2_device, &iomem_resource);
	amba_device_register(&uart3_device, &iomem_resource);

	platform_device_register(&ep93xx_rtc_device);
	platform_device_register(&ep93xx_ohci_device);
	platform_device_register(&ep93xx_wdt_device);

	gpio_led_register_device(-1, &ep93xx_led_data);
}
Пример #5
0
static void __init m28evk_init(void)
{
	mxs_iomux_setup_multiple_pads(m28evk_pads, ARRAY_SIZE(m28evk_pads));

	mx28_add_duart();
	mx28_add_auart0();
	mx28_add_auart3();

	if (!m28evk_fec_get_mac()) {
		mx28_add_fec(0, &mx28_fec_pdata[0]);
		mx28_add_fec(1, &mx28_fec_pdata[1]);
	}

	mx28_add_flexcan(0, NULL);
	mx28_add_flexcan(1, NULL);

	mx28_add_mxsfb(&m28evk_mxsfb_pdata);

	mx28_add_mxs_mmc(0, &m28evk_mmc_pdata[0]);
	mx28_add_mxs_mmc(1, &m28evk_mmc_pdata[1]);

	gpio_led_register_device(0, &m28evk_led_data);

	/* I2C */
	mx28_add_mxs_i2c(0);
	i2c_register_board_info(0, m28_stk5v3_i2c_boardinfo,
			ARRAY_SIZE(m28_stk5v3_i2c_boardinfo));
}
Пример #6
0
static void __init mx53_loco_board_init(void)
{
	int ret;
	imx53_soc_init();
	imx53_qsb_common_init();

	imx53_add_imx_uart(0, NULL);
	mx53_loco_fec_reset();
	imx53_add_fec(&mx53_loco_fec_data);
	imx53_add_imx2_wdt(0, NULL);

	ret = gpio_request_one(LOCO_ACCEL_EN, GPIOF_OUT_INIT_HIGH, "accel_en");
	if (ret)
		pr_err("Cannot request ACCEL_EN pin: %d\n", ret);

	i2c_register_board_info(0, mx53loco_i2c_devices,
				ARRAY_SIZE(mx53loco_i2c_devices));
	imx53_add_imx_i2c(0, &mx53_loco_i2c_data);
	imx53_add_imx_i2c(1, &mx53_loco_i2c_data);
	imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data);
	imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data);
	imx_add_gpio_keys(&loco_button_data);
	gpio_led_register_device(-1, &mx53loco_leds_data);
	imx53_add_ahci_imx();
}
Пример #7
0
static void __init mx28evk_init(void)
{
	int ret;

	mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads));

	mx28_add_duart();
	mx28_add_auart0();
	mx28_add_auart3();

	if (mx28evk_fec_get_mac())
		pr_warn("%s: failed on fec mac setup\n", __func__);

	mx28evk_fec_reset();
	mx28_add_fec(0, &mx28_fec_pdata[0]);
	mx28_add_fec(1, &mx28_fec_pdata[1]);

	ret = gpio_request_one(MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT,
				"flexcan-switch");
	if (ret) {
		pr_err("failed to request gpio flexcan-switch: %d\n", ret);
	} else {
		mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]);
		mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
	}

	ret = gpio_request_one(MX28EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable");
	if (ret)
		pr_warn("failed to request gpio lcd-enable: %d\n", ret);
	else
		gpio_set_value(MX28EVK_LCD_ENABLE, 1);

	ret = gpio_request_one(MX28EVK_BL_ENABLE, GPIOF_DIR_OUT, "bl-enable");
	if (ret)
		pr_warn("failed to request gpio bl-enable: %d\n", ret);
	else
		gpio_set_value(MX28EVK_BL_ENABLE, 1);

	mx28_add_mxsfb(&mx28evk_mxsfb_pdata);

	/* power on mmc slot by writing 0 to the gpio */
	ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
			       "mmc0-slot-power");
	if (ret)
		pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret);
	mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);

	ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW,
			       "mmc1-slot-power");
	if (ret)
		pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret);
	mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);

	gpio_led_register_device(0, &mx28evk_led_data);
}
static void __init armadillo_box_ws1_init(void)
{
	const struct physmap_flash_data *data;
	imx25_soc_init();

	imx25_add_imx_pinctrl("imx25-pinctrl");
	pinctrl_register_mappings(armadillo_box_ws1_pinctrl_map,
				  ARRAY_SIZE(armadillo_box_ws1_pinctrl_map));

	imx25_add_imx_uart1(&uart1_pdata);
	imx25_add_imx_uart2(&uart2_pdata);

	imx25_add_usbmisc_imx();
	imx25_add_usb_phy_gen_xceiv_otg();
	imx25_add_usb_phy_gen_xceiv_hs();
	imx25_add_imx_usb_otg(&otg_pdata);
	imx25_add_imx_usb_hs(&usbh2_pdata);
	imx25_add_imx2_wdt();

	if (machine_is_armadillo420())
		data = &armadillo_box_ws1_nor_flash_pdata_16m;
	else
		data = &armadillo_box_ws1_nor_flash_pdata_32m;

	platform_device_register_resndata(NULL, "physmap-flash", -1,
			&armadillo_box_ws1_nor_flash_resource, 1,
			data, sizeof(*data));

	imx25_named_gpio_init();

	armadillo_box_ws1_fec_reset();
	imx25_add_fec(&mx25_fec_pdata);

	armadillo_box_ws1_bp35a1_init();

	imx25_add_imx_i2c0(&mx25_i2c0_data);

	imx25_add_imx_i2c1(&mx25_i2c1_data);
	i2c_register_board_info(1, armadillo_box_ws1_i2c1,
				ARRAY_SIZE(armadillo_box_ws1_i2c1));

	platform_device_register_data(NULL, "reg-fixed-voltage", 1,
				      &armadillo_box_ws1_esdhc1_regulator_config,
				      sizeof(armadillo_box_ws1_esdhc1_regulator_config));
	platform_device_register_data(NULL, "reg-fixed-voltage", 2,
				      &armadillo_box_ws1_usb_regulator_config,
				      sizeof(armadillo_box_ws1_usb_regulator_config));

	imx25_add_sdhci_esdhc_imx(0, &armadillo_box_ws1_esdhc1_pdata);

	imx_add_gpio_keys(&armadillo_box_ws1_gpio_key_data);

	gpio_led_register_device(-1, &armadillo_box_ws1_led_data);
}
void __init mx31lite_db_init(void)
{
	mxc_iomux_setup_multiple_pins(litekit_db_board_pins,
					ARRAY_SIZE(litekit_db_board_pins),
					"development board pins");
	imx31_add_imx_uart0(&uart_pdata);
	imx31_add_mxc_mmc(0, &mmc_pdata);
	imx31_add_spi_imx0(&spi0_pdata);
	gpio_led_register_device(-1, &litekit_led_platform_data);
	imx31_add_imx2_wdt(NULL);
	imx31_add_mxc_rtc(NULL);
}
Пример #10
0
/*
 * Board specific initialization.
 */
static void __init mx31moboard_init(void)
{
	imx31_soc_init();

	mxc_iomux_setup_multiple_pins(moboard_pins, ARRAY_SIZE(moboard_pins),
		"moboard");

	platform_add_devices(devices, ARRAY_SIZE(devices));
	gpio_led_register_device(-1, &mx31moboard_led_pdata);

	imx31_add_imx_uart0(&uart0_pdata);
	imx31_add_imx_uart4(&uart4_pdata);

	imx31_add_imx_i2c0(&moboard_i2c0_data);
	imx31_add_imx_i2c1(&moboard_i2c1_data);

	imx31_add_spi_imx1(&moboard_spi1_pdata);
	imx31_add_spi_imx2(&moboard_spi2_pdata);

	gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq");
	gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3));
	spi_register_board_info(moboard_spi_board_info,
		ARRAY_SIZE(moboard_spi_board_info));

	imx31_add_mxc_mmc(0, &sdhc1_pdata);

	mx31moboard_init_cam();

	usb_xcvr_reset();

	moboard_usbh2_init();

	pm_power_off = mx31moboard_poweroff;

	switch (mx31moboard_baseboard) {
	case MX31NOBOARD:
		break;
	case MX31DEVBOARD:
		mx31moboard_devboard_init();
		break;
	case MX31MARXBOT:
		mx31moboard_marxbot_init();
		break;
	case MX31SMARTBOT:
	case MX31EYEBOT:
		mx31moboard_smartbot_init(mx31moboard_baseboard);
		break;
	default:
		printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n",
			mx31moboard_baseboard);
	}
}
Пример #11
0
/*
 * system init for baseboard usage. Will be called by cpuimx35 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_mbimxsd35_baseboard_init(void)
{
	if (mxc_iomux_v3_setup_multiple_pads(eukrea_mbimxsd_pads,
			ARRAY_SIZE(eukrea_mbimxsd_pads)))
		printk(KERN_ERR "error setting mbimxsd pads !\n");

#if defined(CONFIG_SND_SOC_EUKREA_TLV320)
	/* SSI unit master I2S codec connected to SSI_AUD4 */
	mxc_audmux_v2_configure_port(0,
			MXC_AUDMUX_V2_PTCR_SYN |
			MXC_AUDMUX_V2_PTCR_TFSDIR |
			MXC_AUDMUX_V2_PTCR_TFSEL(3) |
			MXC_AUDMUX_V2_PTCR_TCLKDIR |
			MXC_AUDMUX_V2_PTCR_TCSEL(3),
			MXC_AUDMUX_V2_PDCR_RXDSEL(3)
	);
	mxc_audmux_v2_configure_port(3,
			MXC_AUDMUX_V2_PTCR_SYN,
			MXC_AUDMUX_V2_PDCR_RXDSEL(0)
	);
#endif

	imx35_add_imx_uart1(&uart_pdata);
	imx35_add_ipu_core(&mx3_ipu_data);
	imx35_add_mx3_sdc_fb(&mx3fb_pdata);

	imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);

	imx35_add_flexcan1(NULL);
	imx35_add_sdhci_esdhc_imx(0, &sd1_pdata);

	gpio_request(GPIO_LED1, "LED1");
	gpio_direction_output(GPIO_LED1, 1);
	gpio_free(GPIO_LED1);

	gpio_request(GPIO_SWITCH1, "SWITCH1");
	gpio_direction_input(GPIO_SWITCH1);
	gpio_free(GPIO_SWITCH1);

	gpio_request(GPIO_LCDPWR, "LCDPWR");
	gpio_direction_output(GPIO_LCDPWR, 1);

	i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices,
				ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));

	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
	gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
	imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
}
Пример #12
0
static void __init efikasb_board_init(void)
{
	imx51_soc_init();

	mxc_iomux_v3_setup_multiple_pads(mx51efikasb_pads,
					ARRAY_SIZE(mx51efikasb_pads));
	efika_board_common_init();

	mx51_efikasb_board_id();
	mx51_efikasb_usb();
	imx51_add_sdhci_esdhc_imx(1, NULL);

	gpio_led_register_device(-1, &mx51_efikasb_leds_data);
	imx_add_gpio_keys(&mx51_efikasb_keys_data);
}
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);
}
Пример #14
0
static void __init mx28evk_init(void)
{
	int ret;

	mx28_soc_init();

	mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads));

	mx28_add_duart();
	mx28_add_auart0();
	mx28_add_auart3();

	if (mx28evk_fec_get_mac())
		pr_warn("%s: failed on fec mac setup\n", __func__);

	ret = gpio_request_array(mx28evk_gpios, ARRAY_SIZE(mx28evk_gpios));
	if (ret)
		pr_err("One or more GPIOs failed to be requested: %d\n", ret);

	mx28evk_fec_reset();
	mx28_add_fec(0, &mx28_fec_pdata[0]);
	mx28_add_fec(1, &mx28_fec_pdata[1]);

	mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]);
	mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);

	mx28_add_mxsfb(&mx28evk_mxsfb_pdata);

	mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
	mx28_add_saif(0, &mx28evk_mxs_saif_pdata[0]);
	mx28_add_saif(1, &mx28evk_mxs_saif_pdata[1]);

	mx28_add_mxs_i2c(0);
	i2c_register_board_info(0, mxs_i2c0_board_info,
				ARRAY_SIZE(mxs_i2c0_board_info));

	mx28evk_add_regulators();

	mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0,
			NULL, 0);

	mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);
	mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);

	mx28_add_rtc_stmp3xxx();

	gpio_led_register_device(0, &mx28evk_led_data);
}
Пример #15
0
static void __init tx28_stk5v3_init(void)
{
	mxs_iomux_setup_multiple_pads(tx28_stk5v3_pads,
			ARRAY_SIZE(tx28_stk5v3_pads));

	mx28_add_duart(); /* UART1 */
	mx28_add_auart(1); /* UART2 */

	tx28_add_fec0();
	/* spi via ssp will be added when available */
	spi_register_board_info(tx28_spi_board_info,
			ARRAY_SIZE(tx28_spi_board_info));
	gpio_led_register_device(0, &tx28_stk5v3_led_data);
	mx28_add_mxs_i2c(0);
	i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo,
			ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo));
	mx28_add_mxs_mmc(0, &tx28_mmc0_pdata);
}
static void __init mx51_efikamx_init(void)
{
	imx51_soc_init();

	mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
					ARRAY_SIZE(mx51efikamx_pads));
	efika_board_common_init();

	mx51_efikamx_board_id();

	/* on < 1.2 boards both SD controllers are used */
	if (system_rev < 0x12) {
		imx51_add_sdhci_esdhc_imx(0, NULL);
		imx51_add_sdhci_esdhc_imx(1, &sd_pdata);
		mx51_efikamx_leds[2].default_trigger = "mmc1";
	} else
		imx51_add_sdhci_esdhc_imx(0, &sd_pdata);

	gpio_led_register_device(-1, &mx51_efikamx_leds_data);
	imx_add_gpio_keys(&mx51_efikamx_powerkey_data);

	if (system_rev == 0x11) {
		gpio_request(EFIKAMX_RESET1_1, "reset");
		gpio_direction_output(EFIKAMX_RESET1_1, 1);
	} else {
		gpio_request(EFIKAMX_RESET, "reset");
		gpio_direction_output(EFIKAMX_RESET, 1);
	}

	/*
	 * enable wifi by default only on mx
	 * sb and mx have same wlan pin but the value to enable it are
	 * different :/
	 */
	gpio_request(EFIKA_WLAN_EN, "wlan_en");
	gpio_direction_output(EFIKA_WLAN_EN, 0);
	msleep(10);

	gpio_request(EFIKA_WLAN_RESET, "wlan_rst");
	gpio_direction_output(EFIKA_WLAN_RESET, 0);
	msleep(10);
	gpio_set_value(EFIKA_WLAN_RESET, 1);
}
static void __init crag6410_machine_init(void)
{
	/* Open drain IRQs need pullups */
	s3c_gpio_setpull(S3C64XX_GPM(0), S3C_GPIO_PULL_UP);
	s3c_gpio_setpull(S3C64XX_GPN(0), S3C_GPIO_PULL_UP);

	gpio_request(S3C64XX_GPB(0), "LCD power");
	gpio_direction_output(S3C64XX_GPB(0), 0);

	gpio_request(S3C64XX_GPF(14), "LCD PWM");
	gpio_direction_output(S3C64XX_GPF(14), 0);  /* turn off */

	gpio_request(S3C64XX_GPB(1), "SD power");
	gpio_direction_output(S3C64XX_GPB(1), 0);

	gpio_request(S3C64XX_GPF(10), "nRESETSEL");
	gpio_direction_output(S3C64XX_GPF(10), 1);

	s3c_sdhci0_set_platdata(&crag6410_hsmmc0_pdata);
	s3c_sdhci2_set_platdata(&crag6410_hsmmc2_pdata);

	s3c_i2c0_set_platdata(&i2c0_pdata);
	s3c_i2c1_set_platdata(&i2c1_pdata);
	s3c_fb_set_platdata(&crag6410_lcd_pdata);
	dwc2_hsotg_set_platdata(&crag6410_hsotg_pdata);

	i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
	i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));

	samsung_keypad_set_platdata(&crag6410_keypad_data);
	s3c64xx_spi0_set_platdata(NULL, 0, 2);

	pwm_add_table(crag6410_pwm_lookup, ARRAY_SIZE(crag6410_pwm_lookup));
	platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));

	gpio_led_register_device(-1, &gpio_leds_pdata);

	regulator_has_full_constraints();

	s3c64xx_pm_init();
}
Пример #18
0
static void __init mx53_evk_board_init(void)
{
	imx53_soc_init();
	imx53_evk_common_init();

	mx53_evk_init_uart();
	mx53_evk_fec_reset();
	imx53_add_fec(&mx53_evk_fec_pdata);

	imx53_add_imx_i2c(0, &mx53_evk_i2c_data);
	imx53_add_imx_i2c(1, &mx53_evk_i2c_data);

	imx53_add_sdhci_esdhc_imx(0, NULL);
	imx53_add_sdhci_esdhc_imx(1, NULL);

	spi_register_board_info(mx53_evk_spi_board_info,
		ARRAY_SIZE(mx53_evk_spi_board_info));
	imx53_add_ecspi(0, &mx53_evk_spi_data);
	imx53_add_imx2_wdt(0);
	gpio_led_register_device(-1, &mx53evk_leds_data);
}
Пример #19
0
static void __init ams_delta_init(void)
{
	/* mux pins for uarts */
	omap_cfg_reg(UART1_TX);
	omap_cfg_reg(UART1_RTS);

	/* parallel camera interface */
	omap_cfg_reg(H19_1610_CAM_EXCLK);
	omap_cfg_reg(J15_1610_CAM_LCLK);
	omap_cfg_reg(L18_1610_CAM_VS);
	omap_cfg_reg(L15_1610_CAM_HS);
	omap_cfg_reg(L19_1610_CAM_D0);
	omap_cfg_reg(K14_1610_CAM_D1);
	omap_cfg_reg(K15_1610_CAM_D2);
	omap_cfg_reg(K19_1610_CAM_D3);
	omap_cfg_reg(K18_1610_CAM_D4);
	omap_cfg_reg(J14_1610_CAM_D5);
	omap_cfg_reg(J19_1610_CAM_D6);
	omap_cfg_reg(J18_1610_CAM_D7);

	omap_serial_init();
	omap_register_i2c_bus(1, 100, NULL, 0);

	omap1_usb_init(&ams_delta_usb_config);
	omap1_set_camera_info(&ams_delta_camera_platform_data);
#ifdef CONFIG_LEDS_TRIGGERS
	led_trigger_register_simple("ams_delta_camera",
			&ams_delta_camera_led_trigger);
#endif
	gpio_led_register_device(-1, &leds_pdata);
	platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));

	ams_delta_init_fiq();

	omap_writew(omap_readw(ARM_RSTCT1) | 0x0004, ARM_RSTCT1);

	omapfb_set_lcd_config(&ams_delta_lcd_config);
}
Пример #20
0
static void __init apx4devkit_init(void)
{
	mxs_iomux_setup_multiple_pads(apx4devkit_pads,
			ARRAY_SIZE(apx4devkit_pads));

	mx28_add_duart();
	mx28_add_auart0();
	mx28_add_auart1();
	mx28_add_auart2();
	mx28_add_auart3();

	/*
	 * Register fixup for the Micrel KS8031 PHY clock
	 * (shares same ID with KS8051)
	 */
	phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
			apx4devkit_phy_fixup);

	mx28_add_fec(0, &mx28_fec_pdata);

	mx28_add_mxs_mmc(0, &apx4devkit_mmc_pdata);

	gpio_led_register_device(0, &apx4devkit_led_data);

	mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
	mx28_add_saif(0, &apx4devkit_mxs_saif_pdata[0]);
	mx28_add_saif(1, &apx4devkit_mxs_saif_pdata[1]);

	apx4devkit_add_regulators();

	mx28_add_mxs_i2c(0);
	i2c_register_board_info(0, apx4devkit_i2c_boardinfo,
			ARRAY_SIZE(apx4devkit_i2c_boardinfo));

	mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0, NULL, 0);
}
Пример #21
0
/*
 * 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

	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)
	/* ADS7846 Touchscreen controller init */
	mxc_gpio_mode(GPIO_PORTD | 25 | GPIO_GPIO | GPIO_IN);
	ads7846_dev_init();
#endif

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

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

	imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data);

	gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info);
}