Exemplo n.º 1
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));
}
Exemplo n.º 2
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);
}
Exemplo n.º 3
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);
}
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));
	mxs_add_platform_device("leds-gpio", 0, NULL, 0,
			&tx28_stk5v3_led_data, sizeof(tx28_stk5v3_led_data));
	mx28_add_mxs_i2c(0);
	i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo,
			ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo));
}
Exemplo n.º 5
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_gpmi_nfc(&mx28evk_gpmi_nfc_data);
	mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
}
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);
}