[PATCH v3] Add imx8mp-libra-fpsc board

Teresa Remmet t.remmet at phytec.de
Tue Aug 26 14:19:28 CEST 2025


Hello Yannic,

Am Freitag, dem 22.08.2025 um 14:21 +0200 schrieb Yannic Moog:
> From: Benjamin Hahn <B.Hahn at phytec.de>
> 
> Add new imx8mp-libra-fpsc board.
> Bootph tags as well as USB device tree nodes are in u-boot.dtsi for
> now
> and will be removed when upstreamed.
> The Libra i.MX 8M Plus FPSC is a single board computer. It uses an
> i.MX
> 8M Plus FPSC [1] System on Module which utilizes the FPSC standard
> [2].
> 
> [1]
> https://www.phytec.eu/en/produkte/system-on-modules/phycore-imx-8m-plus-fpsc
> [2] https://www.phytec.eu/en/produkte/system-on-modules/fpsc
> 
> Signed-off-by: Benjamin Hahn <B.Hahn at phytec.de>
> Signed-off-by: Yannic Moog <y.moog at phytec.de>

please find two nits below.

With them fixed:

Reviewed-by: Teresa Remmet <t.remmet at phytec.de>
Tested-by: Teresa Remmet <t.remmet at phytec.de>

Thanks Benjamin and Yannic for working on this.


> ---
> Changes in v3:
> - take over series from Benjamin
> - add imply OF_UPSTREAM, remove from defconfig
> - style fixes with regards to proper Product name
> - add USB dt properties to u-boot.dtsi (until present in upstream)
> - remove som_detection code from board code (still present in spl as
> som
>   info is printed; in u-boot proper code, nothing is done)
> - standard boot:
>   - add CONFIG_DEFAULT_FDT_FILE for fdtfile variable
>   - change addresses for standard boot variables; align with imx8mm
>     PHYTEC boards
>   - use u-boot.dtsi to define standard boot support
> - Doc:
>   - add doc file to toctree
>   - remove optional from optee_os build instructions
>   - update imx-firmware version
>   - drop export commands, use single make command for instructions
> - Link to v2:
> https://lore.kernel.org/r/20250814-imx8mp-libra-initial-support-v2-1-9b91d437ea48@phytec.de
> 
> Changes in v2:
> - Review comments from v1 (too many to list them all)
> - removed the first two patches (devicetree is now in of_upstream)
> - added the latest version of ram timings
> - add optee support (libra is now in upstream optee)
> - add CONFIG_CMD_MMC_REG command for mmc reg read command
> - Link to v1:
> https://lore.kernel.org/r/20250725-imx8mp-libra-initial-support-v1-0-d9982df21a4b@phytec.de
> ---
>  arch/arm/dts/imx8mp-libra-rdk-fpsc-u-boot.dtsi     |  131 ++
>  arch/arm/mach-imx/imx8m/Kconfig                    |   10 +
>  board/phytec/imx8mp-libra-fpsc/Kconfig             |   16 +
>  board/phytec/imx8mp-libra-fpsc/MAINTAINERS         |    9 +
>  board/phytec/imx8mp-libra-fpsc/Makefile            |   10 +
>  board/phytec/imx8mp-libra-fpsc/imx8mp-libra-fpsc.c |   89 +
>  .../phytec/imx8mp-libra-fpsc/imx8mp-libra-fpsc.env |   19 +
>  board/phytec/imx8mp-libra-fpsc/imximage-8mp-sd.cfg |    9 +
>  board/phytec/imx8mp-libra-fpsc/lpddr4_timing.c     | 1814
> ++++++++++++++++++++
>  board/phytec/imx8mp-libra-fpsc/spl.c               |  132 ++
>  configs/imx8mp-libra-fpsc_defconfig                |  175 ++
>  doc/board/phytec/imx8mp-libra-fpsc.rst             |   84 +
>  doc/board/phytec/index.rst                         |    1 +
>  include/configs/imx8mp-libra-fpsc.h                |   27 +
>  14 files changed, 2526 insertions(+)
> 
> 

