aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r--arch/arm/mach-mx5/Kconfig1
-rw-r--r--arch/arm/mach-mx5/board-mx51_babbage.c36
2 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index 14438426930f..88f0c66d13a7 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -15,6 +15,7 @@ config MACH_MX51_BABBAGE
15 select IMX_HAVE_PLATFORM_IMX_I2C 15 select IMX_HAVE_PLATFORM_IMX_I2C
16 select IMX_HAVE_PLATFORM_IMX_UART 16 select IMX_HAVE_PLATFORM_IMX_UART
17 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX 17 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
18 select IMX_HAVE_PLATFORM_SPI_IMX
18 help 19 help
19 Include support for MX51 Babbage platform, also known as MX51EVK in 20 Include support for MX51 Babbage platform, also known as MX51EVK in
20 u-boot. This includes specific configurations for the board and its 21 u-boot. This includes specific configurations for the board and its
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index 0df50d214db8..ef328433df80 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -20,6 +20,8 @@
20#include <linux/fec.h> 20#include <linux/fec.h>
21#include <linux/gpio_keys.h> 21#include <linux/gpio_keys.h>
22#include <linux/input.h> 22#include <linux/input.h>
23#include <linux/spi/flash.h>
24#include <linux/spi/spi.h>
23 25
24#include <mach/common.h> 26#include <mach/common.h>
25#include <mach/hardware.h> 27#include <mach/hardware.h>
@@ -41,6 +43,8 @@
41#define BABBAGE_PHY_RESET (1*32 + 5) /* GPIO_2_5 */ 43#define BABBAGE_PHY_RESET (1*32 + 5) /* GPIO_2_5 */
42#define BABBAGE_FEC_PHY_RESET (1*32 + 14) /* GPIO_2_14 */ 44#define BABBAGE_FEC_PHY_RESET (1*32 + 14) /* GPIO_2_14 */
43#define BABBAGE_POWER_KEY (1*32 + 21) /* GPIO_2_21 */ 45#define BABBAGE_POWER_KEY (1*32 + 21) /* GPIO_2_21 */
46#define BABBAGE_ECSPI1_CS0 (3*32 + 24) /* GPIO_4_24 */
47#define BABBAGE_ECSPI1_CS1 (3*32 + 25) /* GPIO_4_25 */
44 48
45/* USB_CTRL_1 */ 49/* USB_CTRL_1 */
46#define MX51_USB_CTRL_1_OFFSET 0x10 50#define MX51_USB_CTRL_1_OFFSET 0x10
@@ -147,6 +151,13 @@ static iomux_v3_cfg_t mx51babbage_pads[] = {
147 MX51_PAD_SD2_DATA1__SD2_DATA1, 151 MX51_PAD_SD2_DATA1__SD2_DATA1,
148 MX51_PAD_SD2_DATA2__SD2_DATA2, 152 MX51_PAD_SD2_DATA2__SD2_DATA2,
149 MX51_PAD_SD2_DATA3__SD2_DATA3, 153 MX51_PAD_SD2_DATA3__SD2_DATA3,
154
155 /* eCSPI1 */
156 MX51_PAD_CSPI1_MISO__ECSPI1_MISO,
157 MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI,
158 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK,
159 MX51_PAD_CSPI1_SS0__GPIO_4_24,
160 MX51_PAD_CSPI1_SS1__GPIO_4_25,
150}; 161};
151 162
152/* Serial ports */ 163/* Serial ports */
@@ -310,6 +321,27 @@ static int __init babbage_otg_mode(char *options)
310} 321}
311__setup("otg_mode=", babbage_otg_mode); 322__setup("otg_mode=", babbage_otg_mode);
312 323
324static struct spi_board_info mx51_babbage_spi_board_info[] __initdata = {
325 {
326 .modalias = "mtd_dataflash",
327 .max_speed_hz = 25000000,
328 .bus_num = 0,
329 .chip_select = 1,
330 .mode = SPI_MODE_0,
331 .platform_data = NULL,
332 },
333};
334
335static int mx51_babbage_spi_cs[] = {
336 BABBAGE_ECSPI1_CS0,
337 BABBAGE_ECSPI1_CS1,
338};
339
340static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = {
341 .chipselect = mx51_babbage_spi_cs,
342 .num_chipselect = ARRAY_SIZE(mx51_babbage_spi_cs),
343};
344
313/* 345/*
314 * Board specific initialization. 346 * Board specific initialization.
315 */ 347 */
@@ -351,6 +383,10 @@ static void __init mxc_board_init(void)
351 383
352 imx51_add_sdhci_esdhc_imx(0, NULL); 384 imx51_add_sdhci_esdhc_imx(0, NULL);
353 imx51_add_sdhci_esdhc_imx(1, NULL); 385 imx51_add_sdhci_esdhc_imx(1, NULL);
386
387 spi_register_board_info(mx51_babbage_spi_board_info,
388 ARRAY_SIZE(mx51_babbage_spi_board_info));
389 imx51_add_ecspi(0, &mx51_babbage_spi_pdata);
354} 390}
355 391
356static void __init mx51_babbage_timer_init(void) 392static void __init mx51_babbage_timer_init(void)