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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7630EC433F5 for ; Thu, 18 Nov 2021 21:12:23 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8D33461A70 for ; Thu, 18 Nov 2021 21:12:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8D33461A70 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 10AF382F97; Thu, 18 Nov 2021 22:12:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="XFWHgt5J"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9CFD82FAB; Thu, 18 Nov 2021 22:12:17 +0100 (CET) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (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 6A73282A68 for ; Thu, 18 Nov 2021 22:12:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x832.google.com with SMTP id p19so7463143qtw.12 for ; Thu, 18 Nov 2021 13:12:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=taJiAg1LW48MzmdxrLoZhVec4wVwKJUKnwdcMUUZ9Jw=; b=XFWHgt5JwJtAUFT0ydn0ILOItiJxRaeKE03qlf3VW5nJZuYLpfRvgTcENdClbQIsa9 iASCTeC24FRtmTKSRrFr3a9rXRjUZnpYbuMx02mqEW+Wa9FBPRFI/c/PBXdu67EHBRAn jgiE4zoP1Ru+Yj+QPyJNamcd2oA4zNTgfWKhs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=taJiAg1LW48MzmdxrLoZhVec4wVwKJUKnwdcMUUZ9Jw=; b=YKSiOpX3bCBGOPsd9Oxe6RTek4o/8Jg45+m8mRIuKoaj4JLvfWYVkeYNi9+zSSs5fu KFIZCfrDN2X02rAII+VtcIox+NuOiFScp/fQtHhYqQRAWVOnanwfN9s302AoNO22PVQg nLhZ3L6A8cuQBeUAilii9mZE04IaGFaqcTmnmS/Qhdw4I5GH/IBuDC+kUgltSNVgG6aV sR69gguFbbjJXlSAZbYJ+6Gt4ISDSXUQQ667GT1xc8VKbNwvYHeGgt91+Ru/++E92jTc hoZL9dVcZ9zZXyHSSRAKtl/3LENNbjN89qXN1pa6Pzc/W+b1KaaqdL8d6vWK1F+nMBrX oOfA== X-Gm-Message-State: AOAM533yD9JBweE/MW91ymsgv9bkz6ZiKxse5EQ/w04lLyyEByfrCYi5 g6K6JigoNCMDt2Qnbviu6bHnww== X-Google-Smtp-Source: ABdhPJwJ1ABuOKIfw5q5S7pYG5QqiqxRkBnp6hkb5eRhb6PeX7G0XSpoSULEmU83NA89UGLZpdCIfw== X-Received: by 2002:a05:622a:14:: with SMTP id x20mr589142qtw.1.1637269931192; Thu, 18 Nov 2021 13:12:11 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-6986-0eb7-a1cc-35fa.res6.spectrum.com. [2603:6081:7b01:cbda:6986:eb7:a1cc:35fa]) by smtp.gmail.com with ESMTPSA id p18sm474859qtk.54.2021.11.18.13.12.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Nov 2021 13:12:10 -0800 (PST) Date: Thu, 18 Nov 2021 16:12:08 -0500 From: Tom Rini To: Adam Ford Cc: "Peng Fan (OSS)" , "u-boot@lists.denx.de" , "sbabic@denx.de" , "festevam@gmail.com" , dl-uboot-imx , Peng Fan , "aford@beaconembedded.com" Subject: Re: [PATCH] imx8mn_beacon: Fix booting hang and switch to binman Message-ID: <20211118211208.GZ24579@bill-the-cat> References: <20210910201922.263481-1-aford173@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="B2V2wijkXj5vtlGk" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 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.2 at phobos.denx.de X-Virus-Status: Clean --B2V2wijkXj5vtlGk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 17, 2021 at 08:08:10AM -0600, Adam Ford wrote: > On Fri, Oct 22, 2021 at 2:36 PM Adam Ford wrote: > > > > On Wed, Sep 29, 2021 at 8:26 AM Adam Ford wrote: > > > > > > On Thu, Sep 23, 2021 at 3:03 PM Adam Ford wrote: > > > > > > > > On Tue, Sep 14, 2021 at 9:49 PM Peng Fan (OSS) wrote: > > > > > > > > > > > > > > > >=20 > +Tom Rini >=20 > > > > > On 2021/9/11 4:19, Adam Ford wrote: > > > > > > Somewhere along the line, the board stopped being able to boot. > > > > > > Rather than just fixing the issue, let's fix the issue and migr= ate > > > > > > to binman to eliminate a warning when using custom imx tools for > > > > > > generating the binary. > > > > > > > > > > > > > > Any chance this can make it into 2021.10? it's currently broken, a= nd > > > > this seems to fix the problem. i didn't bisect to see where the is= sue > > > > broke, or i would have added a fixes tag. > > > > > > Stefano or Tom? could someone comment and/or merge? the board is > > > currently not booting, and this fixes the issue > > > > It's been over a month, and we missed the 2021.10 release. Is there > > something stopping this from being applied? >=20 > Tom, >=20 > Is there any chance you can apply this? I can't get anyone to respond > to me, and it's been over 2 months since the initial submission. >=20 > thanks, >=20 > adam > > > > adam > > > > > > > > adam > > > > > > Signed-off-by: Adam Ford > > > > > > > > > > > > diff --git a/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi b/arch/= arm/dts/imx8mn-beacon-kit-u-boot.dtsi > > > > > > index bbc64a2819..69fd69c8d0 100644 > > > > > > --- a/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi > > > > > > +++ b/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi > > > > > > @@ -4,6 +4,10 @@ > > > > > > */ > > > > > > > > > > > > / { > > > > > > + binman: binman { > > > > > > + multiple-images; > > > > > > + }; > > > > > > + > > > > > > wdt-reboot { > > > > > > compatible =3D "wdt-reboot"; > > > > > > wdt =3D <&wdog1>; > > > > > > @@ -40,6 +44,9 @@ > > > > > > &clk { > > > > > > u-boot,dm-spl; > > > > > > u-boot,dm-pre-reloc; > > > > > > + /delete-property/ assigned-clocks; > > > > > > + /delete-property/ assigned-clock-parents; > > > > > > + /delete-property/ assigned-clock-rates; > > > > > > }; > > > > > > > > > > > > &gpio1 { > > > > > > @@ -99,6 +106,10 @@ > > > > > > u-boot,off-on-delay-us =3D <20000>; > > > > > > }; > > > > > > > > > > > > +&uart2 { > > > > > > + u-boot,dm-spl; > > > > > > +}; > > > > > > + > > > > > > &usdhc1 { > > > > > > u-boot,dm-spl; > > > > > > sd-uhs-sdr104; > > > > > > @@ -120,3 +131,122 @@ > > > > > > &wdog1 { > > > > > > u-boot,dm-spl; > > > > > > }; > > > > > > + > > > > > > +&binman { > > > > > > + u-boot-spl-ddr { > > > > > > + filename =3D "u-boot-spl-ddr.bin"; > > > > > > + pad-byte =3D <0xff>; > > > > > > + align-size =3D <4>; > > > > > > + align =3D <4>; > > > > > > + > > > > > > + u-boot-spl { > > > > > > + align-end =3D <4>; > > > > > > + }; > > > > > > + > > > > > > + blob_1: blob-ext@1 { > > > > > > + filename =3D "lpddr4_pmu_train_1d_imem.bi= n"; > > > > > > + size =3D <0x8000>; > > > > > > + }; > > > > > > + > > > > > > + blob_2: blob-ext@2 { > > > > > > + filename =3D "lpddr4_pmu_train_1d_dmem.bi= n"; > > > > > > + size =3D <0x4000>; > > > > > > + }; > > > > > > + > > > > > > + blob_3: blob-ext@3 { > > > > > > + filename =3D "lpddr4_pmu_train_2d_imem.bi= n"; > > > > > > + size =3D <0x8000>; > > > > > > + }; > > > > > > + > > > > > > + blob_4: blob-ext@4 { > > > > > > + filename =3D "lpddr4_pmu_train_2d_dmem.bi= n"; > > > > > > + size =3D <0x4000>; > > > > > > + }; > > > > > > + }; > > > > > > + > > > > > > + > > > > > > + spl { > > > > > > + filename =3D "spl.bin"; > > > > > > + > > > > > > + mkimage { > > > > > > + args =3D "-n spl/u-boot-spl.cfgout -T imx= 8mimage -e 0x912000"; > > > > > > + > > > > > > + blob { > > > > > > + filename =3D "u-boot-spl-ddr.bin"; > > > > > > + }; > > > > > > + }; > > > > > > + }; > > > > > > + > > > > > > + itb { > > > > > > + filename =3D "u-boot.itb"; > > > > > > + > > > > > > + fit { > > > > > > + description =3D "Configuration to load AT= F before U-Boot"; > > > > > > + #address-cells =3D <1>; > > > > > > + fit,external-offset =3D ; > > > > > > + > > > > > > + images { > > > > > > + uboot { > > > > > > + description =3D "U-Boot (= 64-bit)"; > > > > > > + type =3D "standalone"; > > > > > > + arch =3D "arm64"; > > > > > > + compression =3D "none"; > > > > > > + load =3D ; > > > > > > + > > > > > > + uboot_blob: blob-ext { > > > > > > + filename =3D "u-b= oot-nodtb.bin"; > > > > > > + }; > > > > > > + }; > > > > > > + > > > > > > + atf { > > > > > > + description =3D "ARM Trus= ted Firmware"; > > > > > > + type =3D "firmware"; > > > > > > + arch =3D "arm64"; > > > > > > + compression =3D "none"; > > > > > > + load =3D <0x960000>; > > > > > > + entry =3D <0x960000>; > > > > > > + > > > > > > + atf_blob: blob-ext { > > > > > > + filename =3D "bl3= 1.bin"; > > > > > > + }; > > > > > > + }; > > > > > > + > > > > > > + fdt { > > > > > > + description =3D "NAME"; > > > > > > + type =3D "flat_dt"; > > > > > > + compression =3D "none"; > > > > > > + > > > > > > + uboot_fdt_blob: blob-ext { > > > > > > + filename =3D "u-b= oot.dtb"; > > > > > > + }; > > > > > > + }; > > > > > > + }; > > > > > > + > > > > > > + configurations { > > > > > > + default =3D "conf"; > > > > > > + > > > > > > + conf { > > > > > > + description =3D "NAME"; > > > > > > + firmware =3D "uboot"; > > > > > > + loadables =3D "atf"; > > > > > > + fdt =3D "fdt"; > > > > > > + }; > > > > > > + }; > > > > > > + }; > > > > > > + }; > > > > > > + > > > > > > + imx-boot { > > > > > > + filename =3D "flash.bin"; > > > > > > + pad-byte =3D <0x00>; > > > > > > + > > > > > > + spl: blob-ext@1 { > > > > > > + offset =3D <0x0>; > > > > > > + filename =3D "spl.bin"; > > > > > > + }; > > > > > > + > > > > > > + uboot: blob-ext@2 { > > > > > > + offset =3D <0x58000>; > > > > > > + filename =3D "u-boot.itb"; > > > > > > + }; > > > > > > + }; > > > > > > +}; > > > > > > diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-im= x/imx8m/Kconfig > > > > > > index 8fedf45987..9a1eb108e4 100644 > > > > > > --- a/arch/arm/mach-imx/imx8m/Kconfig > > > > > > +++ b/arch/arm/mach-imx/imx8m/Kconfig > > > > > > @@ -116,6 +116,7 @@ config TARGET_IMX8MM_BEACON > > > > > > > > > > > > config TARGET_IMX8MN_BEACON > > > > > > bool "imx8mn Beacon Embedded devkit" > > > > > > + select BINMAN > > > > > > select IMX8MN > > > > > > select SUPPORT_SPL > > > > > > select IMX8M_LPDDR4 > > > > > > diff --git a/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg b/boar= d/beacon/imx8mn/imximage-8mn-lpddr4.cfg > > > > > > new file mode 100644 > > > > > > index 0000000000..7286b26494 > > > > > > --- /dev/null > > > > > > +++ b/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg > > > > > > @@ -0,0 +1,10 @@ > > > > > > +/* SPDX-License-Identifier: GPL-2.0+ */ > > > > > > +/* > > > > > > + * Copyright 2021 NXP > > > > > > + */ > > > > > > + > > > > > > +#define __ASSEMBLY__ > > > > > > + > > > > > > +ROM_VERSION v2 > > > > > > +BOOT_FROM sd > > > > > > +LOADER u-boot-spl-ddr.bin 0x912000 > > > > > > diff --git a/configs/imx8mn_beacon_defconfig b/configs/imx8mn_b= eacon_defconfig > > > > > > index 5296204aad..f2515874a2 100644 > > > > > > --- a/configs/imx8mn_beacon_defconfig > > > > > > +++ b/configs/imx8mn_beacon_defconfig > > > > > > @@ -26,9 +26,9 @@ CONFIG_LTO=3Dy > > > > > > CONFIG_FIT=3Dy > > > > > > CONFIG_FIT_EXTERNAL_OFFSET=3D0x3000 > > > > > > CONFIG_SPL_LOAD_FIT=3Dy > > > > > > -CONFIG_SPL_FIT_GENERATOR=3D"arch/arm/mach-imx/mkimage_fit_atf.= sh" > > > > > > +# CONFIG_USE_SPL_FIT_GENERATOR is not set > > > > > > CONFIG_OF_SYSTEM_SETUP=3Dy > > > > > > -CONFIG_SYS_EXTRA_OPTIONS=3D"IMX_CONFIG=3Darch/arm/mach-imx/imx= 8m/imximage-8mn-lpddr4.cfg" > > > > > > +CONFIG_SYS_EXTRA_OPTIONS=3D"IMX_CONFIG=3Dboard/beacon/imx8mn/i= mximage-8mn-lpddr4.cfg" > > > > > > CONFIG_DEFAULT_FDT_FILE=3D"imx8mn-beacon-kit.dtb" > > > > > > CONFIG_ARCH_MISC_INIT=3Dy > > > > > > CONFIG_SPL_BOARD_INIT=3Dy > > > > > > @@ -36,6 +36,7 @@ CONFIG_SPL_BOOTROM_SUPPORT=3Dy > > > > > > CONFIG_SPL_SEPARATE_BSS=3Dy > > > > > > CONFIG_SPL_I2C=3Dy > > > > > > CONFIG_SPL_POWER=3Dy > > > > > > +CONFIG_SPL_WATCHDOG=3Dy > > > > > > CONFIG_HUSH_PARSER=3Dy > > > > > > CONFIG_SYS_PROMPT=3D"u-boot=3D> " > > > > > > # CONFIG_BOOTM_NETBSD is not set > > > > > > @@ -62,7 +63,6 @@ CONFIG_CMD_EXT4_WRITE=3Dy > > > > > > CONFIG_CMD_FAT=3Dy > > > > > > CONFIG_OF_CONTROL=3Dy > > > > > > CONFIG_SPL_OF_CONTROL=3Dy > > > > > > -CONFIG_OF_SPL_REMOVE_PROPS=3D"interrupt-parent interrupts" > > > > > > CONFIG_ENV_IS_IN_MMC=3Dy > > > > > > CONFIG_SYS_RELOC_GD_ENV_ADDR=3Dy > > > > > > CONFIG_SYS_MMC_ENV_DEV=3D2 > > > > > > @@ -106,6 +106,7 @@ CONFIG_PHY_GIGE=3Dy > > > > > > CONFIG_FEC_MXC=3Dy > > > > > > CONFIG_MII=3Dy > > > > > > CONFIG_PINCTRL=3Dy > > > > > > +CONFIG_SPL_PINCTRL=3Dy > > > > > > CONFIG_PINCTRL_IMX8M=3Dy > > > > > > CONFIG_DM_PMIC=3Dy > > > > > > # CONFIG_SPL_PMIC_CHILDREN is not set > > > > > > @@ -122,7 +123,9 @@ CONFIG_SPI=3Dy > > > > > > CONFIG_DM_SPI=3Dy > > > > > > CONFIG_NXP_FSPI=3Dy > > > > > > CONFIG_SYSRESET=3Dy > > > > > > +CONFIG_SPL_SYSRESET=3Dy > > > > > > CONFIG_SYSRESET_PSCI=3Dy > > > > > > +CONFIG_SYSRESET_WATCHDOG=3Dy > > > > > > CONFIG_DM_THERMAL=3Dy > > > > > > CONFIG_USB=3Dy > > > > > > # CONFIG_SPL_DM_USB is not set > > > > > > @@ -134,3 +137,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=3D0xa4a5 > > > > > > CONFIG_CI_UDC=3Dy > > > > > > CONFIG_SDP_LOADADDR=3D0x0 > > > > > > CONFIG_OF_LIBFDT_OVERLAY=3Dy > > > > > > +CONFIG_IMX_WATCHDOG=3Dy > > > > > > > > > > > > > > > > Reviewed-by: Peng Fan This introduces failure to build now: https://source.denx.de/u-boot/u-boot/-/jobs/352491 --=20 Tom --B2V2wijkXj5vtlGk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmGWwaIACgkQFHw5/5Y0 tywz1gv/cRkEBbTXvOD7WAM5UjeJnrWz1Gdu04eePy+ShvJVrSy/kB7dj5YFkhvz m+SKTPgVvjttv7pMw0Uiqy40HGFh6UmmGtmtTiihTquJ4jXfq77Nwo1H1T1dEukm IbVIe3Lu6C46pL1CBzkKUbYW46g1RgIIT137ddxndwqHx0fCBT8uokPFPesC6U8f d0BRPLCkkVTVIFPzm+FizfjkO1ztHObvRKp+jpAaTaziFkcmeVdeT3mm6XkDXhry 7hKb1Km0t47IeCAE/zTE6L4+9PTsqaAG4fGX/vCHA3ECk0Q79/R9F+sTDD6gxVrI InPfv8vTDSAe9Hv9Iu1MruRrWqRb+Cr6DMOUd2cFH4MCu9K/Kl9q3Wmt3FQi2SXD Y+qK3HdPPudMjOyt7nYvRpHJtv+4ken/9pzy9ZkS5vTbv18nFRJxY3kvbExIalQP mrkXt1VKlj/IOP4Hfr1Wxi4dlF25xdcRAX8vloeBy5FFW4COVcEj++q+/dxJ1omR NEh/fGiO =KOqO -----END PGP SIGNATURE----- --B2V2wijkXj5vtlGk--