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); } }
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); }
/* * 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); imx51_soc_init(); #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, NULL); 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); imx_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, &mx51_babbage_sd1_data); imx51_add_sdhci_esdhc_imx(1, &mx51_babbage_sd2_data); 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 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(0, &sd0_pdata); imx51_add_sdhci_esdhc_imx(1, &sd1_pdata); gpio_led_register_device(-1, &mx51_efikasb_leds_data); imx_add_gpio_keys(&mx51_efikasb_keys_data); }
void __init efika_board_common_init(void) { mxc_iomux_v3_setup_multiple_pads(mx51efika_pads, ARRAY_SIZE(mx51efika_pads)); imx51_add_imx_uart(0, &uart_pdata); mx51_efika_usb(); imx51_add_sdhci_esdhc_imx(0, NULL); /* FIXME: comes from original code. check this. */ if (mx51_revision() < IMX_CHIP_REVISION_2_0) sw2_init.constraints.state_mem.uV = 1100000; else if (mx51_revision() == IMX_CHIP_REVISION_2_0) { sw2_init.constraints.state_mem.uV = 1250000; sw1_init.constraints.state_mem.uV = 1000000; } if (machine_is_mx51_efikasb()) vgen1_init.constraints.max_uV = 1200000; gpio_request(EFIKAMX_PMIC, "pmic irq"); gpio_direction_input(EFIKAMX_PMIC); spi_register_board_info(mx51_efika_spi_board_info, ARRAY_SIZE(mx51_efika_spi_board_info)); imx51_add_ecspi(0, &mx51_efika_spi_pdata); #if defined(CONFIG_CPU_FREQ_IMX) get_cpu_op = mx51_get_cpu_op; #endif }
/* * 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); }
/* * Board specific initialization. */ static void __init mx51_3ds_init(void) { mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads, ARRAY_SIZE(mx51_3ds_pads)); imx51_add_imx_uart(0, &uart_pdata); imx51_add_imx_uart(1, &uart_pdata); imx51_add_imx_uart(2, &uart_pdata); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata); spi_register_board_info(mx51_3ds_spi_nor_device, ARRAY_SIZE(mx51_3ds_spi_nor_device)); if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) printk(KERN_WARNING "Init of the debugboard failed, all " "devices on the board are unusable.\n"); imx51_add_sdhci_esdhc_imx(0, NULL); imx51_add_imx_keypad(&mx51_3ds_map_data); imx51_add_imx2_wdt(0, NULL); imx51_add_spdif(&mxc_spdif_data); imx51_add_spdif_dai(); imx51_add_spdif_audio_device(); }
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 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); }
/* * Board specific initialization. */ static void __init mxc_board_init(void) { mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads, ARRAY_SIZE(mx51_3ds_pads)); mxc_init_imx_uart(); imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata); spi_register_board_info(mx51_3ds_spi_nor_device, ARRAY_SIZE(mx51_3ds_spi_nor_device)); if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) printk(KERN_WARNING "Init of the debugboard failed, all " "devices on the board are unusable.\n"); imx51_add_sdhci_esdhc_imx(0, NULL); mxc_init_keypad(); }