All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: sbabic@denx.de, festevam@gmail.com,
	"Ariel D'Alessandro" <ariel.dalessandro@collabora.com>
Cc: u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>,
	Fabio Estevam <festevam@denx.de>
Subject: [PATCH V2 08/14] imx: imx8mn_var_som: enable DM_SERIAL
Date: Thu,  5 May 2022 15:43:35 +0800	[thread overview]
Message-ID: <20220505074341.24086-9-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20220505074341.24086-1-peng.fan@oss.nxp.com>

From: Peng Fan <peng.fan@nxp.com>

Enable CONFIG_DM_SERIAL. uart and its pinmux was already
marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver
model work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
---
 board/variscite/imx8mn_var_som/spl.c | 11 ++---------
 configs/imx8mn_var_som_defconfig     |  1 +
 include/configs/imx8mn_var_som.h     |  2 --
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/board/variscite/imx8mn_var_som/spl.c b/board/variscite/imx8mn_var_som/spl.c
index 32703c5f0b3..1a8b64fc0a9 100644
--- a/board/variscite/imx8mn_var_som/spl.c
+++ b/board/variscite/imx8mn_var_som/spl.c
@@ -40,14 +40,8 @@ void spl_board_init(void)
 		puts("Failed to find clock node. Check device tree\n");
 }
 
-#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 const iomux_v3_cfg_t uart_pads[] = {
-	IMX8MN_PAD_UART4_RXD__UART4_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	IMX8MN_PAD_UART4_TXD__UART4_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static const iomux_v3_cfg_t wdog_pads[] = {
 	IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -59,7 +53,6 @@ int board_early_init_f(void)
 	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
 	set_wdog_reset(wdog);
 
-	imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
 	init_uart_clk(3);
 
 	return 0;
@@ -78,14 +71,14 @@ void board_init_f(ulong dummy)
 
 	timer_init();
 
-	preloader_console_init();
-
 	ret = spl_init();
 	if (ret) {
 		debug("spl_init() failed: %d\n", ret);
 		hang();
 	}
 
+	preloader_console_init();
+
 	/* DDR initialization */
 	spl_dram_init();
 
diff --git a/configs/imx8mn_var_som_defconfig b/configs/imx8mn_var_som_defconfig
index 5ec82f2a926..39209f62c46 100644
--- a/configs/imx8mn_var_som_defconfig
+++ b/configs/imx8mn_var_som_defconfig
@@ -83,6 +83,7 @@ CONFIG_SPL_DM_PMIC_BD71837=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_SYSRESET=y
 CONFIG_SYSRESET_PSCI=y
diff --git a/include/configs/imx8mn_var_som.h b/include/configs/imx8mn_var_som.h
index 318289b76bc..6ce60b0d704 100644
--- a/include/configs/imx8mn_var_som.h
+++ b/include/configs/imx8mn_var_som.h
@@ -64,8 +64,6 @@
 #define PHYS_SDRAM			0x40000000
 #define PHYS_SDRAM_SIZE			SZ_1G /* 1GB DDR */
 
-#define CONFIG_MXC_UART_BASE		UART4_BASE_ADDR
-
 /* Monitor Command Prompt */
 #define CONFIG_SYS_CBSIZE		SZ_2K
 #define CONFIG_SYS_MAXARGS		64
-- 
2.36.0


  parent reply	other threads:[~2022-05-05  7:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05  7:43 [PATCH V2 00/14] imx8m: convert to DM_SERIAL Peng Fan (OSS)
2022-05-05  7:43 ` [PATCH V2 01/14] imx: imx8mp_rsb3720a1: " Peng Fan (OSS)
2022-05-20 13:42   ` sbabic
2022-05-05  7:43 ` [PATCH V2 02/14] imx: imx8m[m/n/p]_venice: Enable SPL_DM_SERIAL Peng Fan (OSS)
2022-05-05  7:43 ` [PATCH V2 03/14] imx: imx8mm_mx8menlo: Enable DM_SERIAL Peng Fan (OSS)
2022-05-16 22:24   ` Marcel Ziswiler
2022-05-20 13:42   ` sbabic
2022-05-05  7:43 ` [PATCH V2 04/14] imx: imx8m[m/n]_beacon: Enable SPL_DM_SERIAL Peng Fan (OSS)
2022-05-05  7:43 ` [PATCH V2 05/14] imx: imx8mm-cl-iot-gate: Enable DM_SERIAL Peng Fan (OSS)
2022-05-05  7:43 ` [PATCH V2 06/14] imx: imx8mm_icore: Enable SPL_DM_SERIAL Peng Fan (OSS)
2022-05-05  7:43 ` [PATCH V2 07/14] imx: imx8m[m/p]_phycore: Enable DM_SERIAL Peng Fan (OSS)
2022-05-05  7:43 ` Peng Fan (OSS) [this message]
2022-05-05  7:43 ` [PATCH V2 09/14] imx: imx8mm_edm_sbc: Enable SPL_DM_SERIAL Peng Fan (OSS)
2022-05-20 13:42   ` sbabic
2022-05-05  7:43 ` [PATCH V2 10/14] imx: kontron-sl-mx8mm: enable DM_SERIAL Peng Fan (OSS)
2022-05-05  7:43 ` [PATCH V2 11/14] imx: dts: move common changes to imx8mq-u-boot.dtsi Peng Fan (OSS)
2022-05-20 13:43   ` sbabic
2022-05-05  7:43 ` [PATCH V2 12/14] imx: imx8mq-cm: enable CONFIG_DM_SERIAL Peng Fan (OSS)
2022-05-20 13:44   ` sbabic
2022-05-05  7:43 ` [PATCH V2 13/14] imx: imx8mq-pico: " Peng Fan (OSS)
2022-05-20 13:41   ` sbabic
2022-05-05  7:43 ` [PATCH V2 14/14] imx: imx8mq-phanbell: " Peng Fan (OSS)
2022-05-20 13:44   ` sbabic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220505074341.24086-9-peng.fan@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=ariel.dalessandro@collabora.com \
    --cc=festevam@denx.de \
    --cc=festevam@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.