From 4271f767a42f2ccb6085aec3abf9197faf60bb9f Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 6 Aug 2019 01:02:41 -0700 Subject: [PATCH] MLK-22398-8 mx6sxsdb: Enable PCIE IMX DM driver Update the board codes and configs to enable pcie imx DM driver. The pcie node in SDB board DTS reply on the alway on regulator "reg_pcie". So power up the always on regulators in board_init. Signed-off-by: Ye Li --- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 11 ++++++----- configs/mx6sxsabresd_defconfig | 5 ++++- configs/mx6sxsabresd_emmc_defconfig | 3 +++ configs/mx6sxsabresd_m4fastup_defconfig | 3 +++ configs/mx6sxsabresd_optee_defconfig | 3 +++ configs/mx6sxsabresd_qspi2_defconfig | 3 +++ include/configs/mx6sxsabresd.h | 2 ++ 7 files changed, 24 insertions(+), 6 deletions(-) diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 575bac3fc5..f91f1d6f12 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -30,6 +30,7 @@ #include #include #include +#include #ifdef CONFIG_IMX_RDC #include @@ -204,7 +205,7 @@ static iomux_v3_cfg_t const phy_control_pads[] = { MX6_PAD_ENET2_CRS__GPIO2_IO_7 | MUX_PAD_CTRL(NO_PAD_CTRL), }; -#ifdef CONFIG_PCIE_IMX +#if defined(CONFIG_PCIE_IMX) && !defined(CONFIG_DM_PCI) iomux_v3_cfg_t const pcie_pads[] = { MX6_PAD_ENET1_COL__GPIO2_IO_0 | MUX_PAD_CTRL(NO_PAD_CTRL), /* POWER */ MX6_PAD_ENET1_CRS__GPIO2_IO_1 | MUX_PAD_CTRL(NO_PAD_CTRL), /* RESET */ @@ -843,9 +844,9 @@ int board_init(void) */ imx_iomux_v3_setup_pad(wdog_b_pad); - /* Active high for ncp692 */ - gpio_request(IMX_GPIO_NR(4, 16), "ncp692_en"); - gpio_direction_output(IMX_GPIO_NR(4, 16), 1); +#if defined(CONFIG_DM_REGULATOR) + regulators_enable_boot_on(false); +#endif #ifdef CONFIG_SYS_I2C setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); @@ -862,7 +863,7 @@ int board_init(void) board_qspi_init(); #endif -#ifdef CONFIG_PCIE_IMX +#if defined(CONFIG_PCIE_IMX) && !defined(CONFIG_DM_PCI) setup_pcie(); #endif diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig index c84b7fd6b1..8106a03472 100644 --- a/configs/mx6sxsabresd_defconfig +++ b/configs/mx6sxsabresd_defconfig @@ -51,6 +51,9 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y CONFIG_DM_PMIC=y @@ -86,4 +89,4 @@ CONFIG_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x83800000 CONFIG_FASTBOOT_BUF_SIZE=0x40000000 CONFIG_FASTBOOT_FLASH=y -CONFIG_EFI_PARTITION=y \ No newline at end of file +CONFIG_EFI_PARTITION=y diff --git a/configs/mx6sxsabresd_emmc_defconfig b/configs/mx6sxsabresd_emmc_defconfig index 24d8de8fca..a9039cfd76 100644 --- a/configs/mx6sxsabresd_emmc_defconfig +++ b/configs/mx6sxsabresd_emmc_defconfig @@ -52,6 +52,9 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y CONFIG_DM_PMIC=y diff --git a/configs/mx6sxsabresd_m4fastup_defconfig b/configs/mx6sxsabresd_m4fastup_defconfig index 775ed3267f..02e923ffe8 100644 --- a/configs/mx6sxsabresd_m4fastup_defconfig +++ b/configs/mx6sxsabresd_m4fastup_defconfig @@ -44,6 +44,9 @@ CONFIG_FSL_ESDHC=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y CONFIG_DM_PMIC=y diff --git a/configs/mx6sxsabresd_optee_defconfig b/configs/mx6sxsabresd_optee_defconfig index ceb6f466d5..c153629493 100644 --- a/configs/mx6sxsabresd_optee_defconfig +++ b/configs/mx6sxsabresd_optee_defconfig @@ -52,6 +52,9 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y CONFIG_DM_PMIC=y diff --git a/configs/mx6sxsabresd_qspi2_defconfig b/configs/mx6sxsabresd_qspi2_defconfig index 4898007ef3..6644b6a398 100644 --- a/configs/mx6sxsabresd_qspi2_defconfig +++ b/configs/mx6sxsabresd_qspi2_defconfig @@ -55,6 +55,9 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_MII=y CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y CONFIG_DM_PMIC=y diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h index a0663f7979..cd9e8ca9d9 100644 --- a/include/configs/mx6sxsabresd.h +++ b/include/configs/mx6sxsabresd.h @@ -247,9 +247,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(2, 0) #define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(2, 1) #endif +#endif #define CONFIG_IMX_THERMAL -- 2.17.1