Skip to contentSkip to conversation

board: toradex: add Toradex SMARC iMX95

PATCH Applied Ernest Van Hoecke 2 participants 2 messages Oct 27, 2025 – Oct 31, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: toradex: add Toradex SMARC iMX95

From: João Paulo Gonçalves <[email protected]>

Add support for the Toradex SMARC iMX95.

---
Device tree is being upstreamed to Linux. [1] Later, we can switch to OF_UPSTREAM.

[1]: https://lore.kernel.org/all/[email protected]/

---
 .../dts/imx95-toradex-smarc-dev-u-boot.dtsi   |  110 ++
 arch/arm/dts/imx95-toradex-smarc-dev.dts      |  277 ++++
 arch/arm/dts/imx95-toradex-smarc.dtsi         | 1153 +++++++++++++++++
 arch/arm/mach-imx/imx9/Kconfig                |    5 +
 board/toradex/smarc-imx95/Kconfig             |   36 +
 board/toradex/smarc-imx95/MAINTAINERS         |   11 +
 board/toradex/smarc-imx95/Makefile            |    8 +
 board/toradex/smarc-imx95/smarc-imx95.c       |   31 +
 board/toradex/smarc-imx95/smarc-imx95.env     |   20 +
 board/toradex/smarc-imx95/spl.c               |  119 ++
 configs/toradex-smarc-imx95_defconfig         |  172 +++
 doc/board/toradex/index.rst                   |    1 +
 doc/board/toradex/smarc-imx95.rst             |  172 +++
 include/configs/toradex-smarc-imx95.h         |   24 +
 14 files changed, 2139 insertions(+)
 create mode 100644 arch/arm/dts/imx95-toradex-smarc-dev-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx95-toradex-smarc-dev.dts
 create mode 100644 arch/arm/dts/imx95-toradex-smarc.dtsi
 create mode 100644 board/toradex/smarc-imx95/Kconfig
 create mode 100644 board/toradex/smarc-imx95/MAINTAINERS
 create mode 100644 board/toradex/smarc-imx95/Makefile
 create mode 100644 board/toradex/smarc-imx95/smarc-imx95.c
 create mode 100644 board/toradex/smarc-imx95/smarc-imx95.env
 create mode 100644 board/toradex/smarc-imx95/spl.c
 create mode 100644 configs/toradex-smarc-imx95_defconfig
 create mode 100644 doc/board/toradex/smarc-imx95.rst
 create mode 100644 include/configs/toradex-smarc-imx95.h
