From c59e779f71008dede451d1a6185002701b5a34f0 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 6 Aug 2019 01:04:55 -0700 Subject: [PATCH] MLK-22398-10 mx6sabresd: Enable PCIE IMX DM driver Update the board codes and configs to enable PCIE IMX driver on all imx6dql sabresd boards. The always on regulators is powered up in board_init for enabling "pcie_reg" regulator. Signed-off-by: Ye Li Reviewed-by: Peng Fan --- board/freescale/mx6sabresd/mx6sabresd.c | 9 +++++++-- configs/mx6dlsabresd_defconfig | 3 +++ configs/mx6dlsabresd_epdc_defconfig | 3 +++ configs/mx6dlsabresd_optee_defconfig | 3 +++ configs/mx6dlsabresd_plugin_defconfig | 3 +++ configs/mx6qpsabresd_defconfig | 3 +++ configs/mx6qpsabresd_optee_defconfig | 4 +++- configs/mx6qpsabresd_sata_defconfig | 1 + configs/mx6qsabresd_defconfig | 3 +++ configs/mx6qsabresd_optee_defconfig | 3 +++ configs/mx6qsabresd_plugin_defconfig | 3 +++ configs/mx6qsabresd_sata_defconfig | 1 + configs/mx6solosabresd_defconfig | 3 +++ configs/mx6solosabresd_optee_defconfig | 3 +++ include/configs/mx6sabresd.h | 2 ++ 15 files changed, 44 insertions(+), 3 deletions(-) diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c index b65db5acdd..282930c30d 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c +++ b/board/freescale/mx6sabresd/mx6sabresd.c @@ -33,6 +33,7 @@ #include #include #include +#include #if defined(CONFIG_MX6DL) && defined(CONFIG_MXC_EPDC) #include #include @@ -251,7 +252,7 @@ static struct i2c_pads_info i2c_pad_info1 = { }; #endif -#ifdef CONFIG_PCIE_IMX +#if defined(CONFIG_PCIE_IMX) && !defined(CONFIG_DM_PCI) iomux_v3_cfg_t const pcie_pads[] = { IOMUX_PADS(PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* POWER */ IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL)), /* RESET */ @@ -849,6 +850,10 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; +#if defined(CONFIG_DM_REGULATOR) + regulators_enable_boot_on(false); +#endif + #ifdef CONFIG_MXC_SPI setup_spi(); #endif @@ -857,7 +862,7 @@ int board_init(void) setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); #endif -#ifdef CONFIG_PCIE_IMX +#if defined(CONFIG_PCIE_IMX) && !defined(CONFIG_DM_PCI) setup_pcie(); #endif diff --git a/configs/mx6dlsabresd_defconfig b/configs/mx6dlsabresd_defconfig index 75c659e0b0..4ca957f16d 100644 --- a/configs/mx6dlsabresd_defconfig +++ b/configs/mx6dlsabresd_defconfig @@ -75,6 +75,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6dlsabresd_epdc_defconfig b/configs/mx6dlsabresd_epdc_defconfig index 47552c0fc2..df675b0a56 100644 --- a/configs/mx6dlsabresd_epdc_defconfig +++ b/configs/mx6dlsabresd_epdc_defconfig @@ -75,6 +75,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_MXC_EPDC=y CONFIG_LCD=y diff --git a/configs/mx6dlsabresd_optee_defconfig b/configs/mx6dlsabresd_optee_defconfig index 2e4b54a6a3..cb167bab49 100644 --- a/configs/mx6dlsabresd_optee_defconfig +++ b/configs/mx6dlsabresd_optee_defconfig @@ -76,6 +76,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6dlsabresd_plugin_defconfig b/configs/mx6dlsabresd_plugin_defconfig index 3c43d2f03f..7c96a13720 100644 --- a/configs/mx6dlsabresd_plugin_defconfig +++ b/configs/mx6dlsabresd_plugin_defconfig @@ -76,6 +76,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6qpsabresd_defconfig b/configs/mx6qpsabresd_defconfig index fbef71e03f..64798d301e 100644 --- a/configs/mx6qpsabresd_defconfig +++ b/configs/mx6qpsabresd_defconfig @@ -75,6 +75,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6qpsabresd_optee_defconfig b/configs/mx6qpsabresd_optee_defconfig index 7e4c930688..746d4397c3 100644 --- a/configs/mx6qpsabresd_optee_defconfig +++ b/configs/mx6qpsabresd_optee_defconfig @@ -76,7 +76,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y - +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6qpsabresd_sata_defconfig b/configs/mx6qpsabresd_sata_defconfig index 1c25006f88..c1d7fdacb0 100644 --- a/configs/mx6qpsabresd_sata_defconfig +++ b/configs/mx6qpsabresd_sata_defconfig @@ -76,6 +76,7 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig index 367035ae71..2863c1874f 100644 --- a/configs/mx6qsabresd_defconfig +++ b/configs/mx6qsabresd_defconfig @@ -75,6 +75,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6qsabresd_optee_defconfig b/configs/mx6qsabresd_optee_defconfig index 9544c23225..2a4082e0d3 100644 --- a/configs/mx6qsabresd_optee_defconfig +++ b/configs/mx6qsabresd_optee_defconfig @@ -76,6 +76,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6qsabresd_plugin_defconfig b/configs/mx6qsabresd_plugin_defconfig index 58462c308a..b0381422d1 100644 --- a/configs/mx6qsabresd_plugin_defconfig +++ b/configs/mx6qsabresd_plugin_defconfig @@ -76,6 +76,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6qsabresd_sata_defconfig b/configs/mx6qsabresd_sata_defconfig index c88376fa81..b8f8150662 100644 --- a/configs/mx6qsabresd_sata_defconfig +++ b/configs/mx6qsabresd_sata_defconfig @@ -76,6 +76,7 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6solosabresd_defconfig b/configs/mx6solosabresd_defconfig index d5023b7961..bde53a0a01 100644 --- a/configs/mx6solosabresd_defconfig +++ b/configs/mx6solosabresd_defconfig @@ -75,6 +75,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/configs/mx6solosabresd_optee_defconfig b/configs/mx6solosabresd_optee_defconfig index 74cf687402..408d43d071 100644 --- a/configs/mx6solosabresd_optee_defconfig +++ b/configs/mx6solosabresd_optee_defconfig @@ -76,6 +76,9 @@ CONFIG_DM_ETH=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_CMD_FASTBOOT=y CONFIG_USB_FUNCTION_FASTBOOT=y diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index 2dd716f871..6507aa3e20 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -60,9 +60,11 @@ #ifdef CONFIG_CMD_PCI #define CONFIG_PCI_SCAN_SHOW #define CONFIG_PCIE_IMX +#ifndef CONFIG_DM_PCI #define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(7, 12) #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(3, 19) #endif +#endif /* USB Configs */ #ifdef CONFIG_CMD_USB -- 2.17.1