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 D48A9C433EF for ; Sat, 30 Apr 2022 13:48:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C847E83B57; Sat, 30 Apr 2022 15:48:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=nic.cz 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; secure) header.d=nic.cz header.i=@nic.cz header.b="M7oW0mm8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9E5DD83F28; Sat, 30 Apr 2022 15:48:11 +0200 (CEST) Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2A5CC83B3C for ; Sat, 30 Apr 2022 15:48:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPS id 02C8714838A; Sat, 30 Apr 2022 15:48:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1651326488; bh=D9nQmBA8jmCjME0DwoEtmiV4h7s393uUGBGIJoIHrck=; h=Date:From:To:Cc:Subject:From; b=M7oW0mm895x0ammOzc/lbC3sT/UcgQV5W2UtA2zVpcJ0O0qscSvkhKljcNJFBWfLR YgKst47cYTOXTosQyMzvL8CbJQAqrnnf6GQdaT2US+9g2F2qQEXLIeVqWAfrQMQ0VZ nwqghwXWidUhkwwzE3KYR3s360KI8h/WfjnUJm30= Date: Sat, 30 Apr 2022 15:48:04 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Weijie Gao , Stefan Roese , Tom Rini Cc: , GSS_MTK_Uboot_upstream Subject: Re: [PATCH v3 00/15] Add support for MediaTek MT7621 SoC Message-ID: <20220430154804.3593a53e@thinkpad> In-Reply-To: References: <20220428181955.1717ea7d@thinkpad> <3363c536747a3519b2a1eb8d22c029bfd02cc507.camel@mediatek.com> <055adba5a54f3d18ea310cdc7616f212bcc6c61e.camel@mediatek.com> <20220429171330.3f8e3d39@thinkpad> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Sat, 30 Apr 2022 21:31:15 +0800 Weijie Gao wrote: > On Fri, 2022-04-29 at 17:13 +0200, Marek Beh=C3=BAn wrote: > > On Fri, 29 Apr 2022 15:59:44 +0800 > > Weijie Gao wrote: > > =20 > > > On Fri, 2022-04-29 at 08:15 +0200, Stefan Roese wrote: =20 > > > > Hi Weijie > > > >=20 > > > > On 4/29/22 03:23, Weijie Gao wrote: =20 > > > > > Hi Marek, > > > > >=20 > > > > > Yes. MT7621 does need such a proprietary binary for DDR > > > > > initialization > > > > > and calibration. That's why I submit only the ram-bootable part > > > > > here. > > > > >=20 > > > > > I'm considering to create a preloader to load and run DDR > > > > > init&calib > > > > > binary and ram-bootable u-boot image. The ram-bootable u-boot > > > > > image > > > > > can be appended to the proloader to form the flash-bootable > > > > > bootloader. > > > > >=20 > > > > > The source code of preloader will be uploaded to github. =20 > > > >=20 > > > > Just to be sure: You are not implementing this preloader as an U- > > > > Boot > > > > SPL loader, as this would conflict with U-Boot's GPL > > > > compatibility? =20 > > >=20 > > > Yes. Submitting the source code of this binary also violates MTK's > > > non- > > > disclosure agreement. =20 > >=20 > > Isn't it possible to submit the DDR training code in binary version, > > and somehow call into it from SPL? =20 >=20 > It's possible and I've already implemented it. But will u-boot accept > binary file? U-Boot at least accepts drivers that require proprietary firmware to load (bnxt driver, for example). I don't know whether a binary firmware can be accepted into the U-Boot repository, whether in a separate file or as an u8 array in a .c file, but it should at least be possible to make it so that the user can compile it thsemsevles to be bundled, i.e. create a Kconfig option that configures a path to the firmware. If it is present, it will be compiled with DDR training bundled. Stefan, Tom, can this be done? BTW, Weijie, can I already test this on mt7621 board, also with DDR training? Can you send me the patch that adds calling the proprietary code? Marek