From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 397E4C433F5 for ; Thu, 14 Apr 2022 17:21:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9852483952; Thu, 14 Apr 2022 19:21:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gateworks-com.20210112.gappssmtp.com header.i=@gateworks-com.20210112.gappssmtp.com header.b="2Z3d7DZm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F3BAB83934; Thu, 14 Apr 2022 19:20:59 +0200 (CEST) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 390B383AFF for ; Thu, 14 Apr 2022 19:20:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: by mail-pl1-x62c.google.com with SMTP id d15so5177051pll.10 for ; Thu, 14 Apr 2022 10:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=stIhSTahUyLlop8UWqJNj50ieEgIx5eNwAbSuz4ceDg=; b=2Z3d7DZme+hKU2UJMmMUQqE8XiWN1M/59FKzT5BDzbn8IjAdzUaRavr0TFpGqV5UIx zmMqx73GvQeq25va1ACHfJ9+oS1/CE8W2vflFfPher4T328XbGxgeSct66jSGzRa66/u Di5grkqNqEerJHqyR1tJ8Wx1e0AKKNS1g7WrIHa20KMJQEx8+n8JliD92MrcRZKmBN9c sSkZHyuORSWoyHRs81eZl7S7k8/gmD1vW70Y8U6CXyxc0pHMtQ8VlMW5mXST4AJvLfn/ /mgPwvyiWv1UPRrUAjpO1wCXMY/6nFT9s9OpW9+hc/ed3hhQCPa9LrP2MyxKelh4lqKI pADw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=stIhSTahUyLlop8UWqJNj50ieEgIx5eNwAbSuz4ceDg=; b=XXQzzbDj7UIoWWn+V4F4WD7ssH8shv9RcSCS84wBT7cwW+czpap00166fUFxez40Jl rwlHdU6sztGhNJRzYU2pEW+gFFiMfrOWEon7PmQnegmvA8Xm2UaX0u0YoW28Ll1WCzZ1 ovWoG9JjAM3Uvq3Wvk9lGXF/hITH2AtDsG2cgqXZgjhxKFfImdaRZ05BmvPhdm11Dh8u yeYJvDHSsMo1KLEQy/9VGVC1q9CiDvRY26lNYaUmszBqrPr58NJ00u1/oEAiB223VnqL dnQ3UO0vyI1UzKrNbhkPbBiI63jnODN0yfgbp78Qn/yOdUjEjpjQ2l7Vldf3s6jia/bI YzBw== X-Gm-Message-State: AOAM533lVOoGv86Lkrfz8IMXJLk0IscSvc+n7yWeM684iJ2rdWJLx38d SDBnGbeEBuKuvJLzxCRt0kJ7JNaYmhSWdtMP937rQw== X-Google-Smtp-Source: ABdhPJw1r/evWFlNwngjJWCwc3qhFoJ1p7eDtMt3kM5qnv+gLf1xgrhxJLDKlX5ZeURyZ86SyJ+3XOzQNzmOHJmh5IQ= X-Received: by 2002:a17:90b:4f92:b0:1cd:3a73:3a46 with SMTP id qe18-20020a17090b4f9200b001cd3a733a46mr4886709pjb.66.1649956855551; Thu, 14 Apr 2022 10:20:55 -0700 (PDT) MIME-Version: 1.0 References: <20220413021153.30742-1-peng.fan@oss.nxp.com> <20220413021153.30742-4-peng.fan@oss.nxp.com> In-Reply-To: <20220413021153.30742-4-peng.fan@oss.nxp.com> From: Tim Harvey Date: Thu, 14 Apr 2022 10:20:44 -0700 Message-ID: Subject: Re: [PATCH V3 3/4] imx: imx8mn_evk: enable CONFIG_DM_SERIAL To: "Peng Fan (OSS)" Cc: Stefano Babic , Fabio Estevam , "NXP i.MX U-Boot Team" , Peng Fan , u-boot , Michael Nazzareno Trimarchi Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Tue, Apr 12, 2022 at 6:31 PM Peng Fan (OSS) wrote: > > From: Peng Fan > > Enable CONFIG_DM_SERIAL. uart2 and its pinmux was already > marked with u-boot,dm-spl. > > Signed-off-by: Peng Fan > --- > board/freescale/imx8mn_evk/spl.c | 12 ++---------- > configs/imx8mn_ddr4_evk_defconfig | 1 + > configs/imx8mn_evk_defconfig | 1 + > 3 files changed, 4 insertions(+), 10 deletions(-) > > diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c > index 03f2a56e805..8708c93fa34 100644 > --- a/board/freescale/imx8mn_evk/spl.c > +++ b/board/freescale/imx8mn_evk/spl.c > @@ -110,14 +110,8 @@ int board_fit_config_name_match(const char *name) > } > #endif > > -#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[] = { > - IMX8MN_PAD_UART2_RXD__UART2_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL), > - IMX8MN_PAD_UART2_TXD__UART2_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL), > -}; > - > static iomux_v3_cfg_t const wdog_pads[] = { > IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL), > }; > @@ -130,8 +124,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; > } > > @@ -147,8 +139,6 @@ void board_init_f(ulong dummy) > > timer_init(); > > - preloader_console_init(); > - > /* Clear the BSS. */ > memset(__bss_start, 0, __bss_end - __bss_start); > > @@ -158,6 +148,8 @@ void board_init_f(ulong dummy) > hang(); > } > > + preloader_console_init(); > + > enable_tzc380(); > > /* DDR initialization */ > diff --git a/configs/imx8mn_ddr4_evk_defconfig b/configs/imx8mn_ddr4_evk_defconfig > index 917cdb5aa9d..474d9cfa4d2 100644 > --- a/configs/imx8mn_ddr4_evk_defconfig > +++ b/configs/imx8mn_ddr4_evk_defconfig > @@ -76,6 +76,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_SYSRESET=y > CONFIG_SPL_SYSRESET=y > diff --git a/configs/imx8mn_evk_defconfig b/configs/imx8mn_evk_defconfig > index 7749ebe537e..5bc175154ba 100644 > --- a/configs/imx8mn_evk_defconfig > +++ b/configs/imx8mn_evk_defconfig > @@ -83,6 +83,7 @@ CONFIG_DM_REGULATOR=y > CONFIG_SPL_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_SPL_SYSRESET=y > -- > 2.35.1 > Peng, I see you've been able to get SPL DM_SERIAL to work on IMX8M. This patch won't apply by the way due to commit ff1c7961d813 ("ARM: imx: imx8mn-evk: enable DM_SERIAL") so I think you need to rebase. I have not been able to get SPL DM_SERIAL to work on IMX8MM/IMX8MN... it hangs my board. Is this due to moving preloader_console_init() perhaps? Moving it didn't work for me. Please explain the move of preloader_console_init() and please let me know if you have tested this on imx/master. Fabio, perhaps you can test? Best Regards, Tim