ARM: mx6: Add PCIe on SabreSDP
PATCH 1/1 ARM: mx6: Add PCIe on SabreSDP
Add support for PCIe on MX6 SabreSDP board and enable the support in the config file.
Signed-off-by Marek Vasut <[email protected]>
Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Liu Ying <[email protected]>
--- board/freescale/mx6sabresd/mx6sabresd.c | 22 ++++++++++++++++++++++ include/configs/mx6sabresd.h | 9 +++++++++ 2 files changed, 31 insertions(+)
NOTE: Please schedule for 2014.07 and please test properly with _AND_ without
PCIe card.
board/freescale/mx6sabresd/mx6sabresd.c +22 -0
@@ -135,6 +135,27 @@ static void setup_spi(void)imx_iomux_v3_setup_multiple_pads (ecspi1_pads,ARRAY_SIZE (ecspi1_pads)); } +#ifdef CONFIG_CMD_PCI +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)); + +/* Power down the PCIe slot */ +gpio_direction_output (IMX_GPIO_NR (3 ,19 ),0 ); +mdelay (25 ); +/* Power up the PCIe slot */ +gpio_set_value (IMX_GPIO_NR (3 ,19 ),1 ); +mdelay (25 ); +} +#else +static inline void setup_pcie (void ) {} +#endif +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 +475,7 @@ int overwrite_console(void)int board_eth_init (bd_t *bis) {setup_iomux_enet (); +setup_pcie ();return cpu_eth_init (bis); }
include/configs/mx6sabresd.h +9 -0
@@ -48,4 +48,13 @@#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) +#endif +#endif /* __MX6QSABRESD_CONFIG_H */
Signature · 1 line
1.9.0
PATCH 1/1 ARM: mx6: Add PCIe on SabreSDP
Quoted 7 lines · Marek Vasut
Add support for PCIe on MX6 SabreSDP board and enable the support in the config file.
Signed-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>Cc Fabio Estevam <[email protected]>Cc Liu Ying <[email protected]>
Please ignore, V2 on it's way.
Best regards,
Marek Vasut