summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-04-22 10:59:44 -0600
committerTom Rini <[email protected]>2026-04-22 10:59:44 -0600
commit7fbed708d92879a8b199f5113d5e3c3db51c43d3 (patch)
tree7774b4a4bea8f384d9161d7f2310392bef9839ba /include
parent09297182ad79a4ea30fd6aa74d33646efc4eb12f (diff)
parent589153f6070a285a60411d032ce9b08598acd707 (diff)
Merge tag 'u-boot-imx-master-20260421' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/29880 - Convert TQMA7 boards to SPL. - Use second Ethernet MAC also from fuse on i.MX dhelectronics boards. - Add support for Toradex Verdin iMX95. - Drop SPL_POWER_LEGACY from imx8m boards. - Increase the Aquantia Ethernet PHY reset timeout.
Diffstat (limited to 'include')
-rw-r--r--include/configs/tqma7.h71
-rw-r--r--include/configs/tqma7_mba7.h16
-rw-r--r--include/configs/verdin-imx95.h27
-rw-r--r--include/env.h20
-rw-r--r--include/env/tq/spi.env4
-rw-r--r--include/init.h7
6 files changed, 145 insertions, 0 deletions
diff --git a/include/configs/tqma7.h b/include/configs/tqma7.h
new file mode 100644
index 00000000000..6b77139f09d
--- /dev/null
+++ b/include/configs/tqma7.h
@@ -0,0 +1,71 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ *
+ * Copyright (c) 2016-2026 TQ-Systems GmbH <[email protected]>,
+ * D-82229 Seefeld, Germany.
+ * Author: Markus Niebel, Steffen Doster
+ *
+ * Configuration settings for the TQ-Systems TQMa7x SOM
+ */
+
+#ifndef __TQMA7_CONFIG_H
+#define __TQMA7_CONFIG_H
+
+#include "mx7_common.h"
+#include <linux/build_bug.h>
+
+/* MMC Configs */
+#define CFG_SYS_FSL_ESDHC_ADDR 0
+
+/*
+ * 128 MiB offset as recommended in Linux' `Documentation/arch/arm/booting.rst`
+ * TQMA7_FDT_ADDRESS = MMDC0_ARB_BASE_ADDR + 0x8000000
+ */
+#define TQMA7_FDT_ADDRESS 0x88000000
+/* FDT_OVERLAY_ADDR = (TQMA7_FDT_ADDRESS + SZ_256K) */
+#define FDT_OVERLAY_ADDR 0x88040000
+/*
+ * DTB is loaded at 128 MiB, so use just 16 MiB more
+ * TQMA7_INITRD_ADDRESS = (TQMA7_FDT_ADDRESS + SZ_16M)
+ */
+#define TQMA7_INITRD_ADDRESS 0x89000000
+
+#ifndef __ASSEMBLY__
+
+static_assert(TQMA7_FDT_ADDRESS == (MMDC0_ARB_BASE_ADDR + 0x8000000));
+static_assert(FDT_OVERLAY_ADDR == (TQMA7_FDT_ADDRESS + SZ_256K));
+static_assert(TQMA7_INITRD_ADDRESS == (TQMA7_FDT_ADDRESS + SZ_16M));
+
+#endif
+
+#define TQMA7_UBOOT_OFFSET SZ_1K
+#define TQMA7_MMC_UBOOT_SECTOR_START 0x2
+#define TQMA7_MMC_UBOOT_SECTOR_COUNT 0x7fe
+#define TQMA7_SPI_FLASH_SECTOR_SIZE SZ_64K
+#define TQMA7_SPI_UBOOT_START 0x1000
+#define TQMA7_SPI_UBOOT_SIZE 0xf0000
+
+/* Physical Memory Map */
+#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
+
+#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
+#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
+#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
+
+/* u-boot.img base address for SPI-NOR boot */
+#define CFG_SYS_UBOOT_BASE (QSPI0_ARB_BASE_ADDR + TQMA7_UBOOT_OFFSET + CONFIG_SPL_PAD_TO)
+
+/*
+ * All the defines above are for the TQMa7x SoM
+ *
+ * Now include the baseboard specific configuration
+ */
+
+#if IS_ENABLED(CONFIG_MBA7)
+#include "tqma7_mba7.h"
+#else
+#error "No baseboard for the TQMa7x SOM defined!"
+#endif
+
+#endif /* __TQMA7_CONFIG_H */
diff --git a/include/configs/tqma7_mba7.h b/include/configs/tqma7_mba7.h
new file mode 100644
index 00000000000..8b6ac6d4fc0
--- /dev/null
+++ b/include/configs/tqma7_mba7.h
@@ -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 */
diff --git a/include/configs/verdin-imx95.h b/include/configs/verdin-imx95.h
new file mode 100644
index 00000000000..30eb2e01460
--- /dev/null
+++ b/include/configs/verdin-imx95.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Copyright (c) Toradex */
+
+#ifndef __VERDIN_IMX95_H
+#define __VERDIN_IMX95_H
+
+#include <linux/sizes.h>
+#include <asm/arch/imx-regs.h>
+
+/* For 32GB modules: 2GB from 0x80000000..0xffffffff, 30GB above.
+ * Actual size is determined at runtime.
+ */
+#define SZ_30G _AC(0x780000000, ULL)
+
+/* The first 256MB of SDRAM is reserved for firmware (Cortex M7) */
+#define PHYS_SDRAM_FW_RSVD SZ_256M
+#define CFG_SYS_INIT_RAM_ADDR PHYS_SDRAM
+#define CFG_SYS_INIT_RAM_SIZE SZ_2M
+
+#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
+#define PHYS_SDRAM (0x80000000 + PHYS_SDRAM_FW_RSVD)
+#define PHYS_SDRAM_SIZE (SZ_2G - PHYS_SDRAM_FW_RSVD)
+#define PHYS_SDRAM_2_SIZE SZ_30G
+
+#define WDOG_BASE_ADDR WDG3_BASE_ADDR
+
+#endif
diff --git a/include/env.h b/include/env.h
index 01c3eeae7e2..9b872fb26eb 100644
--- a/include/env.h
+++ b/include/env.h
@@ -9,6 +9,7 @@
#ifndef __ENV_H
#define __ENV_H
+#include <config.h>
#include <compiler.h>
#include <stdbool.h>
#include <linux/types.h>
@@ -161,6 +162,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
*
* Most U-Boot environment variables store hex values. For those which store
diff --git a/include/env/tq/spi.env b/include/env/tq/spi.env
index 47dcfea7d3f..242aa4da784 100644
--- a/include/env/tq/spi.env
+++ b/include/env/tq/spi.env
@@ -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
diff --git a/include/init.h b/include/init.h
index 1e375da4893..c31ebd83b85 100644
--- a/include/init.h
+++ b/include/init.h
@@ -14,6 +14,12 @@
#include <linux/types.h>
+struct ram_alias_check {
+ void *probe_addr;
+ void *alias_addr;
+ long size;
+};
+
/*
* In case of the EFI app the UEFI firmware provides the low-level
* initialisation.
@@ -88,6 +94,7 @@ int dram_init(void);
int dram_init_banksize(void);
long get_ram_size(long *base, long size);
+long probe_ram_size_by_alias(const struct ram_alias_check *checks);
phys_size_t get_effective_memsize(void);
int testdram(void);