ARM: mx6: Add PCIe on SabreSDP
authorMarek Vasut <marex@denx.de>
Sun, 23 Mar 2014 21:45:41 +0000 (22:45 +0100)
committerStefano Babic <sbabic@denx.de>
Mon, 31 Mar 2014 16:28:50 +0000 (18:28 +0200)
Add support for PCIe on MX6 SabreSDP board and enable the support
in the config file.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Liu Ying <Ying.Liu@freescale.com>
board/freescale/mx6sabresd/mx6sabresd.c
include/configs/mx6sabresd.h

index 12d8c5664ed7a102234059e11b7e473d8deeb263..d7d932eeb8a3fd70c7d78a6b41cd016cc811d5f8 100644 (file)
@@ -135,6 +135,16 @@ static void setup_spi(void)
        imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
 }
 
+iomux_v3_cfg_t const pcie_pads[] = {
+       MX6_PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL),        /* POWER */
+       MX6_PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL),        /* RESET */
+};
+
+static void setup_pcie(void)
+{
+       imx_iomux_v3_setup_multiple_pads(pcie_pads, ARRAY_SIZE(pcie_pads));
+}
+
 iomux_v3_cfg_t const di0_pads[] = {
        MX6_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,        /* DISP0_CLK */
        MX6_PAD_DI0_PIN2__IPU1_DI0_PIN02,               /* DISP0_HSYNC */
@@ -454,6 +464,7 @@ int overwrite_console(void)
 int board_eth_init(bd_t *bis)
 {
        setup_iomux_enet();
+       setup_pcie();
 
        return cpu_eth_init(bis);
 }
index 4919f53328d92b15c664b6ad04be5c7da470daad..5d02d23ec7129000f32a944e5a58ad8a64c52359 100644 (file)
 #define CONFIG_IPUV3_CLK 260000000
 #define CONFIG_IMX_HDMI
 
+#define CONFIG_CMD_PCI
+#ifdef CONFIG_CMD_PCI
+#define CONFIG_PCI
+#define CONFIG_PCI_PNP
+#define CONFIG_PCI_SCAN_SHOW
+#define CONFIG_PCIE_IMX
+#define CONFIG_PCIE_IMX_PERST_GPIO     IMX_GPIO_NR(7, 12)
+#define CONFIG_PCIE_IMX_POWER_GPIO     IMX_GPIO_NR(3, 19)
+#endif
+
 #endif                         /* __MX6QSABRESD_CONFIG_H */