static void __init mx53_loco_board_init(void) { mx53_loco_io_init(); imx53_add_imx_uart(0, NULL); mx53_loco_fec_reset(); imx53_add_fec(&mx53_loco_fec_data); mxc_register_device(&mxc_pm_device, &loco_pm_data); imx53_add_ipuv3(&ipu_data); imx53_add_vpu(); imx53_add_ldb(&ldb_data); imx53_add_tve(&tve_data); imx53_add_v4l2_output(0); imx53_add_mxc_pwm(1); imx53_add_mxc_pwm_backlight(0, &loco_pwm_backlight_data); imx53_add_imx2_wdt(0, NULL); imx53_add_srtc(); imx53_add_dvfs_core(&loco_dvfs_core_data); imx53_add_busfreq(&loco_bus_freq_data); imx53_add_imx_i2c(0, &mx53_loco_i2c_data); imx53_add_imx_i2c(1, &mx53_loco_i2c_data); mx53_loco_init_da9052(); i2c_register_board_info(0, mxc_i2c0_board_info, ARRAY_SIZE(mxc_i2c0_board_info)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); imx53_add_ahci_imx(0, &sata_data); imx53_add_iim(&iim_data); /* USB */ mx5_usb_dr_init(); mx5_set_host1_vbus_func(mx53_loco_usbh1_vbus); mx5_usbh1_init(); mxc_register_device(&loco_audio_device, &loco_audio_data); imx53_add_imx_ssi(1, &loco_ssi_pdata); /*GPU*/ if (mx53_revision() >= IMX_CHIP_REVISION_2_0) gpu_data.z160_revision = 1; else gpu_data.z160_revision = 0; imx53_add_mxc_gpu(&gpu_data); imx_add_gpio_keys(&loco_button_data); /* this call required to release SCC RAM partition held by ROM * during boot, even if SCC2 driver is not part of the image */ imx53_add_mxc_scc2(); pm_power_off = da9053_power_off; }
void __init mx51_efikamx_init_usb(void) { CONFIG_IOMUX(mx51_efikamx_usb_iomux_pins); CONFIG_IOMUX(mx51_efikamx_usb_control_iomux_pins); if (machine_is_mx51_efikasb()) { CONFIG_IOMUX(mx51_efikasb_usb_iomux_pins); } gpio_request(IOMUX_TO_GPIO(EFIKAMX_USB_HUB_RESET), "usb:hub_reset"); gpio_direction_output(IOMUX_TO_GPIO(EFIKAMX_USB_HUB_RESET), 1); gpio_request(IOMUX_TO_GPIO(EFIKAMX_USB_PHY_RESET), "usb:phy_reset"); gpio_direction_output(IOMUX_TO_GPIO(EFIKAMX_USB_PHY_RESET), 1); mx51_efikamx_usb_hub_reset(); mx51_efikamx_bluetooth_power(POWER_ON); mx51_efikamx_wifi_power(POWER_ON); mx51_efikamx_wifi_reset(); if (machine_is_mx51_efikasb()) { mx51_efikamx_wwan_power(POWER_ON); mx51_efikamx_camera_power(POWER_ON); } mx51_efikamx_usb_phy_reset(); mx5_usb_dr_init(); mx5_usbh1_init(); if (machine_is_mx51_efikasb()) { mx51_usbh2_init(); } mx51_efikamx_usb_hub_enable(); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "csi_mclk1"); mxc_ipu_data.csi_clk[1] = clk_get(NULL, "csi_mclk2"); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); /* SD card detect irqs */ mxcsdhc2_device.resource[2].start = IOMUX_TO_IRQ(MX51_PIN_GPIO1_6); mxcsdhc2_device.resource[2].end = IOMUX_TO_IRQ(MX51_PIN_GPIO1_6); mxcsdhc1_device.resource[2].start = IOMUX_TO_IRQ(MX51_PIN_GPIO1_0); mxcsdhc1_device.resource[2].end = IOMUX_TO_IRQ(MX51_PIN_GPIO1_0); mxc_cpu_common_init(); mxc_register_gpios(); mx51_babbage_io_init(); mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_hs_device, &mxci2c_hs_data); mxc_register_device(&mxc_rtc_device, &srtc_data); mxc_register_device(&mxc_w1_master_device, &mxc_w1_data); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_tve_device, &tve_data); mxc_register_device(&mxcvpu_device, &mxc_vpu_data); mxc_register_device(&gpu_device, NULL); mxc_register_device(&mxcscc_device, NULL); mxc_register_device(&mx51_lpmode_device, NULL); mxc_register_device(&busfreq_device, NULL); mxc_register_device(&sdram_autogating_device, NULL); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&mxc_dvfs_per_device, &dvfs_per_data); mxc_register_device(&mxc_iim_device, NULL); mxc_register_device(&mxc_pwm1_device, NULL); mxc_register_device(&mxc_pwm_backlight_device, &mxc_pwm_backlight_data); mxc_register_device(&mxc_keypad_device, &keypad_plat_data); mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc2_device, &mmc2_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); mxc_register_device(&mxc_fec_device, NULL); mxc_register_device(&mxc_v4l2_device, NULL); mxc_register_device(&mxc_v4l2out_device, NULL); mx51_babbage_init_mc13892(); if (board_is_rev(BOARD_REV_2)) /* BB2.5 */ spi_register_board_info(mxc_dataflash_device, ARRAY_SIZE(mxc_dataflash_device)); else /* BB2.0 */ spi_register_board_info(mxc_spi_nor_device, ARRAY_SIZE(mxc_spi_nor_device)); i2c_register_board_info(0, mxc_i2c0_board_info, ARRAY_SIZE(mxc_i2c0_board_info)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); if (cpu_is_mx51_rev(CHIP_REV_2_0) >= 1) { vga_data.core_reg = NULL; vga_data.io_reg = NULL; vga_data.analog_reg = NULL; } i2c_register_board_info(3, mxc_i2c_hs_board_info, ARRAY_SIZE(mxc_i2c_hs_board_info)); pm_power_off = mxc_power_off; if (cpu_is_mx51_rev(CHIP_REV_1_1) == 2) { sgtl5000_data.sysclk = 26000000; } gpio_request(IOMUX_TO_GPIO(MX51_PIN_EIM_A23), "eim_a23"); gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_A23), 0); mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); mx5_usb_dr_init(); mx5_usbh1_init(); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { int err; mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "csi_mclk1"); mxc_ipu_data.csi_clk[1] = clk_get(NULL, "csi_mclk2"); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); mxc_cpu_common_init(); mx51_3stack_io_init(); mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_hs_device, &mxci2c_hs_data); mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_w1_master_device, &mxc_w1_data); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_tve_device, &tve_data); mxc_register_device(&mxcvpu_device, &mxc_vpu_data); mxc_register_device(&gpu_device, NULL); mxc_register_device(&mxcscc_device, NULL); mxc_register_device(&mx51_lpmode_device, NULL); mxc_register_device(&busfreq_device, &bus_freq_data); mxc_register_device(&sdram_autogating_device, NULL); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&mxc_dvfs_per_device, &dvfs_per_data); mxc_register_device(&mxc_iim_device, NULL); mxc_register_device(&mxc_pwm1_device, NULL); mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm_backlight_data); mxc_register_device(&mxc_keypad_device, &keypad_plat_data); mxcsdhc1_device.resource[2].start = IOMUX_TO_IRQ(MX51_PIN_GPIO1_0); mxcsdhc1_device.resource[2].end = IOMUX_TO_IRQ(MX51_PIN_GPIO1_0); mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc2_device, &mmc2_data); mxc_register_device(&mxc_sim_device, &sim_data); mxc_register_device(&pata_fsl_device, &ata_data); mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); mxc_expio_init(); if (debug_board_present) mxc_register_device(&smsc_lan9217_device, &smsc911x_config); if (cpu_is_mx51_rev(CHIP_REV_2_0) > 0) lcd_data.reset = lcd_reset_to2; mxc_register_device(&mxc_lcd_device, &lcd_data); mxc_register_device(&lcd_wvga_device, &lcd_wvga_data); mxc_register_device(&mxc_fb_devices[0], &fb_data[0]); mxc_register_device(&mxc_fb_devices[1], &fb_data[1]); mxc_register_device(&mxc_fb_devices[2], NULL); mxc_register_device(&mxcbl_device, NULL); #if defined(CONFIG_MTD_NAND_IMX_NFC) || defined(CONFIG_MTD_NAND_IMX_NFC_MODULE) mxc_register_device(&imx_nfc_device, &imx_nfc_platform_data); #else mxc_register_device(&mxc_nandv2_mtd_device, &mxc_nand_data); #endif mx51_3stack_init_mc13892(); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); i2c_register_board_info(3, mxc_i2c_hs_board_info, ARRAY_SIZE(mxc_i2c_hs_board_info)); mxc_init_wm8903(); mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); mxc_register_device(&mxc_bt_device, &mxc_bt_data); mxc_register_device(&mxc_gps_device, &gps_data); mxc_register_device(&mxc_v4l2_device, NULL); mxc_register_device(&mxc_v4l2out_device, NULL); mx5_usb_dr_init(); mx5_usbh1_init(); /* Setup Touchscreen interrupt */ gpio_request(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5), "gpio1_5"); gpio_direction_input(IOMUX_TO_GPIO(MX51_PIN_GPIO1_5)); err = mxc_request_iomux(MX51_PIN_EIM_D19, IOMUX_CONFIG_GPIO); if (err) printk(KERN_ERR "Error: bt reset request gpio failed!\n"); else { gpio_request(IOMUX_TO_GPIO(MX51_PIN_EIM_D19), "eim_d19"); gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_EIM_D19), 0); } }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "ssi_ext1_clk"); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); spdif_audio_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk"); clk_put(spdif_audio_data.ext_ram_clk); /* SD card detect irqs */ if (board_is_mx53_arm2()) { mxcsdhc1_device.resource[2].start = gpio_to_irq(ARM2_SD1_CD); mxcsdhc1_device.resource[2].end = gpio_to_irq(ARM2_SD1_CD); mmc3_data.card_inserted_state = 1; mmc3_data.status = NULL; mmc3_data.wp_status = NULL; mmc1_data.wp_status = NULL; } else { mxcsdhc3_device.resource[2].start = gpio_to_irq(EVK_SD3_CD); mxcsdhc3_device.resource[2].end = gpio_to_irq(EVK_SD3_CD); mxcsdhc1_device.resource[2].start = gpio_to_irq(EVK_SD1_CD); mxcsdhc1_device.resource[2].end = gpio_to_irq(EVK_SD1_CD); } mxc_cpu_common_init(); mx53_evk_io_init(); mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_devices[2], &mxci2c_data); mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_w1_master_device, &mxc_w1_data); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_ldb_device, &ldb_data); mxc_register_device(&mxc_tve_device, &tve_data); if (!mxc_fuse_get_vpu_status()) mxc_register_device(&mxcvpu_device, &mxc_vpu_data); if (!mxc_fuse_get_gpu_status()) mxc_register_device(&gpu_device, &gpu_data); mxc_register_device(&mxcscc_device, NULL); /* mxc_register_device(&mx53_lpmode_device, NULL); mxc_register_device(&sdram_autogating_device, NULL); */ mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&busfreq_device, &bus_freq_data); /* mxc_register_device(&mxc_dvfs_per_device, &dvfs_per_data); */ mxc_register_device(&mxc_iim_device, &iim_data); if (!board_is_mx53_arm2()) { mxc_register_device(&mxc_pwm2_device, NULL); mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm_backlight_data); } mxc_register_device(&mxc_flexcan0_device, &flexcan0_data); mxc_register_device(&mxc_flexcan1_device, &flexcan1_data); /* mxc_register_device(&mxc_keypad_device, &keypad_plat_data); */ mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc3_device, &mmc3_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); mxc_register_device(&ahci_fsl_device, &sata_data); /* ASRC is only available for MX53 TO2.0 */ if (mx53_revision() >= IMX_CHIP_REVISION_2_0) { mxc_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk"); clk_put(mxc_asrc_data.asrc_core_clk); mxc_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk"); clk_put(mxc_asrc_data.asrc_audio_clk); mxc_register_device(&mxc_asrc_device, &mxc_asrc_data); } mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); if (!mxc_apc_on) { mxc_register_device(&mxc_fec_device, &fec_data); mxc_register_device(&mxc_ptp_device, NULL); } spi_register_board_info(mxc_dataflash_device, ARRAY_SIZE(mxc_dataflash_device)); i2c_register_board_info(0, mxc_i2c0_board_info, ARRAY_SIZE(mxc_i2c0_board_info)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); mx53_evk_init_mc13892(); /* pm_power_off = mxc_power_off; */ sgtl5000_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk"); clk_put(sgtl5000_data.ext_ram_clk); mxc_surround_audio_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk"); clk_put(mxc_surround_audio_data.ext_ram_clk); mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); mxc_register_device(&mxc_spdif_audio_device, &spdif_audio_data); mxc_register_device(&mxc_mlb_device, &mlb_data); mxc_register_device(&mxc_powerkey_device, &pwrkey_data); mx5_set_otghost_vbus_func(mx53_gpio_usbotg_driver_vbus); mx5_usb_dr_init(); mx5_set_host1_vbus_func(mx53_gpio_host1_driver_vbus); mx5_usbh1_init(); mxc_register_device(&mxc_nandv2_mtd_device, &mxc_nand_data); if (mxc_apc_on) { mxc_register_device(&mxc_esai_device, &esai_data); mxc_register_device(&mxc_alsa_surround_device, &mxc_surround_audio_data); } mxc_register_device(&mxc_v4l2_device, NULL); mxc_register_device(&mxc_v4l2out_device, NULL); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "ssi_ext1_clk"); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); spdif_audio_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk"); clk_put(spdif_audio_data.ext_ram_clk); mxc_surround_audio_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk"); clk_put(mxc_surround_audio_data.ext_ram_clk); mxcsdhc2_device.resource[2].start = gpio_to_irq(ARD_SD2_CD); mxcsdhc2_device.resource[2].end = gpio_to_irq(ARD_SD2_CD); mxcsdhc1_device.resource[2].start = gpio_to_irq(ARD_SD1_CD); mxcsdhc1_device.resource[2].end = gpio_to_irq(ARD_SD1_CD); mxc_cpu_common_init(); mx53_ard_io_init(); weim_cs_config(); mxc_read_mac_iim(); mxc_register_device(&ard_smsc_lan9220_device, &ard_smsc911x_config); mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[1], &mxci2c1_data); mxc_register_device(&mxci2c_devices[2], &mxci2c2_data); mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_ldb_device, &ldb_data); mxc_register_device(&mxc_tve_device, &tve_data); if (!mxc_fuse_get_vpu_status()) mxc_register_device(&mxcvpu_device, &mxc_vpu_data); if (!mxc_fuse_get_gpu_status()) mxc_register_device(&gpu_device, &gpu_data); mxc_register_device(&mxcscc_device, NULL); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&busfreq_device, &bus_freq_data); mxc_register_device(&mxc_iim_device, &iim_data); mxc_register_device(&mxc_pwm1_device, &mxc_pwm1_platform_data); /* Rev B boards use a different LVDS Panel */ if (board_is_mx53_ard_b()) { mxc_pwm1_backlight_data.pwm_period_ns = 50000; } mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm1_backlight_data); mxc_register_device(&mxc_pwm2_device, &mxc_pwm2_platform_data); /* Rev B boards use a different LVDS Panel */ if (board_is_mx53_ard_b()) { mxc_pwm2_backlight_data.pwm_period_ns = 50000; } mxc_register_device(&mxc_pwm2_backlight_device, &mxc_pwm2_backlight_data); mxc_register_device(&mxc_flexcan0_device, &flexcan0_data); mxc_register_device(&mxc_flexcan1_device, &flexcan1_data); mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc2_device, &mmc2_data); mxc_register_device(&ahci_fsl_device, &sata_data); mxc_register_device(&imx_ahci_device_hwmon, NULL); /* ASRC is only available for MX53 TO2.0 */ if (mx53_revision() >= IMX_CHIP_REVISION_2_0) { mxc_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk"); clk_put(mxc_asrc_data.asrc_core_clk); mxc_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk"); clk_put(mxc_asrc_data.asrc_audio_clk); mxc_register_device(&mxc_asrc_device, &mxc_asrc_data); } mxc_register_device(&mxc_spdif_audio_device, &spdif_audio_data); mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); spi_register_board_info(mxc_dataflash_device, ARRAY_SIZE(mxc_dataflash_device)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); /* Rev B boards use a different touchscreen */ if (board_is_mx53_ard_b()) { strcpy(mxc_i2c2_board_info[0].type, "p1003_fwv33"); mxc_i2c2_board_info[0].addr = 0x41; mxc_i2c2_board_info[0].platform_data = &p1003_ts_data; } i2c_register_board_info(2, mxc_i2c2_board_info, ARRAY_SIZE(mxc_i2c2_board_info)); mxc_register_device(&mxc_mlb_device, &mlb_data); mx5_set_otghost_vbus_func(mx53_ard_usbotg_driver_vbus); mx5_usb_dr_init(); mx5_set_host1_vbus_func(mx53_ard_host1_driver_vbus); mx5_usbh1_init(); mx5_usbh2_init(); mxc_register_device(&mxc_nandv2_mtd_device, &mxc_nand_data); mxc_register_device(&mxc_esai_device, &esai_data); mxc_register_device(&mxc_alsa_surround_device, &mxc_surround_audio_data); mxc_register_device(&mxc_v4l2out_device, NULL); mxc_register_device(&mxc_v4l2_device, NULL); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "ssi_ext1_clk"); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); mxcsdhc1_device.resource[2].start = gpio_to_irq(MX53_SMD_SD1_CD); mxcsdhc1_device.resource[2].end = gpio_to_irq(MX53_SMD_SD1_CD); mxc_cpu_common_init(); mx53_smd_io_init(); /* power off by sending shutdown command to da9053*/ pm_power_off = wm831x_poweroff_system; mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_devices[2], &mxci2c_data); mx53_smd_init_wm8325(); mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_ldb_device, &ldb_data); mxc_register_device(&mxc_tve_device, &tve_data); mxc_register_device(&mxcvpu_device, &mxc_vpu_data); mxc_register_device(&gpu_device, &gpu_data); mxc_register_device(&mxcscc_device, NULL); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&busfreq_device, &bus_freq_data); mxc_register_device(&mxc_iim_device, &iim_data); mxc_register_device(&mxc_pwm1_device, &mxc_pwm1_platform_data); mxc_register_device(&mxc_pwm2_device, NULL); mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm_backlight_data); /* Register mmc3(eMMC) first, make it's device number be 0 to * avoid device number change by hotplug in SD(mmc1) card */ mxc_register_device(&mxcsdhc3_device, &mmc3_data); mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc2_device, &mmc2_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); mxc_register_device(&mxc_android_pmem_device, &android_pmem_data); mxc_register_device(&mxc_android_pmem_gpu_device, &android_pmem_gpu_data); mxc_register_device(&usb_mass_storage_device, &mass_storage_data); mxc_register_device(&usb_rndis_device, &rndis_data); mxc_register_device(&android_usb_device, &android_usb_data); mxc_register_device(&ahci_fsl_device, &sata_data); /* AHCI SATA PWR EN(DCDC_5V, DCDC_3V3_BB) on SATA bus */ gpio_request(MX53_SMD_SATA_PWR_EN, "sata-pwr-en"); gpio_direction_output(MX53_SMD_SATA_PWR_EN, 1); mxc_register_device(&mxc_fec_device, &fec_data); mxc_register_device(&mxc_ptp_device, NULL); /* ASRC is only available for MX53 TO2.0 */ if (mx53_revision() >= IMX_CHIP_REVISION_2_0) { mxc_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk"); clk_put(mxc_asrc_data.asrc_core_clk); mxc_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk"); clk_put(mxc_asrc_data.asrc_audio_clk); mxc_register_device(&mxc_asrc_device, &mxc_asrc_data); } spi_device_init(); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); i2c_register_board_info(2, mxc_i2c2_board_info, ARRAY_SIZE(mxc_i2c2_board_info)); mxc_register_device(&mxc_rt5621_device, &rt5621_data); mxc_register_device(&mxc_spdif_audio_device, &spdif_audio_data); mx5_set_otghost_vbus_func(mx53_gpio_usbotg_driver_vbus); mx5_usb_dr_init(); mx5_usbh1_init(); mxc_register_device(&mxc_v4l2_device, NULL); mxc_register_device(&mxc_v4l2out_device, NULL); mxc_register_device(&mxc_bt_rfkill, &mxc_bt_rfkill_data); smd_add_device_buttons(); smd_add_device_battery(); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { iomux_v3_cfg_t mc34708_int = MX53_PAD_CSI0_DAT12__GPIO5_30; iomux_v3_cfg_t da9052_csi0_d12; mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "ssi_ext1_clk"); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); mxcsdhc3_device.resource[2].start = gpio_to_irq(SD3_CD); mxcsdhc3_device.resource[2].end = gpio_to_irq(SD3_CD); mxc_cpu_common_init(); mx53_loco_io_init(); mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_devices[2], &mxci2c_data); mxc_register_device(&mx5_pmu_device, NULL); if (board_is_mx53_loco_mc34708()) { /* set pmic INT gpio pin */ if (board_is_rev(BOARD_REV_2)) {/*Board rev A*/ mc34708_int = MX53_PAD_CSI0_DAT12__GPIO5_30; mx53_loco_mc34708_irq = MX53_LOCO_MC34708_IRQ_REVA; } else if (board_is_rev(BOARD_REV_4)) {/*Board rev B*/ mc34708_int = MX53_PAD_CSI0_DAT5__GPIO5_23; mx53_loco_mc34708_irq = MX53_LOCO_MC34708_IRQ_REVB; } mxc_iomux_v3_setup_pad(mc34708_int); gpio_request(mx53_loco_mc34708_irq, "pmic-int"); gpio_direction_input(mx53_loco_mc34708_irq); mx53_loco_init_mc34708(mx53_loco_mc34708_irq); dvfs_core_data.reg_id = "SW1A"; tve_data.dac_reg = "VDAC"; bus_freq_data.gp_reg_id = "SW1A"; bus_freq_data.lp_reg_id = "SW2"; mxc_register_device(&mxc_powerkey_device, &pwrkey_data); } else { da9052_csi0_d12 = MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12; mxc_iomux_v3_setup_pad(da9052_csi0_d12); mx53_loco_init_da9052(); dvfs_core_data.reg_id = "DA9052_BUCK_CORE"; tve_data.dac_reg = "DA9052_LDO7"; bus_freq_data.gp_reg_id = "DA9052_BUCK_CORE"; bus_freq_data.lp_reg_id = "DA9052_BUCK_PRO"; } mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_ldb_device, &ldb_data); mxc_register_device(&mxc_tve_device, &tve_data); if (!mxc_fuse_get_vpu_status()) mxc_register_device(&mxcvpu_device, &mxc_vpu_data); if (!mxc_fuse_get_gpu_status()) mxc_register_device(&gpu_device, &gpu_data); mxc_register_device(&mxcscc_device, NULL); mxc_register_device(&pm_device, &loco_pm_data); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&busfreq_device, &bus_freq_data); mxc_register_device(&mxc_iim_device, &iim_data); mxc_register_device(&mxc_pwm2_device, NULL); mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm_backlight_data); mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc3_device, &mmc3_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); mxc_register_device(&ahci_fsl_device, &sata_data); mxc_register_device(&imx_ahci_device_hwmon, NULL); mxc_register_device(&mxc_fec_device, &fec_data); mxc_register_device(&mxc_ptp_device, NULL); /* ASRC is only available for MX53 TO2.0 */ if (mx53_revision() >= IMX_CHIP_REVISION_2_0) { mxc_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk"); clk_put(mxc_asrc_data.asrc_core_clk); mxc_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk"); clk_put(mxc_asrc_data.asrc_audio_clk); mxc_register_device(&mxc_asrc_device, &mxc_asrc_data); } i2c_register_board_info(0, mxc_i2c0_board_info, ARRAY_SIZE(mxc_i2c0_board_info)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); i2c_register_board_info(2, mxc_i2c2_board_info, ARRAY_SIZE(mxc_i2c2_board_info)); sgtl5000_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk"); clk_put(sgtl5000_data.ext_ram_clk); mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); spdif_audio_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk"); clk_put(spdif_audio_data.ext_ram_clk); mxc_register_device(&mxc_spdif_audio_device, &spdif_audio_data); mx5_usb_dr_init(); mx5_set_host1_vbus_func(mx53_loco_usbh1_vbus); mx5_usbh1_init(); mxc_register_device(&mxc_v4l2_device, NULL); mxc_register_device(&mxc_v4l2out_device, NULL); loco_add_device_buttons(); pm_power_off = da9053_power_off; pm_i2c_init(I2C1_BASE_ADDR - MX53_OFFSET); platform_device_register(&leds_gpio); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "csi_mclk1"); mxc_ipu_data.csi_clk[1] = clk_get(NULL, "csi_mclk2"); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); /* SD card detect irqs */ mxcsdhc2_device.resource[2].start = gpio_to_irq(BABBAGE_SD2_CD_2_5); mxcsdhc2_device.resource[2].end = gpio_to_irq(BABBAGE_SD2_CD_2_5); mxcsdhc1_device.resource[2].start = gpio_to_irq(BABBAGE_SD1_CD); mxcsdhc1_device.resource[2].end = gpio_to_irq(BABBAGE_SD1_CD); mxc_cpu_common_init(); mx51_babbage_io_init(); mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_hs_device, &mxci2c_hs_data); mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_w1_master_device, &mxc_w1_data); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_tve_device, &tve_data); mxc_register_device(&mxcvpu_device, &mxc_vpu_data); mxc_register_device(&gpu_device, NULL); mxc_register_device(&mxcscc_device, NULL); mxc_register_device(&mx51_lpmode_device, NULL); mxc_register_device(&busfreq_device, &bus_freq_data); mxc_register_device(&sdram_autogating_device, NULL); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&mxc_dvfs_per_device, &dvfs_per_data); mxc_register_device(&mxc_iim_device, &iim_data); mxc_register_device(&mxc_pwm1_device, NULL); mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm_backlight_data); mxc_register_device(&mxc_keypad_device, &keypad_plat_data); mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc2_device, &mmc2_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); mxc_register_device(&mxc_ssi3_device, NULL); mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); mxc_register_device(&mxc_fec_device, NULL); mxc_register_device(&mxc_v4l2_device, NULL); mxc_register_device(&mxc_v4l2out_device, NULL); mxc_register_device(&mxc_powerkey_device, &pwrkey_data); mx51_babbage_init_mc13892(); if (board_is_rev(BOARD_REV_2)) /* BB2.5 */ spi_register_board_info(mxc_dataflash_device, ARRAY_SIZE(mxc_dataflash_device)); else /* BB2.0 */ spi_register_board_info(mxc_spi_nor_device, ARRAY_SIZE(mxc_spi_nor_device)); i2c_register_board_info(0, mxc_i2c0_board_info, ARRAY_SIZE(mxc_i2c0_board_info)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); vga_data.core_reg = NULL; vga_data.io_reg = NULL; vga_data.analog_reg = NULL; i2c_register_board_info(3, mxc_i2c_hs_board_info, ARRAY_SIZE(mxc_i2c_hs_board_info)); pm_power_off = mxc_power_off; sgtl5000_data.sysclk = 26000000; gpio_request(BABBAGE_AUDAMP_STBY, "audioamp-stdby"); gpio_direction_output(BABBAGE_AUDAMP_STBY, 0); mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); mx5_usb_dr_init(); mx5_usbh1_init(); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "ssi_ext1_clk"); /* *ssi_ext1_clk was enbled in arch/arm/mach-mx5/clock.c, and it was kept *open to provide clock for audio codec on i.Mx53 Quickstart, but MX53 *SMD board have no needs to do that, so we close it here */ clk_disable(mxc_ipu_data.csi_clk[0]); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); mxcsdhc1_device.resource[2].start = gpio_to_irq(MX53_SMD_SD1_CD); mxcsdhc1_device.resource[2].end = gpio_to_irq(MX53_SMD_SD1_CD); mxc_cpu_common_init(); mx53_smd_io_init(); /* power off by sending shutdown command to da9053*/ pm_power_off = da9053_power_off; mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_devices[2], &mxci2c_data); mx53_smd_init_da9052(); mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_ldb_device, &ldb_data); mxc_register_device(&mxc_tve_device, &tve_data); if (!mxc_fuse_get_vpu_status()) mxc_register_device(&mxcvpu_device, &mxc_vpu_data); if (!mxc_fuse_get_gpu_status()) mxc_register_device(&gpu_device, &gpu_data); mxc_register_device(&mxcscc_device, NULL); mxc_register_device(&pm_device, &smd_pm_data); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&busfreq_device, &bus_freq_data); mxc_register_device(&mxc_iim_device, &iim_data); mxc_register_device(&mxc_pwm2_device, NULL); mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm_backlight_data); mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc2_device, &mmc2_data); mxc_register_device(&mxcsdhc3_device, &mmc3_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); mxc_register_device(&ahci_fsl_device, &sata_data); mxc_register_device(&imx_ahci_device_hwmon, NULL); /* AHCI SATA PWR EN(DCDC_5V, DCDC_3V3_BB) on SATA bus */ gpio_request(MX53_SMD_SATA_PWR_EN, "sata-pwr-en"); gpio_direction_output(MX53_SMD_SATA_PWR_EN, 1); mxc_register_device(&mxc_fec_device, &fec_data); mxc_register_device(&mxc_ptp_device, NULL); /* ASRC is only available for MX53 TO2.0 */ if (mx53_revision() >= IMX_CHIP_REVISION_2_0) { mxc_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk"); clk_put(mxc_asrc_data.asrc_core_clk); mxc_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk"); clk_put(mxc_asrc_data.asrc_audio_clk); mxc_register_device(&mxc_asrc_device, &mxc_asrc_data); } spi_device_init(); i2c_register_board_info(0, mxc_i2c0_board_info, ARRAY_SIZE(mxc_i2c0_board_info)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); i2c_register_board_info(2, mxc_i2c2_board_info, ARRAY_SIZE(mxc_i2c2_board_info)); sgtl5000_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk"); clk_put(sgtl5000_data.ext_ram_clk); mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); spdif_audio_data.ext_ram_clk = clk_get(NULL, "emi_fast_clk"); clk_put(spdif_audio_data.ext_ram_clk); mxc_register_device(&mxc_spdif_audio_device, &spdif_audio_data); mx5_set_otghost_vbus_func(mx53_gpio_usbotg_driver_vbus); mx5_usb_dr_init(); mx5_usbh1_init(); mxc_register_device(&mxc_v4l2_device, NULL); mxc_register_device(&mxc_v4l2out_device, NULL); mxc_register_device(&mxc_bt_rfkill, &mxc_bt_rfkill_data); smd_add_device_buttons(); smd_add_device_battery(); pm_i2c_init(I2C1_BASE_ADDR - MX53_OFFSET); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "ssi_ext1_clk"); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); mxcsdhc1_device.resource[2].start = gpio_to_irq(MX53_SMD_SD1_CD); mxcsdhc1_device.resource[2].end = gpio_to_irq(MX53_SMD_SD1_CD); mxc_cpu_common_init(); mx53_smd_io_init(); pm_power_off = mx53_smd_power_off; mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_devices[2], &mxci2c_data); mx53_smd_init_da9052(); mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_ldb_device, &ldb_data); mxc_register_device(&mxc_tve_device, &tve_data); mxc_register_device(&mxcvpu_device, &mxc_vpu_data); mxc_register_device(&gpu_device, &z160_revision); mxc_register_device(&mxcscc_device, NULL); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&busfreq_device, &bus_freq_data); mxc_register_device(&mxc_iim_device, &iim_data); mxc_register_device(&mxc_pwm2_device, NULL); mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm_backlight_data); mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc2_device, &mmc2_data); mxc_register_device(&mxcsdhc3_device, &mmc3_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); mxc_register_device(&ahci_fsl_device, &sata_data); /* AHCI SATA PWR EN(DCDC_5V, DCDC_3V3_BB) on SATA bus */ gpio_request(MX53_SMD_SATA_PWR_EN, "sata-pwr-en"); gpio_direction_output(MX53_SMD_SATA_PWR_EN, 1); mxc_register_device(&mxc_fec_device, &fec_data); mxc_register_device(&mxc_ptp_device, NULL); /* ASRC is only available for MX53 TO2.0 */ if (mx53_revision() >= IMX_CHIP_REVISION_2_0) { mxc_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk"); clk_put(mxc_asrc_data.asrc_core_clk); mxc_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk"); clk_put(mxc_asrc_data.asrc_audio_clk); mxc_register_device(&mxc_asrc_device, &mxc_asrc_data); } spi_device_init(); i2c_register_board_info(0, mxc_i2c0_board_info, ARRAY_SIZE(mxc_i2c0_board_info)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); i2c_register_board_info(2, mxc_i2c2_board_info, ARRAY_SIZE(mxc_i2c2_board_info)); mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); mx5_set_otghost_vbus_func(mx53_gpio_usbotg_driver_vbus); mx5_usb_dr_init(); mx5_usbh1_init(); mxc_register_device(&mxc_v4l2_device, NULL); mxc_register_device(&mxc_v4l2out_device, NULL); mxc_register_device(&mxc_bt_rfkill, &mxc_bt_rfkill_data); smd_add_device_buttons(); smd_add_device_battery(); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { /* SD card detect irqs */ mxcsdhc1_device.resource[2].start = gpio_to_irq(SD1_CD); mxcsdhc1_device.resource[2].end = gpio_to_irq(SD1_CD); mxcsdhc2_device.resource[2].start = gpio_to_irq(SD2_CD); mxcsdhc2_device.resource[2].end = gpio_to_irq(SD2_CD); mxcsdhc3_device.resource[2].start = gpio_to_irq(SD3_CD); mxcsdhc3_device.resource[2].end = gpio_to_irq(SD3_CD); mxc_cpu_common_init(); mx50_arm2_io_init(); mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxs_dma_apbh_device, &dma_apbh_data); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxcspi3_device, &mxcspi3_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_devices[2], &mxci2c_data); mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_w1_master_device, &mxc_w1_data); mxc_register_device(&gpu_device, &z160_revision); mxc_register_device(&mxc_pxp_device, NULL); mxc_register_device(&mxc_pxp_client_device, NULL); mxc_register_device(&mxc_pxp_v4l2, NULL); mxc_register_device(&pm_device, &mx50_pm_data); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&busfreq_device, &bus_freq_data); /* mxc_register_device(&mx53_lpmode_device, NULL); mxc_register_device(&mxc_dvfs_per_device, &dvfs_per_data); */ /* mxc_register_device(&mxc_keypad_device, &keypad_plat_data); */ mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc2_device, &mmc2_data); mxc_register_device(&mxcsdhc3_device, &mmc3_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); mxc_register_device(&mxc_fec_device, &fec_data); spi_register_board_info(mxc_dataflash_device, ARRAY_SIZE(mxc_dataflash_device)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); i2c_register_board_info(2, mxc_i2c2_board_info, ARRAY_SIZE(mxc_i2c2_board_info)); mxc_register_device(&max17135_sensor_device, NULL); mxc_register_device(&epdc_device, &epdc_data); mxc_register_device(&lcd_wvga_device, &lcd_wvga_data); mxc_register_device(&elcdif_device, &fb_data[0]); mxc_register_device(&mxs_viim, NULL); mx50_arm2_init_mc13892(); /* pm_power_off = mxc_power_off; */ mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); mxc_register_device(&gpmi_nfc_device, &gpmi_nfc_platform_data); mx5_set_otghost_vbus_func(mx50_arm2_usb_set_vbus); mx5_usb_dr_init(); mx5_usbh1_init(); mxc_register_device(&mxc_rngb_device, NULL); mxc_register_device(&dcp_device, NULL); mxc_register_device(&fsl_otp_device, &otp_data); if (mx50_revision() >= IMX_CHIP_REVISION_1_1) mxc_register_device(&mxc_zq_calib_device, NULL); mxc_register_device(&mxc_perfmon, &mxc_perfmon_data); }
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { mxc_ipu_data.di_clk[0] = clk_get(NULL, "ipu_di0_clk"); mxc_ipu_data.di_clk[1] = clk_get(NULL, "ipu_di1_clk"); mxc_ipu_data.csi_clk[0] = clk_get(NULL, "ssi_ext1_clk"); mxc_spdif_data.spdif_core_clk = clk_get(NULL, "spdif_xtal_clk"); clk_put(mxc_spdif_data.spdif_core_clk); mxcsdhc3_device.resource[2].start = gpio_to_irq(SD3_CD); mxcsdhc3_device.resource[2].end = gpio_to_irq(SD3_CD); mxc_cpu_common_init(); mx53_loco_io_init(); mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); mxc_register_device(&mxci2c_devices[1], &mxci2c_data); mxc_register_device(&mxci2c_devices[2], &mxci2c_data); if (board_is_mx53_loco_mc34708()) { mx53_loco_init_mc34708(); dvfs_core_data.reg_id = "SW1A"; tve_data.dac_reg = "VDAC"; bus_freq_data.gp_reg_id = "SW1A"; bus_freq_data.lp_reg_id = "SW2"; mxc_register_device(&mxc_powerkey_device, &pwrkey_data); } else { mx53_loco_init_da9052(); dvfs_core_data.reg_id = "DA9052_BUCK_CORE"; tve_data.dac_reg = "DA9052_LDO7"; bus_freq_data.gp_reg_id = "DA9052_BUCK_CORE"; bus_freq_data.lp_reg_id = "DA9052_BUCK_PRO"; } mxc_register_device(&mxc_rtc_device, NULL); mxc_register_device(&mxc_ipu_device, &mxc_ipu_data); mxc_register_device(&mxc_ldb_device, &ldb_data); mxc_register_device(&mxc_tve_device, &tve_data); mxc_register_device(&mxcvpu_device, &mxc_vpu_data); mxc_register_device(&gpu_device, &gpu_data); mxc_register_device(&mxcscc_device, NULL); mxc_register_device(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&busfreq_device, &bus_freq_data); mxc_register_device(&mxc_iim_device, &iim_data); mxc_register_device(&mxc_pwm2_device, NULL); mxc_register_device(&mxc_pwm1_backlight_device, &mxc_pwm_backlight_data); mxc_register_device(&mxcsdhc1_device, &mmc1_data); mxc_register_device(&mxcsdhc3_device, &mmc3_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); mxc_register_device(&mxc_android_pmem_device, &android_pmem_data); mxc_register_device(&mxc_android_pmem_gpu_device, &android_pmem_gpu_data); mxc_register_device(&usb_mass_storage_device, &mass_storage_data); mxc_register_device(&usb_rndis_device, &rndis_data); mxc_register_device(&android_usb_device, &android_usb_data); mxc_register_device(&ahci_fsl_device, &sata_data); mxc_register_device(&mxc_fec_device, &fec_data); mxc_register_device(&mxc_ptp_device, NULL); /* ASRC is only available for MX53 TO2.0 */ if (mx53_revision() >= IMX_CHIP_REVISION_2_0) { mxc_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk"); clk_put(mxc_asrc_data.asrc_core_clk); mxc_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk"); clk_put(mxc_asrc_data.asrc_audio_clk); mxc_register_device(&mxc_asrc_device, &mxc_asrc_data); } i2c_register_board_info(0, mxc_i2c0_board_info, ARRAY_SIZE(mxc_i2c0_board_info)); i2c_register_board_info(1, mxc_i2c1_board_info, ARRAY_SIZE(mxc_i2c1_board_info)); i2c_register_board_info(2, mxc_i2c2_board_info, ARRAY_SIZE(mxc_i2c2_board_info)); mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data); mxc_register_device(&mxc_spdif_audio_device, &spdif_audio_data); mx5_usb_dr_init(); mx5_set_host1_vbus_func(mx53_loco_usbh1_vbus); mx5_usbh1_init(); mxc_register_device(&mxc_v4l2_device, NULL); mxc_register_device(&mxc_v4l2out_device, NULL); loco_add_device_buttons(); pm_power_off = da9053_power_off; }