[...]

> diff --git a/board/phytec/imx8mp-libra-fpsc/lpddr4_timing.c
> b/board/phytec/imx8mp-libra-fpsc/lpddr4_timing.c
> new file mode 100644
> index
> 0000000000000000000000000000000000000000..1206bc7ca31751816858131b30b
> 0a75ce0131596
> --- /dev/null
> +++ b/board/phytec/imx8mp-libra-fpsc/lpddr4_timing.c
> @@ -0,0 +1,1814 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright 2025 NXP
> + *
> + * Code generated with DDR Tool v3.5.0_9-1ddf053d.
> + * DDR PHY FW2020.06
> + */
> 

[...]

> +
> +/* ddr timing config params */
> +struct dram_timing_info dram_timing = {
> +       .ddrc_cfg = ddr_ddrc_cfg,
> +       .ddrc_cfg_num = ARRAY_SIZE(ddr_ddrc_cfg),
> +       .ddrphy_cfg = ddr_ddrphy_cfg,
> +       .ddrphy_cfg_num = ARRAY_SIZE(ddr_ddrphy_cfg),
> +       .fsp_msg = ddr_dram_fsp_msg,
> +       .fsp_msg_num = ARRAY_SIZE(ddr_dram_fsp_msg),
> +       .ddrphy_trained_csr = ddr_ddrphy_trained_csr,
> +       .ddrphy_trained_csr_num = ARRAY_SIZE(ddr_ddrphy_trained_csr),
> +       .ddrphy_pie = ddr_phy_pie,
> +       .ddrphy_pie_num = ARRAY_SIZE(ddr_phy_pie),
> +       .fsp_table = { 4000, },
> +};
> +

please remove the empty line at EOF.

[...]

> diff --git a/doc/board/phytec/imx8mp-libra-fpsc.rst
> b/doc/board/phytec/imx8mp-libra-fpsc.rst
> new file mode 100644
> index
> 0000000000000000000000000000000000000000..fb65b8e92b117bc0bb3b41a3d02
> 705ffa3fceab0
> --- /dev/null
> +++ b/doc/board/phytec/imx8mp-libra-fpsc.rst
> @@ -0,0 +1,84 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +Libra i.MX 8M Plus FPSC
> +=======================
> +
> +The Libra i.MX 8M Plus FPSC is a SBC based with the phyCORE-i.MX 8M
> Plus FPSC
> +SoM.
> +The phyCORE-i.MX 8M Plus FPSC with 2GB of main memory is supported.
> +
> +Quick Start
> +-----------
> +
> +- Build the ARM Trusted firmware binary
> +- Build the OP-TEE binary
> +- Get ddr firmware
> +- Build U-Boot
> +- Boot
> +
> +Build the ARM Trusted firmware binary
> +-------------------------------------
> +
> +.. code-block:: bash
> +
> +   $ git clone
> https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
> +   $ cd trusted-firmware-a
> +   $ make -j $(nproc) \
> +          CROSS_COMPILE=aarch64-linux-gnu- \
> +          PLAT=imx8mp \
> +          IMX_BOOT_UART_BASE=0x30a60000 \
> +          BL32_BASE=0x7e000000 \
> +          SPD=opteed \
> +          bl31
> +
> +Build the OP-TEE binary
> +-----------------------
> +
> +.. code-block:: bash
> +
> +   $ git clone https://github.com/OP-TEE/optee_os.git
> +   $ cd optee_os
> +   $ make -j $(nproc) \
> +          CROSS_COMPILE=aarch64-linux-gnu- \
> +          CFG_TEE_BENCHMARK=n \
> +          O=out/arm \
> +          PLATFORM=imx-mx8mp_libra_fpsc
> +
> +Get the ddr firmware
> +--------------------
> +
> +.. code-block:: bash
> +
> +   $ wget
> https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.28-994fa14.bin
> +   $ chmod +x firmware-imx-8.28-994fa14.bin
> +   $ ./firmware-imx-8.28-994fa14.bin
> +
> +Build U-Boot for SD card
> +------------------------
> +
> +Copy binaries
> +^^^^^^^^^^^^^
> +
> +.. code-block:: bash
> +
> +   $ cp <TF-A dir>/build/imx8mp/release/bl31.bin .
> +   $ cp <OP-TEE dir>/out/arm/core/tee-raw.bin tee.bin
> +   $ cp firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr4*.bin
> .
> +
> +Build U-Boot
> +^^^^^^^^^^^^
> +
> +.. code-block:: bash
> +
> +   $ make flash.bin

