* [PATCH V3] board: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL
@ 2022-04-18 6:53 Michael Trimarchi
2022-04-20 17:24 ` Ariel D'Alessandro
2022-04-22 8:47 ` sbabic
0 siblings, 2 replies; 5+ messages in thread
From: Michael Trimarchi @ 2022-04-18 6:53 UTC (permalink / raw)
To: Stefano Babic, Ariel D'Alessandro
Cc: Fabio Estevam, u-boot, Tim Harvey, Fabio Estevam
Enable DM_SERIAL for both U_Boot and the SPL. The uart4 and its pinmux
are already marked with u-boot,dm-spl but we need to move the call to
preloader_console_init() after spl_init() to avoid a board hang
as dm can't be used until after spl_init().
Remove the manual config of the UART pinmux now that it is no longer
needed.
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
---
V2->V3:
- Add Fabio Estevam review
- change typo in uart2 to uart4
V1->V2:
- Follow Tim Harvery suggestion on Peng change
- Adjust the commit message as Tim
---
board/bsh/imx8mn_smm_s2/spl.c | 11 ++---------
configs/imx8mn_bsh_smm_s2_defconfig | 1 +
configs/imx8mn_bsh_smm_s2pro_defconfig | 1 +
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/board/bsh/imx8mn_smm_s2/spl.c b/board/bsh/imx8mn_smm_s2/spl.c
index 5f04731d72..0f61acc630 100644
--- a/board/bsh/imx8mn_smm_s2/spl.c
+++ b/board/bsh/imx8mn_smm_s2/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);
if (IS_ENABLED(CONFIG_NAND_MXS)) {
@@ -82,14 +75,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_bsh_smm_s2_defconfig b/configs/imx8mn_bsh_smm_s2_defconfig
index 3d67079a46..e864685a62 100644
--- a/configs/imx8mn_bsh_smm_s2_defconfig
+++ b/configs/imx8mn_bsh_smm_s2_defconfig
@@ -80,6 +80,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/configs/imx8mn_bsh_smm_s2pro_defconfig b/configs/imx8mn_bsh_smm_s2pro_defconfig
index c5809f5d4b..dfc9c93809 100644
--- a/configs/imx8mn_bsh_smm_s2pro_defconfig
+++ b/configs/imx8mn_bsh_smm_s2pro_defconfig
@@ -77,6 +77,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
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V3] board: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL
2022-04-18 6:53 [PATCH V3] board: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL Michael Trimarchi
@ 2022-04-20 17:24 ` Ariel D'Alessandro
2022-04-21 12:37 ` Michael Nazzareno Trimarchi
2022-04-22 8:47 ` sbabic
1 sibling, 1 reply; 5+ messages in thread
From: Ariel D'Alessandro @ 2022-04-20 17:24 UTC (permalink / raw)
To: Michael Trimarchi, Stefano Babic
Cc: Fabio Estevam, u-boot, Tim Harvey, Fabio Estevam
Hi Michael,
On 4/18/22 03:53, Michael Trimarchi wrote:
> Enable DM_SERIAL for both U_Boot and the SPL. The uart4 and its pinmux
> are already marked with u-boot,dm-spl but we need to move the call to
> preloader_console_init() after spl_init() to avoid a board hang
> as dm can't be used until after spl_init().
>
> Remove the manual config of the UART pinmux now that it is no longer
> needed.
>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Reviewed-by: Fabio Estevam <festevam@denx.de>
Tested-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3] board: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL
2022-04-20 17:24 ` Ariel D'Alessandro
@ 2022-04-21 12:37 ` Michael Nazzareno Trimarchi
2022-04-21 13:02 ` Stefano Babic
0 siblings, 1 reply; 5+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-04-21 12:37 UTC (permalink / raw)
To: Ariel D'Alessandro
Cc: Stefano Babic, Fabio Estevam, u-boot, Tim Harvey, Fabio Estevam
Hi Stefano
On Wed, Apr 20, 2022 at 7:25 PM Ariel D'Alessandro
<ariel.dalessandro@collabora.com> wrote:
>
> Hi Michael,
>
> On 4/18/22 03:53, Michael Trimarchi wrote:
> > Enable DM_SERIAL for both U_Boot and the SPL. The uart4 and its pinmux
> > are already marked with u-boot,dm-spl but we need to move the call to
> > preloader_console_init() after spl_init() to avoid a board hang
> > as dm can't be used until after spl_init().
> >
> > Remove the manual config of the UART pinmux now that it is no longer
> > needed.
> >
> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> > Cc: Tim Harvey <tharvey@gateworks.com>
> > Reviewed-by: Fabio Estevam <festevam@denx.de>
>
> Tested-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Can you queue this one too?
Michael
--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3] board: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL
2022-04-21 12:37 ` Michael Nazzareno Trimarchi
@ 2022-04-21 13:02 ` Stefano Babic
0 siblings, 0 replies; 5+ messages in thread
From: Stefano Babic @ 2022-04-21 13:02 UTC (permalink / raw)
To: Michael Nazzareno Trimarchi, Ariel D'Alessandro
Cc: Stefano Babic, Fabio Estevam, u-boot, Tim Harvey, Fabio Estevam
On 21.04.22 14:37, Michael Nazzareno Trimarchi wrote:
> Hi Stefano
>
> On Wed, Apr 20, 2022 at 7:25 PM Ariel D'Alessandro
> <ariel.dalessandro@collabora.com> wrote:
>>
>> Hi Michael,
>>
>> On 4/18/22 03:53, Michael Trimarchi wrote:
>>> Enable DM_SERIAL for both U_Boot and the SPL. The uart4 and its pinmux
>>> are already marked with u-boot,dm-spl but we need to move the call to
>>> preloader_console_init() after spl_init() to avoid a board hang
>>> as dm can't be used until after spl_init().
>>>
>>> Remove the manual config of the UART pinmux now that it is no longer
>>> needed.
>>>
>>> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>>> Cc: Tim Harvey <tharvey@gateworks.com>
>>> Reviewed-by: Fabio Estevam <festevam@denx.de>
>>
>> Tested-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
>
> Can you queue this one too?
It is already applied to master-next, CI is running, if no issue are
reported is merged into -master.
Best regards,
Stefano
>
> Michael
>
>
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V3] board: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL
2022-04-18 6:53 [PATCH V3] board: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL Michael Trimarchi
2022-04-20 17:24 ` Ariel D'Alessandro
@ 2022-04-22 8:47 ` sbabic
1 sibling, 0 replies; 5+ messages in thread
From: sbabic @ 2022-04-22 8:47 UTC (permalink / raw)
To: Michael Trimarchi, u-boot
> Enable DM_SERIAL for both U_Boot and the SPL. The uart4 and its pinmux
> are already marked with u-boot,dm-spl but we need to move the call to
> preloader_console_init() after spl_init() to avoid a board hang
> as dm can't be used until after spl_init().
> Remove the manual config of the UART pinmux now that it is no longer
> needed.
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Reviewed-by: Fabio Estevam <festevam@denx.de>
> Tested-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-04-22 8:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 6:53 [PATCH V3] board: bsh: imx8mn_bsh_smm_s2/s2pro: enable DM_SERIAL Michael Trimarchi
2022-04-20 17:24 ` Ariel D'Alessandro
2022-04-21 12:37 ` Michael Nazzareno Trimarchi
2022-04-21 13:02 ` Stefano Babic
2022-04-22 8:47 ` sbabic
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.