aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-cpuimx51sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx5/board-cpuimx51sd.c')
-rw-r--r--arch/arm/mach-mx5/board-cpuimx51sd.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
index ad931895d8b6..29b180823bf5 100644
--- a/arch/arm/mach-mx5/board-cpuimx51sd.c
+++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
@@ -42,6 +42,7 @@
42 42
43#include "devices-imx51.h" 43#include "devices-imx51.h"
44#include "devices.h" 44#include "devices.h"
45#include "cpu_op-mx51.h"
45 46
46#define USBH1_RST IMX_GPIO_NR(2, 28) 47#define USBH1_RST IMX_GPIO_NR(2, 28)
47#define ETH_RST IMX_GPIO_NR(2, 31) 48#define ETH_RST IMX_GPIO_NR(2, 31)
@@ -109,7 +110,7 @@ static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = {
109 110
110 /* Touchscreen */ 111 /* Touchscreen */
111 /* IRQ */ 112 /* IRQ */
112 _MX51_PAD_CSI1_D8__GPIO3_12 | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | 113 _MX51_PAD_GPIO_NAND__GPIO_NAND | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP |
113 PAD_CTL_PKE | PAD_CTL_SRE_FAST | 114 PAD_CTL_PKE | PAD_CTL_SRE_FAST |
114 PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), 115 PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS),
115}; 116};
@@ -118,15 +119,9 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
118 .flags = IMXUART_HAVE_RTSCTS, 119 .flags = IMXUART_HAVE_RTSCTS,
119}; 120};
120 121
121static int ts_get_pendown_state(void)
122{
123 return gpio_get_value(TSC2007_IRQGPIO) ? 0 : 1;
124}
125
126static struct tsc2007_platform_data tsc2007_info = { 122static struct tsc2007_platform_data tsc2007_info = {
127 .model = 2007, 123 .model = 2007,
128 .x_plate_ohms = 180, 124 .x_plate_ohms = 180,
129 .get_pendown_state = ts_get_pendown_state,
130}; 125};
131 126
132static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = { 127static struct i2c_board_info eukrea_cpuimx51sd_i2c_devices[] = {
@@ -167,7 +162,10 @@ static int initialize_otg_port(struct platform_device *pdev)
167 v |= MX51_USB_PLL_DIV_19_2_MHZ; 162 v |= MX51_USB_PLL_DIV_19_2_MHZ;
168 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); 163 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
169 iounmap(usb_base); 164 iounmap(usb_base);
170 return 0; 165
166 mdelay(10);
167
168 return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
171} 169}
172 170
173static int initialize_usbh1_port(struct platform_device *pdev) 171static int initialize_usbh1_port(struct platform_device *pdev)
@@ -186,13 +184,16 @@ static int initialize_usbh1_port(struct platform_device *pdev)
186 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, 184 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN,
187 usbother_base + MX51_USB_CTRL_1_OFFSET); 185 usbother_base + MX51_USB_CTRL_1_OFFSET);
188 iounmap(usb_base); 186 iounmap(usb_base);
189 return 0; 187
188 mdelay(10);
189
190 return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
191 MXC_EHCI_ITC_NO_THRESHOLD);
190} 192}
191 193
192static struct mxc_usbh_platform_data dr_utmi_config = { 194static struct mxc_usbh_platform_data dr_utmi_config = {
193 .init = initialize_otg_port, 195 .init = initialize_otg_port,
194 .portsc = MXC_EHCI_UTMI_16BIT, 196 .portsc = MXC_EHCI_UTMI_16BIT,
195 .flags = MXC_EHCI_INTERNAL_PHY,
196}; 197};
197 198
198static struct fsl_usb2_platform_data usb_pdata = { 199static struct fsl_usb2_platform_data usb_pdata = {
@@ -203,7 +204,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
203static struct mxc_usbh_platform_data usbh1_config = { 204static struct mxc_usbh_platform_data usbh1_config = {
204 .init = initialize_usbh1_port, 205 .init = initialize_usbh1_port,
205 .portsc = MXC_EHCI_MODE_ULPI, 206 .portsc = MXC_EHCI_MODE_ULPI,
206 .flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
207}; 207};
208 208
209static int otg_mode_host; 209static int otg_mode_host;
@@ -242,7 +242,7 @@ static struct mcp251x_platform_data mcp251x_info = {
242static struct spi_board_info cpuimx51sd_spi_device[] = { 242static struct spi_board_info cpuimx51sd_spi_device[] = {
243 { 243 {
244 .modalias = "mcp2515", 244 .modalias = "mcp2515",
245 .max_speed_hz = 6500000, 245 .max_speed_hz = 10000000,
246 .bus_num = 0, 246 .bus_num = 0,
247 .mode = SPI_MODE_0, 247 .mode = SPI_MODE_0,
248 .chip_select = 0, 248 .chip_select = 0,
@@ -269,6 +269,10 @@ static void __init eukrea_cpuimx51sd_init(void)
269 mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51sd_pads, 269 mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51sd_pads,
270 ARRAY_SIZE(eukrea_cpuimx51sd_pads)); 270 ARRAY_SIZE(eukrea_cpuimx51sd_pads));
271 271
272#if defined(CONFIG_CPU_FREQ_IMX)
273 get_cpu_op = mx51_get_cpu_op;
274#endif
275
272 imx51_add_imx_uart(0, &uart_pdata); 276 imx51_add_imx_uart(0, &uart_pdata);
273 imx51_add_mxc_nand(&eukrea_cpuimx51sd_nand_board_info); 277 imx51_add_mxc_nand(&eukrea_cpuimx51sd_nand_board_info);
274 278
@@ -329,7 +333,8 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
329 /* Maintainer: Eric Bénard <eric@eukrea.com> */ 333 /* Maintainer: Eric Bénard <eric@eukrea.com> */
330 .boot_params = MX51_PHYS_OFFSET + 0x100, 334 .boot_params = MX51_PHYS_OFFSET + 0x100,
331 .map_io = mx51_map_io, 335 .map_io = mx51_map_io,
336 .init_early = imx51_init_early,
332 .init_irq = mx51_init_irq, 337 .init_irq = mx51_init_irq,
333 .init_machine = eukrea_cpuimx51sd_init,
334 .timer = &mxc_timer, 338 .timer = &mxc_timer,
339 .init_machine = eukrea_cpuimx51sd_init,
335MACHINE_END 340MACHINE_END