Skip to contentSkip to conversation

colibri_vf: fix NAND boot and add the board documentation

PATCH New Mehmet Fide 1 participant 3 messages Aug 14

lore
Share & tools
lore
#0 lore raw

v2 cover colibri_vf: fix NAND boot and add the board documentation

From: Mehmet Fide <[email protected]>

Following the CONFIG_TEXT_BASE report [1] and Francesco's suggestion, two patches: the first restores the text base the Vybrid BootROM actually accepts, measured on hardware both through the BootROM NAND path and the WinCE-era loader; the second adds the missing doc/board/toradex page for the Colibri VF50/VF61.

Changes in v2:
- code-block:: console for the shell sessions (Francesco)
- drop the TEXT_BASE note from the eBoot section, it is SoC scope and moot once patch 1 is in (Francesco)
- collect the Acked-by tags

[1] https://lore.kernel.org/u-boot/[email protected]/

Mehmet Fide (2):
colibri_vf: restore the pre-2017 text base, the BootROM refuses the
low one
doc: board: toradex: add the Colibri VF50/VF61 page

 configs/colibri_vf_defconfig     |  4 +-
 doc/board/toradex/colibri_vf.rst | 66 ++++++++++++++++++++++++++++++++
 doc/board/toradex/index.rst      |  1 +
 3 files changed, 69 insertions(+), 2 deletions(-)
 create mode 100644 doc/board/toradex/colibri_vf.rst
Signature · 1 line
2.54.0
#1 lore raw

PATCH v2 1/2 colibri_vf: restore the pre-2017 text base, the BootROM refuses the low one

From: Mehmet Fide <[email protected]>

Since commit c0f432c37780 ("configs: vf610: increase maximum size and enforce correct limit") U-Boot for the Vybrid boards links at 0x3f401000, right at the start of the OCRAM gfxRAM area. On a Colibri VF50 the BootROM does not start such an image from NAND at all: the module drops into the serial downloader, verified by the 0x23454523 UART association pattern echoing back. The WinCE-era Toradex loader dies the same way when handed such an image with its flashloader command. Relinking the same tree at 0x3f408000, the value used before that commit and by the vendor fork since, boots through both paths.

The low 28 KiB of the gfxRAM area are evidently not usable as a load address for the ROM, so give them back and correct the size limit to match (0x3f480000 - 0x3f408000).

Tested on a Colibri VF50 128MB IT V1.2B on an Iris carrier: cold boot from NAND, both text bases, one build apart.

Fixes c0f432c37780 ("configs: vf610: increase maximum size and enforce correct limit")
---
 configs/colibri_vf_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configs/colibri_vf_defconfig +2 -2
index 5145e947e88..beb64189d5c 100644
@@ -2,7 +2,7 @@ CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_VF610=y
-CONFIG_TEXT_BASE=0x3f401000
+CONFIG_TEXT_BASE=0x3f408000
 CONFIG_SYS_MALLOC_LEN=0x0220000
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x20000
@@ -16,7 +16,7 @@ CONFIG_SYS_MEMTEST_START=0x80010000
 CONFIG_SYS_MEMTEST_END=0x87c00000
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_HAS_BOARD_SIZE_LIMIT=y
-CONFIG_BOARD_SIZE_LIMIT=520192
+CONFIG_BOARD_SIZE_LIMIT=491520
 # CONFIG_EFI_LOADER is not set
 CONFIG_BOOTDELAY=1
 CONFIG_FDT_FIXUP_PARTITIONS=y
Signature · 1 line
2.54.0
#2 lore raw

PATCH v2 2/2 doc: board: toradex: add the Colibri VF50/VF61 page

In reply to Mehmet Fide

From: Mehmet Fide <[email protected]>

The other Toradex modules are documented here, the Vybrid ones were not. Describe the build, the two ways of getting the image into NAND, and the flashloader command of the WinCE-era bootloader that modules from that era still carry.

---
 doc/board/toradex/colibri_vf.rst | 66 ++++++++++++++++++++++++++++++++
 doc/board/toradex/index.rst      |  1 +
 2 files changed, 67 insertions(+)
 create mode 100644 doc/board/toradex/colibri_vf.rst
doc/board/toradex/colibri_vf.rst new file +66 -0
new file mode 100644
index 00000000000..f9c81d70214
@@ -0,0 +1,66 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later
+.. sectionauthor:: Mehmet Fide <[email protected]>
+
+Colibri VF50/VF61 Modules
+=========================
+
+- SoM: https://www.toradex.com/computer-on-modules/colibri-arm-family/nxp-vybrid-vf5xx-vf6xx
+- Carrier boards: https://www.toradex.com/products/carrier-board/colibri-evaluation-board
+  and https://www.toradex.com/products/carrier-board/iris-carrier-board
+
+Quick Start
+-----------
+
+- Build U-Boot
+- Flash to NAND from a running U-Boot
+- Flash to NAND over recovery mode
+- Modules still carrying the WinCE bootloader
+
+Build U-Boot
+------------
+
+.. code-block:: console
+
+    $ export CROSS_COMPILE=arm-linux-gnueabi-
+    $ make colibri_vf_defconfig
+    $ make
+
+This produces ``u-boot.imx``, the image with the IVT for the Vybrid
+BootROM, ready to be written to the ``u-boot`` NAND partition.
+
+Flash to NAND from a running U-Boot
+-----------------------------------
+
+Load the image over TFTP or from a FAT formatted SD card and use the
+``update_uboot`` script from the default environment:
+
+.. code-block:: none
+
+    Colibri VFxx # fatload mmc 0:1 ${loadaddr} u-boot.imx
+    Colibri VFxx # run update_uboot
+    Colibri VFxx # reset
+
+Flash to NAND over recovery mode
+--------------------------------
+
+With nothing bootable in NAND, the Vybrid BootROM falls back to the
+serial downloader on the USB client port. The `imx_usb_loader
+<https://github.com/boundarydevices/imx_usb_loader>`_ tool can push
+``u-boot.imx`` straight into OCRAM and run it:
+
+.. code-block:: console
+
+    $ imx_usb u-boot.imx
+
+From the running U-Boot, flash NAND as in the previous section.
+
+Modules still carrying the WinCE bootloader
+-------------------------------------------
+
+Modules that were shipped with the WinCE-era Toradex bootloader (eBoot)
+offer a ``flashloader`` command that writes a U-Boot image to NAND:
+
+.. code-block:: none
+
+    > flashloader u-boot.imx
+    > reboot
doc/board/toradex/index.rst +1 -0
index 2a45bde6991..5bf2d052462 100644
@@ -10,6 +10,7 @@ Toradex
    aquila-am69
    colibri_imx7
    colibri-imx8x
+   colibri_vf
    smarc-imx8mp
    smarc-imx95
    verdin-am62
Signature · 1 line
2.54.0