Пример #1
0
static void __init mx25pdk_init(void)
{
	imx25_soc_init();

	mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
			ARRAY_SIZE(mx25pdk_pads));

	imx25_add_imx_uart0(&uart_pdata);
	imx25_add_fsl_usb2_udc(&otg_device_pdata);
	imx25_add_mxc_ehci_hs(&usbh2_pdata);
	imx25_add_mxc_nand(&mx25pdk_nand_board_info);
	imx25_add_imxdi_rtc();
	imx25_add_imx_fb(&mx25pdk_fb_pdata);
	imx25_add_imx2_wdt();

	mx25pdk_fec_reset();
	imx25_add_fec(&mx25_fec_pdata);
	imx25_add_imx_keypad(&mx25pdk_keymap_data);

	imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata);
	imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);

	gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn");
	imx25_add_flexcan0();
}
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);
}
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);
}
/*
 * system init for baseboard usage. Will be called by cpuimx25 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_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");

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

	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);
}
Пример #5
0
static void __init mx25pdk_init(void)
{
	imx25_soc_init();

	mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
			ARRAY_SIZE(mx25pdk_pads));

	imx25_add_imx_uart0(&uart_pdata);
	imx25_add_fsl_usb2_udc(&otg_device_pdata);
	imx25_add_mxc_ehci_hs(&usbh2_pdata);
	imx25_add_mxc_nand(&mx25pdk_nand_board_info);
	imx25_add_imxdi_rtc(NULL);
	imx25_add_imx_fb(&mx25pdk_fb_pdata);
	imx25_add_imx2_wdt(NULL);

	mx25pdk_fec_reset();
	imx25_add_fec(&mx25_fec_pdata);
	imx25_add_imx_keypad(&mx25pdk_keymap_data);

	imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata);
	imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
}
void __init armadillo4x0_con9_con14_init(void)
{
	pinctrl_register_mappings(armadillo4x0_con9_con14_pinctrl_map,
				  ARRAY_SIZE(armadillo4x0_con9_con14_pinctrl_map));

	if (IS_ENABLED(CONFIG_SERIAL_MXC_SELECT3)
	    && IS_ENABLED(CONFIG_ARMADILLO4X0_UART3_CON9))
		imx25_add_imx_uart2(&uart2_pdata);

	if (IS_ENABLED(CONFIG_SERIAL_MXC_SELECT5))
		imx25_add_imx_uart4(&uart4_pdata);

	if (IS_ENABLED(CONFIG_I2C_MXC_SELECT2)) {
		if (IS_ENABLED(CONFIG_ARMADILLO4X0_CON9_2_RTC_ALM_INT))
			armadillo4x0_rtc_init();

		imx25_add_imx_i2c1(&mx25_i2c1_data);
		i2c_register_board_info(1, armadillo4x0_i2c1,
					ARRAY_SIZE(armadillo4x0_i2c1));
	}

	if (IS_ENABLED(CONFIG_ARMADILLO4X0_CON9_1_SDHC2_PWREN))
		platform_device_register_data(NULL, "reg-fixed-voltage", 3,
				&armadillo4x0_esdhc2_regulator_config,
				sizeof(armadillo4x0_esdhc2_regulator_config));

	if (IS_ENABLED(CONFIG_MMC_MXC_SELECT2))
		imx25_add_sdhci_esdhc_imx(1, &armadillo4x0_esdhc2_pdata);

	if (IS_ENABLED(CONFIG_SPI_MXC_SELECT1)) {
		imx25_add_spi_imx0(&spi0_pdata);
		spi_register_board_info(armadillo4x0_spi0_board_info,
				ARRAY_SIZE(armadillo4x0_spi0_board_info));
	}

	if (IS_ENABLED(CONFIG_SPI_MXC_SELECT3)) {
		imx25_add_spi_imx2(&spi2_pdata);
		spi_register_board_info(armadillo4x0_spi2_board_info,
				ARRAY_SIZE(armadillo4x0_spi2_board_info));
	}

	if (IS_ENABLED(CONFIG_MXC_PWM_SELECT2))
		imx25_add_mxc_pwm(1);

	if (IS_ENABLED(CONFIG_MXC_PWM_SELECT4))
		imx25_add_mxc_pwm(3);

	if (IS_ENABLED(CONFIG_FLEXCAN_SELECT2)) {
		regulator_register_fixed(PLATFORM_DEVID_AUTO,
					 flexcan1_dummy_supplies,
					 ARRAY_SIZE(flexcan1_dummy_supplies));
		imx25_add_flexcan1();
	}
	if (IS_ENABLED(CONFIG_W1_MXC_SELECT1))
		imx25_add_mxc_w1();

	if (IS_ENABLED(CONFIG_W1_GPIO_SELECT1))
		imx_add_w1_gpio(-1, &gpio_w1_pdata);

	armadillo4x0_set_extif_gpio(armadillo4x0_con9_con14_gpios,
				    ARRAY_SIZE(armadillo4x0_con9_con14_gpios));
}