imx: Add support for Kontron i.MX93 OSM-S SoM and BL carrier board

This adds support for the Kontron Electronics OSM-S i.MX93 SoM
and the matching baseboard BL i.MX93.

The SoM hardware complies to the Open Standard Module (OSM) 1.1
specification, size S (https://sget.org/standards/osm).

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
This commit is contained in:
Frieder Schrempf 2025-11-11 17:54:20 +01:00 committed by Fabio Estevam
parent b9e48705e0
commit 8cad37db36
14 changed files with 2857 additions and 1 deletions

View File

@ -0,0 +1,153 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Copyright (C) 2024 Kontron Electronics GmbH
*/
#include "imx93-u-boot.dtsi"
/ {
wdt-reboot {
compatible = "wdt-reboot";
wdt = <&wdog3>;
bootph-all;
};
firmware {
optee {
compatible = "linaro,optee-tz";
method = "smc";
};
};
};
&A55_0 {
clocks = <&clk IMX93_CLK_ARM_PLL>;
};
&A55_1 {
clocks = <&clk IMX93_CLK_ARM_PLL>;
};
&{/soc@0} {
bootph-all;
};
&reg_vdd_carrier {
bootph-all;
};
&pinctrl_reg_vdd_carrier {
bootph-all;
};
&aips1 {
bootph-all;
};
&aips2 {
bootph-all;
};
&aips3 {
bootph-all;
};
&iomuxc {
bootph-all;
};
&pinctrl_usdhc2_gpio {
bootph-all;
};
&pinctrl_usdhc2 {
bootph-all;
};
&gpio1 {
bootph-all;
};
&gpio2 {
bootph-all;
};
&gpio3 {
bootph-all;
};
&gpio4 {
bootph-all;
};
&lpuart1 {
bootph-all;
};
&pinctrl_lpuart1 {
bootph-all;
};
&usdhc1 {
bootph-all;
};
&usdhc2 {
bootph-all;
fsl,signal-voltage-switch-extra-delay-ms = <8>;
};
&lpi2c1 {
bootph-all;
};
/* Enable I2C2 to probe for a touch controller on LVDS connector */
&lpi2c2 {
bootph-all;
status = "okay";
};
&pca9451 {
bootph-all;
};
&{/soc@0/bus@44000000/i2c@44340000/pmic@25/regulators} {
bootph-all;
};
&pinctrl_lpi2c1 {
bootph-all;
};
&s4muap {
bootph-all;
status = "okay";
};
&clk {
bootph-all;
};
&osc_32k {
bootph-all;
};
&osc_24m {
bootph-all;
};
&clk_ext1 {
bootph-all;
};
&wdog3 {
bootph-all;
};
&reg_vdd_3v3 {
bootph-all;
};
&reg_nvcc_sd {
bootph-all;
};

View File

@ -103,6 +103,15 @@ config TARGET_IMX93_VAR_SOM
select IMX93 select IMX93
select IMX9_LPDDR4X select IMX9_LPDDR4X
config TARGET_KONTRON_MX93
bool "Kontron OSM-S/BL i.MX93"
select BINMAN
select IMX93
select IMX9_LPDDR4X
help
Kontron Electronics BL i.MX93 using SoM module conformant to OSM
standard 1.1 size S.
config TARGET_PHYCORE_IMX93 config TARGET_PHYCORE_IMX93
bool "phycore_imx93" bool "phycore_imx93"
select IMX93 select IMX93
@ -142,6 +151,7 @@ source "board/freescale/imx91_evk/Kconfig"
source "board/freescale/imx93_evk/Kconfig" source "board/freescale/imx93_evk/Kconfig"
source "board/freescale/imx93_frdm/Kconfig" source "board/freescale/imx93_frdm/Kconfig"
source "board/freescale/imx93_qsb/Kconfig" source "board/freescale/imx93_qsb/Kconfig"
source "board/kontron/osm-s-mx93/Kconfig"
source "board/phytec/phycore_imx93/Kconfig" source "board/phytec/phycore_imx93/Kconfig"
source "board/variscite/imx93_var_som/Kconfig" source "board/variscite/imx93_var_som/Kconfig"
source "board/freescale/imx94_evk/Kconfig" source "board/freescale/imx94_evk/Kconfig"
@ -149,4 +159,3 @@ source "board/freescale/imx95_evk/Kconfig"
source "board/toradex/smarc-imx95/Kconfig" source "board/toradex/smarc-imx95/Kconfig"
endif endif

View File

@ -0,0 +1,17 @@
if TARGET_KONTRON_MX93
config SYS_BOARD
string
default "osm-s-mx93"
config SYS_VENDOR
string
default "kontron"
config SYS_CONFIG_NAME
string
default "kontron-osm-s-mx93"
source "board/kontron/common/Kconfig"
endif

View File

@ -0,0 +1,7 @@
Kontron OSM-S/BL i.MX93 Boards
M: Frieder Schrempf <frieder.schrempf@kontron.de>
S: Maintained
F: board/kontron/osm-s-mx93
F: configs/kontron-osm-s-mx93_defconfig
F: doc/board/kontron/osm-s-mx93.rst
F: include/configs/kontron-osm-s-mx93.h

View File

@ -0,0 +1,9 @@
# SPDX-License-Identifier: GPL-2.0+
# (C) Copyright 2023 Kontron Electronics GmbH
obj-y := osm-s-mx93.o
ifdef CONFIG_SPL_BUILD
obj-y += spl.o
obj-y += lpddr4x_timing.o
endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,168 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2024 Kontron Electronics GmbH
*/
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/mach-imx/boot_mode.h>
#include <dm/uclass.h>
#include <efi.h>
#include <efi_loader.h>
#include <env_internal.h>
#include <fdt_support.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <mmc.h>
#include <net.h>
#include <asm/arch-imx9/imx93_pins.h>
#include <asm/arch/ccm_regs.h>
#include "../common/hw-uid.h"
DECLARE_GLOBAL_DATA_PTR;
int board_early_init_f(void)
{
return 0;
}
#if IS_ENABLED(CONFIG_KONTRON_HW_UID)
struct uid_otp_loc uid_otp_locations[] = {
{
.addr = (u32 *)(FSB_BASE_ADDR + 0x8000 + 0x5e8),
.len = 2,
.format = UID_OTP_FORMAT_DEC,
.desc = "BOARD"
},
{
.addr = (u32 *)(FSB_BASE_ADDR + 0x8000 + 0x5e0),
.len = 2,
.format = UID_OTP_FORMAT_DEC,
.desc = "SOM"
}
};
#endif /* CONFIG_KONTRON_HW_UID */
int ft_board_setup(void *blob, struct bd_info *bd)
{
enum boot_device boot_dev;
char env_str_sd[] = "sd-card";
char env_str_emmc[] = "emmc";
char *env_config_str;
if (env_get_location(0, 0) != ENVL_MMC)
return 0;
boot_dev = get_boot_device();
if (boot_dev == SD2_BOOT)
env_config_str = env_str_sd;
else if (boot_dev == MMC1_BOOT)
env_config_str = env_str_emmc;
else
return 0;
/*
* Export a string to the devicetree that tells userspace tools like
* libubootenv where the environment is currently coming from.
*/
return fdt_find_and_setprop(blob, "/chosen", "u-boot,env-config",
env_config_str, strlen(env_config_str) + 1, 1);
}
static int setup_eqos(void)
{
struct blk_ctrl_wakeupmix_regs *bctrl =
(struct blk_ctrl_wakeupmix_regs *)BLK_CTRL_WAKEUPMIX_BASE_ADDR;
/* set INTF as RGMII, enable RGMII TXC clock */
clrsetbits_le32(&bctrl->eqos_gpr,
BCTRL_GPR_ENET_QOS_INTF_MODE_MASK,
BCTRL_GPR_ENET_QOS_INTF_SEL_RGMII | BCTRL_GPR_ENET_QOS_CLK_GEN_EN);
return set_clk_eqos(ENET_125MHZ);
}
int board_init(void)
{
if (IS_ENABLED(CONFIG_DWC_ETH_QOS))
setup_eqos();
return 0;
}
int board_late_init(void)
{
if (IS_ENABLED(CONFIG_KONTRON_HW_UID))
get_serial_number(uid_otp_locations, ARRAY_SIZE(uid_otp_locations));
if (get_boot_device() == USB_BOOT) {
env_set("bootcmd", "fastboot 0");
env_set("bootdelay", "0");
}
return 0;
}
#if IS_ENABLED(CONFIG_ENV_IS_IN_MMC)
int board_mmc_get_env_dev(int devno)
{
return devno;
}
uint mmc_get_env_part(struct mmc *mmc)
{
if (IS_SD(mmc))
return EMMC_HWPART_DEFAULT;
switch (EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config)) {
case EMMC_BOOT_PART_BOOT1:
return EMMC_HWPART_BOOT1;
case EMMC_BOOT_PART_BOOT2:
return EMMC_HWPART_BOOT2;
default:
return EMMC_HWPART_DEFAULT;
}
}
int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr)
{
/* use normal offset for SD card */
if (IS_SD(mmc)) {
*env_addr = CONFIG_ENV_OFFSET;
if (copy)
*env_addr = CONFIG_ENV_OFFSET_REDUND;
return 0;
}
switch (EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config)) {
case EMMC_BOOT_PART_BOOT1:
case EMMC_BOOT_PART_BOOT2:
*env_addr = mmc->capacity - CONFIG_ENV_SIZE - CONFIG_ENV_SIZE;
if (copy)
*env_addr = mmc->capacity - CONFIG_ENV_SIZE;
break;
default:
*env_addr = CONFIG_ENV_OFFSET;
if (copy)
*env_addr = CONFIG_ENV_OFFSET_REDUND;
}
return 0;
}
#endif
enum env_location env_get_location(enum env_operation op, int prio)
{
if (prio)
return ENVL_UNKNOWN;
if (CONFIG_IS_ENABLED(ENV_IS_NOWHERE) && get_boot_device() == USB_BOOT)
return ENVL_NOWHERE;
return arch_env_get_location(op, prio);
}

