Skip to contentSkip to conversation

imx: add i.MX95 support

PATCH Superseded Alice Guo 5 participants 34 messages Dec 20, 2024 – Jan 3, 2025

Subsystems (8)

v2 of 11 Superseded Latest is v11 →

lore
Share & tools
lore

Alice Guo

author
#0 lore raw

v2 cover imx: add i.MX95 support

CI:https://dev.azure.com/pengfan/uboot-ci/_build/results?buildId=10

Bootlog:

U-Boot SPL 2025.01-rc4-00356-g9dd9c3256131 (Dec 20 2024 - 10:37:50 +0800) DDRMIX is powered UP
Normal Boot
Trying to boot from MMC2
Primary set selected
Load image from MMC/SD 0xdf400

NOTICE:  BL31: v2.10.0  (release):android-14.0.0_2.2.0-rc1-1-g28affcae9
NOTICE:  BL31: Built : 10:35:32, Aug 29 2024

U-Boot 2025.01-rc4-00356-g9dd9c3256131 (Dec 20 2024 - 10:37:50 +0800)

CPU:   i.MX95 rev1.0 2000 MHz (running at 1800 MHz)
CPU:   Consumer temperature grade (0C to 95C)
Model: NXP i.MX95 19X19 board
DRAM:  15.8 GiB
Core:  231 devices, 20 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1

Loading Environment from MMC... Reading from MMC(1)... *** Warning - bad CRC, using default environment

In:    serial@44380000
Out:   serial@44380000
Err:   serial@44380000

BuildInfo:
- ELE firmware version 1.0.32-193e5781

switch to partitions #0, OK
mmc1 is current device
Net: No ethernet found.
u-boot=>

---
Alice Guo (3):
imx: Kconfig: IMX8_ROMAPI is not configured for i.MX95
binman: add a new entry type for packing DDR PHY firmware images
tools: imx8image: add i.MX95 support

Peng Fan (7):
mailbox: add i.MX95 Messaging Unit (MU) driver
pinctrl: nxp: add SCMI pin control protocol driver
scmi_protocols: add SCMI misc protocol protocol_id and message_id for getting the ROM passover data
scmi_protocols: add SCMI Performance domain management protocol message IDs
clk: scmi: add the command CLOCK_PARENT_SET
imx9: scmi: add i.MX95 SoC and clock related code
scmi: add the macro SCMI_MSG

Teo Hall (1):
imx: add V2X container support on i.MX95

Viorel Suman (1):
firmware: scmi: smt: Interrupt communication enable

Ye Li (5):
clk: scmi: check the clock state/parent/rate control permissions
scmi_protocols: update struct scmi_base_discover_list_protocols_out
imx9: add i.MX95 Kconfig and Makefile
imx9: scmi: soc: Override h_spl_load_read with trampoline buffer
imx95_evk: add i.MX95 19x19 EVK board basic support

 MAINTAINERS                                   |   1 +
 arch/arm/dts/imx95-19x19-evk-u-boot.dtsi      | 224 +++++++
 arch/arm/include/asm/arch-imx/cpu.h           |   3 +
 arch/arm/include/asm/arch-imx9/clock.h        |  10 +-
 arch/arm/include/asm/arch-imx9/imx-regs.h     |   7 +-
 arch/arm/include/asm/arch-imx9/sys_proto.h    |   3 +-
 arch/arm/include/asm/mach-imx/sys_proto.h     |  40 ++
 arch/arm/mach-imx/Kconfig                     |   2 +-
 arch/arm/mach-imx/image-container.c           |  63 +-
 arch/arm/mach-imx/imx9/Kconfig                |  12 +
 arch/arm/mach-imx/imx9/Makefile               |  11 +-
 arch/arm/mach-imx/imx9/scmi/Makefile          |   6 +
 arch/arm/mach-imx/imx9/scmi/clock.c           | 328 ++++++++++
 arch/arm/mach-imx/imx9/scmi/clock_scmi.c      | 148 +++++
 arch/arm/mach-imx/imx9/scmi/container.cfg     |  10 +
 arch/arm/mach-imx/imx9/scmi/imximage.cfg      |  15 +
 arch/arm/mach-imx/imx9/scmi/soc.c             | 873 ++++++++++++++++++++++++++
 arch/sandbox/include/asm/scmi_test.h          |   2 +
 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 |  95 +++
 board/freescale/imx95_evk/imx95_evk.c         |  54 ++
 board/freescale/imx95_evk/spl.c               | 117 ++++
 common/spl/spl_mmc.c                          |   2 +-
 configs/imx95_19x19_evk_defconfig             | 178 ++++++
 doc/board/nxp/imx95_evk.rst                   | 109 ++++
 doc/board/nxp/index.rst                       |   1 +
 drivers/clk/clk_scmi.c                        | 191 +++++-
 drivers/firmware/scmi/sandbox-scmi_agent.c    |  56 +-
 drivers/firmware/scmi/scmi_agent-uclass.c     |  11 +
 drivers/firmware/scmi/smt.c                   |   4 +
 drivers/firmware/scmi/smt.h                   |  10 +
 drivers/mailbox/Kconfig                       |   7 +
 drivers/mailbox/Makefile                      |   1 +
 drivers/mailbox/imx-mailbox.c                 | 417 ++++++++++++
 drivers/pinctrl/nxp/Kconfig                   |  13 +
 drivers/pinctrl/nxp/Makefile                  |   1 +
 drivers/pinctrl/nxp/pinctrl-imx.c             |   7 +-
 drivers/pinctrl/nxp/pinctrl-imx.h             |  11 +
 drivers/pinctrl/nxp/pinctrl-scmi.c            | 136 ++++
 include/configs/imx95_evk.h                   |  36 ++
 include/imx8image.h                           |  19 +-
 include/scmi_agent-uclass.h                   |   2 +
 include/scmi_agent.h                          |  11 +
 include/scmi_protocols.h                      | 105 +++-
 tools/binman/entries.rst                      |  14 +
 tools/binman/etype/nxp_append_ddrfw.py        |  78 +++
 tools/imx8image.c                             | 143 ++++-
 tools/imx9_image.sh                           |   4 +
 50 files changed, 3556 insertions(+), 64 deletions(-)

---
base-commit: 078542c346347406cfacdec8adeac66ae6758880
change-id: 20241220-imx95-04a92b6744fe

Best regards,

Signature · 1 line
Alice Guo <[email protected]>
author
#1 lore raw

PATCH v2 1/17 mailbox: add i.MX95 Messaging Unit (MU) driver

From: Peng Fan <[email protected]>

i.MX95 Messaging Unit (MU) enables 2 processors on a chip to communicate and coordinate by passing messages (e.g. frame information, event notices and requests) through the MU interface. This patch provides a driver for i.MX95 MU using the common mailbox framework. Currently, SCMI exchanges on i.MX95 uses a mailbox transport with SMT format, and the hardware used is this MU.

---
 MAINTAINERS                   |   1 +
 drivers/mailbox/Kconfig       |   7 +
 drivers/mailbox/Makefile      |   1 +
 drivers/mailbox/imx-mailbox.c | 417 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 426 insertions(+)
MAINTAINERS +1 -0
index ba31f86feb6da266cddd160a041d0594ac86d274..5ab2b72d0f93afaf70c4c2dcb8fc48210683b749 100644
@@ -313,6 +313,7 @@ F:	board/freescale/*mx*/
 F:	board/freescale/common/
 F:	common/spl/spl_imx_container.c
 F:	doc/imx/
+F:	drivers/mailbox/imx-mailbox.c
 F:	drivers/serial/serial_mxc.c
 F:	include/imx_container.h
 
drivers/mailbox/Kconfig +7 -0
index 67d5ac1a74228ccd82b2725c0bb745354d099948..4d9f004ebad7f57034a6cdae3bff9645fa0ee67d 100644
@@ -21,6 +21,13 @@ config APPLE_MBOX
 	  such as the System Management Controller (SMC) and NVMe and this
 	  driver is required to get that functionality up and running.
 
+config IMX_MU_MBOX
+	bool "Enable i.MX MU MBOX support"
+	depends on DM_MAILBOX
+	help
+	  Enable support for i.MX Messaging Unit for communication with other
+	  processors on the SoC using mailbox interface
+
 config SANDBOX_MBOX
 	bool "Enable the sandbox mailbox test driver"
 	depends on DM_MAILBOX && SANDBOX
drivers/mailbox/Makefile +1 -0
index 6072fa1956b793636c35aa0d1419c9dcaae27095..574add60005fe73d2beba715a12e0157fe4b0552 100644
@@ -5,6 +5,7 @@
 
 obj-$(CONFIG_$(XPL_)DM_MAILBOX) += mailbox-uclass.o
 obj-$(CONFIG_APPLE_MBOX) += apple-mbox.o
+obj-$(CONFIG_IMX_MU_MBOX) += imx-mailbox.o
 obj-$(CONFIG_SANDBOX_MBOX) += sandbox-mbox.o
 obj-$(CONFIG_SANDBOX_MBOX) += sandbox-mbox-test.o
 obj-$(CONFIG_STM32_IPCC) += stm32-ipcc.o
drivers/mailbox/imx-mailbox.c new file +417 -0

417 lines not on this page · raw message

Signature · 1 line
2.34.1
author
#2 lore raw

PATCH v2 2/17 firmware: scmi: smt: Interrupt communication enable

In reply to Alice Guo

From: Viorel Suman <[email protected]>

When interrupt driven communication is supported, the transport allows the caller to choose between interrupt and polling driven communications. To make the choice, the channel flags are used. i.MX95 uses interrupt driven communication so that Channel flags should be set to 1.

---
 drivers/firmware/scmi/smt.c |  4 ++++
 drivers/firmware/scmi/smt.h | 10 ++++++++++
 2 files changed, 14 insertions(+)
drivers/firmware/scmi/smt.c +4 -0
index 67d2f45002490ab64a6bc997eda93a8f4681d99b..e5b902dcb0e641065f4c0faae6bc6660a7e2c6af 100644
@@ -48,6 +48,10 @@ int scmi_dt_get_smt_buffer(struct udevice *dev, struct scmi_smt *smt)
 	if (!smt->buf)
 		return -ENOMEM;
 
+	/* Command should complete via an interrupt so that set Channel flags to 1. */
+	if (IS_ENABLED(CONFIG_IMX95))
+		scmi_smt_enable_intr(smt, true);
+
 #ifdef CONFIG_ARM
 	if (dcache_status())
 		mmu_set_region_dcache_behaviour(ALIGN_DOWN((uintptr_t)smt->buf, MMU_SECTION_SIZE),
drivers/firmware/scmi/smt.h +10 -0
index 9d669a6c922666c48e7dce4c0affd7b47cb137e4..768b0f4c8a8d1cc7966530e724d278d72c2a167b 100644
@@ -84,6 +84,16 @@ static inline void scmi_smt_put_channel(struct scmi_smt *smt)
 	hdr->channel_status &= ~SCMI_SHMEM_CHAN_STAT_CHANNEL_ERROR;
 }
 
+static inline void scmi_smt_enable_intr(struct scmi_smt *smt, bool enable)
+{
+	struct scmi_smt_header *hdr = (void *)smt->buf;
+
+	if (enable)
+		hdr->flags |= SCMI_SHMEM_FLAG_INTR_ENABLED;
+	else
+		hdr->flags &= ~SCMI_SHMEM_FLAG_INTR_ENABLED;
+}
+
 int scmi_dt_get_smt_buffer(struct udevice *dev, struct scmi_smt *smt);
 
 /*
Signature · 1 line
2.34.1
author
#3 lore raw

PATCH v2 3/17 pinctrl: nxp: add SCMI pin control protocol driver

In reply to Alice Guo

From: Peng Fan <[email protected]>

This patch provides a driver for the SCMI pin control protocol which is based on ARM's System Control and Management Interface (SCMI) 3.2. Currently, only the PINCTRL_CONFIG_SET command is implemented.

---
 drivers/firmware/scmi/scmi_agent-uclass.c |  11 +++
 drivers/pinctrl/nxp/Kconfig               |  13 +++
 drivers/pinctrl/nxp/Makefile              |   1 +
 drivers/pinctrl/nxp/pinctrl-imx.c         |   7 +-
 drivers/pinctrl/nxp/pinctrl-imx.h         |  11 +++
 drivers/pinctrl/nxp/pinctrl-scmi.c        | 136 ++++++++++++++++++++++++++++++
 include/scmi_agent-uclass.h               |   2 +
 include/scmi_protocols.h                  |  34 ++++++++
 8 files changed, 213 insertions(+), 2 deletions(-)
drivers/firmware/scmi/scmi_agent-uclass.c +11 -0
index 8c907c3b0328095c4b35ba089ed608fcda48b567..5f101f4ede8b585f8c562a42886ea7be4ef09953 100644
@@ -97,6 +97,9 @@ struct udevice *scmi_get_protocol(struct udevice *dev,
 	case SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN:
 		proto = priv->voltagedom_dev;
 		break;
+	case SCMI_PROTOCOL_ID_PINCTRL:
+		proto = priv->pinctrl_dev;
+		break;
 	default:
 		dev_err(dev, "Protocol not supported\n");
 		proto = NULL;
@@ -147,6 +150,9 @@ static int scmi_add_protocol(struct udevice *dev,
 	case SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN:
 		priv->voltagedom_dev = proto;
 		break;
+	case SCMI_PROTOCOL_ID_PINCTRL:
+		priv->pinctrl_dev = proto;
+		break;
 	default:
 		dev_err(dev, "Protocol not supported\n");
 		return -EPROTO;
@@ -436,6 +442,11 @@ static int scmi_bind_protocols(struct udevice *dev)
 				drv = DM_DRIVER_GET(scmi_voltage_domain);
 			}
 			break;
+		case SCMI_PROTOCOL_ID_PINCTRL:
+			if (IS_ENABLED(CONFIG_PINCTRL_IMX_SCMI) &&
+			    scmi_protocol_is_supported(dev, protocol_id))
+				drv = DM_DRIVER_GET(scmi_pinctrl_imx);
+			break;
 		default:
 			break;
 		}
drivers/pinctrl/nxp/Kconfig +13 -0
index 06c26f156f6c8f63204604d6065485629cfd9b61..0086f9825837bf568bd7633a21da860e410eeeee 100644
@@ -1,6 +1,19 @@
 config PINCTRL_IMX
 	bool
 
+config PINCTRL_IMX_SCMI
+	bool "IMX pinctrl SCMI driver"
+	depends on ARCH_IMX9 && PINCTRL_FULL
+	select PINCTRL_IMX
+	help
+	  Say Y here to enable the imx pinctrl scmi driver
+
+	  This provides a simple pinctrl driver for i.MX SoC which supports
+	  SCMI. This feature depends on device tree configuration. This driver
+	  is different from the linux one, this is a simple implementation,
+	  only parses the 'fsl,pins' property and configure related
+	  registers.
+
 config PINCTRL_IMX_SCU
 	bool
 
drivers/pinctrl/nxp/Makefile +1 -0
index f10aa6ef188e37583b181bdf9d70ac191e506d75..3ec3e2a9c6fdb875da4ae9bf151df5666256883b 100644
@@ -4,6 +4,7 @@ obj-$(CONFIG_PINCTRL_IMX6)		+= pinctrl-imx6.o
 obj-$(CONFIG_PINCTRL_IMX7)		+= pinctrl-imx7.o
 obj-$(CONFIG_PINCTRL_IMX7ULP)		+= pinctrl-imx7ulp.o
 obj-$(CONFIG_PINCTRL_IMX8ULP)		+= pinctrl-imx8ulp.o
+obj-$(CONFIG_PINCTRL_IMX_SCMI)		+= pinctrl-scmi.o
 obj-$(CONFIG_PINCTRL_IMX_SCU)		+= pinctrl-scu.o
 obj-$(CONFIG_PINCTRL_IMX8)		+= pinctrl-imx8.o
 obj-$(CONFIG_PINCTRL_IMX8M)		+= pinctrl-imx8m.o
drivers/pinctrl/nxp/pinctrl-imx.c +5 -2
index b1960c56b512cc113a810304dc3ac3f99b237a7e..3d53d0cd4b60c0685dd4c73c23e61cb712cda0ee 100644
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2016 Peng Fan <[email protected]>
+ * Copyright 2024 NXP
  */
 
 #include <malloc.h>
@@ -65,7 +66,9 @@ static int imx_pinctrl_set_state(struct udevice *dev, struct udevice *config)
 
 	npins = size / pin_size;
 
