On 1/15/25 2:29 PM, Alice Guo wrote:
From: Ye Li <ye...@nxp.com>
This patch adds i.MX95 19x19 EVK board basic support.
Messaging unit for EdgeLock Secure Enclave, messaging unit for System
Manager, uSDHC for SD Card, gpio, lpuart are supported now.
Signed-off-by: Ye Li <ye...@nxp.com>
Signed-off-by: Alice Guo <alice....@nxp.com>
Reviewed-by: Peng Fan <peng....@nxp.com>
---
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi | 68 ++++++++++
arch/arm/dts/imx95-u-boot.dtsi | 157 +++++++++++++++++++++++
arch/arm/mach-imx/imx9/Kconfig | 6 +
arch/arm/mach-imx/imx9/scmi/container.cfg | 10 ++
arch/arm/mach-imx/imx9/scmi/imximage.cfg | 15 +++
board/freescale/imx95_evk/Kconfig | 12 ++
board/freescale/imx95_evk/MAINTAINERS | 6 +
board/freescale/imx95_evk/Makefile | 11 ++
board/freescale/imx95_evk/imx95_19x19_evk.env | 90 +++++++++++++
board/freescale/imx95_evk/imx95_evk.c | 54 ++++++++
board/freescale/imx95_evk/spl.c | 72 +++++++++++
configs/imx95_19x19_evk_defconfig | 177 ++++++++++++++++++++++++++
doc/board/nxp/imx95_evk.rst | 114 +++++++++++++++++
doc/board/nxp/index.rst | 1 +
include/configs/imx95_evk.h | 27 ++++
15 files changed, 820 insertions(+)
diff --git a/arch/arm/dts/imx95-19x19-evk-u-boot.dtsi
b/arch/arm/dts/imx95-19x19-evk-u-boot.dtsi
new file mode 100644
index
0000000000000000000000000000000000000000..2902e8f711c3ef705df27ca4fc7a89d1bd7ffc71
--- /dev/null
+++ b/arch/arm/dts/imx95-19x19-evk-u-boot.dtsi
@@ -0,0 +1,68 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2025 NXP
+ */
+
+#include "imx95-u-boot.dtsi"
+
+&gpio1 {
+ reg = <0 0x47400000 0 0x1000>, <0 0x47400040 0 0x40>;
Why is this override here ?
+};
+
+&lpuart1 {
+ clocks = <&scmi_clk IMX95_CLK_LPUART1>, <&scmi_clk IMX95_CLK_LPUART1>;
+ clock-names = "ipg", "per";
Are these overrides necessary ?
[...]
diff --git a/board/freescale/imx95_evk/imx95_19x19_evk.env
b/board/freescale/imx95_evk/imx95_19x19_evk.env
new file mode 100644
index
0000000000000000000000000000000000000000..8d2b5dfcf07d251c77440bae44d62bff6253dfc7
--- /dev/null
+++ b/board/freescale/imx95_evk/imx95_19x19_evk.env
@@ -0,0 +1,90 @@
+sec_boot=no
+initrd_addr=0x93800000
+emmc_dev=0
+sd_dev=1
+scriptaddr=0x93500000
+kernel_addr_r=CONFIG_SYS_LOAD_ADDR
+image=Image
+splashimage=0xA0000000
+console=ttyLP0,115200 earlycon
+fdt_addr_r=0x93000000
+fdt_addr=0x93000000
+cntr_addr=0xA8000000
+cntr_file=os_cntr_signed.bin
+boot_fit=no
+fdtfile=CONFIG_DEFAULT_FDT_FILE
+bootm_size=0x10000000
+mmcautodetect=yes
+mmcargs=setenv bootargs console=${console} root=${mmcroot}
+loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
+bootscript=echo Running bootscript from mmc ...; source
+loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
+loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
+loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}
+auth_os=auth_cntr ${cntr_addr}
+boot_os=booti ${loadaddr} - ${fdt_addr_r};
+mmcboot=echo Booting from mmc ...;
Did you consider switching to modern "bootflow"/"bootmethod" ?
[...]
+++ b/board/freescale/imx95_evk/imx95_evk.c
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2025 NXP
+ */
+
+#include <env.h>
+#include <init.h>
+#include <asm/global_data.h>
+#include <asm/arch-imx9/ccm_regs.h>
+#include <asm/arch/clock.h>
+#include <fdt_support.h>
+#include <asm/io.h>
+#include <linux/bitfield.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
+#include <miiphy.h>
+#include <netdev.h>
+#include <asm/gpio.h>
+#include <asm/mach-imx/sys_proto.h>
+#include <scmi_agent.h>
+#include <scmi_protocols.h>
+#include "../../../dts/upstream/src/arm64/freescale/imx95-clock.h"
+#include "../../../dts/upstream/src/arm64/freescale/imx95-power.h"
Are all these headers really needed for this trivial C file ? I think
not, so please remove all the unnecessary ones .
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f(void)
+{
+ /* UART1: A55, UART2: M33, UART3: M7 */
+ init_uart_clk(0);
+
+ return 0;
+}
+
+int board_init(void)
+{
+ return 0;
+}
+
+int board_late_init(void)
+{
+#ifdef CONFIG_ENV_IS_IN_MMC
+ board_late_mmc_env_init();
Use if (CONFIG_IS_ENABLED()) ... please fix globally .
[...]
+++ b/include/configs/imx95_evk.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2025 NXP
+ */
+
+#ifndef __IMX95_EVK_H
+#define __IMX95_EVK_H
+
+#include <linux/sizes.h>
+#include <linux/stringify.h>
+#include <asm/arch/imx-regs.h>
+
+#define CFG_SYS_UBOOT_BASE \
+ (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
Is this option really necessary ?
Try and look at CONFIG_POSITION_INDEPENDENT .
+#define CFG_SYS_INIT_RAM_ADDR 0x90000000
+#define CFG_SYS_INIT_RAM_SIZE 0x200000
+
+#define CFG_SYS_SDRAM_BASE 0x90000000
+#define PHYS_SDRAM 0x90000000
+/* Totally 16GB */
+#define PHYS_SDRAM_SIZE 0x70000000 /* 2GB - 256MB DDR */
+#define PHYS_SDRAM_2_SIZE 0x380000000 /* 14GB */
+
+#define WDOG_BASE_ADDR WDG3_BASE_ADDR
Is this watchdog config option needed ?