Add support for TQMa7x
Subsystems (3)
v4 cover Add support for TQMa7x
From: Alexander Feilke <[email protected]>
This series adds support for TQMa7x and is based on the preparations for additional TQ boards series [1] and [2]. It has 512M, 1G and 2G RAM variants which are detected by the SPL by initializing them in descending order. It can boot from SD, MMC, SPI and USB (SDP). SPI however requires an additional prepended NXP header image which is currently unsupported in u-boot.
The i.MX7S variant boots but is not being actively supported.
The testsuites stage passes the pipeline [3]. However I cannot get the following stages to work unfortunately.
Best regards,
Alexander
[1] "TQMa6 with preparations for integrating additional TQ boards" (V2)
https://patchwork.ozlabs.org/project/uboot/list/?series=497120
[2] "TQ-Systems MAINTAINERS files"
https://patchwork.ozlabs.org/project/uboot/list/?series=497398
[3] https://gitlab.com/alexander.feilke/u-boot/-/pipelines/2434435482
Changes in v2:
- Update MAINTAINERS to fix CI issue
- Improved commit messages
- Fix a checkpatch warning in board/tq/common/tq_som.c
Changes in v3:
- Use readl_poll_timeout api for ram initialization
- Remove erroneous rootpath set in env
Changes in v4:
- add tq/index to doc/board/index
- add missing include <config.h> to include/env.h
Alexander Feilke (7):
Kconfig: update build-target for MX7 with SPL board/tq: Add common SoM API
arch: arm: dts: tqma7x: add u-boot device tree fragments
arch: arm: dts: tqma7x: add boot phase properties
board: tqma7: add code for u-boot with spl
configs: tqma7: add defconfigs
doc: tqma7: add documentation
Nora Schiffer (1):
env: add env_set_runtime() helper
Kconfig | 2 +- arch/arm/dts/imx7d-mba7-u-boot.dtsi | 10 ++ arch/arm/dts/imx7s-mba7-u-boot.dtsi | 48 +++++++ arch/arm/dts/imx7s-tqma7-u-boot.dtsi | 22 ++++ arch/arm/mach-imx/mx7/Kconfig | 16 +++ board/tq/MAINTAINERS | 9 ++ board/tq/common/Kconfig | 3 + board/tq/common/Makefile | 1 + board/tq/common/tq_som.c | 32 +++++ board/tq/common/tq_som.h | 35 ++++++ board/tq/tqma7/Kconfig | 103 +++++++++++++++ board/tq/tqma7/Makefile | 14 +++ board/tq/tqma7/spl.c | 123 ++++++++++++++++++ board/tq/tqma7/spl_mba7.c | 182 +++++++++++++++++++++++++++ board/tq/tqma7/spl_tqma7_ram.c | 171 +++++++++++++++++++++++++ board/tq/tqma7/tqma7.c | 96 ++++++++++++++ board/tq/tqma7/tqma7.cfg | 26 ++++ board/tq/tqma7/tqma7.env | 35 ++++++ board/tq/tqma7/tqma7_mba7.c | 148 ++++++++++++++++++++++ configs/tqma7_common.config | 119 ++++++++++++++++++ configs/tqma7_mba7_mmc_defconfig | 2 + configs/tqma7_mba7_qspi_defconfig | 2 + configs/tqma7_mba7_uuu_defconfig | 2 + configs/tqma7_mmc.config | 4 + configs/tqma7_qspi.config | 7 ++ configs/tqma7_uuu.config | 22 ++++ doc/board/index.rst | 1 + doc/board/tq/index.rst | 12 ++ doc/board/tq/tqma7.rst | 77 ++++++++++++ include/configs/tqma7.h | 71 +++++++++++ include/configs/tqma7_mba7.h | 16 +++ include/env.h | 20 +++ include/env/tq/spi.env | 4 + 33 files changed, 1434 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/imx7d-mba7-u-boot.dtsi create mode 100644 arch/arm/dts/imx7s-mba7-u-boot.dtsi create mode 100644 arch/arm/dts/imx7s-tqma7-u-boot.dtsi create mode 100644 board/tq/common/tq_som.c create mode 100644 board/tq/common/tq_som.h create mode 100644 board/tq/tqma7/Kconfig create mode 100644 board/tq/tqma7/Makefile create mode 100644 board/tq/tqma7/spl.c create mode 100644 board/tq/tqma7/spl_mba7.c create mode 100644 board/tq/tqma7/spl_tqma7_ram.c create mode 100644 board/tq/tqma7/tqma7.c create mode 100644 board/tq/tqma7/tqma7.cfg create mode 100644 board/tq/tqma7/tqma7.env create mode 100644 board/tq/tqma7/tqma7_mba7.c create mode 100644 configs/tqma7_common.config create mode 100644 configs/tqma7_mba7_mmc_defconfig create mode 100644 configs/tqma7_mba7_qspi_defconfig create mode 100644 configs/tqma7_mba7_uuu_defconfig create mode 100644 configs/tqma7_mmc.config create mode 100644 configs/tqma7_qspi.config create mode 100644 configs/tqma7_uuu.config create mode 100644 doc/board/tq/index.rst create mode 100644 doc/board/tq/tqma7.rst create mode 100644 include/configs/tqma7.h create mode 100644 include/configs/tqma7_mba7.h
Signature · 1 line
2.43.0
PATCH v4 1/8 Kconfig: update build-target for MX7 with SPL
From: Alexander Feilke <[email protected]>
Prepare for MX7-based module with SPL support.
--- Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Kconfig +1 -1
@@ -539,7 +539,7 @@ config BUILD_TARGET default "u-boot-elf.srec" if RCAR_64 default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT default "u-boot-with-spl.bin" if MPC85xx && !E500MC && !E5500 && !E6500 && SPL - default "u-boot-with-spl.imx" if ARCH_MX6 && SPL + default "u-boot-with-spl.imx" if (ARCH_MX6 || ARCH_MX7) && SPL default "u-boot-with-spl.kwb" if ARMADA_32BIT && SPL default "u-boot-with-spl.sfp" if ARCH_SOCFPGA_ARRIA10 default "u-boot-with-spl.sfp" if ARCH_SOCFPGA_GEN5
Signature · 1 line
2.43.0
PATCH v4 2/8 board/tq: Add common SoM API
In reply to Alexander FeilkeFrom: Alexander Feilke <[email protected]>
Reduce code duplication by adding a default implementation.
--- board/tq/common/Kconfig | 3 +++ board/tq/common/Makefile | 1 + board/tq/common/tq_som.c | 32 ++++++++++++++++++++++++++++++++ board/tq/common/tq_som.h | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) create mode 100644 board/tq/common/tq_som.c create mode 100644 board/tq/common/tq_som.h
board/tq/common/Kconfig +3 -0
@@ -11,3 +11,6 @@ config TQ_COMMON_BB config TQ_COMMON_SDMMC bool + +config TQ_COMMON_SOM + bool
board/tq/common/Makefile +1 -0
@@ -6,4 +6,5 @@ # obj-$(CONFIG_TQ_COMMON_BB) += tq_bb.o +obj-$(CONFIG_TQ_COMMON_SOM) += tq_som.o obj-$(CONFIG_TQ_COMMON_SDMMC) += tq_sdmmc.o
board/tq/common/tq_som.c new file +32 -0
@@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (c) 2025-2026 TQ-Systems GmbH <[email protected]>, +* D-82229 Seefeld, Germany. +* Author: Alexander Feilke, Max Merchel +*/ + +#include <init.h> +#include <asm/io.h> +#include <linux/sizes.h> + +#include "tq_som.h" + +void __weak tq_som_ram_init (void ) +{ + ; +} + +/* +* checks if the accessible range equals the requested RAM size. +* returns true if successful, false otherwise +*/ +bool tq_som_ram_check_size (long ram_size) +{ +long size; + + size =get_ram_size ((void *)PHYS_SDRAM , ram_size); +debug ("SPL: requested RAM size %lu MiB. accessible %lu MiB\n" , + ram_size / (SZ_1M ), size / (SZ_1M )); + +return (size == ram_size); +}
board/tq/common/tq_som.h new file +35 -0
@@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (c) 2025-2026 TQ-Systems GmbH <[email protected]>, +* D-82229 Seefeld, Germany. +* Author: Alexander Feilke, Max Merchel +*/ + +#ifndef __TQ_SOM_H +#define __TQ_SOM_H + +#include <init.h> +#include <asm/io.h> +#include <linux/iopoll.h> + +void tq_som_ram_init (void ); + +/* used as a wrapper to write to specific register addresses */ +static inline void tq_som_init_write_reg (u32 address,u32 value) +{ +writel_relaxed (value, address); +} + +/* +* checks if the accessible range equals the requested ram size. +* returns true if successful, false otherwise +*/ +bool tq_som_ram_check_size (long ram_size); + +static inline void tq_som_check_bits_set (u32 address,u32 mask) +{ +u32 val; +readl_poll_timeout (address, val, (val & mask) == mask,1000 ); +} + +#endif /* __TQ_SOM_H */
Signature · 1 line
2.43.0
PATCH v4 3/8 env: add env_set_runtime() helper
In reply to Alexander FeilkeFrom: Nora Schiffer <[email protected]>
env_set_runtime() is equivalent to env_set(), but does nothing when CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is unset.
--- include/env.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
include/env.h +20 -0
@@ -9,6 +9,7 @@#ifndef __ENV_H#define __ENV_H +#include <config.h> #include <compiler.h> #include <stdbool.h> #include <linux/types.h>
@@ -160,6 +161,25 @@ bool env_get_autostart(void);*/ int env_set (const char *varname,const char *value); +/** +* env_set_runtime() - set an environment variable if +* CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is set. +* +* This is equivalent to env_set(), but does nothing if +* CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is unset. +* +* @varname: Variable to adjust +* @value: Value to set for the variable, or NULL or "" to delete the variable +* @return 0 if OK or !CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG, 1 on error +*/ +static inline int env_set_runtime (const char *varname,const char *value) +{ +if (IS_ENABLED (CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG )) +return env_set (varname, value); + +return 0 ; +} +/** * env_get_ulong() - Return an environment variable as an integer value *
Signature · 1 line
2.43.0
PATCH v4 4/8 arch: arm: dts: tqma7x: add u-boot device tree fragments
In reply to Alexander FeilkeFrom: Alexander Feilke <[email protected]>
Add u-boot specific device tree properties.
--- arch/arm/dts/imx7d-mba7-u-boot.dtsi | 10 ++++++++++ arch/arm/dts/imx7s-mba7-u-boot.dtsi | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 arch/arm/dts/imx7d-mba7-u-boot.dtsi create mode 100644 arch/arm/dts/imx7s-mba7-u-boot.dtsi
arch/arm/dts/imx7d-mba7-u-boot.dtsi new file +10 -0
@@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Device Tree Source for TQ-Systems TQMa7D board on MBa7x carrier board. + * + * Copyright (C) 2024-2026 TQ-Systems GmbH <[email protected]>, + * D-82229 Seefeld, Germany + * Author: Steffen Doster + */ + +#include "imx7s-mba7-u-boot.dtsi"
arch/arm/dts/imx7s-mba7-u-boot.dtsi new file +27 -0
@@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Device Tree Source for TQ-Systems TQMa7S board on MBa7x carrier board. + * + * Copyright (C) 2025-2026 TQ-Systems GmbH <[email protected]>, + * D-82229 Seefeld, Germany + * Author: Steffen Doster + */ + +#include "imx7s-u-boot.dtsi" + +/ { + config { + u-boot,mmc-env-offset = <0x100000>; + u-boot,mmc-env-offset-redundant = <0x110000>; + }; + + wdt-reboot { + compatible = "wdt-reboot"; + wdt = <&wdog1>; + }; +}; + +&wdog1 { + u-boot,noautostart; + timeout-sec = <60>; +};
Signature · 1 line
2.43.0
PATCH v4 5/8 arch: arm: dts: tqma7x: add boot phase properties
In reply to Alexander FeilkeFrom: Alexander Feilke <[email protected]>
Revert this commit once the upstream linux device trees are synchronized.
--- arch/arm/dts/imx7s-mba7-u-boot.dtsi | 23 ++++++++++++++++++++++- arch/arm/dts/imx7s-tqma7-u-boot.dtsi | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/imx7s-tqma7-u-boot.dtsi
arch/arm/dts/imx7s-mba7-u-boot.dtsi +22 -1
@@ -7,7 +7,7 @@ * Author: Steffen Doster */ -#include "imx7s-u-boot.dtsi" +#include "imx7s-tqma7-u-boot.dtsi" / { config {
@@ -21,7 +21,28 @@ }; }; +&gpio4 { + /* Deassert BOOT_EN after boot to separate BOOT_CFG circuits from LCD signals */ + boot-en-hog { + gpio-hog; + gpios = <3 GPIO_ACTIVE_LOW>; + output-low; + }; +}; + &wdog1 { u-boot,noautostart; timeout-sec = <60>; }; + +&iomuxc { + bootph-pre-ram; +}; + +&pinctrl_uart6 { + bootph-pre-ram; +}; + +&uart6 { + bootph-pre-ram; +};
arch/arm/dts/imx7s-tqma7-u-boot.dtsi new file +22 -0
@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Device Tree Source for TQ-Systems TQMa7S module. + * + * Copyright (C) 2024-2026 TQ-Systems GmbH <[email protected]>, + * D-82229 Seefeld, Germany + * Author: Steffen Doster + */ + +#include "imx7s-u-boot.dtsi" + +&soc { + bootph-pre-ram; +}; + +&aips1 { + bootph-pre-ram; +}; + +&aips3 { + bootph-pre-ram; +};
Signature · 1 line
2.43.0
Fabio Estevam
reviewerRe: [PATCH v4 5/8] arch: arm: dts: tqma7x: add boot phase properties
Quoted 5 lines · Alexander Feilke
From: Alexander Feilke <[email protected]>
Revert this commit once the upstream linux device trees are synchronized.
Can you add the link to the upstream submission?
Re: [PATCH v4 5/8] arch: arm: dts: tqma7x: add boot phase properties
Quoted 1 line · Fabio Estevam
Can you add the link to the upstream submission?
Here is the link on lkml: https://lkml.org/lkml/2026/3/6/1623
Best regards,
Alexander
PATCH v4 6/8 board: tqma7: add code for u-boot with spl
In reply to Alexander FeilkeFrom: Alexander Feilke <[email protected]>
The TQMa7x is a SoM family with a pluggable board connector based on the i.MX7 SoCs. Add support for the SoM and its combination with our MBa7x carrier board.
--- arch/arm/mach-imx/mx7/Kconfig | 16 +++ board/tq/MAINTAINERS | 9 ++ board/tq/tqma7/Kconfig | 103 +++++++++++++++++++ board/tq/tqma7/Makefile | 14 +++ board/tq/tqma7/spl.c | 123 ++++++++++++++++++++++ board/tq/tqma7/spl_mba7.c | 182 +++++++++++++++++++++++++++++++++ board/tq/tqma7/spl_tqma7_ram.c | 171 +++++++++++++++++++++++++++++++ board/tq/tqma7/tqma7.c | 96 +++++++++++++++++ board/tq/tqma7/tqma7.cfg | 26 +++++ board/tq/tqma7/tqma7.env | 35 +++++++ board/tq/tqma7/tqma7_mba7.c | 148 +++++++++++++++++++++++++++ include/configs/tqma7.h | 71 +++++++++++++ include/configs/tqma7_mba7.h | 16 +++ include/env/tq/spi.env | 4 + 14 files changed, 1014 insertions(+) create mode 100644 board/tq/tqma7/Kconfig create mode 100644 board/tq/tqma7/Makefile create mode 100644 board/tq/tqma7/spl.c create mode 100644 board/tq/tqma7/spl_mba7.c create mode 100644 board/tq/tqma7/spl_tqma7_ram.c create mode 100644 board/tq/tqma7/tqma7.c create mode 100644 board/tq/tqma7/tqma7.cfg create mode 100644 board/tq/tqma7/tqma7.env create mode 100644 board/tq/tqma7/tqma7_mba7.c create mode 100644 include/configs/tqma7.h create mode 100644 include/configs/tqma7_mba7.h
arch/arm/mach-imx/mx7/Kconfig +16 -0
@@ -90,6 +90,21 @@ config TARGET_COLIBRI_IMX7 select MX7D imply CMD_DM +config TARGET_TQMA7 + bool "TQ-Systems TQMa7x SoM" + select BOARD_LATE_INIT + select SUPPORT_SPL + select SPL_SEPARATE_BSS if SPL + select DM + select DM_SERIAL + select MX7 + imply MX7D + imply CMD_DM + imply DM_THERMAL + help + TQMa7x is a TQ SoM with i.MX7 CPU + The SoM can be used on various baseboards. + endchoice config SYS_SOC
@@ -102,6 +117,7 @@ source "board/novtech/meerkat96/Kconfig" source "board/storopack/smegw01/Kconfig" source "board/technexion/pico-imx7d/Kconfig" source "board/toradex/colibri_imx7/Kconfig" +source "board/tq/tqma7/Kconfig" source "board/warp7/Kconfig" endif
board/tq/MAINTAINERS +9 -0
@@ -6,3 +6,12 @@ W: https://www.tq-group.com/en/products/tq-embedded/ F: arch/arm/dts/*mba6*.dts* F: arch/arm/dts/*tqma6*.dts* F: configs/tqma6*config + +TQMA7 +M: Alexander Feilke <[email protected]> +L: [email protected] +S: Maintained +W: https://www.tq-group.com/en/products/tq-embedded/ +F: arch/arm/dts/*mba7*.dts* +F: arch/arm/dts/*tqma7*.dts* +F: configs/tqma7*config
board/tq/tqma7/Kconfig new file +103 -0
103 lines not on this page · raw message
board/tq/tqma7/Makefile new file +14 -0
@@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (c) 2016-2026 TQ-Systems GmbH <[email protected]>, +# D-82229 Seefeld, Germany. + + +obj-y += tqma7.o +obj-$(CONFIG_MBA7) += tqma7_mba7.o + +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +obj-y += spl_tqma7_ram.o +obj-$(CONFIG_MBA7) += spl_mba7.o +endif
board/tq/tqma7/spl.c new file +123 -0
123 lines not on this page · raw message
board/tq/tqma7/spl_mba7.c new file +182 -0
182 lines not on this page · raw message
board/tq/tqma7/spl_tqma7_ram.c new file +171 -0
171 lines not on this page · raw message
board/tq/tqma7/tqma7.c new file +96 -0
96 lines not on this page · raw message
board/tq/tqma7/tqma7.cfg new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (c) 2016-2026 TQ-Systems GmbH <[email protected]>, + * D-82229 Seefeld, Germany. + * Author: Markus Niebel, Steffen Doster + * + * Refer doc/imx/mkimage/imximage.txt for more details about how-to configure + * and create imximage boot image + * + * The syntax is taken as close as possible with the kwbimage + */ + +/* image version */ +IMAGE_VERSION 2 + +#include <config.h> + +/* + * Set to sd even for QSPI boot on i.MX7, as i.MX7 uses offset 0x400 rather + * than 0x1000 for QSPI + */ +BOOT_FROM sd + +#if IS_ENABLED(CONFIG_IMX_HAB) +CSF CONFIG_CSF_SIZE +#endif
board/tq/tqma7/tqma7.env new file +35 -0
@@ -0,0 +1,35 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2024-2026 TQ-Systems GmbH <[email protected]>, + * D-82229 Seefeld, Germany. + * Author: Alexander Feilke + * + * TQMa7x environment + */ + +#include <env/tq/tq-imx-shared.env> + +board=tqma7 +boot_os=bootz "${kernel_addr_r}" - "${fdt_addr_r}" +emmc_bootp_start=TQMA7_MMC_UBOOT_SECTOR_START +emmc_dev=0 +fdt_addr_r=TQMA7_FDT_ADDRESS +fdtoverlay_addr_r=FDT_OVERLAY_ADDR +image=zImage +kernel_addr_r=CONFIG_SYS_LOAD_ADDR +netdev=eth0 +pxefile_addr_r=CONFIG_SYS_LOAD_ADDR +ramdisk_addr_r=TQMA7_INITRD_ADDRESS +sd_dev=1 +uboot=u-boot-with-spl.imx +uboot_mmc_start=TQMA7_MMC_UBOOT_SECTOR_START +uboot_mmc_size=TQMA7_MMC_UBOOT_SECTOR_COUNT +uboot_spi_sector_size=TQMA7_SPI_FLASH_SECTOR_SIZE +uboot_spi_start=TQMA7_SPI_UBOOT_START +uboot_spi_size=TQMA7_SPI_UBOOT_SIZE + +#ifdef CONFIG_FASTBOOT_UUU_SUPPORT +fastboot_partition_alias_all=CONFIG_FASTBOOT_FLASH_MMC_DEV:0 +fastboot_raw_partition_bootloader=TQMA7_MMC_UBOOT_SECTOR_START TQMA7_MMC_UBOOT_SECTOR_COUNT mmcpart 1 +fastbootcmd=fastboot usb 0 +#endif
board/tq/tqma7/tqma7_mba7.c new file +148 -0
148 lines not on this page · raw message
include/configs/tqma7.h new file +71 -0
71 lines not on this page · raw message
include/configs/tqma7_mba7.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (c) 2016-2026 TQ-Systems GmbH <[email protected]>, +* D-82229 Seefeld, Germany. +* Author: Markus Niebel, Steffen Doster +* +* Configuration settings for the TQ-Systems MBa7x carrier board for +* TQMa7x module. +*/ + +#ifndef __CONFIG_TQMA7_MBA7_H +#define __CONFIG_TQMA7_MBA7_H + +#define CFG_MXC_UART_BASE UART6_IPS_BASE_ADDR + +#endif /* __CONFIG_TQMA7_MBA7_H */
include/env/tq/spi.env +4 -0
@@ -20,4 +20,8 @@ update_uboot_spi= fi; fi; +#ifdef CONFIG_CMD_QSPIHDR +write_uboot_spi=qspihdr init ${loadaddr} ${filesize} safe; +#else write_uboot_spi=sf update "${loadaddr}" "${uboot_spi_start}" "${filesize}" +#endif
Signature · 1 line
2.43.0
Fabio Estevam
reviewerRe: [PATCH v4 6/8] board: tqma7: add code for u-boot with spl
board/tq/tqma7/Kconfig line 30
Quoted 12 lines · Alexander Feilke
board/tq/tqma7/Kconfig new file +12
-0+choice + prompt "TQMa7x RAM configuration" + default TQMA7_RAM_MULTI + help + Select RAM configuration. Normally use default here but for + specific setup it is possible to use a single RAM size. + +config TQMA7_RAM_MULTI + bool "TQMa7x with 512/1024/2048 MB RAM - Single image" + select TQMA7_RAM_2G + select TQMA7_RAM_1G + select TQMA7_RAM_512M
Could you detect the RAM size at run time instead?
Take a look at this method, for reference:
https://github.com/u-boot/u-boot/blob/master/board/kontron/sl-mx6ul/spl.c#L271-L295
Then you could get rid of all these TQMA7_RAM_ symbols.
Re: [PATCH v4 6/8] board: tqma7: add code for u-boot with spl
Quoted 1 line · Fabio Estevam
Could you detect the RAM size at run time instead?
The RAM size is already detected at runtime when using the default MULTI config. The separate RAM size configs are necessary in case only a specific RAM size should be used for customer hardware.
Best regards,
Alexander
PATCH v4 7/8 configs: tqma7: add defconfigs
In reply to Alexander FeilkeFrom: Alexander Feilke <[email protected]>
Add general shared configurations for different boot media and variants for every RAM configuration.
--- configs/tqma7_common.config | 119 ++++++++++++++++++++++++++++++ configs/tqma7_mba7_mmc_defconfig | 2 + configs/tqma7_mba7_qspi_defconfig | 2 + configs/tqma7_mba7_uuu_defconfig | 2 + configs/tqma7_mmc.config | 4 + configs/tqma7_qspi.config | 7 ++ configs/tqma7_uuu.config | 22 ++++++ 7 files changed, 158 insertions(+) create mode 100644 configs/tqma7_common.config create mode 100644 configs/tqma7_mba7_mmc_defconfig create mode 100644 configs/tqma7_mba7_qspi_defconfig create mode 100644 configs/tqma7_mba7_uuu_defconfig create mode 100644 configs/tqma7_mmc.config create mode 100644 configs/tqma7_qspi.config create mode 100644 configs/tqma7_uuu.config
configs/tqma7_common.config new file +119 -0
@@ -0,0 +1,119 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX7=y +CONFIG_SPL_GPIO=y +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_SF_DEFAULT_SPEED=40000000 +CONFIG_ENV_SIZE=0x10000 +CONFIG_DEFAULT_DEVICE_TREE="nxp/imx/imx7d-mba7" +CONFIG_TARGET_TQMA7=y +CONFIG_SPL_MMC=y +CONFIG_SPL_SERIAL=y +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +CONFIG_SPL_BSS_MAX_SIZE=0x100000 +CONFIG_SF_DEFAULT_BUS=4 +CONFIG_SPL=y +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y +CONFIG_IMX_RDC=y +CONFIG_SYS_MEMTEST_START=0x80000000 +CONFIG_SYS_MEMTEST_END=0x98000000 +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +# CONFIG_EFI_LOADER is not set +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_BOOTDELAY=3 +CONFIG_OF_BOARD_SETUP=y +CONFIG_FDT_FIXUP_PARTITIONS=y +CONFIG_SYS_CONSOLE_IS_IN_ENV=y +# CONFIG_BOARD_EARLY_INIT_F is not set +CONFIG_SPL_MAX_SIZE=0xf000 +CONFIG_SPL_SYS_MALLOC=y +CONFIG_SPL_FIT_IMAGE_TINY=y +CONFIG_SPL_NOR_SUPPORT=y +CONFIG_SPL_WATCHDOG=y +CONFIG_CMD_LICENSE=y +CONFIG_CRC32_VERIFY=y +CONFIG_CMD_EEPROM=y +CONFIG_CMD_MD5SUM=y +CONFIG_MD5SUM_VERIFY=y +CONFIG_CMD_MEMINFO=y +CONFIG_CMD_MEMTEST=y +CONFIG_SYS_ALT_MEMTEST=y +# CONFIG_SYS_ALT_MEMTEST_BITFLIP is not set +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y +CONFIG_MMC_SPEED_MODE_SET=y +CONFIG_CMD_MTD=y +CONFIG_CMD_SPI=y +CONFIG_CMD_TEMPERATURE=y +CONFIG_CMD_WDT=y +CONFIG_CMD_NFS=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIME=y +CONFIG_CMD_TIMER=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_MTDPARTS=y +CONFIG_MTDIDS_DEFAULT="nor0=30bb0000.qspi" +CONFIG_MTDPARTS_DEFAULT="mtdparts=30bb0000.qspi:4m@0k(bootstream),64k@4096k(env0),64k@4160k(env1),-@6m(ubi)" +CONFIG_CMD_UBI=y +CONFIG_OF_CONTROL=y +CONFIG_OF_UPSTREAM=y +CONFIG_OF_LIST="nxp/imx/imx7d-mba7 nxp/imx/imx7s-mba7" +CONFIG_MULTI_DTB_FIT=y +CONFIG_ENV_OVERWRITE=y +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_USE_ROOTPATH=y +CONFIG_ROOTPATH="/srv/nfs" +CONFIG_BUTTON=y +CONFIG_BUTTON_GPIO=y +CONFIG_GPIO_HOG=y +CONFIG_DM_PCA953X=y +CONFIG_I2C_SET_DEFAULT_BUS_NUM=y +CONFIG_I2C_DEFAULT_BUS_NUMBER=0x3 +CONFIG_SYS_I2C_MXC=y +CONFIG_LED=y +CONFIG_LED_GPIO=y +CONFIG_SUPPORT_EMMC_BOOT=y +CONFIG_FSL_USDHC=y +CONFIG_MTD=y +CONFIG_DM_MTD=y +CONFIG_DM_SPI_FLASH=y +CONFIG_BOOTDEV_SPI_FLASH=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_ISSI=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_WINBOND=y +# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_SPI_FLASH_MTD=y +CONFIG_DM_MDIO=y +CONFIG_DM_ETH_PHY=y +CONFIG_PHY_GIGE=y +CONFIG_FEC_MXC=y +CONFIG_RGMII=y +CONFIG_MII=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX7=y +CONFIG_DM_PMIC=y +CONFIG_DM_PMIC_PFUZE100=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_PFUZE100=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_RTC=y +CONFIG_RTC_DS1307=y +CONFIG_CONS_INDEX=5 +CONFIG_SPI=y +CONFIG_FSL_QSPI=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y +CONFIG_IMX_THERMAL=y +CONFIG_USB_EHCI_HCD=y +CONFIG_MXC_USB_OTG_HACTIVE=y +# CONFIG_WATCHDOG_AUTOSTART is not set +CONFIG_IMX_WATCHDOG=y +CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
configs/tqma7_mba7_mmc_defconfig new file +2 -0
@@ -0,0 +1,2 @@ +#include <configs/tqma7_common.config> +#include <configs/tqma7_mmc.config>
configs/tqma7_mba7_qspi_defconfig new file +2 -0
@@ -0,0 +1,2 @@ +#include <configs/tqma7_common.config> +#include <configs/tqma7_qspi.config>
configs/tqma7_mba7_uuu_defconfig new file +2 -0
@@ -0,0 +1,2 @@ +#include <configs/tqma7_common.config> +#include <configs/tqma7_uuu.config>
configs/tqma7_mmc.config new file +4 -0
@@ -0,0 +1,4 @@ +CONFIG_SYS_MALLOC_LEN=0x2000000 +CONFIG_ENV_OFFSET=0x100000 +CONFIG_BOOTCOMMAND="run mmcboot; run nfsboot; run panicboot" +CONFIG_ENV_MMC_USE_DT=y
configs/tqma7_qspi.config new file +7 -0
@@ -0,0 +1,7 @@ +CONFIG_SYS_MALLOC_LEN=0x2000000 +CONFIG_ENV_OFFSET=0x100000 +CONFIG_ENV_SECT_SIZE=0x10000 +CONFIG_QSPI_BOOT=y +CONFIG_BOOTCOMMAND="run ubiboot; run nfsboot; run panicboot" +# CONFIG_ENV_IS_IN_MMC is not set +CONFIG_ENV_IS_IN_SPI_FLASH=y
configs/tqma7_uuu.config new file +22 -0
@@ -0,0 +1,22 @@ +CONFIG_SYS_MALLOC_LEN=0x2000000 +# CONFIG_ANDROID_BOOT_IMAGE is not set +CONFIG_BOOTDELAY=1 +CONFIG_BOOTCOMMAND="run fastbootcmd" +# CONFIG_ENV_IS_IN_MMC is not set +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x84000000 +CONFIG_FASTBOOT_BUF_SIZE=0x8000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_UUU_SUPPORT=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 +CONFIG_SPL_USB_HOST=y +CONFIG_USB_MAX_CONTROLLER_COUNT=2 +CONFIG_USB_GADGET=y +CONFIG_SPL_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_CI_UDC=y +CONFIG_SDP_LOADADDR=0x80800000 +CONFIG_SPL_USB_SDP_SUPPORT=y
Signature · 1 line
2.43.0
PATCH v4 8/8 doc: tqma7: add documentation
In reply to Alexander FeilkeFrom: Alexander Feilke <[email protected]>
Add readme for the tqma7 board.
--- doc/board/index.rst | 1 + doc/board/tq/index.rst | 12 +++++++ doc/board/tq/tqma7.rst | 77 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 doc/board/tq/index.rst create mode 100644 doc/board/tq/tqma7.rst
doc/board/index.rst +1 -0
@@ -71,6 +71,7 @@ Board-specific doc theobroma-systems/index ti/index toradex/index + tq/index variscite/index wexler/index xen/index
doc/board/tq/index.rst new file +12 -0
@@ -0,0 +1,12 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later or CC-BY-4.0 + +.. Copyright (c) 2024-2026 TQ-Systems GmbH <[email protected]>, +.. D-82229 Seefeld, Germany. + +TQ-Systems +========== + +.. toctree:: + :maxdepth: 2 + + tqma7
doc/board/tq/tqma7.rst new file +77 -0
77 lines not on this page · raw message
Signature · 1 line
2.43.0
Hi,
I created a CI MR on https://github.com/u-boot/u-boot/pull/926
which is running here:
https://dev.azure.com/u-boot/u-boot/_build/results?buildId=13065
Best regards,
Alexander