Fabio Estevam b40c9b0c22 imx93_frdm: Add initial board support
Add the initial board support for the NXP i.MX93 FRDM board:

https://www.nxp.com/design/design-center/development-boards-and-designs/frdm-i-mx-93-development-board:FRDM-IMX93

Based on the NXP U-Boot code.

There were attempts to upstream the board devicetree, but it has not been
accepted upstream yet:

https://lore.kernel.org/linux-arm-kernel/20250526-fpg-nxp-imx93-frdm-v2-2-e5ad0efaec33@pengutronix.de/

Once it reaches upstream, we can switch to OF_UPSTREAM.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-07-24 08:01:03 -03:00

60 lines
1.2 KiB
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2025 NXP
*/
#include <env.h>
#include <efi_loader.h>
#include <init.h>
#include <asm/global_data.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch-imx9/imx93_pins.h>
#include <asm/arch/clock.h>
#include <dm/device.h>
#include <dm/uclass.h>
DECLARE_GLOBAL_DATA_PTR;
#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
#define IMX_BOOT_IMAGE_GUID \
EFI_GUID(0xbc550d86, 0xda26, 0x4b70, 0xac, 0x05, \
0x2a, 0x44, 0x8e, 0xda, 0x6f, 0x21)
struct efi_fw_image fw_images[] = {
{
.image_type_id = IMX_BOOT_IMAGE_GUID,
.fw_name = u"IMX93-11X11-FRDM-RAW",
.image_index = 1,
},
};
struct efi_capsule_update_info update_info = {
.dfu_string = "mmc 0=flash-bin raw 0 0x2000 mmcpart 1",
.num_images = ARRAY_SIZE(fw_images),
.images = fw_images,
};
#endif /* EFI_HAVE_CAPSULE_SUPPORT */
int board_early_init_f(void)
{
return 0;
}
int board_init(void)
{
return 0;
}
int board_late_init(void)
{
if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC) || IS_ENABLED(CONFIG_ENV_IS_IN_NOWHERE))
board_late_mmc_env_init();
if (IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)) {
env_set("board_name", "11X11_FRDM");
env_set("board_rev", "iMX93");
}
return 0;
}