arch/arm/dts/imx95-toradex-smarc-dev-u-boot.dtsi new file +110 -0
new file mode 100644
index 000000000000..97ce7402e503
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/* Copyright (C) 2025 Toradex */
+
+#include "imx95-u-boot.dtsi"
+
+/ {
+	sysinfo {
+		compatible = "toradex,sysinfo";
+	};
+};
+
+&gpio1 {
+	reg = <0 0x47400000 0 0x1000>, <0 0x47400040 0 0x40>;
+	bootph-pre-ram;
+};
+
+&lpi2c4 {
+	bootph-pre-ram;
+};
+
+&lpuart1 {
+	clocks = <&scmi_clk IMX95_CLK_LPUART1>, <&scmi_clk IMX95_CLK_LPUART1>;
+	clock-names = "ipg", "per";
+	bootph-pre-ram;
+};
+
+/* Conflict with JTAG interface */
+&lpuart5 {
+	status = "disabled";
+};
+
+&pinctrl_lpi2c4 {
+	bootph-pre-ram;
+};
+
+&pinctrl_lpi2c4_gpio {
+	bootph-pre-ram;
+};
+
+&pinctrl_uart1 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc1 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc1_200mhz {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_200mhz {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_cd {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_pwr_en {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_vsel {
+	bootph-pre-ram;
+};
+
+&reg_usdhc2_vmmc {
+	bootph-pre-ram;
+};
+
+&reg_usdhc2_vqmmc {
+	bootph-pre-ram;
+};
+
+&som_gpio_expander_0 {
+	bootph-pre-ram;
+};
+
+&som_gpio_expander_1 {
+	bootph-pre-ram;
+};
+
+&usb2 {
+	/delete-property/power-domains;
+};
+
+&usb3 {
+	status = "disabled";
+};
+
+&usb3_dwc3 {
+	status = "disabled";
+};
+
+&usdhc1 {
+	bootph-pre-ram;
+};
+
+&usdhc2 {
+	bootph-pre-ram;
+};
+
+&wdog3 {
+	status = "disabled";
+};
arch/arm/dts/imx95-toradex-smarc-dev.dts new file +277 -0

277 lines not on this page · raw message

arch/arm/dts/imx95-toradex-smarc.dtsi new file +1153 -0

1,153 lines not on this page · raw message

arch/arm/mach-imx/imx9/Kconfig +5 -0
index 48f458fa55c0..6ad02b9d5810 100644
@@ -113,6 +113,10 @@ config TARGET_IMX943_EVK
 	imply BOOTSTD_FULL
 	imply OF_UPSTREAM
 
+config TARGET_TORADEX_SMARC_IMX95
+	bool "Support Toradex SMARC iMX95"
+	select IMX95
+
 endchoice
 
 source "board/freescale/imx91_evk/Kconfig"
@@ -123,6 +127,7 @@ source "board/phytec/phycore_imx93/Kconfig"
 source "board/variscite/imx93_var_som/Kconfig"
 source "board/freescale/imx94_evk/Kconfig"
 source "board/freescale/imx95_evk/Kconfig"
+source "board/toradex/smarc-imx95/Kconfig"
 
 endif
 
board/toradex/smarc-imx95/Kconfig new file +36 -0
new file mode 100644
index 000000000000..97b2c3da1884
@@ -0,0 +1,36 @@
+if TARGET_TORADEX_SMARC_IMX95
+
+config SYS_BOARD
+	default "smarc-imx95"
+
+config SYS_VENDOR
+	default "toradex"
+
+config SYS_CONFIG_NAME
+	default "toradex-smarc-imx95"
+
+config TDX_CFG_BLOCK
+	default y
+
+config TDX_CFG_BLOCK_2ND_ETHADDR
+	default y
+
+config TDX_CFG_BLOCK_DEV
+	default "0"
+
+# Toradex config block in eMMC, at the end of 1st "boot sector"
+config TDX_CFG_BLOCK_OFFSET
+	default "-512"
+
+config TDX_CFG_BLOCK_PART
+	default "1"
+
+config TDX_HAVE_EEPROM_EXTRA
+	default y
+
+config TDX_HAVE_MMC
+	default y
+
+source "board/toradex/common/Kconfig"
+
+endif
board/toradex/smarc-imx95/MAINTAINERS new file +11 -0
new file mode 100644
index 000000000000..73517d36f1f2
@@ -0,0 +1,11 @@
+Toradex SMARC iMX95
+F:	arch/arm/dts/imx95-toradex-smarc.dtsi
+F:	arch/arm/dts/imx95-toradex-smarc-dev.dts
+F:	arch/arm/dts/imx95-toradex-smarc-dev-u-boot.dtsi
+F:	board/toradex/smarc-imx95/
+F:	configs/toradex-smarc-imx95_defconfig
+F:	doc/board/toradex/smarc-imx95.rst
+F:	include/configs/toradex-smarc-imx95.h
+M:	Francesco Dolcini <[email protected]>
+S:	Maintained
+W:	https://www.toradex.com/computer-on-modules/smarc-arm-family/nxp-imx95
board/toradex/smarc-imx95/Makefile new file +8 -0
new file mode 100644
index 000000000000..e5d0b0c7e8c1
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (C) 2025 Toradex
+
+obj-y += smarc-imx95.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+endif
board/toradex/smarc-imx95/smarc-imx95.c new file +31 -0
new file mode 100644
index 000000000000..c2cf872d9f9d
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/* Copyright (C) 2025 Toradex */
+
+#include <asm/arch/clock.h>
+#include <asm/arch/sys_proto.h>
+#include <fdt_support.h>
+#include <init.h>
+
+#include "../common/tdx-cfg-block.h"
+
+int board_early_init_f(void)
+{
+	/* UART1: A55 */
+	init_uart_clk(0);
+
+	return 0;
+}
+
+int board_phys_sdram_size(phys_size_t *size)
+{
+	*size = PHYS_SDRAM_SIZE + PHYS_SDRAM_2_SIZE;
+
+	return 0;
+}
+
+#if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP)
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+	return ft_common_board_setup(blob, bd);
+}
+#endif
board/toradex/smarc-imx95/smarc-imx95.env new file +20 -0
new file mode 100644
index 000000000000..b94250bbc52e
@@ -0,0 +1,20 @@
+boot_scripts=boot.scr
+boot_script_dhcp=boot.scr
+boot_targets=mmc1 mmc0 dhcp
+console=ttyLP1
+fdt_board=dev
+fdt_addr=0x9c400000
+fdt_addr_r=0x9c400000
+kernel_addr_r=CONFIG_SYS_LOAD_ADDR
+kernel_comp_addr_r=0x94400000
+kernel_comp_size=0x8000000
+ramdisk_addr_r=0x9c800000
+scriptaddr=0x9c600000
+
+update_uboot=
+		askenv confirm Did you load flash.bin (y/N)?;
+		if test $confirm = y; then
+			setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt
+			${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0
+			${blkcnt};
+		fi
board/toradex/smarc-imx95/spl.c new file +119 -0

119 lines not on this page · raw message

configs/toradex-smarc-imx95_defconfig new file +172 -0

172 lines not on this page · raw message

doc/board/toradex/index.rst +1 -0
index 68934566ad7c..b6d49cc187e2 100644
@@ -10,6 +10,7 @@ Toradex
    colibri_imx7
    colibri-imx8x
    smarc-imx8mp
+   smarc-imx95
    verdin-am62
    verdin-am62p
    verdin-imx8mm
doc/board/toradex/smarc-imx95.rst new file +172 -0

172 lines not on this page · raw message

include/configs/toradex-smarc-imx95.h new file +24 -0
new file mode 100644
index 000000000000..e1aebd70af2d
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* Copyright (C) 2025 Toradex */
+
+#ifndef __IMX95_TORADEX_SMARC_H
+#define __IMX95_TORADEX_SMARC_H
+
+#include <linux/sizes.h>
+#include <asm/arch/imx-regs.h>
+
+/* module has 8GB, 2GB from 0x80000000..0xffffffff, 6GB above */
+#define SZ_6G	_AC(0x180000000, ULL)
+
+/* first 256MB reserved for firmware */
+#define CFG_SYS_INIT_RAM_ADDR	0x90000000
+#define CFG_SYS_INIT_RAM_SIZE	SZ_2M
+
+#define CFG_SYS_SDRAM_BASE	0x90000000
+#define PHYS_SDRAM		0x90000000
+#define PHYS_SDRAM_SIZE		(SZ_2G - SZ_256M)
+#define PHYS_SDRAM_2_SIZE	SZ_6G
+
+#define WDOG_BASE_ADDR	WDG3_BASE_ADDR
+
+#endif
Signature · 1 line
2.43.0
reviewer Applied
#1 lore raw