2 * linux/arch/arm/mach-pxa/colibri-evalboard.c
4 * Support for Toradex Colibri Evaluation Carrier Board
5 * Daniel Mack <daniel@caiaq.de>
6 * Marek Vasut <marek.vasut@gmail.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/init.h>
14 #include <linux/kernel.h>
15 #include <linux/platform_device.h>
16 #include <linux/sysdev.h>
17 #include <linux/interrupt.h>
18 #include <linux/gpio.h>
19 #include <asm/mach-types.h>
20 #include <mach/hardware.h>
21 #include <asm/mach/arch.h>
22 #include <linux/i2c.h>
23 #include <linux/i2c/pxa-i2c.h>
25 #include <mach/pxa27x.h>
26 #include <mach/colibri.h>
28 #include <mach/ohci.h>
29 #include <mach/pxa27x-udc.h>
34 /******************************************************************************
35 * SD/MMC card controller
36 ******************************************************************************/
37 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
38 static struct pxamci_platform_data colibri_mci_platform_data
= {
39 .ocr_mask
= MMC_VDD_32_33
| MMC_VDD_33_34
,
42 .detect_delay_ms
= 200,
45 static void __init
colibri_mmc_init(void)
47 if (machine_is_colibri()) /* PXA270 Colibri */
48 colibri_mci_platform_data
.gpio_card_detect
=
49 GPIO0_COLIBRI_PXA270_SD_DETECT
;
50 if (machine_is_colibri300()) /* PXA300 Colibri */
51 colibri_mci_platform_data
.gpio_card_detect
=
52 GPIO13_COLIBRI_PXA300_SD_DETECT
;
53 else /* PXA320 Colibri */
54 colibri_mci_platform_data
.gpio_card_detect
=
55 GPIO28_COLIBRI_PXA320_SD_DETECT
;
57 pxa_set_mci_info(&colibri_mci_platform_data
);
60 static inline void colibri_mmc_init(void) {}
63 /******************************************************************************
65 ******************************************************************************/
66 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
67 static int colibri_ohci_init(struct device
*dev
)
69 UP2OCR
= UP2OCR_HXS
| UP2OCR_HXOE
| UP2OCR_DPPDE
| UP2OCR_DMPDE
;
73 static struct pxaohci_platform_data colibri_ohci_info
= {
74 .port_mode
= PMM_PERPORT_MODE
,
75 .flags
= ENABLE_PORT1
|
76 POWER_CONTROL_LOW
| POWER_SENSE_LOW
,
77 .init
= colibri_ohci_init
,
80 static void __init
colibri_uhc_init(void)
82 /* Colibri PXA270 has two usb ports, TBA for 320 */
83 if (machine_is_colibri())
84 colibri_ohci_info
.flags
|= ENABLE_PORT2
;
86 pxa_set_ohci_info(&colibri_ohci_info
);
89 static inline void colibri_uhc_init(void) {}
92 /******************************************************************************
94 ******************************************************************************/
95 #if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
96 static struct i2c_board_info __initdata colibri_i2c_devs
[] = {
98 I2C_BOARD_INFO("m41t00", 0x68),
102 static void __init
colibri_rtc_init(void)
104 pxa_set_i2c_info(NULL
);
105 i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_i2c_devs
));
108 static inline void colibri_rtc_init(void) {}
111 void __init
colibri_evalboard_init(void)
113 pxa_set_ffuart_info(NULL
);
114 pxa_set_btuart_info(NULL
);
115 pxa_set_stuart_info(NULL
);