Skip to contentSkip to conversation

Add support for TQMa7x

PATCH Superseded Alexander Feilke 2 participants 11 messages Mar 26 – Apr 7

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 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.

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

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

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/tq/index.rst               |  12 ++
 doc/board/tq/tqma7.rst               |  77 ++++++++++++
 include/configs/tqma7.h              |  71 +++++++++++
 include/configs/tqma7_mba7.h         |  16 +++
 include/env.h                        |  19 +++
 include/env/tq/spi.env               |   4 +
 32 files changed, 1432 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.34.1
#1 lore raw

PATCH v3 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
index b52331d6ff2..4bc05d43ee2 100644
@@ -522,7 +522,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.34.1
#2 lore raw

PATCH v3 2/8 board/tq: Add common SoM API

In reply to Alexander Feilke

From: 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
index a1896929ea3..2fe2ca30072 100644
@@ -11,3 +11,6 @@ config TQ_COMMON_BB
 
 config TQ_COMMON_SDMMC
 	bool
+
+config TQ_COMMON_SOM
+	bool
board/tq/common/Makefile +1 -0
index ac564a713fd..4af9207da4a 100644
@@ -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
new file mode 100644
index 00000000000..6fb4839109b
@@ -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
new file mode 100644
index 00000000000..0ab01d51f99
@@ -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.34.1
#3 lore raw

PATCH v3 3/8 env: add env_set_runtime() helper

In reply to Alexander Feilke

From: 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 | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
include/env.h +19 -0
index 01c3eeae7e2..193aff8f23b 100644
@@ -160,6 +160,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.34.1
#4 lore raw

PATCH v3 4/8 arch: arm: dts: tqma7x: add u-boot device tree fragments

In reply to Alexander Feilke

From: 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
new file mode 100644
index 00000000000..3ccc95a7ac6
@@ -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
new file mode 100644
index 00000000000..2ed3f9c4769
@@ -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.34.1
#5 lore raw

PATCH v3 5/8 arch: arm: dts: tqma7x: add boot phase properties

In reply to Alexander Feilke

From: 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
index 2ed3f9c4769..bb560f4d85b 100644
@@ -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
new file mode 100644
index 00000000000..2d1d614cd57
@@ -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.34.1
#6 lore raw

PATCH v3 6/8 board: tqma7: add code for u-boot with spl

In reply to Alexander Feilke

From: 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
index f576ee650f0..597eca142af 100644
@@ -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
index e6f3dc4da21..b31c5793432 100644
@@ -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
new file mode 100644
index 00000000000..b1fb270e861
@@ -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
new file mode 100644
index 00000000000..2e807d62348
@@ -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
new file mode 100644
index 00000000000..857f16d11bb
@@ -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
new file mode 100644
index 00000000000..8b6ac6d4fc0
@@ -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
index 47dcfea7d3f..242aa4da784 100644
@@ -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.34.1
#7 lore raw

PATCH v3 7/8 configs: tqma7: add defconfigs

In reply to Alexander Feilke

From: 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
new file mode 100644
index 00000000000..7e5e31a14ab
@@ -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
new file mode 100644
index 00000000000..9d4a37c5b81
@@ -0,0 +1,2 @@
+#include <configs/tqma7_common.config>
+#include <configs/tqma7_mmc.config>
configs/tqma7_mba7_qspi_defconfig new file +2 -0
new file mode 100644
index 00000000000..041339597b4
@@ -0,0 +1,2 @@
+#include <configs/tqma7_common.config>
+#include <configs/tqma7_qspi.config>
configs/tqma7_mba7_uuu_defconfig new file +2 -0
new file mode 100644
index 00000000000..18404b02ed8
@@ -0,0 +1,2 @@
+#include <configs/tqma7_common.config>
+#include <configs/tqma7_uuu.config>
configs/tqma7_mmc.config new file +4 -0
new file mode 100644
index 00000000000..8c081314002
@@ -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
new file mode 100644
index 00000000000..652abb8d14b
@@ -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
new file mode 100644
index 00000000000..6131aa5b4b4
@@ -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.34.1
#8 lore raw

PATCH v3 8/8 doc: tqma7: add documentation

In reply to Alexander Feilke

From: Alexander Feilke <[email protected]>

Add readme for the tqma7 board.

---
 doc/board/tq/index.rst | 12 +++++++
 doc/board/tq/tqma7.rst | 77 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+)
 create mode 100644 doc/board/tq/index.rst
 create mode 100644 doc/board/tq/tqma7.rst
doc/board/tq/index.rst new file +12 -0
new file mode 100644
index 00000000000..d6dc6101c2c
@@ -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.34.1
reviewer
#9 lore raw
In reply to Alexander Feilke
Quoted 10 lines · Alexander Feilke

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.

Here is a warning while applying your series:

git am ~/Downloads/Add-support-for-TQMa7x.patch
Applying: Kconfig: update build-target for MX7 with SPL
Applying: board/tq: Add common SoM API
Applying: env: add env_set_runtime() helper
Applying: arch: arm: dts: tqma7x: add u-boot device tree fragments
Applying: arch: arm: dts: tqma7x: add boot phase properties
Applying: board: tqma7: add code for u-boot with spl .git/rebase-apply/patch:337: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
Applying: configs: tqma7: add defconfigs
Applying: doc: tqma7: add documentation

Please make sure to run checkpatch/cleanpatch to fix it.

The doc part does not pass CI:

https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/1418796

For v4, make sure to pass it in CI and send me a link for the CI pass.

#10 lore raw
Quoted 5 lines · Fabio Estevam

The doc part does not pass CI:

https://source.denx.de/u-boot/custodians/u-boot-imx/-/jobs/1418796

For v4, make sure to pass it in CI and send me a link for the CI pass.

I set up a repository on gitlab.com and configured a shell and a docker runner on my local machine. The shell executor successfully runs the first stage but fails to run the subsequent stages because of
fatal: destination path '/tmp/uboot-test-hooks' already exists and is not an empty directory. The docker executor fails because of missing ca certificates and some jobs just get stuck at Created fresh repository.with the runner log repeatedly showing the following message:
ERROR: Appending trace to coordinator... error measured raw request: execute
raw request: execute request: couldn't execute PATCH against
https://gitlab.com/api/v4/jobs/13810408111/trace?debug_trace=false: Patch "https://gitlab.com/api/v4/jobs/13810408111/trace?debug_trace=false": EOF runner=orOc9hIHK runner_name=FEILKEA-DOCKER
Is there documentation on how to set up the CI properly, including ca certificates to surpass company restrictions?
Thanks,
Alex