looks like this should be removed.

Teresa


> +   $ make -j $(nproc) \
> +          CROSS_COMPILE=aarch64-linux-gnu- \
> +          imx8mp-libra-fpsc_defconfig \
> +          flash.bin
> +
> +Flash SD card
> +^^^^^^^^^^^^^
> +
> +.. code-block:: bash
> +
> +   $ sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=32 conv=fsync
> diff --git a/doc/board/phytec/index.rst b/doc/board/phytec/index.rst
> index
> 1ae30c2dcd58657f6ba2bd4eeb580447418b6f95..e24040a496e98b5b8c94ca03a5d
> 6382fbab0ab0b 100644
> --- a/doc/board/phytec/index.rst
> +++ b/doc/board/phytec/index.rst
> @@ -6,6 +6,7 @@ PHYTEC
>  .. toctree::
>     :maxdepth: 2
>  
> +   imx8mp-libra-fpsc
>     imx8mm-phygate-tauri-l
>     imx93-phycore
>     phycore-am62x
> diff --git a/include/configs/imx8mp-libra-fpsc.h
> b/include/configs/imx8mp-libra-fpsc.h
> new file mode 100644
> index
> 0000000000000000000000000000000000000000..cde91dc364256bf7783b68e507e
> 9f79f5f894cf9
> --- /dev/null
> +++ b/include/configs/imx8mp-libra-fpsc.h
> @@ -0,0 +1,27 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later
> + *
> + * Copyright (C) 2025 PHYTEC Messtechnik GmbH
> + */
> +
> +#ifndef __IMX8MP_LIBRA_FPSC_H
> +#define __IMX8MP_LIBRA_FPSC_H
> +
> +#include <linux/sizes.h>
> +#include <asm/arch/imx-regs.h>
> +
> +#define CFG_SYS_UBOOT_BASE \
> +               (QSPI0_AMBA_BASE +
> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
> +
> +/* Link Definitions */
> +
> +#define CFG_SYS_INIT_RAM_ADDR  0x40000000
> +#define CFG_SYS_INIT_RAM_SIZE  SZ_512K
> +
> +#define CFG_SYS_SDRAM_BASE             0x40000000
> +
> +#define PHYS_SDRAM                     0x40000000
> +#define PHYS_SDRAM_SIZE                 (SZ_2G + SZ_1G) /* 3GB */
> +#define PHYS_SDRAM_2                    0x100000000
> +#define PHYS_SDRAM_2_SIZE               (SZ_4G + SZ_1G) /* 5GB */
> +
> +#endif /* __IMX8MP_LIBRA_FPSC_H */
> 
> ---
> base-commit: b6e2cfca1a6fd10c8f12016a40d690d2ec61796c
> change-id: 20250821-imx8mp-libra-fpsc-4e42820ba0b1
> 
> Best regards,

-- 
PHYTEC Messtechnik GmbH | Barcelona-Allee 1 | 55129 Mainz, Germany

Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber,
Dipl.-Ing. (FH) Markus Lickes | Handelsregister Mainz HRB 4656 |
Finanzamt Mainz | St.Nr. 26/665/00608, DE 149059855


More information about the U-Boot mailing list