提交 988916e1 编写于 作者: J Jason Wang 提交者: Sascha Hauer

ARM: mx5/mx51_3ds: add eCSPI2 support on the imx51_3ds board

Signed-off-by: NJason Wang <jason77.wang@gmail.com>
Acked-by: NGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 eaa4fd0b
...@@ -18,6 +18,7 @@ config MACH_MX51_BABBAGE ...@@ -18,6 +18,7 @@ config MACH_MX51_BABBAGE
config MACH_MX51_3DS config MACH_MX51_3DS
bool "Support MX51PDK (3DS)" bool "Support MX51PDK (3DS)"
select IMX_HAVE_PLATFORM_SPI_IMX
select MXC_DEBUG_BOARD select MXC_DEBUG_BOARD
help help
Include support for MX51PDK (3DS) platform. This includes specific Include support for MX51PDK (3DS) platform. This includes specific
......
...@@ -24,9 +24,11 @@ ...@@ -24,9 +24,11 @@
#include <mach/imx-uart.h> #include <mach/imx-uart.h>
#include <mach/3ds_debugboard.h> #include <mach/3ds_debugboard.h>
#include "devices-imx51.h"
#include "devices.h" #include "devices.h"
#define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6) #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6)
#define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28)
static struct pad_desc mx51_3ds_pads[] = { static struct pad_desc mx51_3ds_pads[] = {
/* UART1 */ /* UART1 */
...@@ -61,6 +63,12 @@ static struct pad_desc mx51_3ds_pads[] = { ...@@ -61,6 +63,12 @@ static struct pad_desc mx51_3ds_pads[] = {
MX51_PAD_KEY_COL3__KEY_COL3, MX51_PAD_KEY_COL3__KEY_COL3,
MX51_PAD_KEY_COL4__KEY_COL4, MX51_PAD_KEY_COL4__KEY_COL4,
MX51_PAD_KEY_COL5__KEY_COL5, MX51_PAD_KEY_COL5__KEY_COL5,
/* eCSPI2 */
MX51_PAD_NANDF_RB2__ECSPI2_SCLK,
MX51_PAD_NANDF_RB3__ECSPI2_MISO,
MX51_PAD_NANDF_D15__ECSPI2_MOSI,
MX51_PAD_NANDF_D12__GPIO_3_28,
}; };
/* Serial ports */ /* Serial ports */
...@@ -127,6 +135,16 @@ static inline void mxc_init_keypad(void) ...@@ -127,6 +135,16 @@ static inline void mxc_init_keypad(void)
} }
#endif #endif
static int mx51_3ds_spi2_cs[] = {
MXC_SPI_CS(0),
MX51_3DS_ECSPI2_CS,
};
static const struct spi_imx_master mx51_3ds_ecspi2_pdata __initconst = {
.chipselect = mx51_3ds_spi2_cs,
.num_chipselect = ARRAY_SIZE(mx51_3ds_spi2_cs),
};
/* /*
* Board specific initialization. * Board specific initialization.
*/ */
...@@ -136,6 +154,8 @@ static void __init mxc_board_init(void) ...@@ -136,6 +154,8 @@ static void __init mxc_board_init(void)
ARRAY_SIZE(mx51_3ds_pads)); ARRAY_SIZE(mx51_3ds_pads));
mxc_init_imx_uart(); mxc_init_imx_uart();
imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata);
if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT))
printk(KERN_WARNING "Init of the debugboard failed, all " printk(KERN_WARNING "Init of the debugboard failed, all "
"devices on the board are unusable.\n"); "devices on the board are unusable.\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册