On Sat, 30 Apr 2022 21:31:15 +0800 Weijie Gao <weijie....@mediatek.com> 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 <weijie....@mediatek.com> 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