]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: imx8m[m/p]_phycore: Enable DM_SERIAL
authorPeng Fan <peng.fan@nxp.com>
Sat, 11 Jun 2022 12:20:58 +0000 (20:20 +0800)
committerStefano Babic <sbabic@denx.de>
Tue, 14 Jun 2022 19:33:13 +0000 (21:33 +0200)
Enable CONFIG_DM_SERIAL. uart and its pinmux was already
marked with u-boot,dm-spl.
Move preloader_console_init after spl_early_init to make sure driver
model work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
board/phytec/phycore_imx8mm/spl.c
board/phytec/phycore_imx8mp/spl.c
configs/phycore-imx8mm_defconfig
configs/phycore-imx8mp_defconfig
include/configs/phycore_imx8mm.h
include/configs/phycore_imx8mp.h

index d54145ef995c6587ca1b58068ca62c753f2a6493..7f24a3affc8ebd33c1936f2cbf5240f717629a3c 100644 (file)
@@ -57,14 +57,8 @@ int board_fit_config_name_match(const char *name)
        return 0;
 }
 
-#define UART_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL  (PAD_CTL_DSE6 | PAD_CTL_ODE)
 
-static iomux_v3_cfg_t const uart_pads[] = {
-       IMX8MM_PAD_UART3_RXD_UART3_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-       IMX8MM_PAD_UART3_TXD_UART3_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
        IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -77,8 +71,6 @@ int board_early_init_f(void)
 
        set_wdog_reset(wdog);
 
-       imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
        return 0;
 }
 
@@ -92,8 +84,6 @@ void board_init_f(ulong dummy)
 
        board_early_init_f();
 
-       preloader_console_init();
-
        /* Clear the BSS. */
        memset(__bss_start, 0, __bss_end - __bss_start);
 
@@ -103,6 +93,8 @@ void board_init_f(ulong dummy)
                hang();
        }
 
+       preloader_console_init();
+
        enable_tzc380();
 
        /* DDR initialization */
index 19c486e551748dd2fbac01e0562c4446700d3b19..38a581bef57c0bf4045de770524813d33e781f48 100644 (file)
@@ -89,14 +89,8 @@ int board_fit_config_name_match(const char *name)
        return 0;
 }
 
-#define UART_PAD_CTRL   (PAD_CTL_DSE6 | PAD_CTL_FSEL1)
 #define WDOG_PAD_CTRL   (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
-static iomux_v3_cfg_t const uart_pads[] = {
-       MX8MP_PAD_UART1_RXD__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-       MX8MP_PAD_UART1_TXD__UART1_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_pads[] = {
        MX8MP_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -109,8 +103,6 @@ int board_early_init_f(void)
 
        set_wdog_reset(wdog);
 
-       imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
-
        return 0;
 }
 
index b8cda9f64f2175064202ac1e3ab39abc0ca57852..0316d45caebbc92d0dcd39e78a0aa3808dfb4fa6 100644 (file)
@@ -120,6 +120,7 @@ CONFIG_PINCTRL_IMX8M=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
index d10ab2a22c1dee8742d57f871fbec770e3ac87f0..2c53a5ff8c6effb11b3e5cd55c9c8c3b20759ca5 100644 (file)
@@ -111,6 +111,7 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 CONFIG_SPL_POWER_I2C=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
index 1d01104cfe83b6ff2e243add7ba71ce6755b3fe7..a14a076172c1ab4b4fda16771cbd77a45418d3b8 100644 (file)
@@ -72,7 +72,4 @@
 #define PHYS_SDRAM                     0x40000000
 #define PHYS_SDRAM_SIZE                 SZ_2G /* 2GB DDR */
 
-/* UART */
-#define CONFIG_MXC_UART_BASE           UART_BASE_ADDR(3)
-
 #endif /* __PHYCORE_IMX8MM_H */
index 75ddcf465f9e39749fb5cddf70791be9ccf0b22f..9c7331a4167807c22cd8806a652bd13894ef4bdb 100644 (file)
@@ -72,7 +72,4 @@
 #define PHYS_SDRAM                     0x40000000
 #define PHYS_SDRAM_SIZE                        0x80000000
 
-/* UART */
-#define CONFIG_MXC_UART_BASE           UART_BASE_ADDR(1)
-
 #endif /* __PHYCORE_IMX8MP_H */