[PATCH v2 4/4] board: imx93w_evk: add board support for i.MX93W EVK

[email protected]
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
From: Alice Guo <[email protected]>

i.MX93W integrates i.MX93 and IW610 WLCSP in one package. The i.MX93W
EVK reuses the i.MX93 11x11 EVK with some minor changes. Since the
upstream imx93-11x11-evk.dts in dts/upstream does not include SDIO
and WIFI nodes, only the part of the kernel DTS changes needed by
U-Boot (mainly the I2C3 pins) is added here, together with a new
TARGET_IMX93W_EVK Kconfig entry, defconfig, MAINTAINERS entry and
documentation. The board uses the LPDDR4X 3600MTS timing tables
added earlier.

Function differences vs. i.MX93 EVK:
    Function        i.MX93W EVK                     i.MX93 EVK
    WIFI/BT         IW610 in i.MX93W                IW612 M.2 module
    MQS             N                               Y
    PDM MIC         N                               Y
    M.2             N                               Y
    RPi 40-pin HDR  Limited (pin conflict)          Y

Pin connection differences:
    Function  Signal        i.MX93W EVK             i.MX93 EVK
    WIFI/BT   SPI_FRM       SAI1_TXFS (spi1.PCS0)   GPIO_IO08 (spi3.PCS0)
              SPI_TXD       SAI1_TXC  (spi1.SIN)    GPIO_IO09 (spi3.SIN)
              SPI_RXD       SAI1_RXD0 (spi1.SOUT)   GPIO_IO10 (spi3.SOUT)
              SPI_CLK       SAI1_TXD0 (spi1.SCK)    GPIO_IO11 (spi3.SCK)
              SPI_INT       CCM_CLKO1               on-board IO expander
              NB_WAKE_IN    PDM_CLK                 on-module IO expander
              WL_WAKE_IN    PDM_BIT_STREAM0         on-module IO expander
              IND_RST_WL    PDM_BIT_STREAM1         on-module IO expander
              IND_RST_NB    GPIO_IO28               on-module IO expander
              PDn           GPIO_IO29               on-module IO expander
              NB_WAKE_OUT   GPIO_IO14               on-board IO expander
              WL_WAKE_OUT   GPIO_IO15               CCM_CLKO1
    I2C3      I2C3_SDA      GPIO_IO00               GPIO_IO28
              I2C3_SCL      GPIO_IO01               GPIO_IO29

In addition, the default iomux setting 0 of CCM_CLKO1 outputs the CCM
CLKO1 clock. On i.MX93W this pin is wired to IW610 boot config[3], and
a clock on it would cause an incorrect IW610 boot mode. Configure
CCM_CLKO1 as GPIO input with internal pull-up in U-Boot to avoid the
issue. Since CCM_CLKO1 will eventually be used as SPI_INT for IW610,
the pad setting is aligned with SPI_INT.

Signed-off-by: Alice Guo <[email protected]>
---
 arch/arm/dts/imx93w-evk-u-boot.dtsi     | 171 +++++++++++++++++++++++++++++++
 arch/arm/mach-imx/imx9/Kconfig          |  12 +++
 board/nxp/imx93_evk/Kconfig             |   2 +-
 board/nxp/imx93_evk/MAINTAINERS         |   2 +
 board/nxp/imx93_evk/Makefile            |  12 +++
 configs/imx93w_evk_defconfig            | 172 ++++++++++++++++++++++++++++++++
 configs/imx93w_evk_inline_ecc_defconfig |   3 +
 doc/board/nxp/imx93w_evk.rst            |  72 +++++++++++++
 doc/board/nxp/index.rst                 |   1 +
 9 files changed, 446 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/imx93w-evk-u-boot.dtsi b/arch/arm/dts/imx93w-evk-u-boot.dtsi
