diff options
Diffstat (limited to 'arch/arm/mach-mx5/board-cpuimx51sd.c')
-rw-r--r-- | arch/arm/mach-mx5/board-cpuimx51sd.c | 68 |
1 files changed, 36 insertions, 32 deletions
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c index 4b3a6119c5fb..ad931895d8b6 100644 --- a/arch/arm/mach-mx5/board-cpuimx51sd.c +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c | |||
@@ -43,19 +43,19 @@ | |||
43 | #include "devices-imx51.h" | 43 | #include "devices-imx51.h" |
44 | #include "devices.h" | 44 | #include "devices.h" |
45 | 45 | ||
46 | #define USBH1_RST (1*32 + 28) | 46 | #define USBH1_RST IMX_GPIO_NR(2, 28) |
47 | #define ETH_RST (1*32 + 31) | 47 | #define ETH_RST IMX_GPIO_NR(2, 31) |
48 | #define TSC2007_IRQGPIO (2*32 + 12) | 48 | #define TSC2007_IRQGPIO IMX_GPIO_NR(3, 12) |
49 | #define CAN_IRQGPIO (0*32 + 1) | 49 | #define CAN_IRQGPIO IMX_GPIO_NR(1, 1) |
50 | #define CAN_RST (3*32 + 15) | 50 | #define CAN_RST IMX_GPIO_NR(4, 15) |
51 | #define CAN_NCS (3*32 + 24) | 51 | #define CAN_NCS IMX_GPIO_NR(4, 24) |
52 | #define CAN_RXOBF (0*32 + 4) | 52 | #define CAN_RXOBF IMX_GPIO_NR(1, 4) |
53 | #define CAN_RX1BF (0*32 + 6) | 53 | #define CAN_RX1BF IMX_GPIO_NR(1, 6) |
54 | #define CAN_TXORTS (0*32 + 7) | 54 | #define CAN_TXORTS IMX_GPIO_NR(1, 7) |
55 | #define CAN_TX1RTS (0*32 + 8) | 55 | #define CAN_TX1RTS IMX_GPIO_NR(1, 8) |
56 | #define CAN_TX2RTS (0*32 + 9) | 56 | #define CAN_TX2RTS IMX_GPIO_NR(1, 9) |
57 | #define I2C_SCL (3*32 + 16) | 57 | #define I2C_SCL IMX_GPIO_NR(4, 16) |
58 | #define I2C_SDA (3*32 + 17) | 58 | #define I2C_SDA IMX_GPIO_NR(4, 17) |
59 | 59 | ||
60 | /* USB_CTRL_1 */ | 60 | /* USB_CTRL_1 */ |
61 | #define MX51_USB_CTRL_1_OFFSET 0x10 | 61 | #define MX51_USB_CTRL_1_OFFSET 0x10 |
@@ -65,10 +65,7 @@ | |||
65 | #define MX51_USB_PLL_DIV_19_2_MHZ 0x01 | 65 | #define MX51_USB_PLL_DIV_19_2_MHZ 0x01 |
66 | #define MX51_USB_PLL_DIV_24_MHZ 0x02 | 66 | #define MX51_USB_PLL_DIV_24_MHZ 0x02 |
67 | 67 | ||
68 | #define CPUIMX51SD_GPIO_3_12 IOMUX_PAD(0x57C, 0x194, 3, 0x0, 0, \ | 68 | static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = { |
69 | MX51_PAD_CTRL_1 | PAD_CTL_PUS_22K_UP) | ||
70 | |||
71 | static struct pad_desc eukrea_cpuimx51sd_pads[] = { | ||
72 | /* UART1 */ | 69 | /* UART1 */ |
73 | MX51_PAD_UART1_RXD__UART1_RXD, | 70 | MX51_PAD_UART1_RXD__UART1_RXD, |
74 | MX51_PAD_UART1_TXD__UART1_TXD, | 71 | MX51_PAD_UART1_TXD__UART1_TXD, |
@@ -88,30 +85,33 @@ static struct pad_desc eukrea_cpuimx51sd_pads[] = { | |||
88 | MX51_PAD_USBH1_DATA6__USBH1_DATA6, | 85 | MX51_PAD_USBH1_DATA6__USBH1_DATA6, |
89 | MX51_PAD_USBH1_DATA7__USBH1_DATA7, | 86 | MX51_PAD_USBH1_DATA7__USBH1_DATA7, |
90 | MX51_PAD_USBH1_STP__USBH1_STP, | 87 | MX51_PAD_USBH1_STP__USBH1_STP, |
91 | MX51_PAD_EIM_CS3__GPIO_2_28, /* PHY nRESET */ | 88 | MX51_PAD_EIM_CS3__GPIO2_28, /* PHY nRESET */ |
92 | 89 | ||
93 | /* FEC */ | 90 | /* FEC */ |
94 | MX51_PAD_EIM_DTACK__GPIO_2_31, /* PHY nRESET */ | 91 | MX51_PAD_EIM_DTACK__GPIO2_31, /* PHY nRESET */ |
95 | 92 | ||
96 | /* HSI2C */ | 93 | /* HSI2C */ |
97 | MX51_PAD_I2C1_CLK__GPIO_4_16, | 94 | MX51_PAD_I2C1_CLK__GPIO4_16, |
98 | MX51_PAD_I2C1_DAT__GPIO_4_17, | 95 | MX51_PAD_I2C1_DAT__GPIO4_17, |
99 | 96 | ||
100 | /* CAN */ | 97 | /* CAN */ |
101 | MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI, | 98 | MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI, |
102 | MX51_PAD_CSPI1_MISO__ECSPI1_MISO, | 99 | MX51_PAD_CSPI1_MISO__ECSPI1_MISO, |
103 | MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK, | 100 | MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK, |
104 | MX51_PAD_CSPI1_SS0__GPIO_4_24, /* nCS */ | 101 | MX51_PAD_CSPI1_SS0__GPIO4_24, /* nCS */ |
105 | MX51_PAD_CSI2_PIXCLK__GPIO_4_15, /* nReset */ | 102 | MX51_PAD_CSI2_PIXCLK__GPIO4_15, /* nReset */ |
106 | MX51_PAD_GPIO_1_1__GPIO_1_1, /* IRQ */ | 103 | MX51_PAD_GPIO1_1__GPIO1_1, /* IRQ */ |
107 | MX51_PAD_GPIO_1_4__GPIO_1_4, /* Control signals */ | 104 | MX51_PAD_GPIO1_4__GPIO1_4, /* Control signals */ |
108 | MX51_PAD_GPIO_1_6__GPIO_1_6, | 105 | MX51_PAD_GPIO1_6__GPIO1_6, |
109 | MX51_PAD_GPIO_1_7__GPIO_1_7, | 106 | MX51_PAD_GPIO1_7__GPIO1_7, |
110 | MX51_PAD_GPIO_1_8__GPIO_1_8, | 107 | MX51_PAD_GPIO1_8__GPIO1_8, |
111 | MX51_PAD_GPIO_1_9__GPIO_1_9, | 108 | MX51_PAD_GPIO1_9__GPIO1_9, |
112 | 109 | ||
113 | /* Touchscreen */ | 110 | /* Touchscreen */ |
114 | CPUIMX51SD_GPIO_3_12, /* IRQ */ | 111 | /* IRQ */ |
112 | _MX51_PAD_CSI1_D8__GPIO3_12 | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | | ||
113 | PAD_CTL_PKE | PAD_CTL_SRE_FAST | | ||
114 | PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS), | ||
115 | }; | 115 | }; |
116 | 116 | ||
117 | static const struct imxuart_platform_data uart_pdata __initconst = { | 117 | static const struct imxuart_platform_data uart_pdata __initconst = { |
@@ -157,6 +157,8 @@ static int initialize_otg_port(struct platform_device *pdev) | |||
157 | void __iomem *usbother_base; | 157 | void __iomem *usbother_base; |
158 | 158 | ||
159 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 159 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); |
160 | if (!usb_base) | ||
161 | return -ENOMEM; | ||
160 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 162 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
161 | 163 | ||
162 | /* Set the PHY clock to 19.2MHz */ | 164 | /* Set the PHY clock to 19.2MHz */ |
@@ -175,6 +177,8 @@ static int initialize_usbh1_port(struct platform_device *pdev) | |||
175 | void __iomem *usbother_base; | 177 | void __iomem *usbother_base; |
176 | 178 | ||
177 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | 179 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); |
180 | if (!usb_base) | ||
181 | return -ENOMEM; | ||
178 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | 182 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; |
179 | 183 | ||
180 | /* The clock for the USBH1 ULPI port will come from the PHY. */ | 184 | /* The clock for the USBH1 ULPI port will come from the PHY. */ |
@@ -243,7 +247,7 @@ static struct spi_board_info cpuimx51sd_spi_device[] = { | |||
243 | .mode = SPI_MODE_0, | 247 | .mode = SPI_MODE_0, |
244 | .chip_select = 0, | 248 | .chip_select = 0, |
245 | .platform_data = &mcp251x_info, | 249 | .platform_data = &mcp251x_info, |
246 | .irq = gpio_to_irq(0 * 32 + 1) | 250 | .irq = gpio_to_irq(CAN_IRQGPIO) |
247 | }, | 251 | }, |
248 | }; | 252 | }; |
249 | 253 | ||
@@ -323,7 +327,7 @@ static struct sys_timer mxc_timer = { | |||
323 | 327 | ||
324 | MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD") | 328 | MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD") |
325 | /* Maintainer: Eric Bénard <eric@eukrea.com> */ | 329 | /* Maintainer: Eric Bénard <eric@eukrea.com> */ |
326 | .boot_params = PHYS_OFFSET + 0x100, | 330 | .boot_params = MX51_PHYS_OFFSET + 0x100, |
327 | .map_io = mx51_map_io, | 331 | .map_io = mx51_map_io, |
328 | .init_irq = mx51_init_irq, | 332 | .init_irq = mx51_init_irq, |
329 | .init_machine = eukrea_cpuimx51sd_init, | 333 | .init_machine = eukrea_cpuimx51sd_init, |