View File

@ -0,0 +1,6 @@
kernel_addr_r=0x82000000
fdt_addr_r=0x88000000
fdtoverlay_addr_r=0x89000000
ramdisk_addr_r=0x88080000
scriptaddr=0x80000000
pxefile_addr_r=0x80100000

View File

@ -0,0 +1,169 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2024 Kontron Electronics GmbH
*/
#include <asm/arch/imx93_pins.h>
#include <asm/arch/clock.h>
#include <asm/arch/ddr.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/sys_proto.h>
#include <asm/global_data.h>
#include <asm/gpio.h>
#include <asm/mach-imx/boot_mode.h>
#include <asm/mach-imx/iomux-v3.h>
#include <dm/uclass.h>
#include <dm/device.h>
#include <dm/uclass-internal.h>
#include <dm/device-internal.h>
#include <hang.h>
#include <i2c.h>
#include <init.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <power/pca9450.h>
#include <power/pmic.h>
#include <spl.h>
#include <asm/sections.h>
#include <asm/arch/trdc.h>
#include <asm/arch/ccm_regs.h>
DECLARE_GLOBAL_DATA_PTR;
int spl_board_boot_device(enum boot_device boot_dev_spl)
{
if (IS_ENABLED(CONFIG_SPL_BOOTROM_SUPPORT))
return BOOT_DEVICE_BOOTROM;
switch (boot_dev_spl) {
case SD1_BOOT:
case MMC1_BOOT:
return BOOT_DEVICE_MMC1;
case SD2_BOOT:
case MMC2_BOOT:
return BOOT_DEVICE_MMC2;
default:
return BOOT_DEVICE_NONE;
}
}
bool check_ram_available(long size)
{
long sz = get_ram_size((long *)PHYS_SDRAM, size);
if (sz == size)
return true;
return false;
}
static void spl_dram_init(void)
{
if (ddr_init(&dram_timing) || !check_ram_available(SZ_2G))
printf("Failed to initialize DDR RAM!\n");
printf("DDR: LPDDR4 initialized (2GB)\n");
}
void spl_board_init(void)
{
puts("Normal Boot\n");
}
static int power_init_board(void)
{
struct udevice *dev;
int ret = pmic_get("pmic@25", &dev);
if (ret == -ENODEV)
puts("No pmic found\n");
if (ret)
return ret;
/* BUCKxOUT_DVS0/1 control BUCK123 output */
pmic_reg_write(dev, PCA9450_BUCK123_DVS, 0x29);
/* enable DVS control through PMIC_STBY_REQ */
pmic_reg_write(dev, PCA9450_BUCK1CTRL, 0x59);
/* 0.9v for Over drive mode */
pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS0, 0x18);
pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x18);
/* set standby voltage to 0.65v */
pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS1, 0x4);
/* I2C_LT_EN*/
pmic_reg_write(dev, 0xa, 0x3);
return 0;
}
const char *spl_board_loader_name(u32 boot_device)
{
static char name[16];
struct mmc *mmc;
switch (boot_device) {
case BOOT_DEVICE_MMC1:
mmc_init_device(0);
mmc = find_mmc_device(0);
mmc_init(mmc);
snprintf(name, sizeof(name), "eMMC %s",
emmc_hwpart_names[EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config)]);
return name;
case BOOT_DEVICE_MMC2:
sprintf(name, "SD card");
return name;
}
return NULL;
}
extern int imx9_probe_mu(void);
void board_init_f(ulong dummy)
{
int ret;
/* Clear the BSS. */
memset(__bss_start, 0, __bss_end - __bss_start);
timer_init();
arch_cpu_init();
board_early_init_f();
spl_early_init();
preloader_console_init();
ret = imx9_probe_mu();
if (ret) {
printf("Fail to init Sentinel API\n");
} else {
debug("SOC: 0x%x\n", gd->arch.soc_rev);
debug("LC: 0x%x\n", gd->arch.lifecycle);
}
power_init_board();
if (!IS_ENABLED(CONFIG_IMX9_LOW_DRIVE_MODE))
set_arm_clk(get_cpu_speed_grade_hz());
/* Init power of mix */
soc_power_init();
/* Setup TRDC for DDR access */
trdc_init();
/* DDR initialization */
spl_dram_init();
/* Put M33 into CPUWAIT for following kick */
ret = m33_prepare();
if (ret)
printf("M33 prepare failed!\n");
board_init_r(NULL, 0);
}

