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 D3081C00140 for ; Fri, 12 Aug 2022 11:30:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ECDD084847; Fri, 12 Aug 2022 13:30:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C97E184857; Fri, 12 Aug 2022 13:30:30 +0200 (CEST) Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E1C3984837 for ; Fri, 12 Aug 2022 13:30:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=daniel@makrotopia.org Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1oMSrw-0000oD-0L; Fri, 12 Aug 2022 13:30:24 +0200 Date: Fri, 12 Aug 2022 13:29:22 +0200 From: Daniel Golle To: Weijie Gao Cc: u-boot@lists.denx.de, GSS_MTK_Uboot_upstream , Simon Glass , Marcel Ziswiler , Andre Przywara , Fabio Estevam , Samuel Holland , Marek Vasut , "Ying-Chun Liu (PaulLiu)" , Christian Hewitt Subject: Re: [PATCH 03/31] board: mediatek: add MT7986 reference boards Message-ID: References: <1019ae0fceee359e6e99149b8de00a1eefd4de1f.1659581119.git.weijie.gao@mediatek.com> <2cc65311ea80067afdabdd9e1c18845ec8ef4c5c.camel@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2cc65311ea80067afdabdd9e1c18845ec8ef4c5c.camel@mediatek.com> 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.6 at phobos.denx.de X-Virus-Status: Clean On Fri, Aug 12, 2022 at 07:02:17PM +0800, Weijie Gao wrote: > On Tue, 2022-08-09 at 11:10 +0200, Daniel Golle wrote: > > Hi Weijie, > > > > On Thu, Aug 04, 2022 at 11:35:03AM +0800, Weijie Gao wrote: > > > This patch adds general board files based on MT7986 SoCs. > > > > > > The SD/eMMC controller on MT7986A and MT7986B have different pin > > > configurations so that four different reference board configs has > > > to be > > > added. > > > > > > Signed-off-by: Weijie Gao > > > --- > > > [...] > > > diff --git a/include/configs/mt7986.h b/include/configs/mt7986.h > > > new file mode 100644 > > > index 0000000000..b28fc0f613 > > > --- /dev/null > > > +++ b/include/configs/mt7986.h > > > @@ -0,0 +1,26 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 */ > > > +/* > > > + * Configuration for MediaTek MT7986 SoC > > > + * > > > + * Copyright (C) 2022 MediaTek Inc. > > > + * Author: Sam Shih > > > + */ > > > + > > > +#ifndef __MT7986_H > > > +#define __MT7986_H > > > + > > > +#include > > > + > > > > In the SDK sources I found also > > #define CONFIG_SYS_BOOTM_LEN SZ_128M > > here which is actually needed to boot any image with uncompressed > > kernel larger than 8MiB. As for ARM64 this size is easily exceeded > > and > > we got plenty of RAM, I suggest to also include a more generous > > CONFIG_SYS_BOOTM_LEN in your submission to upstream U-Boot. > > CONFIG_SYS_BOOTM_LEN is now a Kconfig symbol. It will no be defined in > this header. > Instead, the default value of this symbol is 0x4000000 (64M) for ARM64 > which is enough for an ARM64 kernel. Sorry, I missed c45568cc4e ("Convert CONFIG_SYS_BOOTM_LEN to Kconfig") and was trying the series on top of U-Boot 2022.07 (for inclusion in OpenWrt) locally. I've tested the whole series with Bananapi BPi-R3 (MT7986A) board. U-Boot itself works great with all 4 boot media options. The only remaining problem is BootROM header generation using mkimage/mtk_image for SPI-NOR: TF-A and U-Boot ithemselves both work well with SPI-NOR when using 'bromutil' to generate the image. When using 'mkimage -T mtk_image' instead of 'bromutil' the resulting bl2.img doesn't work: F0: 102B 0000 FA: 0000 0000 V0: 7027 6006 [0001] 00: 1017 0000 FA: 5100 0000 01: 102A 0001 02: 5100 0000 BP: 2000 00C0 [0001] EC: 0000 0000 [0000] T0: 0000 0213 [010F] System halt! Cheers Daniel