Re: [PATCH v3 00/15] Add support for MediaTek MT7621 SoC

2022-04-28 Thread Marek Behún
On Thu, 28 Apr 2022 18:37:09 +0800
Weijie Gao  wrote:

> This series will add support for MediaTek MT7621 SoC with two reference boards
> and related drivers.
> 
> The MediaTek MT7621 is a network processor integrating a dual-core
> dual-threaded MIPS 1004Kc processor running at a normal frequency of 880MHz.
> This chip can be found in many wireless routers.

Hello Weijie,

doesn't MT7621 U-Boot need a proprietary binary for DDR training?
I remember that it was required in 2016 for MqMaker WitiBoard.

Marek


Re: [PATCH v3 00/15] Add support for MediaTek MT7621 SoC

2022-04-28 Thread Stefan Roese

Hi Weijie

On 4/29/22 03:23, Weijie Gao wrote:

Hi Marek,

Yes. MT7621 does need such a proprietary binary for DDR initialization
and calibration. That's why I submit only the ram-bootable part here.

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.

The source code of preloader will be uploaded to github.


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?

Thanks,
Stefan


Best Regards,
Weijie

On Thu, 2022-04-28 at 18:19 +0200, Marek Behún wrote:

On Thu, 28 Apr 2022 18:37:09 +0800
Weijie Gao  wrote:


This series will add support for MediaTek MT7621 SoC with two
reference boards
and related drivers.

The MediaTek MT7621 is a network processor integrating a dual-core
dual-threaded MIPS 1004Kc processor running at a normal frequency
of 880MHz.
This chip can be found in many wireless routers.


Hello Weijie,

doesn't MT7621 U-Boot need a proprietary binary for DDR training?
I remember that it was required in 2016 for MqMaker WitiBoard.

Marek


Viele Grüße,
Stefan Roese

--
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de


Re: [PATCH v3 00/15] Add support for MediaTek MT7621 SoC

2022-04-29 Thread Marek Behún
On Fri, 29 Apr 2022 15:59:44 +0800
Weijie Gao  wrote:

> On Fri, 2022-04-29 at 08:15 +0200, Stefan Roese wrote:
> > Hi Weijie
> > 
> > On 4/29/22 03:23, Weijie Gao wrote:  
> > > Hi Marek,
> > > 
> > > Yes. MT7621 does need such a proprietary binary for DDR
> > > initialization
> > > and calibration. That's why I submit only the ram-bootable part
> > > here.
> > > 
> > > 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.
> > > 
> > > The source code of preloader will be uploaded to github.  
> > 
> > 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?  
> 
> Yes. Submitting the source code of this binary also violates MTK's non-
> disclosure agreement.

Isn't it possible to submit the DDR training code in binary version,
and somehow call into it from SPL?

Marek


Re: [PATCH v3 00/15] Add support for MediaTek MT7621 SoC

2022-04-30 Thread Marek Behún
On Sat, 30 Apr 2022 21:31:15 +0800
Weijie Gao  wrote:

> On Fri, 2022-04-29 at 17:13 +0200, Marek Behún wrote:
> > On Fri, 29 Apr 2022 15:59:44 +0800
> > Weijie Gao  wrote:
> >   
> > > On Fri, 2022-04-29 at 08:15 +0200, Stefan Roese wrote:  
> > > > Hi Weijie
> > > > 
> > > > On 4/29/22 03:23, Weijie Gao wrote:
> > > > > Hi Marek,
> > > > > 
> > > > > Yes. MT7621 does need such a proprietary binary for DDR
> > > > > initialization
> > > > > and calibration. That's why I submit only the ram-bootable part
> > > > > here.
> > > > > 
> > > > > 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.
> > > > > 
> > > > > The source code of preloader will be uploaded to github.
> > > > 
> > > > 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?
> > > 
> > > Yes. Submitting the source code of this binary also violates MTK's
> > > non-
> > > disclosure agreement.  
> > 
> > Isn't it possible to submit the DDR training code in binary version,
> > and somehow call into it from SPL?  
> 
> 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


Re: [PATCH v3 00/15] Add support for MediaTek MT7621 SoC

2022-05-01 Thread Tom Rini
On Sat, Apr 30, 2022 at 03:48:04PM +0200, Marek Behún wrote:
> On Sat, 30 Apr 2022 21:31:15 +0800
> Weijie Gao  wrote:
> 
> > On Fri, 2022-04-29 at 17:13 +0200, Marek Behún wrote:
> > > On Fri, 29 Apr 2022 15:59:44 +0800
> > > Weijie Gao  wrote:
> > >   
> > > > On Fri, 2022-04-29 at 08:15 +0200, Stefan Roese wrote:  
> > > > > Hi Weijie
> > > > > 
> > > > > On 4/29/22 03:23, Weijie Gao wrote:
> > > > > > Hi Marek,
> > > > > > 
> > > > > > Yes. MT7621 does need such a proprietary binary for DDR
> > > > > > initialization
> > > > > > and calibration. That's why I submit only the ram-bootable part
> > > > > > here.
> > > > > > 
> > > > > > 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.
> > > > > > 
> > > > > > The source code of preloader will be uploaded to github.
> > > > > 
> > > > > 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?
> > > > 
> > > > Yes. Submitting the source code of this binary also violates MTK's
> > > > non-
> > > > disclosure agreement.  
> > > 
> > > Isn't it possible to submit the DDR training code in binary version,
> > > and somehow call into it from SPL?  
> > 
> > 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?

At the high level, I would make a further disappointed sigh and note the
NXP ddr firmware blobs, the binary blobs we pull in for x86, and all of
the other blobs we bring in today via binman.  Please make use of one of
these otherwise existing mechanics to bring in the required DDR blobs
here.

-- 
Tom


signature.asc
Description: PGP signature