mc13892_register_regulator(mc13892, MC13892_VGEN3, &vgen3_init); mc13892_register_regulator(mc13892, MC13892_VUSB, &vusb_init); mc13892_register_regulator(mc13892, MC13892_GPO1, &gpo1_init); mc13892_register_regulator(mc13892, MC13892_GPO2, &gpo2_init); mc13892_register_regulator(mc13892, MC13892_GPO3, &gpo3_init); mc13892_register_regulator(mc13892, MC13892_GPO4, &gpo4_init); regulator_has_full_constraints(); return 0; } static struct mc13892_platform_data mc13892_plat = { .init = mc13892_regulator_init, }; static struct spi_board_info __initdata mc13892_spi_device = { .modalias = "pmic_spi", .irq = IOMUX_TO_IRQ_V3(114), .max_speed_hz = 6000000, /* max spi SCK clock speed in HZ */ .bus_num = 3, .chip_select = 0, .platform_data = &mc13892_plat, }; int __init mx50_arm2_init_mc13892(void) { return spi_register_board_info(&mc13892_spi_device, 1); }
ltc3589_register_regulator(ltc3589, LTC3589_SW4, &sw4_init); ltc3589_register_regulator(ltc3589, LTC3589_LDO1, &ldo1_init); ltc3589_register_regulator(ltc3589, LTC3589_LDO2, &ldo2_init); ltc3589_register_regulator(ltc3589, LTC3589_LDO3, &ldo3_init); ltc3589_register_regulator(ltc3589, LTC3589_LDO4, &ldo4_init); return 0; } static struct ltc3589_platform_data __initdata ltc3589_plat = { .init = mx53_ltc3589_init, }; static struct i2c_board_info __initdata ltc3589_i2c_device = { I2C_BOARD_INFO("ltc3589", 0x34), .irq = IOMUX_TO_IRQ_V3(ARD_PMIC_INT), .platform_data = <c3589_plat, }; static __init int mx53_init_i2c(void) { return i2c_register_board_info(1, <c3589_i2c_device, 1); } subsys_initcall(mx53_init_i2c); static __init int ltc3589_pmic_init(void) { int i = 0; int ret = 0; struct regulator *regulator;
/*! * Board specific initialization. */ static void __init mxc_board_init(void) { /* SD card detect irqs */ mxcsdhc1_device.resource[2].start = IOMUX_TO_IRQ_V3(SD1_CD); mxcsdhc1_device.resource[2].end = IOMUX_TO_IRQ_V3(SD1_CD); mxcsdhc2_device.resource[2].start = IOMUX_TO_IRQ_V3(SD2_CD); mxcsdhc2_device.resource[2].end = IOMUX_TO_IRQ_V3(SD2_CD); mxcsdhc3_device.resource[2].start = IOMUX_TO_IRQ_V3(SD3_CD); mxcsdhc3_device.resource[2].end = IOMUX_TO_IRQ_V3(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, &srtc_data); mxc_register_device(&mxc_w1_master_device, &mxc_w1_data); mxc_register_device(&gpu_device, &z160_version); 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(&mxc_dvfs_core_device, &dvfs_core_data); mxc_register_device(&busfreq_device, NULL); /* 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); }
static int mxc_sgtl5000_amp_enable(int enable) { /* TO DO */ return 0; } static int headphone_det_status(void) { return (gpio_get_value(HP_DETECT) != 0); } static struct mxc_audio_platform_data sgtl5000_data = { .ssi_num = 1, .src_port = 2, .ext_port = 3, .hp_irq = IOMUX_TO_IRQ_V3(HP_DETECT), .hp_status = headphone_det_status, .amp_enable = mxc_sgtl5000_amp_enable, .sysclk = 12288000, }; static struct platform_device mxc_sgtl5000_device = { .name = "imx-3stack-sgtl5000", }; static struct pad_desc armadillo2_wvga_pads[] = { MX50_PAD_DISP_D0__DISP_D0, MX50_PAD_DISP_D1__DISP_D1, MX50_PAD_DISP_D2__DISP_D2, MX50_PAD_DISP_D3__DISP_D3, MX50_PAD_DISP_D4__DISP_D4,
/*! * 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); /* SD card detect irqs */ if (board_is_mx53_arm2()) { mxcsdhc1_device.resource[2].start = IOMUX_TO_IRQ_V3(ARM2_SD1_CD); mxcsdhc1_device.resource[2].end = IOMUX_TO_IRQ_V3(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 = IOMUX_TO_IRQ_V3(EVK_SD3_CD); mxcsdhc3_device.resource[2].end = IOMUX_TO_IRQ_V3(EVK_SD3_CD); mxcsdhc1_device.resource[2].start = IOMUX_TO_IRQ_V3(EVK_SD1_CD); mxcsdhc1_device.resource[2].end = IOMUX_TO_IRQ_V3(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); mxc_register_device(&mxcvpu_device, &mxc_vpu_data); mxc_register_device(&gpu_device, &z160_revision); 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 (cpu_is_mx53_rev(CHIP_REV_2_0) >= 1) { 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; */ mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_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); }
} static struct mxc_lcd_platform_data sii9022_hdmi_data = { .reset = sii9022_hdmi_reset, }; /* TO DO add platform data */ static struct i2c_board_info mxc_i2c1_board_info[] __initdata = { { .type = "sgtl5000-i2c", .addr = 0x0a, }, { .type = "tsc2007", .addr = 0x48, .irq = IOMUX_TO_IRQ_V3(EVK_TS_INT), }, { .type = "backlight-i2c", .addr = 0x2c, }, { .type = "vga-ddc", .addr = 0x1f, }, { .type = "eeprom", .addr = 0x50, }, { .type = "sii9022",