-	if (info->flags & IMX8_USE_SCU) {
+	if (info->flags & IMX_USE_SCMI) {
+		return imx_pinctrl_scmi_conf_pins(dev, pin_data, npins);
+	} else if (info->flags & IMX8_USE_SCU) {
 		imx_pinctrl_scu_conf_pins(info, pin_data, npins);
 	} else {
 		/*
@@ -216,7 +219,7 @@ int imx_pinctrl_probe(struct udevice *dev,
 	priv->dev = dev;
 	priv->info = info;
 
-	if (info->flags & IMX8_USE_SCU)
+	if ((info->flags & IMX8_USE_SCU) || (info->flags & IMX_USE_SCMI))
 		return 0;
 
 	addr = ofnode_get_addr_size_index(dev_ofnode(dev), 0, &size);
drivers/pinctrl/nxp/pinctrl-imx.h +11 -0
index fa4c084e2fc067fcb4e92c33312d4f430081fffd..b2f8865ded0ae380fc0156baa5eaea505c12f501 100644
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (C) 2016 Peng Fan <[email protected]>
+ * Copyright 2024 NXP
  */
 
 #ifndef __DRIVERS_PINCTRL_IMX_H
@@ -47,6 +48,7 @@ extern const struct pinctrl_ops imx_pinctrl_ops;
 #define ZERO_OFFSET_VALID	0x2
 #define CFG_IBE_OBE		0x4
 #define IMX8_USE_SCU		0x8
+#define IMX_USE_SCMI		0x10
 
 #define IOMUXC_CONFIG_SION	(0x1 << 4)
 
@@ -65,4 +67,13 @@ static inline int imx_pinctrl_scu_conf_pins(struct imx_pinctrl_soc_info *info,
 }
 #endif
 
+#ifdef CONFIG_PINCTRL_IMX_SCMI
+int imx_pinctrl_scmi_conf_pins(struct udevice *dev, u32 *pin_data, int npins);
+#else
+static inline int imx_pinctrl_scmi_conf_pins(struct udevice *dev, u32 *pin_data, int npins)
+{
+	return 0;
+}
+#endif
+
 #endif /* __DRIVERS_PINCTRL_IMX_H */
drivers/pinctrl/nxp/pinctrl-scmi.c new file +136 -0

136 lines not on this page · raw message

include/scmi_agent-uclass.h +2 -0
index 33e0e18c30d4ae4ddaaa2cb3830c03cd7a559cc0..4beec43cb080b14a777cac1cb0f18ef53433596c 100644
@@ -27,6 +27,7 @@ struct scmi_channel;
  * @clock_dev:		SCMI clock protocol device
  * @resetdom_dev:	SCMI reset domain protocol device
  * @voltagedom_dev:	SCMI voltage domain protocol device
+ * @pinctrl_dev:	SCMI pin control protocol device
  */
 struct scmi_agent_priv {
 	u32 version;
@@ -43,6 +44,7 @@ struct scmi_agent_priv {
 	struct udevice *clock_dev;
 	struct udevice *resetdom_dev;
 	struct udevice *voltagedom_dev;
+	struct udevice *pinctrl_dev;
 };
 
 static inline u32 scmi_version(struct udevice *dev)
include/scmi_protocols.h +34 -0
index 7abb2a6f36ba53223bd9103fcc02f58506fbfc8d..2367467512a6b65253317e51bea71de396aa96f9 100644
@@ -24,6 +24,7 @@ enum scmi_std_protocol {
 	SCMI_PROTOCOL_ID_SENSOR = 0x15,
 	SCMI_PROTOCOL_ID_RESET_DOMAIN = 0x16,
 	SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN = 0x17,
+	SCMI_PROTOCOL_ID_PINCTRL = 0x19,
 };
 
 enum scmi_status_code {
@@ -1005,4 +1006,37 @@ struct scmi_voltd_level_get_out {
 	s32 voltage_level;
 };
 
+/* SCMI Pinctrl Protocol */
+enum scmi_pinctrl_message_id {
+	SCMI_MSG_PINCTRL_CONFIG_SET = 0x6
+};
+
+struct scmi_pin_config {
+	u32 type;
+	u32 val;
+};
+
+/**
+ * struct scmi_pad_config_set_in - Message payload for PAD_CONFIG_SET command
+ * @identifier:	Identifier for the pin or group.
+ * @function_id:	Identifier for the function selected to be enabled for the
+ * 					selected pin or group. This field is set to 0xFFFFFFFF if no
+ * 					function should be enabled by the pin or group.
+ * @attributes:	Bits[31:11] Reserved, must be zero.
+ * 				Bit[10] Function valid.
+ * 				Bits[9:2] Number of configurations to set.
+ * 				Bits[1:0] Selector: Whether the identifier field refers to a pin or a group.
+ * @configs:	Array of configurations.
+ */
+struct scmi_pinctrl_config_set_in {
+	u32 identifier;
+	u32 function_id;
+	u32 attributes;
+	struct scmi_pin_config configs[4];
+};
+
+struct scmi_pinctrl_config_set_out {
+	s32 status;
+};
+
 #endif /* _SCMI_PROTOCOLS_H */
Signature · 1 line
2.34.1
author
#4 lore raw

PATCH v2 4/17 scmi_protocols: add SCMI misc protocol protocol_id and message_id for getting the ROM passover data

In reply to Alice Guo

From: Peng Fan <[email protected]>

SCMI misc protocol is intended for miscellaneous functions which are device specific and are usually defined to access bit fields. This patch adds SCMI misc protocol protocol_id and message_id for getting the ROM passover data.

---
 include/scmi_protocols.h | 5 +++++
 1 file changed, 5 insertions(+)
include/scmi_protocols.h +5 -0
index 2367467512a6b65253317e51bea71de396aa96f9..6cda1f00df1f6baf6db65a28b4cab114f8540a4b 100644
@@ -25,6 +25,7 @@ enum scmi_std_protocol {
 	SCMI_PROTOCOL_ID_RESET_DOMAIN = 0x16,
 	SCMI_PROTOCOL_ID_VOLTAGE_DOMAIN = 0x17,
 	SCMI_PROTOCOL_ID_PINCTRL = 0x19,
+	SCMI_PROTOCOL_ID_IMX_MISC = 0x84,
 };
 
 enum scmi_status_code {
@@ -50,6 +51,10 @@ enum scmi_discovery_id {
 	SCMI_PROTOCOL_MESSAGE_ATTRIBUTES = 0x2,
 };
 
+enum scmi_imx_misc_message_id {
+	SCMI_MISC_ROM_PASSOVER_GET = 0x7
+};
+
 /*
  * SCMI Base Protocol
  */
Signature · 1 line
2.34.1
author
#5 lore raw

PATCH v2 5/17 scmi_protocols: add SCMI Performance domain management protocol message IDs

In reply to Alice Guo

From: Peng Fan <[email protected]>

SCMI Performance domain management protocol is intended for performance management of groups of devices or APs that run in the same performance domain. The functionality provided by the callee-side can be used by passing the corresponding message_id.

---
 include/scmi_protocols.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
include/scmi_protocols.h +18 -0
index 6cda1f00df1f6baf6db65a28b4cab114f8540a4b..08c86a642844570424dddbfcf9670d1e6757d8d1 100644
@@ -1044,4 +1044,22 @@ struct scmi_pinctrl_config_set_out {
 	s32 status;
 };
 
+/* SCMI Perf Protocol */
+enum scmi_perf_message_id {
+	SCMI_PERF_DOMAIN_ATTRIBUTES = 0x3,
+	SCMI_PERF_DESCRIBE_LEVELS = 0x4,
+	SCMI_PERF_LIMITS_SET = 0x5,
+	SCMI_PERF_LIMITS_GET = 0x6,
+	SCMI_PERF_LEVEL_SET = 0x7,
+	SCMI_PERF_LEVEL_GET = 0x8
+};
+
+struct scmi_perf_in {
+	u32 domain_id;
+	u32 perf_level;
+};
+
+struct scmi_perf_out {
+	s32 status;
+};
 #endif /* _SCMI_PROTOCOLS_H */
Signature · 1 line
2.34.1
author
#6 lore raw

PATCH v2 6/17 clk: scmi: add the command CLOCK_PARENT_SET

In reply to Alice Guo

From: Peng Fan <[email protected]>

This patch adds the command CLOCK_PARENT_SET that can be used to set the parent of a clock. ARM SCMI Version 3.2 supports to change the parent of a clock device.

---
 drivers/clk/clk_scmi.c   | 20 ++++++++++++++++++++
 include/scmi_protocols.h | 19 +++++++++++++++++++
 2 files changed, 39 insertions(+)
drivers/clk/clk_scmi.c +20 -0
index e42d2032d45e011b751c19b395b6f99d5c54e78e..84333cdd0ccfe566c269f776f39725c69883c25c 100644
@@ -178,11 +178,31 @@ static int scmi_clk_probe(struct udevice *dev)
 	return 0;
 }
 
+static int scmi_clk_set_parent(struct clk *clk, struct clk *parent)
+{
+	struct scmi_clk_parent_set_in in = {
+		.clock_id = clk->id,
+		.parent_clk = parent->id,
+	};
+	struct scmi_clk_parent_set_out out;
+	struct scmi_msg msg = SCMI_MSG_IN(SCMI_PROTOCOL_ID_CLOCK,
+					  SCMI_CLOCK_PARENT_SET,
+					  in, out);
+	int ret;
+
+	ret = devm_scmi_process_msg(clk->dev, &msg);
+	if (ret < 0)
+		return ret;
+
+	return scmi_to_linux_errno(out.status);
+}
+
 static const struct clk_ops scmi_clk_ops = {
 	.enable = scmi_clk_enable,
 	.disable = scmi_clk_disable,
 	.get_rate = scmi_clk_get_rate,
 	.set_rate = scmi_clk_set_rate,
+	.set_parent = scmi_clk_set_parent,
 };
 
 U_BOOT_DRIVER(scmi_clock) = {
include/scmi_protocols.h +19 -0
index 08c86a642844570424dddbfcf9670d1e6757d8d1..d529f8e2697472e60d0cb9c275f34ef0ecaed3ca 100644
@@ -737,6 +737,7 @@ enum scmi_clock_message_id {
 	SCMI_CLOCK_RATE_SET = 0x5,
 	SCMI_CLOCK_RATE_GET = 0x6,
 	SCMI_CLOCK_CONFIG_SET = 0x7,
+	SCMI_CLOCK_PARENT_SET = 0xD
 };
 
 #define SCMI_CLK_PROTO_ATTR_COUNT_MASK	GENMASK(15, 0)
@@ -839,6 +840,24 @@ struct scmi_clk_rate_set_out {
 	s32 status;
 };
 
+/**
+ * struct scmi_clk_parent_state_in - Message payload for CLOCK_PARENT_SET command
+ * @clock_id:		SCMI clock ID
+ * @parent_clk:		SCMI clock ID
+ */
+struct scmi_clk_parent_set_in {
+	u32 clock_id;
+	u32 parent_clk;
+};
+
+/**
+ * struct scmi_clk_parent_set_out - Response payload for CLOCK_PARENT_SET command
+ * @status:	SCMI command status
+ */
+struct scmi_clk_parent_set_out {
+	s32 status;
+};
+
 /*
  * SCMI Reset Domain Protocol
  */
Signature · 1 line
2.34.1
author
#7 lore raw

PATCH v2 7/17 clk: scmi: check the clock state/parent/rate control permissions

In reply to Alice Guo

From: Ye Li <[email protected]>

SCMI clock management protocol driver in Linux checks clock state, parent and rate control permissions. To be consistent with the kernel driver, add this check here.

When using common clock framework (CCF), use the clock signal ID to get the clock registered by clk_register() in scmi_clk_probe(), and then obatin the struct clk_scmi variable with container_of().

---
 arch/sandbox/include/asm/scmi_test.h       |   2 +
 drivers/clk/clk_scmi.c                     | 173 +++++++++++++++++++++++++++--
 drivers/firmware/scmi/sandbox-scmi_agent.c |  56 +++++++++-
 include/scmi_protocols.h                   |  26 ++++-
 4 files changed, 243 insertions(+), 14 deletions(-)
arch/sandbox/include/asm/scmi_test.h +2 -0
index 619f8f5098cdd82ba2343897166c34c82c753422..b30e536a35771ec3e1439c1e64fd09de3728dc50 100644
@@ -27,10 +27,12 @@ struct sandbox_scmi_pwd {
  * @id:		Identifier of the clock used in the SCMI protocol
  * @enabled:	Clock state: true if enabled, false if disabled
  * @rate:	Clock rate in Hertz
+ * @perm:	Indicating state/parent/rate permission
  */
 struct sandbox_scmi_clk {
 	bool enabled;
 	ulong rate;
+	u32 perm;
 };
 
 /**
drivers/clk/clk_scmi.c +163 -10

244 lines not on this page · raw message

drivers/firmware/scmi/sandbox-scmi_agent.c +53 -3

92 lines not on this page · raw message

include/scmi_protocols.h +25 -1
index d529f8e2697472e60d0cb9c275f34ef0ecaed3ca..9607433c3276f9aa18044c414a5bde3143726cf4 100644
@@ -731,13 +731,15 @@ int scmi_pwd_name_get(struct udevice *dev, u32 domain_id, u8 **name);
 /*
  * SCMI Clock Protocol
  */
+#define CLOCK_PROTOCOL_VERSION_3_0	0x30000
 
 enum scmi_clock_message_id {
 	SCMI_CLOCK_ATTRIBUTES = 0x3,
 	SCMI_CLOCK_RATE_SET = 0x5,
 	SCMI_CLOCK_RATE_GET = 0x6,
 	SCMI_CLOCK_CONFIG_SET = 0x7,
-	SCMI_CLOCK_PARENT_SET = 0xD
+	SCMI_CLOCK_PARENT_SET = 0xD,
+	SCMI_CLOCK_GET_PERMISSIONS = 0xF
 };
 
 #define SCMI_CLK_PROTO_ATTR_COUNT_MASK	GENMASK(15, 0)
@@ -776,6 +778,7 @@ struct scmi_clk_attribute_in {
 struct scmi_clk_attribute_out {
 	s32 status;
 	u32 attributes;
+#define CLK_HAS_RESTRICTIONS(x)	((x) & BIT(1))
 	char clock_name[SCMI_CLOCK_NAME_LENGTH_MAX];
 };
 
@@ -858,6 +861,27 @@ struct scmi_clk_parent_set_out {
 	s32 status;
 };
 
+/**
+ * @clock_id:	Identifier for the clock device.
+ */
+struct scmi_clk_get_permissions_in {
+	u32 clock_id;
+};
+
+/**
+ * @status:	Negative 32-bit integers are used to return error status codes.
+ * @permissions:	Bit[31] Clock state control, Bit[30] Clock parent control,
+ * 					Bit[29] Clock rate control, Bits[28:0] Reserved, must be zero
+ */
+struct scmi_clk_get_permissions_out {
+	s32 status;
+	u32 permissions;
+};
+
+#define SUPPORT_CLK_STAT_CONTROL	BIT(31)
+#define SUPPORT_CLK_PARENT_CONTROL	BIT(30)
+#define SUPPORT_CLK_RATE_CONTROL	BIT(29)
+
 /*
  * SCMI Reset Domain Protocol
  */
Signature · 1 line
2.34.1
maintainer
#8 lore raw

Re: [PATCH v2 07/17] clk: scmi: check the clock state/parent/rate control permissions

drivers/clk/clk_scmi.c line 62

Quoted 2 lines · Alice Guo
drivers/clk/clk_scmi.c +2 -0
+       debug("SCMI clock management protocol version is less than 3.0.\n");
+       return -1;

Nit: return -EINVAL would be better here.

author
#9 lore raw

PATCH v2 8/17 scmi_protocols: update struct scmi_base_discover_list_protocols_out

In reply to Alice Guo

From: Ye Li <[email protected]>

@protocols is an array of protocol identifiers that are implemented, excluding the Base protocol. The number of elements of @protocols is specified by callee-side. Currently, set it to 4 is enough for i.MX95.

---
 include/scmi_protocols.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/scmi_protocols.h +4 -1
index 9607433c3276f9aa18044c414a5bde3143726cf4..3c55d228cb641bc6c0e5ca7ac885efe84b41c66d 100644
@@ -141,11 +141,14 @@ struct scmi_base_discover_impl_version_out {
  * @status:		SCMI command status
  * @num_protocols:	Number of SCMI protocols in @protocol
  * @protocols:		Array of packed SCMI protocol ID's
+ *
+ * The number of elements of @protocols is specified by callee-side. Currently,
+ * set it to 4 is enough for i.MX95.
  */
 struct scmi_base_discover_list_protocols_out {
 	s32 status;
 	u32 num_protocols;
-	u32 protocols[3];
+	u32 protocols[4];
 };
 
 /**
Signature · 1 line
2.34.1
author
#10 lore raw

PATCH v2 9/17 imx9: scmi: add i.MX95 SoC and clock related code

In reply to Alice Guo

From: Peng Fan <[email protected]>

This patch adds i.MX95 SoC and clock related code. Because they are based on SCMI, put them in the scmi subfolder.

---
 arch/arm/include/asm/arch-imx/cpu.h        |   3 +
 arch/arm/include/asm/arch-imx9/clock.h     |  10 +-
 arch/arm/include/asm/arch-imx9/imx-regs.h  |   7 +-
 arch/arm/include/asm/arch-imx9/sys_proto.h |   3 +-
 arch/arm/include/asm/mach-imx/sys_proto.h  |  40 ++
 arch/arm/mach-imx/imx9/scmi/Makefile       |   6 +
 arch/arm/mach-imx/imx9/scmi/clock.c        | 328 ++++++++++++
 arch/arm/mach-imx/imx9/scmi/clock_scmi.c   | 148 +++++
 arch/arm/mach-imx/imx9/scmi/soc.c          | 832 +++++++++++++++++++++++++++++
 9 files changed, 1373 insertions(+), 4 deletions(-)
arch/arm/include/asm/arch-imx/cpu.h +3 -0
index 0d7a573461690046b27498c7174459110a73689c..b283c49afec83cbed670d07ad0909ad6f453853b 100644
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * (C) Copyright 2014 Freescale Semiconductor, Inc.
+ * Copyright 2024 NXP
  */
 
 #define MXC_CPU_MX23		0x23
@@ -76,6 +77,8 @@
 #define MXC_CPU_IMX9111		0xCD /* dummy ID */
 #define MXC_CPU_IMX9101		0xCE /* dummy ID */
 
+#define MXC_CPU_IMX95		0x1C1 /* dummy ID */
+
 #define MXC_SOC_MX6		0x60
 #define MXC_SOC_MX7		0x70
 #define MXC_SOC_IMX8M		0x80
arch/arm/include/asm/arch-imx9/clock.h +8 -2
index 60d48b13b11f274c9e4c8caf20954de0431d9d6a..a64c18b28291553d47725d83cb748031faf64488 100644
@@ -1,8 +1,8 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2022 NXP
+ * Copyright 2024 NXP
  *
- * Peng Fan <peng.fan at nxp.com>
+ * Peng Fan <[email protected]>
  */
 
 #ifndef __CLOCK_IMX9__
@@ -255,5 +255,11 @@ int ccm_shared_gpr_tz_access(u32 gpr, bool non_secure, bool user_mode, bool lock
 void enable_usboh3_clk(unsigned char enable);
 int set_clk_enet(enum enet_freq type);
 int set_clk_eqos(enum enet_freq type);
+int set_clk_netc(enum enet_freq type);
 void set_arm_clk(ulong freq);
+
+int imx_clk_scmi_enable(u32 clock_id, bool enable);
+ulong imx_clk_scmi_set_rate(u32 clock_id, ulong rate);
+ulong imx_clk_scmi_get_rate(u32 clock_id);
+int imx_clk_scmi_set_parent(u32 clock_id, u32 parent_id);
 #endif
arch/arm/include/asm/arch-imx9/imx-regs.h +6 -1
index ef9538bd42e8b2972d7e6829a402bc4f661e3cbb..5512d66ee0a44348845d2a559bd99327115bc1d0 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2022 NXP
+ * Copyright 2024 NXP
  */
 
 #ifndef __ASM_ARCH_IMX9_REGS_H__
@@ -20,6 +20,11 @@
 #define WDG4_BASE_ADDR      0x424a0000UL
 #define WDG5_BASE_ADDR      0x424b0000UL
 
+#define GPIO2_BASE_ADDR	    0x43810000UL
+#define GPIO3_BASE_ADDR	    0x43820000UL
+#define GPIO4_BASE_ADDR	    0x43840000UL
+#define GPIO5_BASE_ADDR	    0x43850000UL
+
 #define FSB_BASE_ADDR       0x47510000UL
 
 #define ANATOP_BASE_ADDR    0x44480000UL
arch/arm/include/asm/arch-imx9/sys_proto.h +2 -1
index e4bf6a63424f7c54c1dcdf6b882a908940e5fdb1..aac43c74a44a127549c67059e70f570aae5f680c 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright (C) 2022 NXP
+ * Copyright (C) 2024 NXP
  */
 
 #ifndef __ARCH_IMX9_SYS_PROTO_H
@@ -12,6 +12,7 @@ enum imx9_soc_voltage_mode {
 	VOLT_LOW_DRIVE = 0,
 	VOLT_NOMINAL_DRIVE,
 	VOLT_OVER_DRIVE,
+	VOLT_SUPER_OVER_DRIVE,
 };
 
 void soc_power_init(void);
arch/arm/include/asm/mach-imx/sys_proto.h +40 -0
index 109a806852ab42d018ce45a4e96af5b57adb6a9c..bcf33769ae5f45125bbf9377eb64d96473dc4996 100644
@@ -2,6 +2,7 @@
 /*
  * (C) Copyright 2009
  * Stefano Babic, DENX Software Engineering, [email protected].
+ * Copyright 2024 NXP
  */
 
 #ifndef _SYS_PROTO_H_
@@ -97,6 +98,8 @@ struct bd_info;
 #define is_imx9302() (is_cpu_type(MXC_CPU_IMX9302))
 #define is_imx9301() (is_cpu_type(MXC_CPU_IMX9301))
 
+#define is_imx95() (is_cpu_type(MXC_CPU_IMX95))
+
 #define is_imx9121() (is_cpu_type(MXC_CPU_IMX9121))
 #define is_imx9111() (is_cpu_type(MXC_CPU_IMX9111))
 #define is_imx9101() (is_cpu_type(MXC_CPU_IMX9101))
@@ -216,6 +219,43 @@ ulong spl_romapi_get_uboot_base(u32 image_offset, u32 rom_bt_dev);
 u32 rom_api_download_image(u8 *dest, u32 offset, u32 size);
 u32 rom_api_query_boot_infor(u32 info_type, u32 *info);
 
+#ifdef CONFIG_SCMI_FIRMWARE
+typedef struct rom_passover {
+	uint16_t tag;                   //!< Tag
+	uint8_t  len;                   //!< Fixed value of 0x80
+	uint8_t  ver;                   //!< Version
+	uint32_t boot_mode;             //!< Boot mode
+	uint32_t card_addr_mode;        //!< SD card address mode
+	uint32_t bad_blks_of_img_set0;  //!< NAND bad block count skipped 1
+	uint32_t ap_mu_id;              //!< AP MU ID
+	uint32_t bad_blks_of_img_set1;  //!< NAND bad block count skipped 1
+	uint8_t  boot_stage;            //!< Boot stage
+	uint8_t  img_set_sel;           //!< Image set booted from
+	uint8_t  rsv0[2];               //!< Reserved
+	uint32_t img_set_end;           //!< Offset of Image End
+	uint32_t rom_version;           //!< ROM version
+	uint8_t  boot_dev_state;        //!< Boot device state
+	uint8_t  boot_dev_inst;         //!< Boot device type
+	uint8_t  boot_dev_type;         //!< Boot device instance
+	uint8_t  rsv1;                  //!< Reserved
+	uint32_t dev_page_size;         //!< Boot device page size
+	uint32_t cnt_header_ofs;        //!< Container header offset
+	uint32_t img_ofs;               //!< Image offset
+}  __attribute__ ((packed)) rom_passover_t;
+
+/**
+ * struct scmi_rom_passover_out - Response payload for ROM_PASSOVER_GET command
+ * @status:	SCMI clock ID
+ * @attributes:	Attributes of the targets clock state
+ */
+struct scmi_rom_passover_get_out {
+	u32 status;
+	u32 numPassover;
+	u32 passover[(sizeof(rom_passover_t) + 8) / 4];
+};
+
+#endif
+
 /* For i.MX ULP */
 #define BT0CFG_LPBOOT_MASK	0x1
 #define BT0CFG_DUALBOOT_MASK	0x2
arch/arm/mach-imx/imx9/scmi/Makefile new file +6 -0
new file mode 100644
index 0000000000000000000000000000000000000000..78f24c6e5151e2d7280b9c456c0477a3b6a958c4
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2024 NXP
+
+obj-y += soc.o
+obj-y += clock_scmi.o clock.o
arch/arm/mach-imx/imx9/scmi/clock.c new file +328 -0

328 lines not on this page · raw message

arch/arm/mach-imx/imx9/scmi/clock_scmi.c new file +148 -0

148 lines not on this page · raw message

arch/arm/mach-imx/imx9/scmi/soc.c new file +832 -0

832 lines not on this page · raw message

Signature · 1 line
2.34.1
author
#11 lore raw

PATCH v2 10/17 imx9: add i.MX95 Kconfig and Makefile

In reply to Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 Kconfig and Makefile. i.MX95 uses SCMI.

---
 arch/arm/mach-imx/imx9/Kconfig  |  6 ++++++
 arch/arm/mach-imx/imx9/Makefile | 11 ++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)
arch/arm/mach-imx/imx9/Kconfig +6 -0
index 54c6b117fcff21be5c3800ebd1dc30f8ea12ac42..596e753f2897c11d7ca3bcc9211af786d005bfd9 100644
@@ -21,6 +21,12 @@ config IMX91
 	select IMX9
 	select ARMV8_SPL_EXCEPTION_VECTORS
 
+config IMX95
+	bool
+	select IMX9
+	select ARMV8_SPL_EXCEPTION_VECTORS
+	select SCMI_FIRMWARE
+	select DM_MAILBOX
 
 config SYS_SOC
 	default "imx9"
arch/arm/mach-imx/imx9/Makefile +8 -3
index 45a9105a75a558dada3c328ed0878050da2a41e1..8d43ea2b267e2608df2e8f140c91b626dd969842 100644
@@ -1,10 +1,15 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
-# Copyright 2022 NXP
+# Copyright 2024 NXP
 
 obj-y += lowlevel_init.o
+
+ifeq ($(CONFIG_SCMI_FIRMWARE),y)
+obj-y += scmi/
+else
 obj-y += soc.o clock.o clock_root.o trdc.o
+endif
 
-#ifndef CONFIG_XPL_BUILD
+ifneq ($(CONFIG_SPL_BUILD),y)
 obj-y += imx_bootaux.o
-#endif
+endif
\ No newline at end of file
Signature · 1 line
2.34.1
author
#12 lore raw

PATCH v2 11/17 imx9: scmi: soc: Override h_spl_load_read with trampoline buffer

In reply to Alice Guo

From: Ye Li <[email protected]>

When SPL loading image to secure region, for example, ATF and tee to DDR secure region. Because the USDHC controller is non-secure master, it can't access this region and will cause loading issue.

So override h_spl_load_read to use a trampoline buffer in nonsecure region, then use CPU to copy the image from trampoline buffer to destination secure region.

---
 arch/arm/mach-imx/imx9/scmi/soc.c | 40 +++++++++++++++++++++++++++++++++++++++
 common/spl/spl_mmc.c              |  2 +-
 2 files changed, 41 insertions(+), 1 deletion(-)
arch/arm/mach-imx/imx9/scmi/soc.c +40 -0
index fefb1a6f4ca58722a5d93c39e4f6a7aaf85aa177..8a7df24afecc1d6d77b7162be639b56af95fd975 100644
@@ -41,6 +41,8 @@
 #include <scmi_agent.h>
 #include <scmi_protocols.h>
 #endif
+#include <spl.h>
+#include <mmc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -830,3 +832,41 @@ enum boot_device get_boot_device(void)
 	return boot_dev;
 }
 #endif
+
+ulong h_spl_load_read(struct spl_load_info *load, ulong off,
+		      ulong size, void *buf)
+{
+	struct blk_desc *bd = load->priv;
+	lbaint_t sector = off >> bd->log2blksz;
+	lbaint_t count = size >> bd->log2blksz;
+	ulong trampoline_sz = SZ_16M;
+	void *trampoline = (void *)((ulong)CFG_SYS_SDRAM_BASE + PHYS_SDRAM_SIZE - trampoline_sz);
+	ulong ns_ddr_end = CFG_SYS_SDRAM_BASE + PHYS_SDRAM_SIZE;
+	ulong read_count, trampoline_cnt = trampoline_sz >> bd->log2blksz, actual, total;
+
+#ifdef PHYS_SDRAM_2_SIZE
+	ns_ddr_end += PHYS_SDRAM_2_SIZE;
+#endif
+
+	/* Check if the buf is in non-secure world, otherwise copy from trampoline */
+	if ((ulong)buf < CFG_SYS_SDRAM_BASE || (ulong)buf + (count * sector) > ns_ddr_end) {
+		total = 0;
+		while (count) {
+			read_count = trampoline_cnt > count ? count : trampoline_cnt;
+			actual = blk_dread(bd, sector, read_count, trampoline);
+			if (actual != read_count) {
+				printf("Error in blk_dread, %lu, %lu\n", read_count, actual);
+				return 0;
+			}
+			memcpy(buf, trampoline, actual * 512);
+			buf += actual * 512;
+			sector += actual;
+			total += actual;
+			count -= actual;
+		}
+
+		return total << bd->log2blksz;
+	}
+
+	return blk_dread(bd, sector, count, buf) << bd->log2blksz;
+}
common/spl/spl_mmc.c +1 -1
index 1f69659321620739d066bd806acd1d282b66bad3..d15a6945f9c24ee427b847c036413c52475c44a8 100644
@@ -17,7 +17,7 @@
 #include <image.h>
 #include <imx_container.h>
 
-static ulong h_spl_load_read(struct spl_load_info *load, ulong off,
+ulong __weak h_spl_load_read(struct spl_load_info *load, ulong off,
 			     ulong size, void *buf)
 {
 	struct blk_desc *bd = load->priv;
Signature · 1 line
2.34.1
author
#13 lore raw

PATCH v2 12/17 scmi: add the macro SCMI_MSG

In reply to Alice Guo

From: Peng Fan <[email protected]>

This patch adds the macro SCMI_MSG for protocols that do not need _in_array.

---
 include/scmi_agent.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
include/scmi_agent.h +11 -0
index 755986d6c424ccc881ac0943a88735cbcfacb001..5508a126a6dc504afa6d896c78c760b1af0d3deb 100644
@@ -54,6 +54,17 @@ struct scmi_msg {
 		.out_msg_sz = sizeof(_out_array),	\
 	}
 
+/* Helper macro to match a message on output array references */
+#define SCMI_MSG(_protocol, _message, _out_array)	\
+	(struct scmi_msg){				\
+		.protocol_id = (_protocol),		\
+		.message_id = (_message),		\
+		.in_msg = (uint8_t *)NULL,		\
+		.in_msg_sz = 0,				\
+		.out_msg = (uint8_t *)&(_out_array),	\
+		.out_msg_sz = sizeof(_out_array),	\
+	}
+
 /**
  * devm_scmi_of_get_channel() - Get SCMI channel handle from SCMI agent DT node
  *
Signature · 1 line
2.34.1
author
#14 lore raw

PATCH v2 13/17 imx: Kconfig: IMX8_ROMAPI is not configured for i.MX95

In reply to Alice Guo

From: Alice Guo <[email protected]>

i.MX95 only supports low power boot, which means A55 is kicked by M33. There is no ROM runs on A55 in such case so that deselect IMX8_ROMAPI for i.MX95.

---
 arch/arm/mach-imx/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/Kconfig +1 -1
index 134e42028c3787d78e28af03d40c41a8b2b1981b..daf6443aa5b40b6410f2645937239a4ec785fa34 100644
@@ -180,7 +180,7 @@ config DDRMC_VF610_CALIBRATION
 
 config IMX8_ROMAPI
 	def_bool y
-	depends on IMX8MN || IMX8MP || IMX8ULP || IMX9
+	depends on IMX8MN || IMX8MP || IMX8ULP || (IMX9 && !IMX95)
 
 config SPL_IMX_ROMAPI_LOADADDR
 	hex "Default load address to load image through ROM API"
Signature · 1 line
2.34.1
author
#15 lore raw

PATCH v2 14/17 binman: add a new entry type for packing DDR PHY firmware images

In reply to Alice Guo

From: Alice Guo <[email protected]>

i.MX95 needs to combine DDR PHY firmware images and their byte counts together, so add a new entry type nxp-append-ddrfw for this requirement.

---
 tools/binman/entries.rst               | 14 ++++++
 tools/binman/etype/nxp_append_ddrfw.py | 78 ++++++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+)
tools/binman/entries.rst +14 -0
index 83068ba6d39d9a5b586312fd4a062b0da31eb595..061bd2f1da9812d36c90b1fb10a919667e36ceaa 100644
@@ -1658,6 +1658,20 @@ Properties / Entry arguments:
 
 
 
+.. _etype_nxp_append_ddrfw:
+
+Entry: nxp-append-ddrfw: pack NXP LPDDR firmware
+---------------------------------------------------
+
+Properties / Entry arguments:
+    - oei_m33_ddr_image - M33 DDR IMAGE
+    - lpddr_imem - Synopsys LPDDR PHY firmware
+    - lpddr_dmem - Synopsys LPDDR PHY firmware
+    - lpddr_imem_qb - Synopsys LPDDR quick boot firmware
+    - lpddr_dmem_qb - Synopsys LPDDR quick boot firmware
+
+
+
 .. _etype_opensbi:
 
 Entry: opensbi: RISC-V OpenSBI fw_dynamic blob
tools/binman/etype/nxp_append_ddrfw.py new file +78 -0

78 lines not on this page · raw message

Signature · 1 line
2.34.1
#16 lore raw

Re: [PATCH v2 14/17] binman: add a new entry type for packing DDR PHY firmware images

Hi Alice,

Quoted 12 lines · Alice Guo

From: Alice Guo <[email protected]>

i.MX95 needs to combine DDR PHY firmware images and their byte counts together, so add a new entry type nxp-append-ddrfw for this requirement.

---
 tools/binman/entries.rst               | 14 ++++++
 tools/binman/etype/nxp_append_ddrfw.py | 78 ++++++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+)

Please note that you should create a test[1] for any new Binman etype.

You can see the current work on this[2], which failed apparently due to a bug in the 'cst' tool.

Quoted 31 lines
tools/binman/entries.rst +14 -0
index 83068ba6d39d9a5b586312fd4a062b0da31eb595..061bd2f1da9812d36c90b1fb10a919667e36ceaa 100644
@@ -1658,6 +1658,20 @@ Properties / Entry arguments:
 
 
 
+.. _etype_nxp_append_ddrfw:
+
+Entry: nxp-append-ddrfw: pack NXP LPDDR firmware
+---------------------------------------------------
+
+Properties / Entry arguments:
+    - oei_m33_ddr_image - M33 DDR IMAGE
+    - lpddr_imem - Synopsys LPDDR PHY firmware
+    - lpddr_dmem - Synopsys LPDDR PHY firmware
+    - lpddr_imem_qb - Synopsys LPDDR quick boot firmware
+    - lpddr_dmem_qb - Synopsys LPDDR quick boot firmware
+
+
+
 .. _etype_opensbi:
 
 Entry: opensbi: RISC-V OpenSBI fw_dynamic blob
tools/binman/etype/nxp_append_ddrfw.py new file +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..bc23a7611eaf823651a8fcbc9898c9140c277d7f

tools/binman/etype/nxp_append_ddrfw.py line 10

Quoted 10 lines
tools/binman/etype/nxp_append_ddrfw.py new file +10 -0
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2024 NXP
+
+from binman.etype.section import Entry_section
+from dtoc import fdt_util
+import os
+
+class Entry_nxp_append_ddrfw(Entry_section):
+    """NXP M33 OEI DDRFW

Here you should describe the entry type so people know what it is for. Is the word 'append' needed in the name?

tools/binman/etype/nxp_append_ddrfw.py line 17

Quoted 7 lines
tools/binman/etype/nxp_append_ddrfw.py new file +7 -0
+
+    Properties / Entry arguments:
+        - oei_m33_ddr_image: M33 DDR IMAGE
+        - lpddr_imem: Synopsys LPDDR PHY firmware
+        - lpddr_dmem: Synopsys LPDDR PHY firmware
+        - lpddr_imem_qb: Synopsys LPDDR quick boot firmware
+        - lpddr_dmem_qb: Synopsys LPDDR quick boot firmware

It isn't clear what these things are. Please add a bit more detail about how to get these things and what they are.

From what I can tell, I think you should add each of these as a new etype. See for example Entry_intel_fsp_m.

Then in your image description you specify how these are packed together.

tools/binman/etype/nxp_append_ddrfw.py line 23

Quoted 6 lines
tools/binman/etype/nxp_append_ddrfw.py new file +6 -0
+    """
+
+    def __init__(self, section, etype, node):
+        super().__init__(section, etype, node)
+        self.required_props = ['oei_m33_ddr_image', 'lpddr_imem', 'lpddr_dmem',
+                               'lpddr_imem_qb', 'lpddr_dmem_qb']

Properties should use hyphens rather than underscores, to fit with devicetree usage.

tools/binman/etype/nxp_append_ddrfw.py line 27

Quoted 4 lines
tools/binman/etype/nxp_append_ddrfw.py new file +4 -0
+
+    def ReadNode(self):
+        super().ReadNode()
+        self.oei_m33_ddr_image = fdt_util.GetString(self._node, 'oei_m33_ddr_image')

This looks like an output file. Binman handles this side of things and you should not have etypes writing out files themselves.

Quoted 13 lines
tools/binman/etype/nxp_append_ddrfw.py new file +11 -0
+        self.lpddr_imem = fdt_util.GetString(self._node, 'lpddr_imem')
+        self.lpddr_dmem = fdt_util.GetString(self._node, 'lpddr_dmem')
+        self.lpddr_imem_qb = fdt_util.GetString(self._node, 'lpddr_imem_qb')
+        self.lpddr_dmem_qb = fdt_util.GetString(self._node, 'lpddr_dmem_qb')
+        self.ReadEntries()
+
+    def BuildSectionData(self, required):
+        u_boot_path = os.path.abspath('.')
+
+        oei_m33_ddr_image_path = os.path.join(u_boot_path, self.oei_m33_ddr_image)
 
 
+        lpddr_imem_path = os.path.join(u_boot_path, self.lpddr_imem)

tools/binman/etype/nxp_append_ddrfw.py line 47

Quoted 10 lines
tools/binman/etype/nxp_append_ddrfw.py new file +9 -0
+        lpddr_dmem_path = os.path.join(u_boot_path, self.lpddr_dmem)
+        lpddr_imem_qb_path = os.path.join(u_boot_path, self.lpddr_imem_qb)
+        lpddr_dmem_qb_path = os.path.join(u_boot_path, self.lpddr_dmem_qb)
 
+
+        if (not (os.path.exists(oei_m33_ddr_image_path) and
+            os.path.exists(lpddr_imem_path) and os.path.exists(lpddr_dmem_path) and
+            os.path.exists(lpddr_imem_qb_path) and os.path.exists(lpddr_dmem_qb_path))):
+            print("Please check if there are any external blobs that do not exist.")
+            return b''

Missing blobs are handled automatically by Binman.[3]

tools/binman/etype/nxp_append_ddrfw.py line 55

Quoted 8 lines
tools/binman/etype/nxp_append_ddrfw.py new file +8 -0
+
+        lpddr_imem_size = os.path.getsize(lpddr_imem_path)
+        lpddr_dmem_size = os.path.getsize(lpddr_dmem_path)
+        lpddr_imem_qb_size = os.path.getsize(lpddr_imem_qb_path)
+        lpddr_dmem_qb_size = os.path.getsize(lpddr_dmem_qb_path)
+
+        with open(oei_m33_ddr_image_path, 'rb') as file:
+            oei_m33_ddr_image = file.read()

oei_m33_ddr_image = tools.read_file(oei_m33_ddr_image_path)

tools/binman/etype/nxp_append_ddrfw.py line 59

Quoted 4 lines
tools/binman/etype/nxp_append_ddrfw.py new file +4 -0
+
+        length = len(oei_m33_ddr_image)
+        if (length % 4 != 0):
+            oei_m33_ddr_image += bytes(4 - length % 4)

Binman handles alignment automatically. It just needs to be in the description

It seems that this etype is putting some files together with a little header.

Quoted 4 lines
tools/binman/etype/nxp_append_ddrfw.py new file +4 -0
+
+        fw_header = lpddr_imem_size.to_bytes(4, 'little') + lpddr_dmem_size.to_bytes(4, 'little')
+        with open(lpddr_imem_path, 'rb') as file:
+            lpddr_imem = file.read()

tools/binman/etype/nxp_append_ddrfw.py line 73

Quoted 10 lines
tools/binman/etype/nxp_append_ddrfw.py new file +10 -0
+        with open(lpddr_dmem_path, 'rb') as file:
+            lpddr_dmem = file.read()
+
+        fw_header_qb = lpddr_imem_qb_size.to_bytes(4, 'little') + lpddr_dmem_qb_size.to_bytes(4, 'little')
+        with open(lpddr_imem_qb_path, 'rb') as file:
+            lpddr_imem_qb = file.read()
+        with open(lpddr_dmem_qb_path, 'rb') as file:
+            lpddr_dmem_qb = file.read()
+
+        data = oei_m33_ddr_image + fw_header + lpddr_imem + lpddr_dmem + fw_header_qb + lpddr_imem_qb + lpddr_dmem_qb

So ddr-image should be its own etype (probably just a one-line thing like fsp-s

The next bit is a fw_header plus two blobs, so that should be in an 'lpddr' etype

The final bit is qb (?) which should be in a 'qb' etype, or some better name.

tools/binman/etype/nxp_append_ddrfw.py line 76

Quoted 3 lines
tools/binman/etype/nxp_append_ddrfw.py new file +3 -0
+        length = len(data)
+        if (length % 8 != 0):
+            data += bytes(8 - length % 8)

In the end you will have very little code and an image description like:

oei-m33-ddr {
align-size = <4>;
};
imx-lpddr {
align-size = <4>;
imx-lpddr-imem {
};
imx-lpddr-dmem {
};
};
imx-lpddr-qb {
align-size = <4>;
imx-lpddr-imem-qb {
};
imx-lpddr-dmem-qb {
};
};

Please let me know if you need help with any of this.

Quoted 6 lines
tools/binman/etype/nxp_append_ddrfw.py new file +2 -1
+
+        return data
 
--

2.34.1

Regards,
SImon

[1] https://docs.u-boot.org/en/latest/develop/binman_tests.html
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=430428&state=*
[3] https://docs.u-boot.org/en/latest/develop/package/binman.html#external-blobs

author
#17 lore raw

PATCH v2 15/17 tools: imx8image: add i.MX95 support

In reply to Alice Guo

From: Alice Guo <[email protected]>

i.MX95 uses binman to invoke mkimage to create image container. 2 image containers are needed currently. The first one is composed of ahab-container.img, LPDDR firmware images, OEI images, System Manager image and u-boot-spl.bin. The second one is comsisted of ARM Trusted firmware and u-boot.bin.

Because DDR OEI image and LPDDR firmware images have to be packaged together and named as m33-oei-ddrfw.bin, so imx9_image.sh does not check if m33-oei-ddrfw.bin exists.

---
 include/imx8image.h |  19 +++++--
 tools/imx8image.c   | 143 +++++++++++++++++++++++++++++++++++++++++++++++-----
 tools/imx9_image.sh |   4 ++
 3 files changed, 149 insertions(+), 17 deletions(-)
include/imx8image.h +16 -3
index 6b95e93fb50980f9e86099b3103142dcbe38764a..233c28aa501f1e78c4160bdf5ca69d2b474217ea 100644
@@ -157,7 +157,9 @@ enum imx8image_cmd {
 	CMD_SOC_TYPE,
 	CMD_CONTAINER,
 	CMD_IMAGE,
-	CMD_DATA
+	CMD_DATA,
+	CMD_DUMMY_V2X,
+	CMD_HOLD
 };
 
 enum imx8image_core_type {
@@ -169,7 +171,9 @@ enum imx8image_core_type {
 	CFG_A35,
 	CFG_A55,
 	CFG_A53,
-	CFG_A72
+	CFG_A72,
+	CFG_M33,
+	CFG_OEI
 };
 
 enum imx8image_fld_types {
@@ -208,7 +212,10 @@ typedef enum option_type {
 	FILEOFF,
 	MSG_BLOCK,
 	SENTINEL,
-	UPOWER
+	UPOWER,
+	OEI,
+	DUMMY_V2X,
+	HOLD
 } option_type_t;
 
 typedef struct {
@@ -227,12 +234,16 @@ typedef struct {
 #define CORE_CA35       4
 #define CORE_CA72       5
 #define CORE_SECO       6
+#define CORE_M33        7
 
 #define CORE_ULP_CM33		0x1
 #define CORE_ULP_CA35		0x2
 #define CORE_ULP_UPOWER 	0x4
 #define CORE_ULP_SENTINEL 	0x6
 
+#define CORE_IMX95_M33P        0U
+#define CORE_IMX95_A55C0       2U
+
 #define SC_R_OTP	357U
 #define SC_R_DEBUG	354U
 #define SC_R_ROM_0	236U
@@ -246,10 +257,12 @@ typedef struct {
 #define IMG_TYPE_EXEC    0x03   /* Executable image type */
 #define IMG_TYPE_DATA    0x04   /* Data image type */
 #define IMG_TYPE_DCD_DDR 0x05   /* DCD/DDR image type */
+#define IMG_TYPE_OEI     0x05   /* Optional Executable image type */
 #define IMG_TYPE_SECO    0x06   /* SECO image type */
 #define IMG_TYPE_SENTINEL 0x06	/* SENTINEL image type */
 #define IMG_TYPE_PROV    0x07   /* Provisioning image type */
 #define IMG_TYPE_DEK     0x08   /* DEK validation type */
+#define IMG_TYPE_V2X_DUMMY 0x0E /* V2X Dummy image */
 
 #define IMG_TYPE_SHIFT   0
 #define IMG_TYPE_MASK    0x1f
tools/imx8image.c +129 -14

298 lines not on this page · raw message

tools/imx9_image.sh +4 -0
index ca78a57a19a06ade4792da6d2435cbc4fa07de62..76db4e8eff4018ea4eba43477c8122a08bfa92cf 100755
@@ -18,6 +18,10 @@ for f in $blobs; do
 		continue
 	fi
 
+	if [ $f = "m33-oei-ddrfw.bin" ]; then
+		continue
+	fi
+
 	if [ ! -f $tmp ]; then
 		echo "WARNING '$tmp' not found, resulting binary may be not-functional" >&2
 
Signature · 1 line
2.34.1
author
#18 lore raw

PATCH v2 16/17 imx95_evk: add i.MX95 19x19 EVK board basic support

In reply to Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 19x19 EVK board basic support.

---
 arch/arm/dts/imx95-19x19-evk-u-boot.dtsi      | 224 ++++++++++++++++++++++++++
 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 ++
 arch/arm/mach-imx/imx9/scmi/soc.c             |   1 +
 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 |  95 +++++++++++
 board/freescale/imx95_evk/imx95_evk.c         |  54 +++++++
 board/freescale/imx95_evk/spl.c               | 117 ++++++++++++++
 configs/imx95_19x19_evk_defconfig             | 178 ++++++++++++++++++++
 doc/board/nxp/imx95_evk.rst                   | 109 +++++++++++++
 doc/board/nxp/index.rst                       |   1 +
 include/configs/imx95_evk.h                   |  36 +++++
 15 files changed, 875 insertions(+)
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +224 -0
new file mode 100644
index 0000000000000000000000000000000000000000..5c891518448d24204f5ca2a00957b47a0a24bd70
@@ -0,0 +1,224 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2024 NXP
+ */
+
+#ifdef CONFIG_BINMAN
+/ {
+	binman {
+		multiple-images;
+
+		m33-oei-ddrfw {
+			filename = "m33-oei-ddrfw.bin";
+
+			nxp-append-ddrfw {
+				oei_m33_ddr_image = "oei-m33-ddr.bin";
+				lpddr_imem = "lpddr5_imem_v202311.bin";
+				lpddr_dmem = "lpddr5_dmem_v202311.bin";
+				lpddr_imem_qb = "lpddr5_imem_qb_v202311.bin";
+				lpddr_dmem_qb = "lpddr5_dmem_qb_v202311.bin";
+			};
+		};
+
+		spl {
+			filename = "spl.bin";
+
+			mkimage {
+				args = "-n spl/u-boot-spl.cfgout -T imx8image";
+			};
+		};
+
+		u-boot {
+			filename = "uboot.bin";
+
+			mkimage {
+				args = "-n u-boot-container.cfgout -T imx8image";
+			};
+		};
+
+		imx-boot {
+			filename = "imx-boot-imx95.bin";
+			pad-byte = <0x00>;
+
+			blob-ext@1 {
+				align = <0x400>;
+				align-size = <0x400>;
+				offset = <0x0>;
+				filename = "spl.bin";
+			};
+
+			blob-ext@2 {
+				filename = "uboot.bin";
+			};
+		};
+	};
+};
+#endif
+
+&{/soc} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&aips1 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&aips2 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&aips3 {
+	bootph-pre-ram;
+};
+
+&gpio1 {
+	reg = <0 0x47400000 0 0x1000>, <0 0x47400040 0 0x40>;
+};
+
+&gpio2 {
+	reg = <0 0x43810000 0 0x1000>, <0 0x43810040 0 0x40>;
+	bootph-pre-ram;
+};
+
+&gpio3 {
+	reg = <0 0x43820000 0 0x1000>, <0 0x43820040 0 0x40>;
+	bootph-pre-ram;
+};
+
+&gpio4 {
+	reg = <0 0x43840000 0 0x1000>, <0 0x43840040 0 0x40>;
+	bootph-pre-ram;
+};
+
+&gpio5 {
+	reg = <0 0x43850000 0 0x1000>, <0 0x43850040 0 0x40>;
+	bootph-pre-ram;
+};
+
+&lpuart1 {
+	clocks = <&scmi_clk IMX95_CLK_LPUART1>, <&scmi_clk IMX95_CLK_LPUART1>;
+	clock-names = "ipg", "per";
+	bootph-pre-ram;
+};
+
+&mu2 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&osc_24m {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&clk_ext1 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&sram0 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&scmi_buf0 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&scmi_buf1 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@11} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@13} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@14} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@19} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&pinctrl_uart1 {
+	bootph-pre-ram;
+};
+
+&usdhc1 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc1 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc1_100mhz {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc1_200mhz {
+	bootph-pre-ram;
+};
+
+&usdhc2 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_100mhz {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_200mhz {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_gpio {
+	bootph-pre-ram;
+};
+
+&reg_usdhc2_vmmc {
+	bootph-pre-ram;
+};
+
+&pinctrl_reg_usdhc2_vmmc {
+	bootph-pre-ram;
+};
+
+&elemu3 {
+	compatible = "fsl,imx93-mu-s4";
+	status = "okay";
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&wdog3 {
+	status = "disabled";
+};
arch/arm/mach-imx/imx9/Kconfig +6 -0
index 596e753f2897c11d7ca3bcc9211af786d005bfd9..1ba277baeb353de301a1e67a7adf70f281752ded 100644
@@ -66,6 +66,11 @@ config TARGET_PHYCORE_IMX93
 	select OF_BOARD_FIXUP
 	select OF_BOARD_SETUP
 
+config TARGET_IMX95_19X19_EVK
+	bool "imx95_19x19_evk"
+	select IMX95
+	imply OF_UPSTREAM
+
 endchoice
 
 source "board/freescale/imx91_evk/Kconfig"
@@ -73,6 +78,7 @@ source "board/freescale/imx93_evk/Kconfig"
 source "board/freescale/imx93_qsb/Kconfig"
 source "board/phytec/phycore_imx93/Kconfig"
 source "board/variscite/imx93_var_som/Kconfig"
+source "board/freescale/imx95_evk/Kconfig"
 
 endif
 
arch/arm/mach-imx/imx9/scmi/container.cfg new file +10 -0
new file mode 100644
index 0000000000000000000000000000000000000000..29f346e59c4afd0c2689667abe36f4b776b29ba8
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2024 NXP
+ */
+
+BOOT_FROM SD
+SOC_TYPE IMX9
+CONTAINER
+IMAGE A55 bl31.bin 0x8a200000
+IMAGE A55 u-boot.bin CONFIG_TEXT_BASE
\ No newline at end of file
arch/arm/mach-imx/imx9/scmi/imximage.cfg new file +15 -0
new file mode 100644
index 0000000000000000000000000000000000000000..c90432f5efa78dccb2c67e237b88a96174446b96
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2024 NXP
+ */
+
+BOOT_FROM SD
+SOC_TYPE IMX9
+APPEND mx95a0-ahab-container.img
+CONTAINER
+IMAGE OEI m33-oei-ddrfw.bin 0x1ffc0000
+HOLD 0x10000
+IMAGE OEI oei-m33-tcm.bin 0x1ffc0000
+IMAGE M33 m33_image.bin 0x1ffc0000
+IMAGE A55 spl/u-boot-spl.bin 0x20480000
+DUMMY_V2X 0x8b000000
\ No newline at end of file
arch/arm/mach-imx/imx9/scmi/soc.c +1 -0
index 8a7df24afecc1d6d77b7162be639b56af95fd975..38ade99964b64512ba93423efcaa0cfb58094b00 100644
@@ -43,6 +43,7 @@
 #endif
 #include <spl.h>
 #include <mmc.h>
+#include <asm/arch/mu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/freescale/imx95_evk/Kconfig new file +12 -0
new file mode 100644
index 0000000000000000000000000000000000000000..f9a67353e5db6d3ec94784cf091e45d8817d541c
@@ -0,0 +1,12 @@
+if TARGET_IMX95_19X19_EVK
+
+config SYS_BOARD
+	default "imx95_evk"
+
+config SYS_VENDOR
+	default "freescale"
+
+config SYS_CONFIG_NAME
+	default "imx95_evk"
+
+endif
board/freescale/imx95_evk/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000000000000000000000000000000000000..5caf763e0cc390c46fc54ee627bc966b2b110958
@@ -0,0 +1,6 @@
+i.MX95 EVK BOARD
+M:	Alice Guo <[email protected]>
+S:	Maintained
+F:	board/freescale/imx95_evk/
+F:	include/configs/imx95_evk.h
+F:	configs/imx95_19x19_evk_defconfig
board/freescale/imx95_evk/Makefile new file +11 -0
new file mode 100644
index 0000000000000000000000000000000000000000..a278d58ee0085176948b812703d120aaad3a3116
@@ -0,0 +1,11 @@
+#
+# Copyright 2024 NXP
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += imx95_evk.o
+
+ifdef CONFIG_SPL_BUILD
+obj-y += spl.o
+endif
board/freescale/imx95_evk/imx95_19x19_evk.env new file +95 -0

96 lines not on this page · raw message

board/freescale/imx95_evk/imx95_evk.c new file +54 -0

54 lines not on this page · raw message

board/freescale/imx95_evk/spl.c new file +117 -0

117 lines not on this page · raw message

configs/imx95_19x19_evk_defconfig new file +178 -0

178 lines not on this page · raw message

doc/board/nxp/imx95_evk.rst new file +109 -0

109 lines not on this page · raw message

doc/board/nxp/index.rst +1 -0
index 8ca4b5619863f616dbedc7eb0ff8a286a3fbbf48..e7ec725cc04e9755ba3dac37561c26ebc3f1c716 100644
@@ -15,6 +15,7 @@ NXP Semiconductors
    imx91_11x11_evk
    imx93_9x9_qsb
    imx93_11x11_evk
+   imx95_evk
    imxrt1020-evk
    imxrt1050-evk
    imxrt1170-evk
include/configs/imx95_evk.h new file +36 -0
new file mode 100644
index 0000000000000000000000000000000000000000..0f37fcddebaf7c6ed45c344d8992d2aa28c798d3
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2024 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)
+
+#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 CFG_SYS_FSL_USDHC_NUM	2
+
+/* Using ULP WDOG for reset */
+#define WDOG_BASE_ADDR          WDG3_BASE_ADDR
+
+/* USB configs */
+#if defined(CONFIG_CMD_NET)
+#define PHY_ANEG_TIMEOUT 20000
+/* Number of Rx BD rings: 8 per ENETC instance */
+#endif
+
+#endif
Signature · 1 line
2.34.1
#19 lore raw

Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Hi Alice,

Quoted 70 lines · Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 19x19 EVK board basic support.

---
 arch/arm/dts/imx95-19x19-evk-u-boot.dtsi      | 224 ++++++++++++++++++++++++++
 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 ++
 arch/arm/mach-imx/imx9/scmi/soc.c             |   1 +
 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 |  95 +++++++++++
 board/freescale/imx95_evk/imx95_evk.c         |  54 +++++++
 board/freescale/imx95_evk/spl.c               | 117 ++++++++++++++
 configs/imx95_19x19_evk_defconfig             | 178 ++++++++++++++++++++
 doc/board/nxp/imx95_evk.rst                   | 109 +++++++++++++
 doc/board/nxp/index.rst                       |   1 +
 include/configs/imx95_evk.h                   |  36 +++++
 15 files changed, 875 insertions(+)
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +38 -0
new file mode 100644
index 0000000000000000000000000000000000000000..5c891518448d24204f5ca2a00957b47a0a24bd70
@@ -0,0 +1,224 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2024 NXP
+ */
+
+#ifdef CONFIG_BINMAN
+/ {
+       binman {
+               multiple-images;
+
+               m33-oei-ddrfw {
+                       filename = "m33-oei-ddrfw.bin";
+
+                       nxp-append-ddrfw {
+                               oei_m33_ddr_image = "oei-m33-ddr.bin";
+                               lpddr_imem = "lpddr5_imem_v202311.bin";
+                               lpddr_dmem = "lpddr5_dmem_v202311.bin";
+                               lpddr_imem_qb = "lpddr5_imem_qb_v202311.bin";
+                               lpddr_dmem_qb = "lpddr5_dmem_qb_v202311.bin";
+                       };
+               };
+
+               spl {
+                       filename = "spl.bin";
+
+                       mkimage {
+                               args = "-n spl/u-boot-spl.cfgout -T imx8image";
+                       };
+               };
+
+               u-boot {
+                       filename = "uboot.bin";
+
+                       mkimage {
+                               args = "-n u-boot-container.cfgout -T imx8image";
+                       };
+               };
+

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi line 48

Quoted 10 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +10 -0
+               imx-boot {
+                       filename = "imx-boot-imx95.bin";
+                       pad-byte = <0x00>;
+
+                       blob-ext@1 {
+                               align = <0x400>;
+                               align-size = <0x400>;
+                               offset = <0x0>;
+                               filename = "spl.bin";
+                       };

For this node you should just be able to do something like:

imx-boot {
filename = "imx-boot-imx95.bin";
pad-byte = <0x00>;

   spl {
      type = "mkimage";
      args = "-n spl/u-boot-spl.cfgout -T imx8image";
      align = <0x400>;
      align-size = <0x400>;

};

You don't need to create intermediate files for all this stuff, so drop your 'filename' properties.

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi line 52

Quoted 3 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +3 -0
+                       blob-ext@2 {
+                               filename = "uboot.bin";
+                       };

similar for this one

[..]

Quoted 92 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +86 -0
new file mode 100644
index 0000000000000000000000000000000000000000..27e09d3d70a068efb97d69b27089d1f213f39ee9
@@ -0,0 +1,95 @@
+sec_boot=no
+initrd_addr=0x93800000
+emmc_dev=0
+sd_dev=1
+prepare_mcore=setenv mcore_clk clk-imx95.mcore_booted
+scriptaddr=0x93500000
+kernel_addr_r=" __stringify(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
+mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV)"
+mmcpart=1
+mmcroot=/dev/mmcblk1p2 rootwait rw
+mmcautodetect=yes
+mmcargs=setenv bootargs ${mcore_clk} 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 ...;
+               run mmcargs;
+               if test ${sec_boot} = yes; then
+                       if run auth_os; then
+                               run boot_os;
+                       else
+                               echo ERR: failed to authenticate;
+                       fi;
+               else
+                       if test ${boot_fit} = yes || test ${boot_fit} = try; then
+                               bootm ${loadaddr};
+                       else
+                               if run loadfdt; then
+                                       run boot_os;
+                               else
+                                       echo WARN: Cannot load the DT;
+                               fi;
+                       fi;
+               fi;
+netargs=setenv bootargs ${mcore_clk} console=${console}
+               root=/dev/nfs
+               ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
+netboot=echo Booting from net ...;
+               run netargs;
+               if test ${ip_dyn} = yes; then
+                       setenv get_cmd dhcp;
+               else
+                       setenv get_cmd tftp;
+               fi;
+               if test ${sec_boot} = yes; then
+                       ${get_cmd} ${cntr_addr} ${cntr_file};
+                       if run auth_os; then
+                               run boot_os;
+                       else
+                               echo ERR: failed to authenticate;
+                       fi;
+               else
+                       ${get_cmd} ${loadaddr} ${image};
+                       if test ${boot_fit} = yes || test ${boot_fit} = try; then
+                               bootm ${loadaddr};
+                       else
+                               if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then
+                                       run boot_os;
+                               else
+                                       echo WARN: Cannot load the DT;
+                               fi;
+                       fi;
+               fi;
+bsp_bootcmd=echo Running BSP bootcmd ...;
+                       mmc dev ${mmcdev}; if mmc rescan; then
+                       if run loadbootscript; then
+                               run bootscript;
+                       else
+                               if test ${sec_boot} = yes; then
+                                       if run loadcntr; then
+                                               run mmcboot;
+                                       else run netboot;

board/freescale/imx95_evk/imx95_19x19_evk.env line 95

Quoted 10 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +9 -0
+                                       fi;
+                               else
+                                       if run loadimage; then
+                                               run mmcboot;
+                                       else run netboot;
+                                       fi;
+                               fi;
+                       fi;
+               fi;
\ No newline at end of file

Could this be moved to use standard boot?

Quoted 38 lines
board/freescale/imx95_evk/imx95_evk.c new file +32 -0
new file mode 100644
index 0000000000000000000000000000000000000000..c75a8f2450288a34cfc01150d3c42b07f2215491
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2024 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"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f(void)
+{
+       /* UART1: A55, UART2: M33, UART3: M7 */
+       init_uart_clk(0);
+
+       return 0;

[..]

Quoted 44 lines
board/freescale/imx95_evk/imx95_evk.c new file +44 -0
+void board_init_f(ulong dummy)
+{
+       int ret;
+       bool ddrmix_power = false;
+
+       /* Clear the BSS. */
+       memset(__bss_start, 0, __bss_end - __bss_start);
+
+#ifdef CONFIG_SPL_RECOVER_DATA_SECTION
+       if (IS_ENABLED(CONFIG_SPL_BUILD))
+               spl_save_restore_data();
+#endif
+
+       timer_init();
+
+       /* Need dm_init() to run before any SCMI calls can be made. */
+       spl_early_init();
+
+       /* Need enable SCMI drivers and ELE driver before enabling console */
+       ret = imx9_probe_mu();
+       if (ret)
+               hang(); /* if MU not probed, nothing can output, just hang here */
+
+       arch_cpu_init();
+
+       board_early_init_f();
+
+       preloader_console_init();
+
+       debug("SOC: 0x%x\n", gd->arch.soc_rev);
+       debug("LC: 0x%x\n", gd->arch.lifecycle);
+
+       /* Will set ARM freq to max rate */
+       clock_init_late();
+
+       /* Check is DDR MIX is already powered up. */
+       u32 state = 0;
+       struct udevice *dev;
+
+       ret = uclass_get_device_by_name(UCLASS_CLK, "protocol@14", &dev);
+       if (ret)
+               printf("%s: %d\n", __func__, ret);
+
+       ret = scmi_pwd_state_get(dev, IMX95_PD_DDR, &state);

board/freescale/imx95_evk/imx95_evk.c

Quoted 10 lines
board/freescale/imx95_evk/imx95_evk.c new file +10 -0
+       if (ret) {
+               printf("scmi_pwd_state_get Failed %d for DDRMIX\n", ret);
+       } else {
+               if (state == BIT(30)) {
+                       panic("DDRMIX is powered OFF, Please initialize DDR with OEI \n");
+               } else {
+                       printf("DDRMIX is powered UP \n");
+                       ddrmix_power = true;
+               }
+       }

How about putting this code in a separate function (called from board_init_f()) so you can check errors consistently, and always hang or panic in that situation?

Quoted 3 lines
board/freescale/imx95_evk/imx95_evk.c new file +3 -0
+
+       board_init_r(NULL, 0);
+}

[..]

Quoted 56 lines
doc/board/nxp/imx95_evk.rst new file +50 -0
new file mode 100644
index 0000000000000000000000000000000000000000..c2be474aa71f0f8d934f956c8840d330fbee98df
@@ -0,0 +1,109 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+imx95_evk
+=======================
+
+U-Boot for the NXP i.MX95 19x19 EVK board
+
+Quick Start
+-----------
+
+- Get ahab-container.img
+- Get the DDR PHY Firmware Images
+- Get and Build OEI Images
+- Get and Build System Manager Image
+- Get and Build the ARM Trusted Firmware
+- Build the Bootloader Image
+- Boot
+
+Get ahab-container.img
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+
+.. code-block:: bash
+
+   $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-ele-imx-1.3.0-17945fc.bin
+   $ chmod +x firmware-ele-imx-1.3.0-17945fc.bin
+   $ ./firmware-ele-imx-1.3.0-17945fc.bin
+   $ cp firmware-ele-imx-1.3.0-17945fc.bin/mx95a0-ahab-container.img $(srctree)
+
+Get the DDR PHY Firmware Images
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+
+.. code-block:: bash
+
+   $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.26-d4c33ab.bin
+   $ chmod +x firmware-imx-8.26-d4c33ab.bin
+   $ ./firmware-imx-8.26-d4c33ab.bin
+   $ cp firmware-imx-8.26-d4c33ab/firmware/ddr/synopsys/lpddr5*v202311.bin $(srctree)
+
+Get and Build OEI Images
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+Get OEI from: https://github.com/nxp-imx/imx-oei
+branch: master
+
+.. code-block:: bash

doc/board/nxp/imx95_evk.rst line 60

Quoted 10 lines
doc/board/nxp/imx95_evk.rst new file +10 -0
+
+   $ sudo apt -y install make gcc g++-multilib srecord
+   $ wget https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
+   $ tar xvf arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
+   $ export TOOLS=$PWD
+   $ make board=mx95lp5 oei=ddr DEBUG=1
+   $ cp build/mx95lp5/ddr/oei-m33-ddr.bin $(srctree)
+
+   $ make board=mx95lp5 oei=tcm DEBUG=1
+   $ cp build/mx95lp5/tcm/oei-m33-tcm.bin $(srctree)

Blobs should be accessed via environment variables (like TEE, BL31) or using the binman input path. How about creating an IMX_BLOBS variable and adding to Makefile like '-a imx-blobs=$(IMX_BLOBS)' - see ti-dm-path for an example.

Quoted 34 lines
doc/board/nxp/imx95_evk.rst new file +34 -0
+
+Get and Build System Manager Image
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+Get System Manager from: https://github.com/nxp-imx/imx-sm
+branch: master
+
+.. code-block:: bash
+
+   $ sudo apt -y install make gcc g++-multilib srecord
+   $ wget https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
+   $ tar xvf arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
+   $ export TOOLS=$PWD
+   $ make config=mx95evk all
+   $ cp build/mx95evk/m33_image.bin $(srctree)
+
+Get and Build the ARM Trusted Firmware
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+Get ATF from: https://github.com/nxp-imx/imx-atf/
+branch: lf_v2.10
+
+.. code-block:: bash
+
+   $ unset LDFLAGS
+   $ make PLAT=imx95 bl31
+   $ cp build/imx95/release/bl31.bin $(srctree)
+
+Build the Bootloader Image
+------------
+
+.. code-block:: bash

doc/board/nxp/imx95_evk.rst line 104

Quoted 10 lines
doc/board/nxp/imx95_evk.rst new file +10 -0
+
+   $ export CROSS_COMPILE=aarch64-poky-linux-
+   $ make imx95_19x19_evk_defconfig
+   $ make
+
+Copy imx-boot-imx95.bin to the MicroSD card:
+
+.. code-block:: bash
+
+   $ sudo dd if=imx-boot-imx95.bin of=/dev/sdb bs=1k seek=32 conv=fsync

Good instructions.

Regards,
Simon

#20 lore raw

回复: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 161 lines

-----邮件原件-----
发件人: Simon Glass <[email protected]>
发送时间: 2024年12月21日 1:37
收件人: Alice Guo (OSS) <[email protected]>
抄送: Tom Rini <[email protected]>; Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; dl-uboot-imx <[email protected]>; Lukasz Majewski <[email protected]>; Sean Anderson <[email protected]>; Alper Nebi Yasak <[email protected]>; [email protected]; [email protected]; Alice Guo <[email protected]>; Ye Li <[email protected]>; Peng Fan <[email protected]>
主题: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Hi Alice,

Quoted 10 lines · Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 19x19 EVK board basic support.

---
 arch/arm/dts/imx95-19x19-evk-u-boot.dtsi      | 224

++++++++++++++++++++++++++

Quoted 11 lines
 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 ++
 arch/arm/mach-imx/imx9/scmi/soc.c             |   1 +
 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 |  95 +++++++++++
 board/freescale/imx95_evk/imx95_evk.c         |  54 +++++++
 board/freescale/imx95_evk/spl.c               | 117 ++++++++++++++
 configs/imx95_19x19_evk_defconfig             | 178

++++++++++++++++++++

Quoted 10 lines
 doc/board/nxp/imx95_evk.rst                   | 109 +++++++++++++
 doc/board/nxp/index.rst                       |   1 +
 include/configs/imx95_evk.h                   |  36 +++++
 15 files changed, 875 insertions(+)
board/freescale/imx95_evk/imx95_19x19_evk.env new file +0 -0
new file mode 100644

index

0000000000000000000000000000000000000000..27e09d3d70a068efb97d69b 27089

Quoted 32 lines

d1f213f39ee9

board/freescale/imx95_evk/imx95_19x19_evk.env new file +28 -0
@@ -0,0 +1,95 @@
+sec_boot=no
+initrd_addr=0x93800000
+emmc_dev=0
+sd_dev=1
+prepare_mcore=setenv mcore_clk clk-imx95.mcore_booted
+scriptaddr=0x93500000
+kernel_addr_r=" __stringify(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
+mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV)"
+mmcpart=1
+mmcroot=/dev/mmcblk1p2 rootwait rw
+mmcautodetect=yes
+mmcargs=setenv bootargs ${mcore_clk} 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}

board/freescale/imx95_evk/imx95_19x19_evk.env line 38

Quoted 10 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +10 -0
+- ${fdt_addr_r}; mmcboot=echo Booting from mmc ...;
+               run mmcargs;
+               if test ${sec_boot} = yes; then
+                       if run auth_os; then
+                               run boot_os;
+                       else
+                               echo ERR: failed to authenticate;
+                       fi;
+               else
+                       if test ${boot_fit} = yes || test ${boot_fit} = try;

then

board/freescale/imx95_evk/imx95_19x19_evk.env

Quoted 6 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +6 -0
+                               bootm ${loadaddr};
+                       else
+                               if run loadfdt; then
+                                       run boot_os;
+                               else
+                                       echo WARN: Cannot load

the DT;

Quoted 13 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +13 -0
+                               fi;
+                       fi;
+               fi;
+netargs=setenv bootargs ${mcore_clk} console=${console}
+               root=/dev/nfs
+               ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
+netboot=echo Booting from net ...;
+               run netargs;
+               if test ${ip_dyn} = yes; then
+                       setenv get_cmd dhcp;
+               else
+                       setenv get_cmd tftp;
+               fi;

board/freescale/imx95_evk/imx95_19x19_evk.env

Quoted 10 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +10 -0
+               if test ${sec_boot} = yes; then
+                       ${get_cmd} ${cntr_addr} ${cntr_file};
+                       if run auth_os; then
+                               run boot_os;
+                       else
+                               echo ERR: failed to authenticate;
+                       fi;
+               else
+                       ${get_cmd} ${loadaddr} ${image};
+                       if test ${boot_fit} = yes || test ${boot_fit} = try;

then

board/freescale/imx95_evk/imx95_19x19_evk.env

Quoted 3 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +3 -0
+                               bootm ${loadaddr};
+                       else
+                               if ${get_cmd} ${fdt_addr_r} ${fdtfile};

then

board/freescale/imx95_evk/imx95_19x19_evk.env

Quoted 3 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +3 -0
+                                       run boot_os;
+                               else
+                                       echo WARN: Cannot load

the DT;

Quoted 12 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +12 -0
+                               fi;
+                       fi;
+               fi;
+bsp_bootcmd=echo Running BSP bootcmd ...;
+                       mmc dev ${mmcdev}; if mmc rescan; then
+                       if run loadbootscript; then
+                               run bootscript;
+                       else
+                               if test ${sec_boot} = yes; then
+                                       if run loadcntr; then
+                                               run mmcboot;
+                                       else run netboot;

board/freescale/imx95_evk/imx95_19x19_evk.env line 95

Quoted 10 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +9 -0
+                                       fi;
+                               else
+                                       if run loadimage; then
+                                               run mmcboot;
+                                       else run netboot;
+                                       fi;
+                               fi;
+                       fi;
+               fi;
\ No newline at end of file
Quoted 2 lines

Could this be moved to use standard boot?

Hi Simon, Fabio

I am new to standard boot and trying to understand the flow, could that be a follow up patch to switch imx95 to use standard boot? Then we no need to wait longer for i.MX95 patchset for mainline.

Best Regards,
Alice Guo

maintainer
#21 lore raw

Re: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Hi Alice,

[Please trim your replies when replying].

Quoted 3 lines · Alice Guo (OSS)

Hi Simon, Fabio

I am new to standard boot and trying to understand the flow, could that be a follow up patch to switch imx95 to use standard boot? Then we no need to wait longer for i.MX95 patchset for mainline.

That's OK.

Please send a v3 addressing the other comments.

maintainer
#22 lore raw

Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

In reply to Alice Guo

Hi Alice

Quoted 4 lines · Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 19x19 EVK board basic support.

Do you know if this board boots without patch 17/17?

If it doesn't boot, this patch should be the last one.

doc/board/nxp/imx95_evk.rst line 104

Quoted 5 lines
doc/board/nxp/imx95_evk.rst new file +5 -0
+Copy imx-boot-imx95.bin to the MicroSD card:
+
+.. code-block:: bash
+
+   $ sudo dd if=imx-boot-imx95.bin of=/dev/sdb bs=1k seek=32 conv=fsync

It would be better to call the final binary flash.bin to keep it consistent with imx8m/imx93.

Also, don't hardcode the device name as /dev/sdb as it can cause problem if someone has /dev/sdb mapped to something else.

maintainer
#23 lore raw

Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

In reply to Alice Guo

include/configs/imx95_evk.h line 32

Quoted 3 lines · Alice Guo
include/configs/imx95_evk.h new file +3 -0
+/* USB configs */
+#if defined(CONFIG_CMD_NET)
+#define PHY_ANEG_TIMEOUT 20000

This should be moved to the defconfig file instead.

#24 lore raw

Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

In reply to Alice Guo
Quoted 245 lines · Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 19x19 EVK board basic support.

---
 arch/arm/dts/imx95-19x19-evk-u-boot.dtsi      | 224 ++++++++++++++++++++++++++
 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 ++
 arch/arm/mach-imx/imx9/scmi/soc.c             |   1 +
 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 |  95 +++++++++++
 board/freescale/imx95_evk/imx95_evk.c         |  54 +++++++
 board/freescale/imx95_evk/spl.c               | 117 ++++++++++++++
 configs/imx95_19x19_evk_defconfig             | 178 ++++++++++++++++++++
 doc/board/nxp/imx95_evk.rst                   | 109 +++++++++++++
 doc/board/nxp/index.rst                       |   1 +
 include/configs/imx95_evk.h                   |  36 +++++
 15 files changed, 875 insertions(+)
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +214 -0
new file mode 100644
index 0000000000000000000000000000000000000000..5c891518448d24204f5ca2a00957b47a0a24bd70
@@ -0,0 +1,224 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2024 NXP
+ */
+
+#ifdef CONFIG_BINMAN
+/ {
+	binman {
+		multiple-images;
+
+		m33-oei-ddrfw {
+			filename = "m33-oei-ddrfw.bin";
+
+			nxp-append-ddrfw {
+				oei_m33_ddr_image = "oei-m33-ddr.bin";
+				lpddr_imem = "lpddr5_imem_v202311.bin";
+				lpddr_dmem = "lpddr5_dmem_v202311.bin";
+				lpddr_imem_qb = "lpddr5_imem_qb_v202311.bin";
+				lpddr_dmem_qb = "lpddr5_dmem_qb_v202311.bin";
+			};
+		};
+
+		spl {
+			filename = "spl.bin";
+
+			mkimage {
+				args = "-n spl/u-boot-spl.cfgout -T imx8image";
+			};
+		};
+
+		u-boot {
+			filename = "uboot.bin";
+
+			mkimage {
+				args = "-n u-boot-container.cfgout -T imx8image";
+			};
+		};
+
+		imx-boot {
+			filename = "imx-boot-imx95.bin";
+			pad-byte = <0x00>;
+
+			blob-ext@1 {
+				align = <0x400>;
+				align-size = <0x400>;
+				offset = <0x0>;
+				filename = "spl.bin";
+			};
+
+			blob-ext@2 {
+				filename = "uboot.bin";
+			};
+		};
+	};
+};
+#endif
+
+&{/soc} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&aips1 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&aips2 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&aips3 {
+	bootph-pre-ram;
+};
+
+&gpio1 {
+	reg = <0 0x47400000 0 0x1000>, <0 0x47400040 0 0x40>;
+};
+
+&gpio2 {
+	reg = <0 0x43810000 0 0x1000>, <0 0x43810040 0 0x40>;
+	bootph-pre-ram;
+};
+
+&gpio3 {
+	reg = <0 0x43820000 0 0x1000>, <0 0x43820040 0 0x40>;
+	bootph-pre-ram;
+};
+
+&gpio4 {
+	reg = <0 0x43840000 0 0x1000>, <0 0x43840040 0 0x40>;
+	bootph-pre-ram;
+};
+
+&gpio5 {
+	reg = <0 0x43850000 0 0x1000>, <0 0x43850040 0 0x40>;
+	bootph-pre-ram;
+};
+
+&lpuart1 {
+	clocks = <&scmi_clk IMX95_CLK_LPUART1>, <&scmi_clk IMX95_CLK_LPUART1>;
+	clock-names = "ipg", "per";
+	bootph-pre-ram;
+};
+
+&mu2 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&osc_24m {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&clk_ext1 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&sram0 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&scmi_buf0 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&scmi_buf1 {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@11} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@13} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@14} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@19} {
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&pinctrl_uart1 {
+	bootph-pre-ram;
+};
+
+&usdhc1 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc1 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc1_100mhz {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc1_200mhz {
+	bootph-pre-ram;
+};
+
+&usdhc2 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_100mhz {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_200mhz {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_gpio {
+	bootph-pre-ram;
+};
+
+&reg_usdhc2_vmmc {
+	bootph-pre-ram;
+};
+
+&pinctrl_reg_usdhc2_vmmc {
+	bootph-pre-ram;
+};
+

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi line 224

Quoted 10 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +10 -0
+&elemu3 {
+	compatible = "fsl,imx93-mu-s4";
+	status = "okay";
+	bootph-all;
+	bootph-pre-ram;
+};
+
+&wdog3 {
+	status = "disabled";
+};

Hi Alice,

Would it be possible to factor out the common parts of the U-Boot SPL/Pre-relocation device tree into an imx95-u-boot.dtsi file, like U-Boot already has for imx8mp/imx8mm? From what I understand, the binman configuration and some DT nodes (e.g. soc, aips*, scmi*, elemu*, gpio2-5) are required on all boards, as they are bus parent nodes or needed by the SoC implementation.

In the downstream kernel, there are already other boards apart from the EVK (e.g., Verdin-EVK), and we’re also working on a new SoM family (Toradex SMARC iMX95). Having the common parts factored out would make things more organized and easier to upstream.

Best regards,
João Paulo

#25 lore raw

回复: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 298 lines

-----邮件原件-----
发件人: João Paulo Gonçalves <[email protected]> 发送时间: 2024年12月24日 21:33
收件人: Alice Guo (OSS) <[email protected]>
抄送: Tom Rini <[email protected]>; Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; dl-uboot-imx <[email protected]>; Lukasz Majewski <[email protected]>; Sean Anderson <[email protected]>; Simon Glass <[email protected]>; Alper Nebi Yasak <[email protected]>; [email protected]; [email protected]; Alice Guo <[email protected]>; Ye Li <[email protected]>; Peng Fan <[email protected]>; Francesco Dolcini <[email protected]>; [email protected]
主题: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 9 lines · Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 19x19 EVK board basic support.

---
 arch/arm/dts/imx95-19x19-evk-u-boot.dtsi      | 224

++++++++++++++++++++++++++

Quoted 11 lines
 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 ++
 arch/arm/mach-imx/imx9/scmi/soc.c             |   1 +
 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 |  95 +++++++++++
 board/freescale/imx95_evk/imx95_evk.c         |  54 +++++++
 board/freescale/imx95_evk/spl.c               | 117 ++++++++++++++
 configs/imx95_19x19_evk_defconfig             | 178

++++++++++++++++++++

Quoted 10 lines
 doc/board/nxp/imx95_evk.rst                   | 109 +++++++++++++
 doc/board/nxp/index.rst                       |   1 +
 include/configs/imx95_evk.h                   |  36 +++++
 15 files changed, 875 insertions(+)
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +0 -0
new file mode 100644

index

0000000000000000000000000000000000000000..5c891518448d24204f5ca 2a00957

Quoted 10 lines

b47a0a24bd70

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +6 -0
@@ -0,0 +1,224 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2024 NXP
+ */
+
+#ifdef CONFIG_BINMAN

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi line 16

Quoted 10 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +10 -0
+/ {
+     binman {
+             multiple-images;
+
+             m33-oei-ddrfw {
+                     filename = "m33-oei-ddrfw.bin";
+
+                     nxp-append-ddrfw {
+                             oei_m33_ddr_image = "oei-m33-ddr.bin";
+                             lpddr_imem =

"lpddr5_imem_v202311.bin";

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi line 17

Quoted 1 line
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +1 -0
+                             lpddr_dmem =

"lpddr5_dmem_v202311.bin";

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi line 18

Quoted 1 line
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +1 -0
+                             lpddr_imem_qb =

"lpddr5_imem_qb_v202311.bin";

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi line 19

Quoted 1 line
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +1 -0
+                             lpddr_dmem_qb =

"lpddr5_dmem_qb_v202311.bin";

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi

Quoted 8 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +8 -0
+                     };
+             };
+
+             spl {
+                     filename = "spl.bin";
+
+                     mkimage {
+                             args = "-n spl/u-boot-spl.cfgout -T

imx8image";

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi

Quoted 8 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +8 -0
+                     };
+             };
+
+             u-boot {
+                     filename = "uboot.bin";
+
+                     mkimage {
+                             args = "-n u-boot-container.cfgout -T

imx8image";

Quoted 56 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +56 -0
+                     };
+             };
+
+             imx-boot {
+                     filename = "imx-boot-imx95.bin";
+                     pad-byte = <0x00>;
+
+                     blob-ext@1 {
+                             align = <0x400>;
+                             align-size = <0x400>;
+                             offset = <0x0>;
+                             filename = "spl.bin";
+                     };
+
+                     blob-ext@2 {
+                             filename = "uboot.bin";
+                     };
+             };
+     };
+};
+#endif
+
+&{/soc} {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&aips1 {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&aips2 {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&aips3 {
+     bootph-pre-ram;
+};
+
+&gpio1 {
+     reg = <0 0x47400000 0 0x1000>, <0 0x47400040 0 0x40>; };
+
+&gpio2 {
+     reg = <0 0x43810000 0 0x1000>, <0 0x43810040 0 0x40>;
+     bootph-pre-ram;
+};
+
+&gpio3 {
+     reg = <0 0x43820000 0 0x1000>, <0 0x43820040 0 0x40>;
+     bootph-pre-ram;
+};
+
+&gpio4 {
+     reg = <0 0x43840000 0 0x1000>, <0 0x43840040 0 0x40>;

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi

Quoted 10 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +10 -0
+     bootph-pre-ram;
+};
+
+&gpio5 {
+     reg = <0 0x43850000 0 0x1000>, <0 0x43850040 0 0x40>;
+     bootph-pre-ram;
+};
+
+&lpuart1 {
+     clocks = <&scmi_clk IMX95_CLK_LPUART1>, <&scmi_clk

IMX95_CLK_LPUART1>;

Quoted 112 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +112 -0
+     clock-names = "ipg", "per";
+     bootph-pre-ram;
+};
+
+&mu2 {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&osc_24m {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&clk_ext1 {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&sram0 {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&scmi_buf0 {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&scmi_buf1 {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&{/firmware} {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&{/firmware/scmi} {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@11} {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@13} {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@14} {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&{/firmware/scmi/protocol@19} {
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&pinctrl_uart1 {
+     bootph-pre-ram;
+};
+
+&usdhc1 {
+     bootph-pre-ram;
+};
+
+&pinctrl_usdhc1 {
+     bootph-pre-ram;
+};
+
+&pinctrl_usdhc1_100mhz {
+     bootph-pre-ram;
+};
+
+&pinctrl_usdhc1_200mhz {
+     bootph-pre-ram;
+};
+
+&usdhc2 {
+     bootph-pre-ram;
+};
+
+&pinctrl_usdhc2 {
+     bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_100mhz {
+     bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_200mhz {
+     bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_gpio {
+     bootph-pre-ram;
+};
+
+&reg_usdhc2_vmmc {
+     bootph-pre-ram;
+};
+
+&pinctrl_reg_usdhc2_vmmc {
+     bootph-pre-ram;
+};
+

arch/arm/dts/imx95-19x19-evk-u-boot.dtsi line 224

Quoted 10 lines
arch/arm/dts/imx95-19x19-evk-u-boot.dtsi new file +10 -0
+&elemu3 {
+     compatible = "fsl,imx93-mu-s4";
+     status = "okay";
+     bootph-all;
+     bootph-pre-ram;
+};
+
+&wdog3 {
+     status = "disabled";
+};

Hi Alice,

Would it be possible to factor out the common parts of the U-Boot SPL/Pre-relocation device tree into an imx95-u-boot.dtsi file, like U-Boot already has for imx8mp/imx8mm? From what I understand, the binman configuration and some DT nodes (e.g. soc, aips*, scmi*, elemu*, gpio2-5) are required on all boards, as they are bus parent nodes or needed by the SoC implementation.

Quoted 7 lines

In the downstream kernel, there are already other boards apart from the EVK (e.g., Verdin-EVK), and we’re also working on a new SoM family (Toradex SMARC iMX95). Having the common parts factored out would make things more organized and easier to upstream.

Best regards,
João Paulo

Hi João Paulo,

Will move these common parts to an imx95-u-boot.dtsi file in next version.

Best Regards,
Alice Guo

#26 lore raw

Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

In reply to Alice Guo
Quoted 26 lines · Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 19x19 EVK board basic support.

---
 arch/arm/dts/imx95-19x19-evk-u-boot.dtsi      | 224 ++++++++++++++++++++++++++
 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 ++
 arch/arm/mach-imx/imx9/scmi/soc.c             |   1 +
 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 |  95 +++++++++++
 board/freescale/imx95_evk/imx95_evk.c         |  54 +++++++
 board/freescale/imx95_evk/spl.c               | 117 ++++++++++++++
 configs/imx95_19x19_evk_defconfig             | 178 ++++++++++++++++++++
 doc/board/nxp/imx95_evk.rst                   | 109 +++++++++++++
 doc/board/nxp/index.rst                       |   1 +
 include/configs/imx95_evk.h                   |  36 +++++
 15 files changed, 875 insertions(+)

<snip>

Quoted 25 lines
doc/board/nxp/imx95_evk.rst new file +19 -0
new file mode 100644
index 0000000000000000000000000000000000000000..c2be474aa71f0f8d934f956c8840d330fbee98df
@@ -0,0 +1,109 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+imx95_evk
+=======================
+
+U-Boot for the NXP i.MX95 19x19 EVK board
+
+Quick Start
+-----------
+
+- Get ahab-container.img
+- Get the DDR PHY Firmware Images
+- Get and Build OEI Images
+- Get and Build System Manager Image
+- Get and Build the ARM Trusted Firmware
+- Build the Bootloader Image
+- Boot
+
+Get ahab-container.img

doc/board/nxp/imx95_evk.rst line 29

Quoted 10 lines
doc/board/nxp/imx95_evk.rst new file +10 -0
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+
+.. code-block:: bash
+
+   $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-ele-imx-1.3.0-17945fc.bin
+   $ chmod +x firmware-ele-imx-1.3.0-17945fc.bin
+   $ ./firmware-ele-imx-1.3.0-17945fc.bin
+   $ cp firmware-ele-imx-1.3.0-17945fc.bin/mx95a0-ahab-container.img $(srctree)

Hi Alice,

typo here in the path. Should be:
cp firmware-ele-imx-1.3.0-17945fc/mx95a0-ahab-container.img $(srctree)

Quoted 9 lines
doc/board/nxp/imx95_evk.rst new file +9 -0
+
+Get the DDR PHY Firmware Images
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+
+.. code-block:: bash
+
+   $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.26-d4c33ab.bin

doc/board/nxp/imx95_evk.rst line 48

Quoted 10 lines
doc/board/nxp/imx95_evk.rst new file +10 -0
+   $ chmod +x firmware-imx-8.26-d4c33ab.bin
+   $ ./firmware-imx-8.26-d4c33ab.bin
+   $ cp firmware-imx-8.26-d4c33ab/firmware/ddr/synopsys/lpddr5*v202311.bin $(srctree)
+
+Get and Build OEI Images
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+Get OEI from: https://github.com/nxp-imx/imx-oei
+branch: master

how about just adding a 'git clone https://github.com/nxp-imx/imx-oei
-b master' in your instructions below and update the make/cp to use imx-oei path?

Quoted 9 lines
doc/board/nxp/imx95_evk.rst new file +9 -0
+
+.. code-block:: bash
+
+   $ sudo apt -y install make gcc g++-multilib srecord
+   $ wget https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
+   $ tar xvf arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
+   $ export TOOLS=$PWD
+   $ make board=mx95lp5 oei=ddr DEBUG=1
+   $ cp build/mx95lp5/ddr/oei-m33-ddr.bin $(srctree)

doc/board/nxp/imx95_evk.rst line 67

Quoted 10 lines
doc/board/nxp/imx95_evk.rst new file +10 -0
+
+   $ make board=mx95lp5 oei=tcm DEBUG=1
+   $ cp build/mx95lp5/tcm/oei-m33-tcm.bin $(srctree)
+
+Get and Build System Manager Image
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+Get System Manager from: https://github.com/nxp-imx/imx-sm
+branch: master

how about just adding a 'git clone https://github.com/nxp-imx/imx-sm
-b master' in your instructions below and update make/cp to use imx-sm path?

Quoted 6 lines
doc/board/nxp/imx95_evk.rst new file +6 -0
+
+.. code-block:: bash
+
+   $ sudo apt -y install make gcc g++-multilib srecord
+   $ wget https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
+   $ tar xvf arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz

doc/board/nxp/imx95_evk.rst line 83

Quoted 10 lines
doc/board/nxp/imx95_evk.rst new file +10 -0
+   $ export TOOLS=$PWD
+   $ make config=mx95evk all
+   $ cp build/mx95evk/m33_image.bin $(srctree)
+
+Get and Build the ARM Trusted Firmware
+--------------------------------------
+
+Note: srctree is U-Boot source directory
+Get ATF from: https://github.com/nxp-imx/imx-atf/
+branch: lf_v2.10

how about just adding a 'git clone https://github.com/nxp-imx/imx-atf
-b lf_v2.10' in your instructions below and update make/cp to use imx-atf path?

doc/board/nxp/imx95_evk.rst line 87

Quoted 4 lines
doc/board/nxp/imx95_evk.rst new file +4 -0
+
+.. code-block:: bash
+
+   $ unset LDFLAGS

why? where was LDFLAGS set?

doc/board/nxp/imx95_evk.rst line 88

Quoted 1 line
doc/board/nxp/imx95_evk.rst new file +1 -0
+   $ make PLAT=imx95 bl31

You need to export CROSS_COMPILE before building here

Quoted 11 lines
doc/board/nxp/imx95_evk.rst new file +11 -0
+   $ cp build/imx95/release/bl31.bin $(srctree)
+
+Build the Bootloader Image
+------------
+
+.. code-block:: bash
+
+   $ export CROSS_COMPILE=aarch64-poky-linux-
+   $ make imx95_19x19_evk_defconfig
+   $ make
+

doc/board/nxp/imx95_evk.rst line 109

Quoted 10 lines
doc/board/nxp/imx95_evk.rst new file +10 -0
+Copy imx-boot-imx95.bin to the MicroSD card:
+
+.. code-block:: bash
+
+   $ sudo dd if=imx-boot-imx95.bin of=/dev/sdb bs=1k seek=32 conv=fsync
+
+Boot
+----
+
+Set i.MX95 boot device to MicroSD card

I gave this series a go on top of 5cfbf8c364 origin/next on an EVK I have here and I saw no u-boot proper output after the ATF.

Here is what I saw on UART2:
U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP
Normal Boot
Trying to boot from MMC2
Primary set selected
Load image from MMC/SD 0xdec00

NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024

U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP
Normal Boot
Trying to boot from MMC2
Primary set selected
Load image from MMC/SD 0xdec00

NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024

^^^ nothing after this

Any thoughts on what is wrong here?

Best Regards,

Tim

#27 lore raw

回复: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 16 lines

主题: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 1 line

I gave this series a go on top of 5cfbf8c364 origin/next on an EVK I have here and I saw no u-boot proper output after the ATF.

Here is what I saw on UART2:
U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP Normal Boot Trying to boot from MMC2 Primary set selected Load image from MMC/SD 0xdec00

NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024

U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP Normal Boot Trying to boot from MMC2 Primary set selected Load image from MMC/SD 0xdec00

Quoted 8 lines
NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024 ^^^ nothing after this

Any thoughts on what is wrong here?

Best Regards,

Tim

Hi Tim,

I tried it on my MX95 and it works well, so I not sure what causes this issue on your EVK.

Best Regards,
Alice Guo

#28 lore raw

Re: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 22 lines · Alice Guo (OSS)
Quoted 22 lines

主题: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 1 line

I gave this series a go on top of 5cfbf8c364 origin/next on an EVK I have here and I saw no u-boot proper output after the ATF.

Here is what I saw on UART2:
U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP Normal Boot Trying to boot from MMC2 Primary set selected Load image from MMC/SD 0xdec00

NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024

U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP Normal Boot Trying to boot from MMC2 Primary set selected Load image from MMC/SD 0xdec00

NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024 ^^^ nothing after this

Any thoughts on what is wrong here?

Quoted 8 lines
Quoted 3 lines

Best Regards,

Tim

Hi Tim,

I tried it on my MX95 and it works well, so I not sure what causes this issue on your EVK.

Hi Alice,

I discovered what happened. The first make for uboot resulted in a binman warning (which should be a failure but is not for some reason) and results in an image that doesn't contain uboot proper:
WARNING './u-boot.bin' not found, resulting binary may be not-functional

Simon, do you know why this warning doesn't result in a make failure?

Doing a second make works, so I think there is likely a binman dependency issue going on here. You can re-create the issue with a distclean as shown here:

$ make distclean
  CLEAN   dts/./upstream/src/arm64
  CLEAN   dts
  CLEAN   lib/efi_loader
  CLEAN   tools
  CLEAN   tools/generated
  CLEAN   spl/arch spl/board spl/boot spl/cmd spl/common spl/disk
spl/drivers spl/dts spl/env spl/fs spl/lib spl/spl
spl/u-boot-spl spl/u-boot-spl.bin spl/u-boot-spl.cfgout
spl/u-boot-spl.dtb spl/u-boot-spl-dtb.bin spl/u-boot-spl.lds
spl/u-boot-spl.map spl/u-boot-spl-nodtb.bin spl/u-boot-spl.sym
  CLEAN   include/config.h u-boot u-boot.bin u-boot.cfg
u-boot-container.cfgout u-boot.dtb u-boot-dtb.bin u-boot-dtb.
img u-boot.dtb.out u-boot.elf u-boot-elf.lds u-boot-elf.o u-boot.img
u-boot.lds u-boot.map u-boot-nodtb.bin u-boot-sp
l.dtb.out u-boot.srec u-boot.sym System.map mkimage-out.spl.mkimage
mkimage.spl.mkimage imx-boot.map spl.map
  CLEAN   scripts/basic
  CLEAN   scripts/dtc/pylibfdt
  CLEAN   scripts/dtc
  CLEAN   scripts/kconfig
  CLEAN   include/config include/generated spl
  CLEAN   .config .config.old
$ make imx95_19x19_evk_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
  LEX     scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
$ make && ls -l imx-boot-imx95.bin
scripts/kconfig/conf  --syncconfig Kconfig
  UPD     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  CFG     spl/u-boot.cfg
  GEN     spl/include/autoconf.mk
  UPD     include/config/uboot.release
  UPD     include/generated/version_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  UPD     include/generated/dt.h
  ENVC    include/generated/env.txt
  ENVP    include/generated/env.in
  ENVT    include/generated/environment.h
  CC      lib/asm-offsets.s
  UPD     include/generated/generic-asm-offsets.h
  CC      arch/arm/lib/asm-offsets.s
  UPD     include/generated/asm-offsets.h
  SHIPPED scripts/dtc/pylibfdt/libfdt.i
  PYMOD   rebuild
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  LEX     scripts/dtc/dtc-lexer.lex.c
  YACC    scripts/dtc/dtc-parser.tab.h
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  YACC    scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
  HOSTCC  tools/gen_eth_addr
  HOSTCC  tools/gen_ethaddr_crc.o
  WRAP    tools/generated/lib/crc8.c
  HOSTCC  tools/generated/lib/crc8.o
  HOSTLD  tools/gen_ethaddr_crc
  HOSTCC  tools/img2srec
  HOSTCC  tools/mkenvimage.o
  HOSTCC  tools/os_support.o
  WRAP    tools/generated/lib/crc32.c
  HOSTCC  tools/generated/lib/crc32.o
  HOSTLD  tools/mkenvimage
  HOSTCC  tools/aisimage.o
  HOSTCC  tools/atmelimage.o
  HOSTCC  tools/fit_common.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/image-host.o
  WRAP    tools/generated/boot/image-fit.c
  HOSTCC  tools/generated/boot/image-fit.o
  HOSTCC  tools/image-sig-host.o
  WRAP    tools/generated/boot/image-fit-sig.c
  HOSTCC  tools/generated/boot/image-fit-sig.o
  WRAP    tools/generated/boot/image-cipher.c
  HOSTCC  tools/generated/boot/image-cipher.o
  WRAP    tools/generated/boot/fdt_region.c
  HOSTCC  tools/generated/boot/fdt_region.o
  WRAP    tools/generated/boot/bootm.c
  HOSTCC  tools/generated/boot/bootm.o
  HOSTCC  tools/default_image.o
  WRAP    tools/generated/lib/fdtdec_common.c
  HOSTCC  tools/generated/lib/fdtdec_common.o
  WRAP    tools/generated/lib/fdtdec.c
  HOSTCC  tools/generated/lib/fdtdec.o
  WRAP    tools/generated/boot/image.c
  HOSTCC  tools/generated/boot/image.o
  WRAP    tools/generated/boot/image-host.c
  HOSTCC  tools/generated/boot/image-host.o
  HOSTCC  tools/imagetool.o
  HOSTCC  tools/imximage.o
  HOSTCC  tools/imx8image.o
  HOSTCC  tools/imx8mimage.o
  HOSTCC  tools/kwbimage.o
  WRAP    tools/generated/lib/md5.c
  HOSTCC  tools/generated/lib/md5.o
  HOSTCC  tools/lpc32xximage.o
  HOSTCC  tools/mxsimage.o
  HOSTCC  tools/omapimage.o
  HOSTCC  tools/pblimage.o
  HOSTCC  tools/pbl_crc32.o
  HOSTCC  tools/renesas_spkgimage.o
  HOSTCC  tools/sfspl.o
  HOSTCC  tools/vybridimage.o
  HOSTCC  tools/stm32image.o
  WRAP    tools/generated/lib/rc4.c
  HOSTCC  tools/generated/lib/rc4.o
  HOSTCC  tools/rkcommon.o
  HOSTCC  tools/rkimage.o
  HOSTCC  tools/rksd.o
  HOSTCC  tools/rkspi.o
  HOSTCC  tools/socfpgaimage.o
  HOSTCC  tools/sunxi_egon.o
  WRAP    tools/generated/lib/crc16-ccitt.c
  HOSTCC  tools/generated/lib/crc16-ccitt.o
  WRAP    tools/generated/lib/hash-checksum.c
  HOSTCC  tools/generated/lib/hash-checksum.o
  WRAP    tools/generated/lib/sha1.c
  HOSTCC  tools/generated/lib/sha1.o
  WRAP    tools/generated/lib/sha256.c
  HOSTCC  tools/generated/lib/sha256.o
  WRAP    tools/generated/lib/sha512.c
  HOSTCC  tools/generated/lib/sha512.o
  WRAP    tools/generated/common/hash.c
  HOSTCC  tools/generated/common/hash.o
  HOSTCC  tools/ublimage.o
  HOSTCC  tools/zynqimage.o
  HOSTCC  tools/zynqmpimage.o
  HOSTCC  tools/zynqmpbif.o
  WRAP    tools/generated/lib/fdt-libcrypto.c
  HOSTCC  tools/generated/lib/fdt-libcrypto.o
  HOSTCC  tools/sunxi_toc0.o
  HOSTCC  tools/libfdt/fdt.o
  HOSTCC  tools/libfdt/fdt_ro.o
  HOSTCC  tools/libfdt/fdt_wip.o
  HOSTCC  tools/libfdt/fdt_sw.o
  HOSTCC  tools/libfdt/fdt_rw.o
  HOSTCC  tools/libfdt/fdt_strerror.o
  HOSTCC  tools/libfdt/fdt_empty_tree.o
  HOSTCC  tools/libfdt/fdt_addresses.o
  HOSTCC  tools/libfdt/fdt_overlay.o
  HOSTCC  tools/gpimage.o
  HOSTCC  tools/gpimage-common.o
  HOSTCC  tools/mtk_image.o
  HOSTCC  tools/mtk_nand_headers.o
  WRAP    tools/generated/lib/ecdsa/ecdsa-libcrypto.c
  HOSTCC  tools/generated/lib/ecdsa/ecdsa-libcrypto.o
  WRAP    tools/generated/lib/rsa/rsa-sign.c
  HOSTCC  tools/generated/lib/rsa/rsa-sign.o
  WRAP    tools/generated/lib/rsa/rsa-verify.c
  HOSTCC  tools/generated/lib/rsa/rsa-verify.o
  WRAP    tools/generated/lib/rsa/rsa-mod-exp.c
  HOSTCC  tools/generated/lib/rsa/rsa-mod-exp.o
  WRAP    tools/generated/lib/aes/aes-encrypt.c
  HOSTCC  tools/generated/lib/aes/aes-encrypt.o
  WRAP    tools/generated/lib/aes/aes-decrypt.c
  HOSTCC  tools/generated/lib/aes/aes-decrypt.o
  HOSTCC  tools/dumpimage.o
  HOSTLD  tools/dumpimage
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/mkimage
  HOSTCC  tools/fit_info.o
  HOSTLD  tools/fit_info
  HOSTCC  tools/fit_check_sign.o
  HOSTLD  tools/fit_check_sign
  HOSTCC  tools/fdt_add_pubkey.o
  HOSTLD  tools/fdt_add_pubkey
  HOSTCC  tools/proftool.o
  WRAP    tools/generated/lib/abuf.c
  HOSTCC  tools/generated/lib/abuf.o
  HOSTLD  tools/proftool
  HOSTCC  tools/relocate-rela
  HOSTCC  tools/fdtgrep.o
  HOSTLD  tools/fdtgrep
  HOSTCC  tools/spl_size_limit
  WRAP    tools/generated/lib/uuid.c
  HOSTCC  tools/generated/lib/uuid.o
  HOSTCC  tools/mkeficapsule.o
  HOSTLD  tools/mkeficapsule
  AR      arch/arm/cpu/built-in.o
  CC      arch/arm/cpu/armv8/cpu.o
  CC      arch/arm/cpu/armv8/generic_timer.o
  CC      arch/arm/cpu/armv8/cache_v8.o
  AS      arch/arm/cpu/armv8/cache.o
  AS      arch/arm/cpu/armv8/exceptions.o
  CC      arch/arm/cpu/armv8/exception_level.o
  AS      arch/arm/cpu/armv8/tlb.o
  AS      arch/arm/cpu/armv8/transition.o
  CC      arch/arm/cpu/armv8/fwcall.o
  CC      arch/arm/cpu/armv8/cpu-dt.o
  AS      arch/arm/cpu/armv8/smccc-call.o
  AR      arch/arm/cpu/armv8/built-in.o
  AS      arch/arm/cpu/armv8/start.o
  AS      arch/arm/lib/crt0_64.o
  AS      arch/arm/lib/setjmp_aarch64.o
  AS      arch/arm/lib/relocate_64.o
  CC      arch/arm/lib/bootm-fdt.o
  CC      arch/arm/lib/bootm.o
  CC      arch/arm/lib/image.o
  CC      arch/arm/lib/bdinfo.o
  CC      arch/arm/lib/sections.o
  CC      arch/arm/lib/stack.o
  CC      arch/arm/lib/interrupts_64.o
  CC      arch/arm/lib/reset.o
  CC      arch/arm/lib/cache.o
  CC      arch/arm/lib/psci-dt.o
  AR      arch/arm/lib/built-in.o
  AR      arch/arm/lib/lib.a
  CC      arch/arm/mach-imx/imx9/scmi/soc.o
  CC      arch/arm/mach-imx/imx9/scmi/clock_scmi.o
  CC      arch/arm/mach-imx/imx9/scmi/clock.o
  AR      arch/arm/mach-imx/imx9/scmi/built-in.o
  AS      arch/arm/mach-imx/imx9/lowlevel_init.o
  CC      arch/arm/mach-imx/imx9/imx_bootaux.o
  AR      arch/arm/mach-imx/imx9/built-in.o
  CC      arch/arm/mach-imx/iomux-v3.o
  CC      arch/arm/mach-imx/fdt.o
  CC      arch/arm/mach-imx/misc.o
  AR      arch/arm/mach-imx/built-in.o
  CC      board/freescale/common/mmc.o
  AR      board/freescale/common/built-in.o
  CC      board/freescale/imx95_evk/imx95_evk.o
  AR      board/freescale/imx95_evk/built-in.o
  CC      boot/bootm.o
  CC      boot/bootm_os.o
  CC      boot/pxe_utils.o
  CC      boot/image.o
  CC      boot/image-board.o
  CC      boot/bootdev-uclass.o
  CC      boot/bootflow.o
  CC      boot/bootmeth-uclass.o
  CC      boot/bootstd-uclass.o
  CC      boot/bootmeth_extlinux.o
  CC      boot/bootmeth_efi.o
  CC      boot/bootmeth_efi_mgr.o
  CC      boot/fdt_support.o
  CC      boot/image-fdt.o
  AR      boot/built-in.o
  AR      cmd/arm/built-in.o
  CC      cmd/boot.o
  CC      cmd/bootm.o
  CC      cmd/help.o
  CC      cmd/panic.o
  CC      cmd/version.o
  CC      cmd/blk_common.o
  CC      cmd/bootflow.o
  CC      cmd/source.o
  CC      cmd/bdinfo.o
  CC      cmd/blkcache.o
  CC      cmd/bootefi.o
  CC      cmd/booti.o
  CC      cmd/cache.o
  CC      cmd/clk.o
  CC      cmd/console.o
  CC      cmd/date.o
  CC      cmd/dm.o
  CC      cmd/echo.o
  CC      cmd/efidebug.o
  CC      cmd/efi_common.o
  CC      cmd/eficonfig.o
  CC      cmd/elf.o
  CC      cmd/exit.o
  CC      cmd/ext4.o
  CC      cmd/ext2.o
  CC      cmd/fat.o
  CC      cmd/fdt.o
  CC      cmd/fs.o
  CC      cmd/fuse.o
  CC      cmd/gettime.o
  CC      cmd/gpio.o
  CC      cmd/i2c.o
  CC      cmd/hash.o
  CC      cmd/itest.o
  CC      cmd/load.o
  CC      cmd/mem.o
  CC      cmd/mii.o
  CC      cmd/mdio.o
  CC      cmd/sleep.o
  CC      cmd/mmc.o
  CC      cmd/legacy-mtd-utils.o
  CC      cmd/net.o
  CC      cmd/net-common.o
  CC      cmd/nvedit.o
  CC      cmd/nvedit_efi.o
  CC      cmd/part.o
  CC      cmd/pci.o
  CC      cmd/pinmux.o
  CC      cmd/rtc.o
  CC      cmd/sf.o
  CC      cmd/setexpr.o
  CC      cmd/time.o
  CC      cmd/timer.o
  CC      cmd/test.o
  CC      cmd/unlz4.o
  CC      cmd/unzip.o
  CC      cmd/lzmadec.o
  CC      cmd/ximg.o
  CC      cmd/dfu.o
  CC      cmd/gpt.o
  CC      cmd/regulator.o
  AR      cmd/built-in.o
  CC      common/init/board_init.o
  AR      common/init/built-in.o
  CC      common/main.o
  CC      common/memtop.o
  CC      common/exports.o
  CC      common/cli_getch.o
  CC      common/cli_simple.o
  CC      common/cli_readline.o
  CC      common/cli_hush.o
  CC      common/autoboot.o
  CC      common/version.o
  CC      common/board_f.o
  CC      common/board_r.o
  CC      common/board_info.o
  CC      common/miiphyutil.o
  CC      common/splash.o
  CC      common/menu.o
  CC      common/console.o
  CC      common/dlmalloc.o
  CC      common/malloc_simple.o
  CC      common/event.o
  CC      common/hash.o
  CC      common/memsize.o
  CC      common/stdio.o
  CC      common/cli.o
  CC      common/command.o
  CC      common/s_record.o
  CC      common/xyzModem.o
  AR      common/built-in.o
  CC      disk/part.o
  CC      disk/disk-uclass.o
  CC      disk/part_dos.o
  CC      disk/part_efi.o
  AR      disk/built-in.o
  AR      drivers/ata/built-in.o
  AR      drivers/axi/built-in.o
  CC      drivers/block/blk-uclass.o
  CC      drivers/block/blkcache.o
  AR      drivers/block/built-in.o
  AR      drivers/bus/built-in.o
  AR      drivers/cache/built-in.o
  AR      drivers/clk/adi/built-in.o
  AR      drivers/clk/analogbits/built-in.o
  CC      drivers/clk/imx/clk-gate2.o
  CC      drivers/clk/imx/clk-pllv3.o
  CC      drivers/clk/imx/clk-pfd.o
  AR      drivers/clk/imx/built-in.o
  AR      drivers/clk/tegra/built-in.o
  AR      drivers/clk/ti/built-in.o
  CC      drivers/clk/clk-uclass.o
  CC      drivers/clk/clk_fixed_rate.o
  CC      drivers/clk/clk_fixed_factor.o
  CC      drivers/clk/clk.o
  CC      drivers/clk/clk-divider.o
  CC      drivers/clk/clk-mux.o
  CC      drivers/clk/clk-gate.o
  CC      drivers/clk/clk-fixed-factor.o
  CC      drivers/clk/clk_scmi.o
  AR      drivers/clk/built-in.o
  CC      drivers/core/device.o
  CC      drivers/core/fdtaddr.o
  CC      drivers/core/lists.o
  CC      drivers/core/root.o
  CC      drivers/core/uclass.o
  CC      drivers/core/util.o
  CC      drivers/core/tag.o
  CC      drivers/core/device-remove.o
  CC      drivers/core/simple-bus.o
  CC      drivers/core/dump.o
  CC      drivers/core/regmap.o
  CC      drivers/core/syscon-uclass.o
  CC      drivers/core/of_extra.o
  CC      drivers/core/ofnode.o
  CC      drivers/core/read_extra.o
  AR      drivers/core/built-in.o
  AR      drivers/crypto/aspeed/built-in.o
  CC      drivers/crypto/fsl/sec.o
  AR      drivers/crypto/fsl/built-in.o
  AR      drivers/crypto/hash/built-in.o
  AR      drivers/crypto/nuvoton/built-in.o
  AR      drivers/crypto/rsa_mod_exp/built-in.o
  AR      drivers/crypto/built-in.o
  CC      drivers/dfu/dfu.o
  CC      drivers/dfu/dfu_mmc.o
  CC      drivers/dfu/dfu_ram.o
  AR      drivers/dfu/built-in.o
  CC      drivers/firmware/scmi/scmi_agent-uclass.o
  CC      drivers/firmware/scmi/base.o
  CC      drivers/firmware/scmi/smt.o
  CC      drivers/firmware/scmi/mailbox_agent.o
  CC      drivers/firmware/scmi/pwdom.o
  AR      drivers/firmware/scmi/built-in.o
  CC      drivers/firmware/firmware-uclass.o
  CC      drivers/firmware/psci.o
  AR      drivers/firmware/built-in.o
  CC      drivers/gpio/gpio-uclass.o
  CC      drivers/gpio/pca953x_gpio.o
  CC      drivers/gpio/imx_rgpio2p.o
  CC      drivers/gpio/adp5585_gpio.o
  AR      drivers/gpio/built-in.o
  CC      drivers/i2c/i2c-uclass.o
  CC      drivers/i2c/imx_lpi2c.o
  AR      drivers/i2c/built-in.o
  CC      drivers/input/key_matrix.o
  AR      drivers/input/built-in.o
  AR      drivers/iommu/built-in.o
  CC      drivers/mailbox/mailbox-uclass.o
  CC      drivers/mailbox/imx-mailbox.o
  AR      drivers/mailbox/built-in.o
  AR      drivers/memory/built-in.o
  AR      drivers/mfd/built-in.o
  CC      drivers/misc/imx_ele/ele_api.o
  CC      drivers/misc/imx_ele/ele_mu.o
  CC      drivers/misc/imx_ele/fuse.o
  AR      drivers/misc/imx_ele/built-in.o
  CC      drivers/misc/misc-uclass.o
  AR      drivers/misc/built-in.o
  CC      drivers/mmc/mmc.o
  CC      drivers/mmc/mmc-uclass.o
  CC      drivers/mmc/mmc_bootdev.o
  CC      drivers/mmc/mmc_write.o
  CC      drivers/mmc/mmc_boot.o
  CC      drivers/mmc/fsl_esdhc_imx.o
  AR      drivers/mmc/built-in.o
  AR      drivers/mtd/nand/built-in.o
  AR      drivers/mtd/onenand/built-in.o
  CC      drivers/mtd/spi/sf-uclass.o
  CC      drivers/mtd/spi/sf_probe.o
  CC      drivers/mtd/spi/spi-nor-ids.o
  CC      drivers/mtd/spi/spi-nor-core.o
  AR      drivers/mtd/spi/spi-nor.o
  AR      drivers/mtd/spi/built-in.o
  CC      drivers/mtd/mtdcore.o
  CC      drivers/mtd/mtd_uboot.o
  AR      drivers/mtd/mtd.o
  AR      drivers/mtd/built-in.o
  AR      drivers/net/mscc_eswitch/built-in.o
  CC      drivers/net/phy/phy.o
  CC      drivers/net/phy/generic_10g.o
  CC      drivers/net/phy/aquantia.o
  CC      drivers/net/phy/realtek.o
  AR      drivers/net/phy/built-in.o
  AR      drivers/net/qe/built-in.o
  AR      drivers/net/ti/built-in.o
  CC      drivers/net/fsl_enetc.o
  CC      drivers/net/fsl_enetc_mdio.o
  AR      drivers/net/built-in.o
  CC      drivers/pci/pci-uclass.o
  CC      drivers/pci/pci_auto.o
  CC      drivers/pci/pci_auto_common.o
  CC      drivers/pci/pci_common.o
  CC      drivers/pci/pcie_ecam_generic.o
  AR      drivers/pci/built-in.o
  AR      drivers/phy/allwinner/built-in.o
  AR      drivers/phy/cadence/built-in.o
  AR      drivers/phy/marvell/built-in.o
  AR      drivers/phy/qcom/built-in.o
  AR      drivers/phy/renesas/built-in.o
  AR      drivers/phy/rockchip/built-in.o
  AR      drivers/phy/socionext/built-in.o
  AR      drivers/phy/ti/built-in.o
  CC      drivers/phy/phy-uclass.o
  AR      drivers/phy/built-in.o
  AR      drivers/pinctrl/broadcom/built-in.o
  CC      drivers/pinctrl/nxp/pinctrl-imx.o
  CC      drivers/pinctrl/nxp/pinctrl-scmi.o
  AR      drivers/pinctrl/nxp/built-in.o
  CC      drivers/pinctrl/pinctrl-uclass.o
  CC      drivers/pinctrl/pinctrl-generic.o
  AR      drivers/pinctrl/built-in.o
  CC      drivers/power/domain/power-domain-uclass.o
  CC      drivers/power/domain/scmi-power-domain.o
  AR      drivers/power/domain/built-in.o
  AR      drivers/power/pmic/built-in.o
  CC      drivers/power/regulator/regulator-uclass.o
  CC      drivers/power/regulator/regulator_common.o
  CC      drivers/power/regulator/fixed.o
  CC      drivers/power/regulator/gpio-regulator.o
  AR      drivers/power/regulator/built-in.o
  AR      drivers/power/built-in.o
  AR      drivers/pwm/built-in.o
  AR      drivers/reset/built-in.o
  CC      drivers/rtc/rtc-uclass.o
  AR      drivers/rtc/built-in.o
  AR      drivers/scsi/built-in.o
  CC      drivers/serial/serial-uclass.o
  CC      drivers/serial/serial_lpuart.o
  AR      drivers/serial/built-in.o
  AR      drivers/smem/built-in.o
  AR      drivers/soc/built-in.o
  AR      drivers/sound/built-in.o
  CC      drivers/spi/spi-uclass.o
  CC      drivers/spi/spi-mem.o
  CC      drivers/spi/nxp_fspi.o
  AR      drivers/spi/built-in.o
  AR      drivers/spmi/built-in.o
  AR      drivers/thermal/built-in.o
  AR      drivers/ufs/built-in.o
  CC      drivers/watchdog/ulp_wdog.o
  AR      drivers/watchdog/built-in.o
  AR      drivers/built-in.o
  AR      drivers/usb/cdns3/built-in.o
  AR      drivers/usb/common/built-in.o
  AR      drivers/usb/dwc3/built-in.o
  AR      drivers/usb/emul/built-in.o
  AR      drivers/usb/eth/built-in.o
  AR      drivers/usb/host/built-in.o
  AR      drivers/usb/isp1760/built-in.o
  AR      drivers/usb/mtu3/built-in.o
  AR      drivers/usb/musb-new/built-in.o
  AR      drivers/usb/musb/built-in.o
  AR      drivers/usb/phy/built-in.o
  AR      drivers/usb/tcpm/built-in.o
  AR      drivers/usb/ulpi/built-in.o
  CC      env/common.o
  CC      env/env.o
  CC      env/attr.o
  CC      env/flags.o
  CC      env/callback.o
  CC      env/nowhere.o
  CC      env/mmc.o
  AR      env/built-in.o
  CC      fs/ext4/ext4fs.o
  CC      fs/ext4/ext4_common.o
  CC      fs/ext4/dev.o
  CC      fs/ext4/ext4_write.o
  CC      fs/ext4/ext4_journal.o
  AR      fs/ext4/built-in.o
  CC      fs/fat/fat_write.o
  AR      fs/fat/built-in.o
  CC      fs/fs.o
  CC      fs/fs_internal.o
  AR      fs/built-in.o
  CC      lib/bzip2/bzlib.o
  CC      lib/bzip2/bzlib_crctable.o
  CC      lib/bzip2/bzlib_decompress.o
  CC      lib/bzip2/bzlib_randtable.o
  CC      lib/bzip2/bzlib_huffman.o
  AR      lib/bzip2/built-in.o
  AR      lib/crypto/built-in.o
  CC      lib/efi_driver/efi_uclass.o
  CC      lib/efi_driver/efi_block_device.o
  AR      lib/efi_driver/built-in.o
  CC      lib/efi_loader/efi_bootmgr.o
  CC      lib/efi_loader/efi_bootbin.o
  CC      lib/efi_loader/efi_boottime.o
  CC      lib/efi_loader/efi_helper.o
  CC      lib/efi_loader/efi_console.o
  CC      lib/efi_loader/efi_device_path.o
  CC      lib/efi_loader/efi_device_path_to_text.o
  CC      lib/efi_loader/efi_device_path_utilities.o
  CC      lib/efi_loader/efi_dt_fixup.o
  CC      lib/efi_loader/efi_fdt.o
  CC      lib/efi_loader/efi_file.o
  CC      lib/efi_loader/efi_hii.o
  CC      lib/efi_loader/efi_image_loader.o
  CC      lib/efi_loader/efi_load_options.o
  CC      lib/efi_loader/efi_memory.o
  CC      lib/efi_loader/efi_root_node.o
  CC      lib/efi_loader/efi_runtime.o
  CC      lib/efi_loader/efi_setup.o
  CC      lib/efi_loader/efi_string.o
  CC      lib/efi_loader/efi_unicode_collation.o
  CC      lib/efi_loader/efi_var_common.o
  CC      lib/efi_loader/efi_var_mem.o
  CC      lib/efi_loader/efi_variable.o
  CC      lib/efi_loader/efi_var_file.o
  CC      lib/efi_loader/efi_watchdog.o
  CC      lib/efi_loader/efi_disk.o
  CC      lib/efi_loader/efi_net.o
  CC      lib/efi_loader/efi_smbios.o
  CC      lib/efi_loader/efi_load_initrd.o
  CC      lib/efi_loader/efi_conformance.o
  AR      lib/efi_loader/built-in.o
  CC      lib/efi_loader/helloworld.o
  AS      lib/efi_loader/efi_crt0.o
  CC      lib/efi_loader/efi_reloc.o
  CC      lib/efi_loader/efi_freestanding.o
  LD      lib/efi_loader/helloworld_efi.so
  OBJCOPY lib/efi_loader/helloworld.efi
  CC      lib/efi_loader/smbiosdump.o
  LD      lib/efi_loader/smbiosdump_efi.so
  OBJCOPY lib/efi_loader/smbiosdump.efi
  CC      lib/efi_loader/initrddump.o
  LD      lib/efi_loader/initrddump_efi.so
  OBJCOPY lib/efi_loader/initrddump.efi
  CC      lib/efi_loader/dtbdump.o
  LD      lib/efi_loader/dtbdump_efi.so
  OBJCOPY lib/efi_loader/dtbdump.efi
  CC      lib/efi_loader/testapp.o
  LD      lib/efi_loader/testapp_efi.so
  OBJCOPY lib/efi_loader/testapp.efi
  CC      lib/libfdt/fdt.o
  CC      lib/libfdt/fdt_ro.o
  CC      lib/libfdt/fdt_wip.o
  CC      lib/libfdt/fdt_strerror.o
  CC      lib/libfdt/fdt_sw.o
  CC      lib/libfdt/fdt_rw.o
  CC      lib/libfdt/fdt_empty_tree.o
  CC      lib/libfdt/fdt_addresses.o
  CC      lib/libfdt/fdt_overlay.o
  AR      lib/libfdt/built-in.o
  CC      lib/lzma/LzmaDec.o
  CC      lib/lzma/LzmaTools.o
  AR      lib/lzma/built-in.o
  CC      lib/lzo/lzo1x_decompress.o
  AR      lib/lzo/built-in.o
  CC      lib/zlib/zlib.o
  AR      lib/zlib/built-in.o
  CC      lib/binman.o
  CC      lib/charset.o
  CC      lib/crc8.o
  CC      lib/crc16.o
  CC      lib/crc16-ccitt.o
  CC      lib/smbios.o
  CC      lib/initcall.o
  CC      lib/ldiv.o
  CC      lib/net_utils.o
  CC      lib/rc4.o
  CC      lib/list_sort.o
  CC      lib/hash-checksum.o
  CC      lib/sha1.o
  CC      lib/gunzip.o
  CC      lib/lz4_wrapper.o
  CC      lib/fdtdec_common.o
  CC      lib/fdtdec.o
  CC      lib/qsort.o
  CC      lib/hashtable.o
  CC      lib/errno.o
  CC      lib/display_options.o
  CC      lib/crc32.o
  CC      lib/ctype.o
  CC      lib/div64.o
  CC      lib/hang.o
  CC      lib/linux_compat.o
  CC      lib/linux_string.o
  CC      lib/lmb.o
  CC      lib/membuff.o
  CC      lib/slre.o
  CC      lib/string.o
  CC      lib/tables_csum.o
  CC      lib/time.o
  CC      lib/hexdump.o
  CC      lib/uuid.o
  CC      lib/rand.o
  CC      lib/panic.o
  CC      lib/vsprintf.o
  CC      lib/strto.o
  CC      lib/abuf.o
  CC      lib/alist.o
  CC      lib/date.o
  CC      lib/rtc-lib.o
  CC      lib/elf.o
  AR      lib/built-in.o
  CC      net/arp.o
  CC      net/bootp.o
  CC      net/net.o
  CC      net/ping.o
  CC      net/sntp.o
  CC      net/tftp.o
  CC      net/udp.o
  CC      net/eth-uclass.o
  CC      net/eth_bootdev.o
  CC      net/mdio-uclass.o
  CC      net/eth_common.o
  CC      net/net-common.o
  AR      net/built-in.o
  LDS     u-boot.lds
  LD      u-boot
  DTC     dts/upstream/src/arm64/freescale/imx95-19x19-evk.dtb
  SHIPPED dts/dt.dtb
  CC      spl/./lib/asm-offsets.s
  UPD     spl/./include/generated/generic-asm-offsets.h
  CC      spl/./arch/arm/lib/asm-offsets.s
  UPD     spl/./include/generated/asm-offsets.h
  CC      spl/arch/arm/mach-imx/imx9/scmi/soc.o
  CC      spl/arch/arm/mach-imx/imx9/scmi/clock_scmi.o
  CC      spl/arch/arm/mach-imx/imx9/scmi/clock.o
  AR      spl/arch/arm/mach-imx/imx9/scmi/built-in.o
  AS      spl/arch/arm/mach-imx/imx9/lowlevel_init.o
  AR      spl/arch/arm/mach-imx/imx9/built-in.o
  CC      spl/arch/arm/mach-imx/iomux-v3.o
  CC      spl/arch/arm/mach-imx/misc.o
  CC      spl/arch/arm/mach-imx/spl.o
  CC      spl/arch/arm/mach-imx/image-container.o
  AR      spl/arch/arm/mach-imx/built-in.o
  CC      spl/arch/arm/cpu/armv8/cpu.o
  CC      spl/arch/arm/cpu/armv8/generic_timer.o
  CC      spl/arch/arm/cpu/armv8/cache_v8.o
  AS      spl/arch/arm/cpu/armv8/cache.o
  AS      spl/arch/arm/cpu/armv8/exceptions.o
  AS      spl/arch/arm/cpu/armv8/tlb.o
  AS      spl/arch/arm/cpu/armv8/transition.o
  CC      spl/arch/arm/cpu/armv8/fwcall.o
  CC      spl/arch/arm/cpu/armv8/cpu-dt.o
  AS      spl/arch/arm/cpu/armv8/smccc-call.o
  CC      spl/arch/arm/cpu/armv8/spl_data.o
  AR      spl/arch/arm/cpu/armv8/built-in.o
  AS      spl/arch/arm/cpu/armv8/start.o
  AR      spl/arch/arm/cpu/built-in.o
  AS      spl/arch/arm/lib/crt0_64.o
  AS      spl/arch/arm/lib/setjmp_aarch64.o
  CC      spl/arch/arm/lib/spl.o
  CC      spl/arch/arm/lib/image.o
  CC      spl/arch/arm/lib/bootm-fdt.o
  CC      spl/arch/arm/lib/bdinfo.o
  CC      spl/arch/arm/lib/sections.o
  CC      spl/arch/arm/lib/stack.o
  CC      spl/arch/arm/lib/interrupts_64.o
  CC      spl/arch/arm/lib/reset.o
  CC      spl/arch/arm/lib/cache.o
  CC      spl/arch/arm/lib/psci-dt.o
  AR      spl/arch/arm/lib/built-in.o
  AR      spl/arch/arm/lib/lib.a
  CC      spl/board/freescale/imx95_evk/imx95_evk.o
  CC      spl/board/freescale/imx95_evk/spl.o
  AR      spl/board/freescale/imx95_evk/built-in.o
  CC      spl/board/freescale/common/mmc.o
  AR      spl/board/freescale/common/built-in.o
  CC      spl/common/spl/spl.o
  CC      spl/common/spl/spl_legacy.o
  CC      spl/common/spl/spl_mmc.o
  CC      spl/common/spl/spl_imx_container.o
  AR      spl/common/spl/built-in.o
  CC      spl/common/init/board_init.o
  AR      spl/common/init/built-in.o
  CC      spl/boot/image.o
  CC      spl/boot/image-board.o
  CC      spl/boot/fdt_support.o
  CC      spl/boot/image-fdt.o
  AR      spl/boot/built-in.o
  CC      spl/common/console.o
  CC      spl/common/dlmalloc.o
  CC      spl/common/malloc_simple.o
  CC      spl/common/memsize.o
  CC      spl/common/stdio.o
  CC      spl/common/cli.o
  CC      spl/common/command.o
  CC      spl/common/s_record.o
  CC      spl/common/xyzModem.o
  AR      spl/common/built-in.o
  AR      spl/cmd/built-in.o
  AR      spl/env/built-in.o
  AR      spl/lib/crypto/built-in.o
  CC      spl/lib/libfdt/fdt.o
  CC      spl/lib/libfdt/fdt_ro.o
  CC      spl/lib/libfdt/fdt_wip.o
  CC      spl/lib/libfdt/fdt_strerror.o
  CC      spl/lib/libfdt/fdt_sw.o
  CC      spl/lib/libfdt/fdt_rw.o
  CC      spl/lib/libfdt/fdt_empty_tree.o
  CC      spl/lib/libfdt/fdt_addresses.o
  CC      spl/lib/libfdt/fdt_overlay.o
  AR      spl/lib/libfdt/built-in.o
  CC      spl/lib/hash-checksum.o
  CC      spl/lib/sha1.o
  CC      spl/lib/fdtdec_common.o
  CC      spl/lib/fdtdec.o
  CC      spl/lib/net_utils.o
  CC      spl/lib/qsort.o
  CC      spl/lib/hashtable.o
  CC      spl/lib/errno.o
  CC      spl/lib/display_options.o
  CC      spl/lib/crc32.o
  CC      spl/lib/ctype.o
  CC      spl/lib/div64.o
  CC      spl/lib/hang.o
  CC      spl/lib/linux_compat.o
  CC      spl/lib/linux_string.o
  CC      spl/lib/membuff.o
  CC      spl/lib/slre.o
  CC      spl/lib/string.o
  CC      spl/lib/tables_csum.o
  CC      spl/lib/time.o
  CC      spl/lib/hexdump.o
  CC      spl/lib/uuid.o
  CC      spl/lib/rand.o
  CC      spl/lib/panic.o
  CC      spl/lib/tiny-printf.o
  CC      spl/lib/strto.o
  CC      spl/lib/abuf.o
  CC      spl/lib/alist.o
  CC      spl/lib/date.o
  CC      spl/lib/rtc-lib.o
  CC      spl/lib/elf.o
  AR      spl/lib/built-in.o
  CC      spl/disk/part.o
  CC      spl/disk/disk-uclass.o
  CC      spl/disk/part_dos.o
  CC      spl/disk/part_efi.o
  AR      spl/disk/built-in.o
  CC      spl/drivers/block/blk-uclass.o
  AR      spl/drivers/block/built-in.o
  AR      spl/drivers/bus/built-in.o
  AR      spl/drivers/clk/adi/built-in.o
  AR      spl/drivers/clk/analogbits/built-in.o
  CC      spl/drivers/clk/imx/clk-gate2.o
  CC      spl/drivers/clk/imx/clk-pllv3.o
  CC      spl/drivers/clk/imx/clk-pfd.o
  AR      spl/drivers/clk/imx/built-in.o
  AR      spl/drivers/clk/tegra/built-in.o
  AR      spl/drivers/clk/ti/built-in.o
  CC      spl/drivers/clk/clk-uclass.o
  CC      spl/drivers/clk/clk_fixed_rate.o
  CC      spl/drivers/clk/clk_fixed_factor.o
  CC      spl/drivers/clk/clk.o
  CC      spl/drivers/clk/clk-divider.o
  CC      spl/drivers/clk/clk-mux.o
  CC      spl/drivers/clk/clk-gate.o
  CC      spl/drivers/clk/clk-fixed-factor.o
  CC      spl/drivers/clk/clk_scmi.o
  AR      spl/drivers/clk/built-in.o
  CC      spl/drivers/core/device.o
  CC      spl/drivers/core/fdtaddr.o
  CC      spl/drivers/core/lists.o
  CC      spl/drivers/core/root.o
  CC      spl/drivers/core/uclass.o
  CC      spl/drivers/core/util.o
  CC      spl/drivers/core/tag.o
  CC      spl/drivers/core/simple-bus.o
  CC      spl/drivers/core/dump.o
  CC      spl/drivers/core/of_extra.o
  CC      spl/drivers/core/ofnode.o
  CC      spl/drivers/core/read_extra.o
  AR      spl/drivers/core/built-in.o
  AR      spl/drivers/ddr/imx/imx9/../phy/built-in.o
  AR      spl/drivers/ddr/imx/imx9/built-in.o
  CC      spl/drivers/firmware/scmi/scmi_agent-uclass.o
  CC      spl/drivers/firmware/scmi/base.o
  CC      spl/drivers/firmware/scmi/smt.o
  CC      spl/drivers/firmware/scmi/mailbox_agent.o
  CC      spl/drivers/firmware/scmi/pwdom.o
  AR      spl/drivers/firmware/scmi/built-in.o
  CC      spl/drivers/firmware/firmware-uclass.o
  AR      spl/drivers/firmware/built-in.o
  CC      spl/drivers/gpio/gpio-uclass.o
  CC      spl/drivers/gpio/imx_rgpio2p.o
  CC      spl/drivers/gpio/adp5585_gpio.o
  AR      spl/drivers/gpio/built-in.o
  CC      spl/drivers/i2c/i2c-uclass.o
  CC      spl/drivers/i2c/imx_lpi2c.o
  AR      spl/drivers/i2c/built-in.o
  CC      spl/drivers/mailbox/mailbox-uclass.o
  CC      spl/drivers/mailbox/imx-mailbox.o
  AR      spl/drivers/mailbox/built-in.o
  CC      spl/drivers/misc/imx_ele/ele_api.o
  CC      spl/drivers/misc/imx_ele/ele_mu.o
  CC      spl/drivers/misc/imx_ele/fuse.o
  AR      spl/drivers/misc/imx_ele/built-in.o
  CC      spl/drivers/misc/misc-uclass.o
  AR      spl/drivers/misc/built-in.o
  CC      spl/drivers/mmc/mmc.o
  CC      spl/drivers/mmc/mmc-uclass.o
  CC      spl/drivers/mmc/mmc_boot.o
  CC      spl/drivers/mmc/fsl_esdhc_imx.o
  AR      spl/drivers/mmc/built-in.o
  AR      spl/drivers/mtd/built-in.o
  AR      spl/drivers/pinctrl/broadcom/built-in.o
  CC      spl/drivers/pinctrl/nxp/pinctrl-imx.o
  CC      spl/drivers/pinctrl/nxp/pinctrl-scmi.o
  AR      spl/drivers/pinctrl/nxp/built-in.o
  CC      spl/drivers/pinctrl/pinctrl-uclass.o
  CC      spl/drivers/pinctrl/pinctrl-generic.o
  AR      spl/drivers/pinctrl/built-in.o
  AR      spl/drivers/power/pmic/built-in.o
  CC      spl/drivers/power/regulator/regulator-uclass.o
  CC      spl/drivers/power/regulator/regulator_common.o
  CC      spl/drivers/power/regulator/fixed.o
  AR      spl/drivers/power/regulator/built-in.o
  AR      spl/drivers/power/built-in.o
  CC      spl/drivers/serial/serial-uclass.o
  CC      spl/drivers/serial/serial_lpuart.o
  AR      spl/drivers/serial/built-in.o
  AR      spl/drivers/soc/built-in.o
  CC      spl/drivers/watchdog/ulp_wdog.o
  CC      spl/drivers/watchdog/wdt-uclass.o
  AR      spl/drivers/watchdog/built-in.o
  AR      spl/drivers/built-in.o
  AR      spl/dts/built-in.o
  CC      spl/fs/fs_internal.o
  AR      spl/fs/built-in.o
  LDS     spl/u-boot-spl.lds
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
mkdir -p spl/dts/
  FDTGREP spl/dts/dt-spl.dtb
  COPY    spl/u-boot-spl.dtb
  CAT     spl/u-boot-spl-dtb.bin
  COPY    spl/u-boot-spl.bin
  SYM     spl/u-boot-spl.sym
  CHECK    spl/u-boot-spl.cfgout
  CHECK    u-boot-container.cfgout
WARNING './u-boot.bin' not found, resulting binary may be not-functional
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  RELOC   u-boot-nodtb.bin
  CAT     u-boot-dtb.bin
  COPY    u-boot.bin
  SYM     u-boot.sym
  MKIMAGE u-boot.img
  COPY    u-boot.dtb
  MKIMAGE u-boot-dtb.img
  LDS     u-boot-elf.lds
  LD      u-boot.elf
  BINMAN  .binman_stamp
  OFCHK   .config
-rw-r--r-- 1 tharvey Tim Harvey 922624 Dec 31 11:08 imx-boot-imx95.bin
^^^ image too small... missing u-boot.bin
$ make && ls -l imx-boot-imx95.bin
  UPD     include/generated/timestamp_autogenerated.h
  CC      common/version.o
  AR      common/built-in.o
  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  RELOC   u-boot-nodtb.bin
  CAT     u-boot-dtb.bin
  COPY    u-boot.bin
  SYM     u-boot.sym
  CC      spl/common/spl/spl.o
  AR      spl/common/spl/built-in.o
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  CAT     spl/u-boot-spl-dtb.bin
  COPY    spl/u-boot-spl.bin
  SYM     spl/u-boot-spl.sym
  MKIMAGE u-boot.img
  MKIMAGE u-boot-dtb.img
  LD      u-boot.elf
  CHECK    u-boot-container.cfgout
  BINMAN  .binman_stamp
  OFCHK   .config
-rw-r--r-- 1 tharvey Tim Harvey 1709056 Dec 31 11:10 imx-boot-imx95.bin
^^^ now we have a proper image

Best Regards,

Tim

#29 lore raw

回复: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 60 lines

-----邮件原件-----
发件人: Tim Harvey <[email protected]>
发送时间: 2025年1月1日 4:32
收件人: Alice Guo (OSS) <[email protected]>; Simon Glass <[email protected]>
抄送: Tom Rini <[email protected]>; Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; dl-uboot-imx <[email protected]>; Lukasz Majewski <[email protected]>; Sean Anderson <[email protected]>; Alper Nebi Yasak <[email protected]>; [email protected]; [email protected]; Alice Guo <[email protected]>; Ye Li <[email protected]>; Peng Fan <[email protected]>
主题: Re: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 22 lines · Alice Guo (OSS)
Quoted 22 lines

主题: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 1 line

I gave this series a go on top of 5cfbf8c364 origin/next on an EVK I have here and I saw no u-boot proper output after the ATF.

Here is what I saw on UART2:
U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP Normal Boot Trying to boot from MMC2 Primary set selected Load image from MMC/SD 0xdec00

NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024

U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP Normal Boot Trying to boot from MMC2 Primary set selected Load image from MMC/SD 0xdec00

NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024 ^^^ nothing after this

Any thoughts on what is wrong here?

Quoted 7 lines
Quoted 3 lines

Best Regards,

Tim

Hi Tim,

I tried it on my MX95 and it works well, so I not sure what causes this issue on

your EVK.

Quoted 1 line

Hi Alice,

I discovered what happened. The first make for uboot resulted in a binman warning (which should be a failure but is not for some reason) and results in an image that doesn't contain uboot proper:
WARNING './u-boot.bin' not found, resulting binary may be not-functional

Quoted 5 lines

Simon, do you know why this warning doesn't result in a make failure?

Doing a second make works, so I think there is likely a binman dependency issue going on here. You can re-create the issue with a distclean as shown here:

I reproduced this issue with make distclean, but not every time. I need time to check it.

Best Regards,
Alice Guo

#30 lore raw

回复: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

In reply to Tim Harvey
Quoted 113 lines

-----邮件原件-----
发件人: Tim Harvey <[email protected]>
发送时间: 2025年1月1日 4:32
收件人: Alice Guo (OSS) <[email protected]>; Simon Glass <[email protected]>
抄送: Tom Rini <[email protected]>; Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; dl-uboot-imx <[email protected]>; Lukasz Majewski <[email protected]>; Sean Anderson <[email protected]>; Alper Nebi Yasak <[email protected]>; [email protected]; [email protected]; Alice Guo <[email protected]>; Ye Li <[email protected]>; Peng Fan <[email protected]>
主题: Re: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 22 lines · Alice Guo (OSS)
Quoted 22 lines

主题: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 1 line

I gave this series a go on top of 5cfbf8c364 origin/next on an EVK I have here and I saw no u-boot proper output after the ATF.

Here is what I saw on UART2:
U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP Normal Boot Trying to boot from MMC2 Primary set selected Load image from MMC/SD 0xdec00

NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024

U-Boot SPL 2025.01-rc5-00393-g9b292f7d347f (Dec 27 2024 - 16:12:20 -0800) DDRMIX is powered UP Normal Boot Trying to boot from MMC2 Primary set selected Load image from MMC/SD 0xdec00

NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
NOTICE:  BL31: Built : 16:06:15, Dec 27 2024 ^^^ nothing after this

Any thoughts on what is wrong here?

Quoted 7 lines
Quoted 3 lines

Best Regards,

Tim

Hi Tim,

I tried it on my MX95 and it works well, so I not sure what causes this issue on

your EVK.

Quoted 1 line

Hi Alice,

I discovered what happened. The first make for uboot resulted in a binman warning (which should be a failure but is not for some reason) and results in an image that doesn't contain uboot proper:
WARNING './u-boot.bin' not found, resulting binary may be not-functional

Simon, do you know why this warning doesn't result in a make failure?

Doing a second make works, so I think there is likely a binman dependency issue going on here. You can re-create the issue with a distclean as shown here:

COPY spl/u-boot-spl.bin
SYM spl/u-boot-spl.sym
CHECK spl/u-boot-spl.cfgout
CHECK u-boot-container.cfgout
WARNING './u-boot.bin' not found, resulting binary may be not-functional
OBJCOPY u-boot.srec
OBJCOPY u-boot-nodtb.bin

  RELOC   u-boot-nodtb.bin
  CAT     u-boot-dtb.bin
  COPY    u-boot.bin
  SYM     u-boot.sym
  MKIMAGE u-boot.img
  COPY    u-boot.dtb
  MKIMAGE u-boot-dtb.img
  LDS     u-boot-elf.lds
  LD      u-boot.elf
  BINMAN  .binman_stamp
  OFCHK   .config

-rw-r--r-- 1 tharvey Tim Harvey 922624 Dec 31 11:08 imx-boot-imx95.bin ^^^ image too small... missing u-boot.bin

$ make && ls -l imx-boot-imx95.bin
  UPD     include/generated/timestamp_autogenerated.h
  CC      common/version.o
  AR      common/built-in.o
  LD      u-boot
  OBJCOPY u-boot.srec
  OBJCOPY u-boot-nodtb.bin
  RELOC   u-boot-nodtb.bin
  CAT     u-boot-dtb.bin
  COPY    u-boot.bin
  SYM     u-boot.sym
  CC      spl/common/spl/spl.o
  AR      spl/common/spl/built-in.o
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  CAT     spl/u-boot-spl-dtb.bin
  COPY    spl/u-boot-spl.bin
  SYM     spl/u-boot-spl.sym
  MKIMAGE u-boot.img
  MKIMAGE u-boot-dtb.img
  LD      u-boot.elf
  CHECK    u-boot-container.cfgout
  BINMAN  .binman_stamp
  OFCHK   .config
-rw-r--r-- 1 tharvey Tim Harvey 1709056 Dec 31 11:10 imx-boot-imx95.bin ^^^
now we have a proper image
Quoted 3 lines

Best Regards,

Tim

Hi Tim,

When using "make distclean; make imx95_19x19_evk_defconfig; make", imx9_image.sh will delete the line "IMAGE A55 u-boot.bin CONFIG_TEXT_BASE" in container.cfg for i.MX95. I correct it in v3 and will send it later.

Best Regards,
Alice Guo

#31 lore raw

Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

In reply to Alice Guo
Quoted 17 lines · Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 19x19 EVK board basic support.

---
 arch/arm/dts/imx95-19x19-evk-u-boot.dtsi      | 224 ++++++++++++++++++++++++++
 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 ++
 arch/arm/mach-imx/imx9/scmi/soc.c             |   1 +
 board/freescale/imx95_evk/Kconfig             |  12 ++
 board/freescale/imx95_evk/MAINTAINERS         |   6 +
 board/freescale/imx95_evk/Makefile            |  11 ++
Quoted 9 lines
 board/freescale/imx95_evk/imx95_19x19_evk.env |  95 +++++++++++
 board/freescale/imx95_evk/imx95_evk.c         |  54 +++++++
 board/freescale/imx95_evk/spl.c               | 117 ++++++++++++++
 configs/imx95_19x19_evk_defconfig             | 178 ++++++++++++++++++++
 doc/board/nxp/imx95_evk.rst                   | 109 +++++++++++++
 doc/board/nxp/index.rst                       |   1 +
 include/configs/imx95_evk.h                   |  36 +++++
 15 files changed, 875 insertions(+)

Hi Alice,

I found some issues with imx95_19x19_evk.env (see below)

<snip>

board/freescale/imx95_evk/imx95_19x19_evk.env line 5

Quoted 11 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +5 -0
new file mode 100644
index 0000000000000000000000000000000000000000..27e09d3d70a068efb97d69b27089d1f213f39ee9
@@ -0,0 +1,95 @@
+sec_boot=no
+initrd_addr=0x93800000
+emmc_dev=0
+sd_dev=1
+prepare_mcore=setenv mcore_clk clk-imx95.mcore_booted

I see where mcore_clk is used but nothing uses prepare_mcore. Also there is no upstream Linux clk-imx95 driver yet so this really doesn't do anything useful. Has a clk-imx95 driver been submitted?

board/freescale/imx95_evk/imx95_19x19_evk.env line 7

Quoted 2 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +2 -0
+scriptaddr=0x93500000
+kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "

for a .env file you can't use stringify. Just use the config without quotes:
kernel_addr_r=CONFIG_SYS_LOAD_ADDR

board/freescale/imx95_evk/imx95_19x19_evk.env line 16

Quoted 9 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +9 -0
+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 "

fdtfile=CONFIG_DEFAULT_FDT_FILE

board/freescale/imx95_evk/imx95_19x19_evk.env line 18

Quoted 2 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +2 -0
+bootm_size=0x10000000
+mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV)"

mmcdev=CONFIG_SYS_MMC_ENV_DEV

but you should probably just eliminate this one as its set at runtime in board_late_mmc_env_init()

board/freescale/imx95_evk/imx95_19x19_evk.env line 20

Quoted 2 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +2 -0
+mmcpart=1
+mmcroot=/dev/mmcblk1p2 rootwait rw

This is also redundant as its set at runtime in board_late_mmc_env_init()

Best Regards,

Tim

#32 lore raw

回复: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Quoted 60 lines

-----邮件原件-----
发件人: Tim Harvey <[email protected]>
发送时间: 2025年1月3日 7:13
收件人: Alice Guo (OSS) <[email protected]>
抄送: Tom Rini <[email protected]>; Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; dl-uboot-imx <[email protected]>; Lukasz Majewski <[email protected]>; Sean Anderson <[email protected]>; Simon Glass <[email protected]>; Alper Nebi Yasak <[email protected]>; [email protected]; [email protected]; Alice Guo <[email protected]>; Ye Li <[email protected]>; Peng Fan <[email protected]>
主题: [EXT] Re: [PATCH v2 16/17] imx95_evk: add i.MX95 19x19 EVK board basic support

Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button

Quoted 10 lines · Alice Guo

From: Ye Li <[email protected]>

This patch adds i.MX95 19x19 EVK board basic support.

---
 arch/arm/dts/imx95-19x19-evk-u-boot.dtsi      | 224

++++++++++++++++++++++++++

Quoted 11 lines
 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 ++
 arch/arm/mach-imx/imx9/scmi/soc.c             |   1 +
 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 |  95 +++++++++++
 board/freescale/imx95_evk/imx95_evk.c         |  54 +++++++
 board/freescale/imx95_evk/spl.c               | 117 ++++++++++++++
 configs/imx95_19x19_evk_defconfig             | 178

++++++++++++++++++++

Quoted 5 lines
 doc/board/nxp/imx95_evk.rst                   | 109 +++++++++++++
 doc/board/nxp/index.rst                       |   1 +
 include/configs/imx95_evk.h                   |  36 +++++
 15 files changed, 875 insertions(+)

Hi Alice,

I found some issues with imx95_19x19_evk.env (see below)

<snip>

Quoted 5 lines
board/freescale/imx95_evk/imx95_19x19_evk.env new file +0 -0
new file mode 100644

index

0000000000000000000000000000000000000000..27e09d3d70a068efb97d6 9b27089

Quoted 13 lines

board/freescale/imx95_evk/imx95_19x19_evk.env line 5

Quoted 9 lines

d1f213f39ee9

board/freescale/imx95_evk/imx95_19x19_evk.env new file +5 -0
@@ -0,0 +1,95 @@
+sec_boot=no
+initrd_addr=0x93800000
+emmc_dev=0
+sd_dev=1
+prepare_mcore=setenv mcore_clk clk-imx95.mcore_booted

I see where mcore_clk is used but nothing uses prepare_mcore. Also there is no upstream Linux clk-imx95 driver yet so this really doesn't do anything useful. Has a clk-imx95 driver been submitted?

Hi Tim,

i.MX95 use clk-scmi.c driver, so no clk-imx95. And there is no prepare_mcore, this env needs to be dropped.

Thanks for pointing out my errors. I will correct them.

Best Regards,
Alice Guo

author
#33 lore raw

PATCH v2 17/17 imx: add V2X container support on i.MX95

In reply to Alice Guo

From: Teo Hall <[email protected]>

This patch adds V2X container support on i.MX95.

---
 arch/arm/mach-imx/image-container.c | 63 +++++++++++++++++++++++--------------
 1 file changed, 40 insertions(+), 23 deletions(-)
arch/arm/mach-imx/image-container.c +40 -23
index 2afe9d38a0681862098a6566a873873f24069b88..54ae7721888dbc93fdaba8e5aedc52c4506bb1c1 100644
@@ -231,45 +231,62 @@ static unsigned long get_boot_device_offset(void *dev, int dev_type)
 	return offset;
 }
 
-static int get_imageset_end(void *dev, int dev_type)
+static ulong get_imageset_end(void *dev, int dev_type)
 {
-	unsigned long offset1 = 0, offset2 = 0;
-	int value_container[2];
+	unsigned long offset[3] = {};
+	int value_container[3] = {};
 	u16 hdr_length;
 
-	offset1 = get_boot_device_offset(dev, dev_type);
-	offset2 = CONTAINER_HDR_ALIGNMENT + offset1;
+	offset[0] = get_boot_device_offset(dev, dev_type);
 
-	value_container[0] = get_dev_container_size(dev, dev_type, offset1, &hdr_length);
+	value_container[0] = get_dev_container_size(dev, dev_type, offset[0], &hdr_length);
 	if (value_container[0] < 0) {
 		printf("Parse seco container failed %d\n", value_container[0]);
-		return value_container[0];
+		return 0;
 	}
 
 	debug("seco container size 0x%x\n", value_container[0]);
 
-	value_container[1] = get_dev_container_size(dev, dev_type, offset2, &hdr_length);
-	if (value_container[1] < 0) {
-		debug("Parse scu container failed %d, only seco container\n",
-		      value_container[1]);
-		/* return seco container total size */
-		return value_container[0] + offset1;
+	if (is_imx95()) {
+		offset[1] = ALIGN(hdr_length, CONTAINER_HDR_ALIGNMENT) + offset[0];
+
+		value_container[1] = get_dev_container_size(dev, dev_type, offset[1], &hdr_length);
+		if (value_container[1] < 0) {
+			printf("Parse v2x container failed %d\n", value_container[1]);
+			return value_container[0] + offset[0]; /* return seco container total size */
+		}
+
+		debug("v2x container size 0x%x\n", value_container[1]);
+
+		offset[2] = ALIGN(hdr_length, CONTAINER_HDR_ALIGNMENT) + offset[1];
+	} else {
+		/* Skip offset[1] */
+		offset[2] = ALIGN(hdr_length, CONTAINER_HDR_ALIGNMENT) + offset[0];
 	}
 
-	debug("scu container size 0x%x\n", value_container[1]);
+	value_container[2] = get_dev_container_size(dev, dev_type, offset[2], &hdr_length);
+	if (value_container[2] < 0) {
+		debug("Parse scu container image failed %d, only seco container\n", value_container[2]);
+		if (is_imx95())
+			return value_container[1] + offset[1]; /* return seco + v2x container total size */
+		else
+			return value_container[0] + offset[0]; /* return seco container total size */
+	}
 
-	return value_container[1] + offset2;
+	debug("scu container size 0x%x\n", value_container[2]);
+
+	return value_container[2] + offset[2];
 }
 
 #ifdef CONFIG_SPL_SPI_LOAD
 unsigned int spl_spi_get_uboot_offs(struct spi_flash *flash)
 {
-	int end;
+	ulong end;
 
 	end = get_imageset_end(flash, QSPI_DEV);
 	end = ROUND(end, SZ_1K);
 
-	printf("Load image from QSPI 0x%x\n", end);
+	printf("Load image from QSPI 0x%lx\n", end);
 
 	return end;
 }
@@ -279,12 +296,12 @@ unsigned int spl_spi_get_uboot_offs(struct spi_flash *flash)
 unsigned long arch_spl_mmc_get_uboot_raw_sector(struct mmc *mmc,
 						unsigned long raw_sect)
 {
-	int end;
+	ulong end;
 
 	end = get_imageset_end(mmc, MMC_DEV);
 	end = ROUND(end, SZ_1K);
 
-	printf("Load image from MMC/SD 0x%x\n", end);
+	printf("Load image from MMC/SD 0x%lx\n", end);
 
 	return end / mmc->read_bl_len;
 }
@@ -312,12 +329,12 @@ int spl_mmc_emmc_boot_partition(struct mmc *mmc)
 #ifdef CONFIG_SPL_NAND_SUPPORT
 uint32_t spl_nand_get_uboot_raw_page(void)
 {
-	int end;
+	ulong end;
 
 	end = get_imageset_end((void *)NULL, NAND_DEV);
 	end = ROUND(end, SZ_16K);
 
-	printf("Load image from NAND 0x%x\n", end);
+	printf("Load image from NAND 0x%lx\n", end);
 
 	return end;
 }
@@ -326,7 +343,7 @@ uint32_t spl_nand_get_uboot_raw_page(void)
 #ifdef CONFIG_SPL_NOR_SUPPORT
 unsigned long spl_nor_get_uboot_base(void)
 {
-	int end;
+	ulong end;
 
 	/* Calculate the image set end,
 	 * if it is less than CFG_SYS_UBOOT_BASE(0x8281000),
@@ -339,7 +356,7 @@ unsigned long spl_nor_get_uboot_base(void)
 	else
 		end = ROUND(end, SZ_1K);
 
-	printf("Load image from NOR 0x%x\n", end);
+	printf("Load image from NOR 0x%lx\n", end);
 
 	return end;
 }
Signature · 1 line
2.34.1