View File

@ -0,0 +1,197 @@
CONFIG_ARM=y
CONFIG_ARCH_IMX9=y
CONFIG_TEXT_BASE=0x80200000
CONFIG_SYS_MALLOC_LEN=0x2000000
CONFIG_SYS_MALLOC_F_LEN=0x20000
CONFIG_SPL_GPIO=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=2
CONFIG_ENV_SIZE=0x10000
CONFIG_ENV_OFFSET=0x1E0000
CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx9/imximage.cfg"
CONFIG_DM_GPIO=y
CONFIG_KONTRON_HW_UID=y
CONFIG_DEFAULT_DEVICE_TREE="freescale/imx93-kontron-bl-osm-s"
CONFIG_TARGET_KONTRON_MX93=y
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SPL_STACK=0x20519dd0
CONFIG_SPL_TEXT_BASE=0x2049A000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
CONFIG_SPL_BSS_START_ADDR=0x2051a000
CONFIG_SPL_BSS_MAX_SIZE=0x2000
CONFIG_SYS_LOAD_ADDR=0x82000000
CONFIG_SPL=y
CONFIG_ENV_OFFSET_REDUND=0x1F0000
CONFIG_IMX_ELE_DEK_ENCAP=y
CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
CONFIG_LTO=y
CONFIG_EFI_SET_TIME=y
CONFIG_FIT=y
CONFIG_FIT_EXTERNAL_OFFSET=0x3000
CONFIG_BOOTSTD_FULL=y
CONFIG_BOOTMETH_RAUC=y
CONFIG_SYS_CBSIZE=2048
CONFIG_SYS_PBSIZE=2074
CONFIG_BOARD_LATE_INIT=y
CONFIG_SPL_MAX_SIZE=0x26000
CONFIG_SPL_BOARD_INIT=y
CONFIG_SPL_LOAD_IMX_CONTAINER=y
CONFIG_IMX_CONTAINER_CFG="arch/arm/mach-imx/imx9/container.cfg"
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
CONFIG_SPL_HAVE_INIT_STACK=y
CONFIG_SPL_SYS_MALLOC=y
CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y
CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x83200000
CONFIG_SPL_SYS_MALLOC_SIZE=0x80000
CONFIG_SPL_SYS_MMCSD_RAW_MODE=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300
CONFIG_SPL_I2C=y
CONFIG_SPL_POWER=y
CONFIG_SPL_WATCHDOG=y
CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CRC32_VERIFY=y
CONFIG_CMD_EEPROM=y
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
CONFIG_SYS_EEPROM_SIZE=8192
CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=5
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=6
CONFIG_CMD_MD5SUM=y
CONFIG_MD5SUM_VERIFY=y
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_SHA1SUM=y
CONFIG_SHA1SUM_VERIFY=y
# CONFIG_CMD_LZMADEC is not set
CONFIG_CMD_CLK=y
CONFIG_CMD_DFU=y
CONFIG_CMD_FUSE=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_GPT_RENAME=y
CONFIG_CMD_I2C=y
CONFIG_CMD_LSBLK=y
CONFIG_CMD_MBR=y
CONFIG_CMD_MMC=y
CONFIG_CMD_BKOPS_ENABLE=y
CONFIG_MMC_SPEED_MODE_SET=y
CONFIG_CMD_READ=y
CONFIG_CMD_SPI=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_SDP=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_WDT=y
CONFIG_CMD_BOOTCOUNT=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_RTC=y
CONFIG_CMD_TIME=y
CONFIG_CMD_GETTIME=y
CONFIG_CMD_TIMER=y
CONFIG_CMD_UUID=y
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
CONFIG_CMD_HASH=y
CONFIG_CMD_SMC=y
CONFIG_HASH_VERIFY=y
CONFIG_CMD_BTRFS=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FS_UUID=y
CONFIG_PARTITION_TYPE_GUID=y
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_UPSTREAM=y
CONFIG_ENV_IS_NOWHERE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_REDUNDANT=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="kontron-mx93"
CONFIG_VERSION_VARIABLE=y
CONFIG_TFTP_TSIZE=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_ADC=y
CONFIG_ADC_IMX93=y
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
CONFIG_SPL_CLK_IMX93=y
CONFIG_CLK_IMX93=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x82000000
CONFIG_FASTBOOT_FLASH=y
CONFIG_FASTBOOT_UUU_SUPPORT=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
CONFIG_FASTBOOT_MMC_BOOT_SUPPORT=y
CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
CONFIG_GPIO_HOG=y
CONFIG_IMX_RGPIO2P=y
CONFIG_DM_I2C=y
CONFIG_DM_I2C_GPIO=y
CONFIG_SYS_I2C_IMX_LPI2C=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_USB_HUB_USB251XB=y
CONFIG_I2C_EEPROM=y
CONFIG_SPL_I2C_EEPROM=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x50
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_IO_VOLTAGE=y
CONFIG_SPL_MMC_IO_VOLTAGE=y
CONFIG_MMC_UHS_SUPPORT=y
CONFIG_SPL_MMC_UHS_SUPPORT=y
CONFIG_MMC_HS400_ES_SUPPORT=y
CONFIG_MMC_HS400_SUPPORT=y
CONFIG_FSL_USDHC=y
CONFIG_PHY_ETHERNET_ID=y
CONFIG_DM_ETH_PHY=y
CONFIG_PHY_GIGE=y
CONFIG_DWC_ETH_QOS=y
CONFIG_DWC_ETH_QOS_IMX=y
CONFIG_FEC_MXC=y
CONFIG_RGMII=y
CONFIG_MII=y
CONFIG_RMII=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_IMX93=y
CONFIG_POWER_DOMAIN=y
CONFIG_DM_PMIC=y
CONFIG_DM_PMIC_PCA9450=y
CONFIG_SPL_DM_PMIC_PCA9450=y
CONFIG_DM_REGULATOR=y
CONFIG_SPL_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PCA9450=y
CONFIG_SPL_DM_REGULATOR_PCA9450=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_RTC=y
CONFIG_RTC_RV3028=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
CONFIG_LPUART=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_MXC_SPI=y
CONFIG_SYSRESET=y
CONFIG_SPL_SYSRESET=y
CONFIG_SYSRESET_PSCI=y
CONFIG_SYSRESET_WATCHDOG=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="FSL"
CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
CONFIG_USB_GADGET_PRODUCT_NUM=0x0152
CONFIG_CI_UDC=y
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_IMX_WATCHDOG=y
CONFIG_ULP_WATCHDOG=y