new file mode 100644
index 00000000000..4cf6a4a71d2
--- /dev/null
+++ b/arch/arm/dts/imx93w-evk-u-boot.dtsi
@@ -0,0 +1,171 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2026 NXP
+ */
+
+#include "imx93-u-boot.dtsi"
+
+&{/soc@0} {
+	bootph-all;
+};
+
+&aips1 {
+	bootph-all;
+};
+
+&aips2 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&aips3 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&clk {
+	bootph-all;
+	/delete-property/ assigned-clocks;
+	/delete-property/ assigned-clock-rates;
+	/delete-property/ assigned-clock-parents;
+};
+
+&clk_ext1 {
+	bootph-all;
+};
+
+&gpio1 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&gpio2 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&gpio3 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&gpio4 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&lpi2c1 {
+	bootph-pre-ram;
+};
+
+&lpi2c2 {
+	bootph-pre-ram;
+};
+
+&lpi2c3 {
+	bootph-pre-ram;
+	pinctrl-names = "default", "gpio";
+	pinctrl-0 = <&pinctrl_lpi2c3>;
+	pinctrl-1 = <&pinctrl_lpi2c3_gpio>;
+	gpios = <&gpio2 0 GPIO_ACTIVE_LOW>,
+		<&gpio2 1 GPIO_ACTIVE_LOW>;
+};
+
+&lpuart1 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&osc_24m {
+	bootph-all;
+};
+
+&osc_32k {
+	bootph-all;
+};
+
+&{/soc@0/bus@44000000/i2c@44350000/pmic@25} {
+	bootph-pre-ram;
+	bootph-some-ram;
+
+	regulators {
+		bootph-pre-ram;
+		bootph-some-ram;
+	};
+};
+
+&reg_usdhc2_vmmc {
+	bootph-pre-ram;
+};
+
+&s4muap {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&usdhc1 {
+	bootph-pre-ram;
+};
+
+&usdhc2 {
+	bootph-pre-ram;
+	fsl,signal-voltage-switch-extra-delay-ms = <8>;
+};
+
+&wdog3 {
+	status = "disabled";
+};
+
+&iomuxc {
+	bootph-all;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;
+
+	pinctrl_hog: hoggrp {
+		bootph-all;
+		fsl,pins = <
+			MX93_PAD_CCM_CLKO1__GPIO3_IO26			0x31e
+		>;
+	};
+
+	pinctrl_lpi2c3_gpio: lpi2c3gpiogrp {
+		bootph-all;
+		fsl,pins = <
+			MX93_PAD_GPIO_IO00__GPIO2_IO00			0x31e
+			MX93_PAD_GPIO_IO01__GPIO2_IO01			0x31e
+		>;
+	};
+};
+
+&pinctrl_uart1 {
+	bootph-pre-ram;
+	bootph-some-ram;
+};
+
+&pinctrl_lpi2c1 {
+	bootph-pre-ram;
+};
+
+&pinctrl_lpi2c2 {
+	bootph-pre-ram;
+};
+
+&pinctrl_lpi2c3 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc1 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2 {
+	bootph-pre-ram;
+};
+
+&pinctrl_usdhc2_gpio {
+	bootph-pre-ram;
+};
+
+&pinctrl_reg_usdhc2_vmmc {
+	bootph-pre-ram;
+};
diff --git a/arch/arm/mach-imx/imx9/Kconfig b/arch/arm/mach-imx/imx9/Kconfig
index 1271a3e88e6..ad1a425e652 100644
--- a/arch/arm/mach-imx/imx9/Kconfig
+++ b/arch/arm/mach-imx/imx9/Kconfig
@@ -105,6 +105,18 @@ config TARGET_IMX93_11X11_EVK
 	select REGMAP
 	select SYSCON
 
+config TARGET_IMX93W_EVK
+	bool "imx93w_evk"
+	select OF_BOARD_FIXUP
+	select IMX93
+	imply OF_UPSTREAM
+	imply BOOTSTD_FULL
+	imply BOOTSTD_BOOTCOMMAND
+	select CMD_REMOTEPROC
+	select REMOTEPROC_IMX
+	select REGMAP
+	select SYSCON
+
 config TARGET_IMX93_FRDM
 	bool "imx93_frdm"
 	select OF_BOARD_FIXUP
diff --git a/board/nxp/imx93_evk/Kconfig b/board/nxp/imx93_evk/Kconfig
index 305c3963f06..99df2079107 100644
--- a/board/nxp/imx93_evk/Kconfig
+++ b/board/nxp/imx93_evk/Kconfig
@@ -1,4 +1,4 @@
-if TARGET_IMX93_11X11_EVK
+if TARGET_IMX93_11X11_EVK || TARGET_IMX93W_EVK
 
 config SYS_BOARD
 	default "imx93_evk"
diff --git a/board/nxp/imx93_evk/MAINTAINERS b/board/nxp/imx93_evk/MAINTAINERS
index da0540307c6..0c542aced87 100644
--- a/board/nxp/imx93_evk/MAINTAINERS
+++ b/board/nxp/imx93_evk/MAINTAINERS
@@ -5,3 +5,5 @@ F:	board/nxp/imx93_evk/
 F:	include/configs/imx93_evk.h
 F:	configs/imx93_11x11_evk_defconfig
 F:	configs/imx93_11x11_evk_ld_defconfig
+F:	configs/imx93w_evk_defconfig
+F:	configs/imx93w_evk_inline_ecc_defconfig
diff --git a/board/nxp/imx93_evk/Makefile b/board/nxp/imx93_evk/Makefile
index b077acc70a5..ec2a0af3501 100644
--- a/board/nxp/imx93_evk/Makefile
+++ b/board/nxp/imx93_evk/Makefile
@@ -8,5 +8,17 @@ obj-y += imx93_evk.o
 
 ifdef CONFIG_XPL_BUILD
 obj-y += spl.o
+ifdef CONFIG_IMX9_DRAM_INLINE_ECC
+ifdef CONFIG_TARGET_IMX93W_EVK
+obj-$(CONFIG_IMX93_EVK_LPDDR4X) += lpddr4x_timing_3600mts.o lpddr4x_timing_1866mts.o
+else
 obj-$(CONFIG_IMX93_EVK_LPDDR4X) += lpddr4x_timing.o lpddr4x_timing_1866mts.o
 endif
+else
+ifdef CONFIG_TARGET_IMX93W_EVK
+obj-$(CONFIG_IMX93_EVK_LPDDR4X) += lpddr4x_timing_3600mts.o lpddr4x_timing_1866mts.o
+else
+obj-$(CONFIG_IMX93_EVK_LPDDR4X) += lpddr4x_timing.o lpddr4x_timing_1866mts.o
+endif
+endif
+endif
diff --git a/configs/imx93w_evk_defconfig b/configs/imx93w_evk_defconfig
new file mode 100644
index 00000000000..9a1d134f4db
--- /dev/null
+++ b/configs/imx93w_evk_defconfig
@@ -0,0 +1,172 @@
+CONFIG_ARM=y
+CONFIG_ARCH_IMX9=y
+CONFIG_TEXT_BASE=0x80200000
+CONFIG_SYS_MALLOC_LEN=0x2000000
+CONFIG_SYS_MALLOC_F_LEN=0x18000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_NR_DRAM_BANKS=2
+CONFIG_SF_DEFAULT_SPEED=40000000
+CONFIG_ENV_SIZE=0x4000
+CONFIG_ENV_OFFSET=0x700000
+CONFIG_DM_GPIO=y
+CONFIG_DEFAULT_DEVICE_TREE="freescale/imx93w-evk"
+CONFIG_TARGET_IMX93W_EVK=y
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_SYS_MONITOR_LEN=524288
+CONFIG_SPL_SERIAL=y
+CONFIG_SPL_DRIVERS_MISC=y
+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=0x80400000
+CONFIG_SPL=y
+CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
+CONFIG_SYS_MEMTEST_START=0x80000000
+CONFIG_SYS_MEMTEST_END=0x90000000
+CONFIG_REMAKE_ELF=y
+CONFIG_EFI_SET_TIME=y
+CONFIG_EFI_VAR_BUF_SIZE=139264
+CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_OF_SYSTEM_SETUP=y
+CONFIG_BOOTCOMMAND="run sr_ir_v2_cmd;bootflow scan -lb; run bsp_bootcmd"
+CONFIG_DEFAULT_FDT_FILE="imx93w-evk.dtb"
+CONFIG_SYS_CBSIZE=2048
+CONFIG_SYS_PBSIZE=2074
+# CONFIG_BOARD_INIT is not set
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_SPL_MAX_SIZE=0x26000
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_BOOTROM_SUPPORT=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=0x1040
+CONFIG_SPL_I2C=y
+CONFIG_SPL_POWER=y
+CONFIG_SPL_WATCHDOG=y
+CONFIG_SYS_PROMPT="u-boot=> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_NVEDIT_EFI=y
+CONFIG_CRC32_VERIFY=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_CLK=y
+CONFIG_CMD_DFU=y
+CONFIG_CMD_FUSE=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_POWEROFF=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_BMP=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_REGULATOR=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_NOWHERE=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_ENV_MMC_DEVICE_INDEX=1
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_USE_ETHPRIME=y
+CONFIG_ETHPRIME="eth1"
+# CONFIG_BOOTDEV_ETH is not set
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_DM=y
+CONFIG_ADC=y
+CONFIG_ADC_IMX93=y
+CONFIG_SPL_CLK_IMX93=y
+CONFIG_CLK_IMX93=y
+CONFIG_DFU_MMC=y
+CONFIG_DFU_RAM=y
+CONFIG_IMX_RGPIO2P=y
+CONFIG_DM_PCA953X=y
+CONFIG_ADP5585_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_IMX_LPI2C=y
+CONFIG_SUPPORT_EMMC_RPMB=y
+CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_MMC_HS400_ES_SUPPORT=y
+CONFIG_MMC_HS400_SUPPORT=y
+CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_STMICRO=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_MII=y
+CONFIG_PHY_ANEG_TIMEOUT=20000
+CONFIG_PHY_REALTEK=y
+CONFIG_MIPI_DPHY_HELPERS=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_DM_REGULATOR_PCA9450=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_RTC=y
+CONFIG_RTC_EMULATION=y
+CONFIG_DM_SERIAL=y
+CONFIG_FSL_LPUART=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_NXP_FSPI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_CMD_POWEROFF=y
+CONFIG_SYSRESET_PSCI=y
+CONFIG_DM_THERMAL=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_HOST_ETHER=y
+CONFIG_USB_ETHER_ASIX=y
+CONFIG_USB_ETHER_RTL8152=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_VIDEO=y
+CONFIG_VIDEO_LOGO=y
+CONFIG_SYS_WHITE_ON_BLACK=y
+CONFIG_SPLASH_SCREEN=y
+CONFIG_SPLASH_SCREEN_ALIGN=y
+CONFIG_BMP_16BPP=y
+CONFIG_BMP_24BPP=y
+CONFIG_BMP_32BPP=y
+CONFIG_ULP_WATCHDOG=y
+CONFIG_SHA384=y
+CONFIG_LZO=y
+CONFIG_BZIP2=y
diff --git a/configs/imx93w_evk_inline_ecc_defconfig b/configs/imx93w_evk_inline_ecc_defconfig
new file mode 100644
index 00000000000..04ba29fe3a2
--- /dev/null
+++ b/configs/imx93w_evk_inline_ecc_defconfig
@@ -0,0 +1,3 @@
+#include <configs/imx93w_evk_defconfig>
+
+CONFIG_IMX9_DRAM_INLINE_ECC=y
diff --git a/doc/board/nxp/imx93w_evk.rst b/doc/board/nxp/imx93w_evk.rst
new file mode 100644
index 00000000000..24e994e2ee4
--- /dev/null
+++ b/doc/board/nxp/imx93w_evk.rst
@@ -0,0 +1,72 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+imx93w_evk
+==========
+
+U-Boot for the NXP i.MX93W EVK board.
+
+Quick Start
+-----------
+
+- Get and Build the ARM Trusted firmware
+- Get the DDR firmware
+- Get ahab-container.img
+- Build U-Boot
+- Boot
+
+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.14
+
+.. code-block:: bash
+
+   $ git clone -b lf_v2.14 https://github.com/nxp-imx/imx-atf.git
+   $ cd imx-atf
+   $ export CROSS_COMPILE=aarch64-poky-linux-
+   $ unset LDFLAGS
+   $ unset AS
+   $ make PLAT=imx93 bl31
+   $ cp build/imx93/release/bl31.bin $(srctree)
+
+Get the DDR firmware
+--------------------
+
+.. code-block:: bash
+
+   $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.32-1991416.bin
+   $ chmod +x firmware-imx-8.32-1991416.bin
+   $ ./firmware-imx-8.32-1991416.bin
+   $ cp firmware-imx-8.32-1991416/firmware/ddr/synopsys/lpddr4*v202201.bin $(srctree)
+
+Get ahab-container.img
+----------------------
+
+.. code-block:: bash
+
+   $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-ele-imx-2.0.6-c0b284c.bin
+   $ chmod +x firmware-ele-imx-2.0.6-c0b284c.bin
+   $ ./firmware-ele-imx-2.0.6-c0b284c.bin
+   $ cp firmware-ele-imx-2.0.6-c0b284c/mx93a1-ahab-container.img $(srctree)
+
+Build U-Boot
+------------
+
+.. code-block:: bash
+
+   $ export CROSS_COMPILE=aarch64-poky-linux-
+   $ make imx93w_evk_defconfig or imx93w_evk_inline_ecc_defconfig
+   $ make
+
+Burn the flash.bin to MicroSD card offset 32KB:
+
+.. code-block:: bash
+
+   $ dd if=flash.bin of=/dev/sd[x] bs=1024 seek=32 conv=notrunc
+
+Boot
+----
+
+Set Boot switch to SD boot.
diff --git a/doc/board/nxp/index.rst b/doc/board/nxp/index.rst
index b28e5b6ceb9..fd92deef3c8 100644
--- a/doc/board/nxp/index.rst
+++ b/doc/board/nxp/index.rst
@@ -17,6 +17,7 @@ NXP Semiconductors
    imx93_9x9_qsb
    imx93_11x11_evk
    imx93_frdm
+   imx93w_evk
    imx95_frdm
    imx943_evk
    imx95_evk

-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.