summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx6
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2013-07-06 12:34:01 -0700
committerEric Nelson <eric.nelson@boundarydevices.com>2013-09-03 14:14:30 -0700
commit53743273837be8026895d2012affe1d8e991b97f (patch)
tree44f521e4e116839a712ade14ea4f188d64950453 /arch/arm/mach-mx6
parent2092f00a2f159d2ddfc90cb098bd153e14a92e2b (diff)
board-mx6_s: add CSPI2
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Diffstat (limited to 'arch/arm/mach-mx6')
-rw-r--r--arch/arm/mach-mx6/board-mx6_s.c25
-rw-r--r--arch/arm/mach-mx6/pads-mx6_s.h2
2 files changed, 19 insertions, 8 deletions
diff --git a/arch/arm/mach-mx6/board-mx6_s.c b/arch/arm/mach-mx6/board-mx6_s.c
index 1f444f90a944..1cd4b826a172 100644
--- a/arch/arm/mach-mx6/board-mx6_s.c
+++ b/arch/arm/mach-mx6/board-mx6_s.c
@@ -83,6 +83,7 @@
#define GP_SD4_CD IMX_GPIO_NR(2, 6)
#define GP_SD4_WP IMX_GPIO_NR(2, 7)
#define GP_ECSPI1_CS1 IMX_GPIO_NR(3, 19)
+#define GP_ECSPI2_CS1 IMX_GPIO_NR(2, 27)
#define GP_USB_OTG_PWR IMX_GPIO_NR(3, 22)
#define GP_CAP_TCH_INT1 IMX_GPIO_NR(1, 9)
#define GP_DRGB_IRQGPIO IMX_GPIO_NR(4, 20)
@@ -316,13 +317,13 @@ static struct fec_platform_data fec_data __initdata = {
.phy_irq = gpio_to_irq(GP_ENET_PHY_INT)
};
-static int spi_cs[] = {
+static int spi1_cs[] = {
GP_ECSPI1_CS1,
};
-static const struct spi_imx_master spi_data __initconst = {
- .chipselect = spi_cs,
- .num_chipselect = ARRAY_SIZE(spi_cs),
+static const struct spi_imx_master spi1_data __initconst = {
+ .chipselect = spi1_cs,
+ .num_chipselect = ARRAY_SIZE(spi1_cs),
};
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
@@ -364,12 +365,21 @@ static struct spi_board_info spi_nor_device[] __initdata = {
#endif
};
-static void spi_device_init(void)
+static void spi_nor_device_init(void)
{
spi_register_board_info(spi_nor_device,
ARRAY_SIZE(spi_nor_device));
}
+static int spi2_cs[] = {
+ GP_ECSPI2_CS1,
+};
+
+static const struct spi_imx_master spi2_data __initconst = {
+ .chipselect = spi2_cs,
+ .num_chipselect = ARRAY_SIZE(spi2_cs),
+};
+
static struct mxc_audio_platform_data audio_data;
static int sgtl5000_init(void)
@@ -1138,8 +1148,9 @@ static void __init board_init(void)
ARRAY_SIZE(mxc_i2c2_board_info));
/* SPI */
- imx6q_add_ecspi(0, &spi_data);
- spi_device_init();
+ imx6q_add_ecspi(0, &spi1_data);
+ spi_nor_device_init();
+ imx6q_add_ecspi(1, &spi2_data);
imx6q_add_mxc_hdmi(&hdmi_data);
diff --git a/arch/arm/mach-mx6/pads-mx6_s.h b/arch/arm/mach-mx6/pads-mx6_s.h
index 431e77801f73..d5ca4eb26b66 100644
--- a/arch/arm/mach-mx6/pads-mx6_s.h
+++ b/arch/arm/mach-mx6/pads-mx6_s.h
@@ -127,7 +127,7 @@ static iomux_v3_cfg_t MX6NAME(common_pads)[] = {
/* CSPI2 */
- MX6PAD(EIM_LBA__ECSPI2_SS1),
+ MX6PAD(EIM_LBA__GPIO_2_27),
MX6PAD(EIM_OE__ECSPI2_MISO),
MX6PAD(EIM_CS0__ECSPI2_SCLK),
MX6PAD(EIM_CS1__ECSPI2_MOSI),