View File

@ -0,0 +1,3 @@
#include <configs/kontron-osm-s-mx93.config>
CONFIG_SPL_BOOTROM_SUPPORT=y

View File

@ -7,6 +7,7 @@ Kontron
:maxdepth: 2 :maxdepth: 2
osm-s-mx8mp osm-s-mx8mp
osm-s-mx93
pitx-imx8m pitx-imx8m
sl28 sl28
sl-mx6ul sl-mx6ul

View File

@ -0,0 +1,95 @@
.. SPDX-License-Identifier: GPL-2.0+
Kontron Electronics i.MX93 SoMs and Boards
===========================================
The OSM-S i.MX93 by Kontron Electronics GmbH is a SoM module with an
i.MX93 SoC, 2 GB LPDDR4 RAM, eMMC, PMIC, RTC.
The matching evaluation boards (Board-Line, BL) have two Ethernet ports,
USB 2.0, LVDS, SD card, CAN, RS485, RS232 and much more.
The OSM-S i.MX93 is compliant to the Open Standard Module (OSM) 1.1
specification, size S (https://sget.org/standards/osm).
Quick Start
-----------
- Get and Build the Trusted Firmware-A (TF-A)
- Get the DDR firmware
- Build U-Boot
- Boot
.. note::
To build on a x86-64 host machine, you need a GNU cross toolchain for the
target architecture (aarch64). Check your distros package manager or
download and install the necessary tools (``aarch64-linux-gnu-*``) manually.
Get and Build the Trusted Firmware-A (TF-A)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
If you are using GCC 12 and you get compiler/linker errors, try to add the
following arguments to your make command as workaround:
``CFLAGS="-Wno-array-bounds" LDFLAGS="--no-warn-rwx-segments"``
1. Get TF-A from: https://github.com/nxp-imx/imx-atf, branch: lf_v2.12
2. Build
.. code-block:: bash
$ make PLAT=imx93 CROSS_COMPILE=aarch64-linux-gnu- IMX_BOOT_UART_BASE="0x30880000" bl31
$ cp build/imx93/release/bl31.bin $(builddir)
.. note::
*builddir* is U-Boot's build directory (source directory for in-tree builds)
Get the DDR firmware
^^^^^^^^^^^^^^^^^^^^
.. code-block:: bash
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.28-994fa14.bin
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-ele-imx-2.0.2-89161a8.bin
$ chmod +x firmware-imx-8.28-994fa14.bin firmware-ele-imx-2.0.2-89161a8.bin
$ ./firmware-imx-8.28-994fa14.bin
$ ./firmware-ele-imx-2.0.2-89161a8.bin
$ cp firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr4_dmem_1d_v202201.bin $(builddir)
$ cp firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr4_dmem_2d_v202201.bin $(builddir)
$ cp firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr4_imem_1d_v202201.bin $(builddir)
$ cp firmware-imx-8.28-994fa14/firmware/ddr/synopsys/lpddr4_imem_2d_v202201.bin $(builddir)
$ cp firmware-ele-imx-2.0.2-89161a8/mx93a1-ahab-container.img $(builddir)
Build U-Boot
^^^^^^^^^^^^
.. code-block:: bash
$ make kontron-osm-s-mx93_defconfig
$ make CROSS_COMPILE=aarch64-linux-gnu-
Copy the flash.bin to SD card at an offset of 32 KiB:
.. code-block:: bash
$ dd if=flash.bin of=/dev/sd[x] bs=1K seek=32 conv=fsync
Boot
^^^^
Put the SD card in the slot on the board and apply power. Alternatively connect
the USB Type-C Connector to your host machine, power up the board and load the
bootloader via uuu-Tool (`uuu flash.bin`).
Check the serial console for output.
Further Information
-------------------
The bootloader configuration is setup to be used with kernel FIT images. Legacy
images might not be working out of the box.
Please see https://docs.kontron-electronics.de for further vendor documentation.

View File

@ -0,0 +1,30 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2024 Kontron Electronics GmbH
*
* Configuration settings for the Kontron OSM-S/BL i.MX93 boards and modules.
*/
#ifndef __KONTRON_MX93_CONFIG_H
#define __KONTRON_MX93_CONFIG_H
#include <asm/arch/imx-regs.h>
#include <linux/sizes.h>
/* RAM */
#define PHYS_SDRAM 0x80000000
#define PHYS_SDRAM_SIZE (SZ_2G)
#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
#define CFG_SYS_INIT_RAM_ADDR 0x80000000
#define CFG_SYS_INIT_RAM_SIZE SZ_2M
/* Board and environment settings */
#ifdef CONFIG_USB_EHCI_HCD
#define CFG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
#define CFG_MXC_USB_FLAGS 0
#endif
#define WDOG_BASE_ADDR WDG3_BASE_ADDR
#endif /* __KONTRON_MX93_CONFIG_H */