public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peter Robinson <pbrobinson@gmail.com>
To: Stefano Babic <sbabic@denx.de>, Breno Lima <breno.lima@nxp.com>,
	Francesco Montefoschi <francesco.montefoschi@udoo.org>,
	Fabio Estevam <festevam@gmail.com>,
	u-boot@lists.denx.de
Cc: Peter Robinson <pbrobinson@gmail.com>
Subject: [PATCH v2 2/2] udoo_neo: Select DM_SERIAL and drop iomux board level init
Date: Mon, 14 Nov 2022 20:53:48 +0000	[thread overview]
Message-ID: <20221114205348.642614-2-pbrobinson@gmail.com> (raw)
In-Reply-To: <20221114205348.642614-1-pbrobinson@gmail.com>

Convert to DM_SERIAL and drop the iomux board file
level init as it's handled as part of the DM serial
layer instead.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---

Changes in v2:
- Drop no longer needed setup_iomux_uart and associated bits

 board/udoo/neo/neo.c       | 26 +++-----------------------
 configs/udoo_neo_defconfig |  2 +-
 2 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 9e2a66996c4..1287f719197 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -43,10 +43,6 @@ enum {
 	UDOO_NEO_TYPE_EXTENDED,
 };
 
-#define UART_PAD_CTRL  (PAD_CTL_PKE | PAD_CTL_PUE |		\
-	PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED |		\
-	PAD_CTL_DSE_40ohm   | PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
-
 #define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE |		\
 	PAD_CTL_PUS_22K_UP  | PAD_CTL_SPEED_LOW |		\
 	PAD_CTL_DSE_80ohm   | PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
@@ -98,11 +94,6 @@ int power_init_board(void)
 	return 0;
 }
 
-static iomux_v3_cfg_t const uart1_pads[] = {
-	MX6_PAD_GPIO1_IO04__UART1_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
-	MX6_PAD_GPIO1_IO05__UART1_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const usdhc2_pads[] = {
 	MX6_PAD_SD2_CLK__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
 	MX6_PAD_SD2_CMD__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -130,11 +121,6 @@ static iomux_v3_cfg_t const peri_3v3_pads[] = {
 	MX6_PAD_QSPI1A_DATA0__GPIO4_IO_16 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
-static void setup_iomux_uart(void)
-{
-	imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
-}
-
 static int setup_fec(void)
 {
 	struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
@@ -184,13 +170,6 @@ int board_init(void)
 	return 0;
 }
 
-int board_early_init_f(void)
-{
-	setup_iomux_uart();
-
-	return 0;
-}
-
 static struct fsl_esdhc_cfg usdhc_cfg[1] = {
 	{USDHC2_BASE_ADDR},
 };
@@ -421,11 +400,12 @@ void board_init_f(ulong dummy)
 	/* setup AIPS and disable watchdog */
 	arch_cpu_init();
 
-	board_early_init_f();
-
 	/* setup GP timer */
 	timer_init();
 
+	/* Enable device tree and early DM support*/
+	spl_early_init();
+
 	/* UART clocks enabled and gd valid - init serial console */
 	preloader_console_init();
 
diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index 341ee4671db..3d50bf7d79f 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -21,7 +21,6 @@ CONFIG_SPL_LIBDISK_SUPPORT=y
 # CONFIG_CMD_BMODE is not set
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd"
-CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SYS_SPL_MALLOC=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_FS_EXT4=y
@@ -59,6 +58,7 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_ANATOP=y
 CONFIG_DM_REGULATOR_PFUZE100=y
+CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
-- 
2.38.1


  reply	other threads:[~2022-11-14 20:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 20:53 [PATCH v2 1/2] udoo_neo: Move to DM for REGULATOR/PMIC/I2C drivers Peter Robinson
2022-11-14 20:53 ` Peter Robinson [this message]
2022-11-14 21:08   ` [PATCH v2 2/2] udoo_neo: Select DM_SERIAL and drop iomux board level init Fabio Estevam
2023-02-03 14:56   ` sbabic
2022-11-14 21:07 ` [PATCH v2 1/2] udoo_neo: Move to DM for REGULATOR/PMIC/I2C drivers Fabio Estevam
2023-02-03 14:56 ` 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=20221114205348.642614-2-pbrobinson@gmail.com \
    --to=pbrobinson@gmail.com \
    --cc=breno.lima@nxp.com \
    --cc=festevam@gmail.com \
    --cc=francesco.montefoschi@udoo.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox