Exemplo n.º 1
0
static void __init mxc_board_init(void)
{
	mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
					ARRAY_SIZE(mx51efikamx_pads));
	mx51_efikamx_board_id();
	mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
	mxc_init_imx_uart();
	imx51_add_sdhci_esdhc_imx(0, NULL);

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

	platform_device_register(&mx51_efikamx_leds_device);
	imx51_add_gpio_keys(&mx51_efikamx_powerkey_data);

	spi_register_board_info(mx51_efikamx_spi_board_info,
		ARRAY_SIZE(mx51_efikamx_spi_board_info));
	imx51_add_ecspi(0, &mx51_efikamx_spi_pdata);

	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);
	}
}
static void __init efikasb_board_init(void)
{
    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);

    platform_device_register(&mx51_efikasb_leds_device);
    imx51_add_gpio_keys(&mx51_efikasb_keys_data);

}
Exemplo n.º 3
0
/*
 * Board specific initialization.
 */
static void __init mx51_babbage_init(void)
{
    iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
    iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 |
                               MUX_PAD_CTRL(PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP);

#if defined(CONFIG_CPU_FREQ_IMX)
    get_cpu_op = mx51_get_cpu_op;
#endif
    mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads,
                                     ARRAY_SIZE(mx51babbage_pads));

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

    babbage_fec_reset();
    imx51_add_fec(NULL);

    /* Set the PAD settings for the pwr key. */
    mxc_iomux_v3_setup_pad(power_key);
    imx51_add_gpio_keys(&imx_button_data);

    imx51_add_imx_i2c(0, &babbage_i2c_data);
    imx51_add_imx_i2c(1, &babbage_i2c_data);
    mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data);

    if (otg_mode_host)
        mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
    else {
        initialize_otg_port(NULL);
        mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata);
    }

    gpio_usbh1_active();
    mxc_register_device(&mxc_usbh1_device, &usbh1_config);
    /* setback USBH1_STP to be function */
    mxc_iomux_v3_setup_pad(usbh1stp);
    babbage_usbhub_reset();

    imx51_add_sdhci_esdhc_imx(0, NULL);
    imx51_add_sdhci_esdhc_imx(1, NULL);

    spi_register_board_info(mx51_babbage_spi_board_info,
                            ARRAY_SIZE(mx51_babbage_spi_board_info));
    imx51_add_ecspi(0, &mx51_babbage_spi_pdata);
    imx51_add_imx2_wdt(0, NULL);
}
static void __init mx51_efikamx_init(void)
{
	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(1, NULL);
		mx51_efikamx_leds[2].default_trigger = "mmc1";
	}

	platform_device_register(&mx51_efikamx_leds_device);
	imx51_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);
}
Exemplo n.º 5
0
/*
 * Board specific initialization.
 */
static void __init mxc_board_init(void)
{
	struct pad_desc usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
	struct pad_desc power_key = MX51_PAD_EIM_A27__GPIO_2_21;

#if defined(CONFIG_CPU_FREQ_IMX)
	get_cpu_op = mx51_get_cpu_op;
#endif
	mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads,
					ARRAY_SIZE(mx51babbage_pads));
	mxc_init_imx_uart();
	babbage_fec_reset();
	imx51_add_fec(NULL);

	/* Set the PAD settings for the pwr key. */
	power_key.pad_ctrl = MX51_GPIO_PAD_CTRL_2;
	mxc_iomux_v3_setup_pad(&power_key);
	imx51_add_gpio_keys(&imx_button_data);

	imx51_add_imx_i2c(0, &babbage_i2c_data);
	imx51_add_imx_i2c(1, &babbage_i2c_data);
	mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data);

	if (otg_mode_host)
		mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
	else {
		initialize_otg_port(NULL);
		mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata);
	}

	gpio_usbh1_active();
	mxc_register_device(&mxc_usbh1_device, &usbh1_config);
	/* setback USBH1_STP to be function */
	mxc_iomux_v3_setup_pad(&usbh1stp);
	babbage_usbhub_reset();

	imx51_add_esdhc(0, NULL);
	imx51_add_esdhc(1, NULL);
}