Re: [PATCH RFC u-boot-mvebu 00/59] arm: mvebu: Various fixes

Pali Rohár
2023-02-22T18:04:27Z

Hello! Thank you for testing.

On Wednesday 22 February 2023 11:59:35 Martin Rowe wrote:
> Pali,
>
> Good news:
>
> A388 Clearfog Base (SD card model):
> - MMC from SD card works
> - UART works
> - SATA with new defconfig works
> - SPI (if you select MVEBU_SPL_BOOT_DEVICE_SPI yourself) works

Could you send a patch which adds appropriate defconfig file for SPI
boot? So this configuration would be tested in U-Boot CI automatically.

> A388 Clearfog Pro (eMMC model):
> - MMC from eMMC works, but still requires the dts to be patched for
> eMMC (included at bottom)

Have you tried booting from eMMC boot partition or eMMC user data
partition? Because all 3 options should work, but I'm not fully sure if
BootROM choose partition from eMMC register or if tries all 3 in some
order. This is something which needs to be checked and verified.

> I tried eMMC both with and without the dts patched, but only the
> patched version boots. I am not easily able to test the other boot
> methods on the Pro, but they're the same as the Base. Let me know if
> you need any extra data/outputs.

Could you try to use SolidRun eMMC patch which SolidRun has for years in
its repository?

https://github.com/SolidRun/u-boot/commit/19a96f7c40a8fc1d0a6546ac2418d966e5840a99

Probably same functionality is needed to implement also into
board_fix_fdt() function enabled by CONFIG_OF_BOARD_FIXUP. Look for
other boards how they use CONFIG_OF_BOARD_FIXUP.

And if ... you can try to put this logic in board_late_init() function.
For inspiration look into Espressobin board which deactivates eMMC at
runtime by checking existence of eMMC:
https://source.denx.de/u-boot/u-boot/-/blob/master/board/Marvell/mvebu_armada-37xx/board.c

> Also, the extra/updated comments with these changes are great! Thanks.

There is still missing documentation for kwbimage config file format.
It should be in "kwbimage" section of ./doc/mkimage.1 file but there is
only placeholder... It would be nice if somebody can take it and write
it.

> Tested-by: Martin Rowe <martin.p.rowe@gmail.com>
>
> Martin
>
> diff --git a/arch/arm/dts/armada-388-clearfog.dts
> b/arch/arm/dts/armada-388-clearfog.dts
> index e4164f49b2..29a608abcf 100644
> --- a/arch/arm/dts/armada-388-clearfog.dts
> +++ b/arch/arm/dts/armada-388-clearfog.dts
> @@ -101,7 +101,7 @@
>
> sdhci@d8000 {
> bus-width = <4>;
> - cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
> + non-removable;
> no-1-8-v;
> pinctrl-0 = <&microsom_sdhci_pins
> &clearfog_sdhci_cd_pins>;
>
> On Wed, 22 Feb 2023 at 07:58, Pali Rohár <pali@kernel.org> wrote:
> >
> > On Tuesday 21 February 2023 21:45:07 Tony Dinh wrote:
> > > Hi Pali,
> > >
> > > On Tue, Feb 21, 2023 at 3:14 PM Pali Rohár <pali@kernel.org> wrote:
> > > >
> > > > On Tuesday 21 February 2023 15:06:16 Tony Dinh wrote:
> > > > > Hi Pali,
> > > > >
> > > > > On Tue, Feb 21, 2023 at 12:22 PM Pali Rohár <pali@kernel.org> wrote:
> > > > > >
> > > > > > This patch series contains various improvements and fixes for existing
> > > > > > logical errors. Boot phase was adjusted to match behavior of Armada 385
> > > > > > BootROM by inspecting and disassembling of BootROM binary dump itself.
> > > > > > Important information are included in documentation patch for kwboot.
> > > > > > Most of the changes are untested, hence this patch series is just RFC.
> > > > > > So please test changes before applying, idealy on SPI, SATA and SD/MMC.
> > > > > > Nevertheless all patches on github passed CI testing in this PR:
> > > > > > https://github.com/u-boot/u-boot/pull/275
> > > > ...
> > > > > I went to patchwork and downloaded the series.
> > > > > https://patchwork.ozlabs.org/project/uboot/patch/20230221201925.9644-2-pali@kernel.org
> > > > >
> > > > > When I applied the patches set there were some rejections.
> > > > > <BEGIN LOG>
> > > > > # patch -p1 < /usr/src/builds-u-boot-marvell/pali_patches/arm-mvebu-Various-fixes.patch
> > > > >
> > > > ...
> > > > FAILED
> > > > ...
> > > > > <END LOG>
> > > > >
> > > > > I'm on the latest master branch (just did a git pull today). Could
> > > > > some patches be out of order?
> > > > >
> > > > > Thanks,
> > > > > Tony
> > > >
> > > > Well, that is because DENX mail server is broken and it crashed during
> > > > processing antispam filter on my some of my patches. So some patches are
> > > > missing in archive and then applying dependent patches failed.
> > > >
> > > > So ignore patchwork and email patches. Rather fetch changes from the
> > > > mentioned github pull request https://github.com/u-boot/u-boot/pull/275
> > > >
> > > > You can do it via git command (it fetch it to the new mvebu branch):
> > > >
> > > > git fetch https://github.com/u-boot/u-boot.git refs/pull/275/merge:mvebu
> > >
> > > Indeed! That pull request was applied without problem.
> > >
> > > So I did a general regression test running rebuilt kwboot binary, and
> > > rebuilt u-boot images for these 2 Marvell boards:
> > >
> > > Thecus N2350 (Armada 385)
> > > Pogo V4 (Kirkwood 88F6192).
> > >
> > > So for that part:
> > > Tested-by: Tony Dinh <mibodhi@gmail.com>
> > >
> > > All the best,
> > > Tony
> >
> > Thanks for testing! Anyway do you have some A38x board which can boot
> > from SD/MMC, SATA or NAND? This is what is needed to test too. I see
> > that Pogo boots from NAND but it does not use SPL.