aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx51_efikamx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx5/board-mx51_efikamx.c')
-rw-r--r--arch/arm/mach-mx5/board-mx51_efikamx.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
index f84452f8ef74..4b2718b3e517 100644
--- a/arch/arm/mach-mx5/board-mx51_efikamx.c
+++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
@@ -56,6 +56,10 @@
56#define EFIKAMX_SPI_CS0 (3*32 + 24) 56#define EFIKAMX_SPI_CS0 (3*32 + 24)
57#define EFIKAMX_SPI_CS1 (3*32 + 25) 57#define EFIKAMX_SPI_CS1 (3*32 + 25)
58 58
59/* board 1.1 doesn't have same reset gpio */
60#define EFIKAMX_RESET1_1 (2*32 + 2)
61#define EFIKAMX_RESET (0*32 + 4)
62
59/* the pci ids pin have pull up. they're driven low according to board id */ 63/* the pci ids pin have pull up. they're driven low according to board id */
60#define MX51_PAD_PCBID0 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, PAD_CTL_PUS_100K_UP) 64#define MX51_PAD_PCBID0 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, PAD_CTL_PUS_100K_UP)
61#define MX51_PAD_PCBID1 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, PAD_CTL_PUS_100K_UP) 65#define MX51_PAD_PCBID1 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, PAD_CTL_PUS_100K_UP)
@@ -110,6 +114,10 @@ static iomux_v3_cfg_t mx51efikamx_pads[] = {
110 MX51_PAD_CSPI1_SS1__GPIO_4_25, 114 MX51_PAD_CSPI1_SS1__GPIO_4_25,
111 MX51_PAD_CSPI1_RDY__ECSPI1_RDY, 115 MX51_PAD_CSPI1_RDY__ECSPI1_RDY,
112 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK, 116 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK,
117
118 /* reset */
119 MX51_PAD_DI1_PIN13__GPIO_3_2,
120 MX51_PAD_GPIO_1_4__GPIO_1_4,
113}; 121};
114 122
115/* Serial ports */ 123/* Serial ports */
@@ -296,6 +304,14 @@ static const struct spi_imx_master mx51_efikamx_spi_pdata __initconst = {
296 .num_chipselect = ARRAY_SIZE(mx51_efikamx_spi_cs), 304 .num_chipselect = ARRAY_SIZE(mx51_efikamx_spi_cs),
297}; 305};
298 306
307void mx51_efikamx_reset(void)
308{
309 if (system_rev == 0x11)
310 gpio_direction_output(EFIKAMX_RESET1_1, 0);
311 else
312 gpio_direction_output(EFIKAMX_RESET, 0);
313}
314
299static void __init mxc_board_init(void) 315static void __init mxc_board_init(void)
300{ 316{
301 mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads, 317 mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
@@ -317,6 +333,14 @@ static void __init mxc_board_init(void)
317 spi_register_board_info(mx51_efikamx_spi_board_info, 333 spi_register_board_info(mx51_efikamx_spi_board_info,
318 ARRAY_SIZE(mx51_efikamx_spi_board_info)); 334 ARRAY_SIZE(mx51_efikamx_spi_board_info));
319 imx51_add_ecspi(0, &mx51_efikamx_spi_pdata); 335 imx51_add_ecspi(0, &mx51_efikamx_spi_pdata);
336
337 if (system_rev == 0x11) {
338 gpio_request(EFIKAMX_RESET1_1, "reset");
339 gpio_direction_output(EFIKAMX_RESET1_1, 1);
340 } else {
341 gpio_request(EFIKAMX_RESET, "reset");
342 gpio_direction_output(EFIKAMX_RESET, 1);
343 }
320} 344}
321 345
322static void __init mx51_efikamx_timer_init(void) 346static void __init mx51_efikamx_timer_init(void)