summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2014-02-14 11:36:51 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2014-02-14 11:36:51 +0100
commita04866753934832035f3e5d0729f8e627c27c29c (patch)
treeb436a45469c832f37963ae8b7695a540ac40e297
parent843073790d3b6930a7fd44c763e588cf6358b1c6 (diff)
board: apalis-imx6: add PCIe reset out
-rw-r--r--arch/arm/mach-mx6/board-apalis_imx6.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-mx6/board-apalis_imx6.c b/arch/arm/mach-mx6/board-apalis_imx6.c
index db57232e3d44..40ac27172791 100644
--- a/arch/arm/mach-mx6/board-apalis_imx6.c
+++ b/arch/arm/mach-mx6/board-apalis_imx6.c
@@ -85,7 +85,7 @@
#define GP_SD2_WP (-1)
#define GP_ECSPI1_CS1 IMX_GPIO_NR(5, 25) /* TODO muxing uses not GPIO!*/
#define GP_USB_OTG_PWR IMX_GPIO_NR(3, 22)
-#define GP_CAP_TCH_INT1 IMX_GPIO_NR(1, 9) /* TODO PCIe RESET */
+#define GP_PEX_PERST APALIS_GPIO7 /* PCIe RESET */
#define GP_USB_PEN IMX_GPIO_NR(1, 0) /* USBH_EN */
#define GP_USB_HUB_VBUS IMX_GPIO_NR(3, 28) /* USB_VBUS_DET */
#define GP_ENET_PHY_INT IMX_GPIO_NR(1, 30)
@@ -1317,7 +1317,7 @@ early_param("caam", caam_setup);
static const struct imx_pcie_platform_data pcie_data __initconst = {
.pcie_pwr_en = -EINVAL,
- .pcie_rst = -EINVAL, //GP_CAP_TCH_INT1,
+ .pcie_rst = -EINVAL,
.pcie_wake_up = -EINVAL,
.pcie_dis = -EINVAL,
};
@@ -1374,6 +1374,12 @@ static void __init board_init(void)
lcd_disable_pins();
vga_dac_enable_pins();
+ /* PCIe set switch reset, inital 0 */
+ gpio_request(GP_PEX_PERST, "PEX_PERST");
+ gpio_direction_output(GP_PEX_PERST, 0);
+ msleep(100); /* TODO Wait asynchronous */
+ gpio_set_value(GP_PEX_PERST, 1);
+
#ifdef CONFIG_FEC_1588
/* Set GPIO_16 input for IEEE-1588 ts_clk and RMII reference clock
* For MX6 GPR1 bit21 meaning: