DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Fabian Pflug <f.pflug@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Fabian Pflug <f.pflug@pengutronix.de>
Subject: [DistroKit] [PATCH 3/3] platform-v8a: add nxp-imx93-frdm board
Date: Tue, 21 Oct 2025 15:27:31 +0200	[thread overview]
Message-ID: <20251021133031.3266446-4-f.pflug@pengutronix.de> (raw)
In-Reply-To: <20251021133031.3266446-1-f.pflug@pengutronix.de>

After fixing the missing upstream support in the previous two commits,
we can now fully integrate the i.MX93 FRDM board.

It recycles the image config from the TQ-MA93 board and the image file
in itself is just a copy from tqma with some name changes. Same goes for
the bootstate.dtsi. The magic value is random thoughts, the rest is copy
paste.

Signed-off-by: Fabian Pflug <f.pflug@pengutronix.de>
---
 .../barebox-common-defaultenv/init/bootsource |  2 +-
 configs/platform-v8a/dts/bootstate.dtsi       | 21 +++++++++
 configs/platform-v8a/platformconfig           |  3 +-
 .../platforms/image-nxp-imx93-frdm.in         | 10 ++++
 .../rules/image-nxp-imx93-frdm.make           | 35 ++++++++++++++
 doc/hardware.rst                              |  1 +
 doc/hardware_v8a_imx93_frdm.rst               | 47 +++++++++++++++++++
 .../lib/udev/rules.d/90-rauc-partitions.rules |  1 +
 8 files changed, 118 insertions(+), 2 deletions(-)
 create mode 100644 configs/platform-v8a/platforms/image-nxp-imx93-frdm.in
 create mode 100644 configs/platform-v8a/rules/image-nxp-imx93-frdm.make
 create mode 100644 doc/hardware_v8a_imx93_frdm.rst

diff --git a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
index 87d58f58..03dbbf60 100644
--- a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
+++ b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
@@ -10,7 +10,7 @@ if [ "$bootsource" = mmc ]; then
 	global.boot.default="mmc$bootsource_instance net"
 fi
 
-if of_compatible -k radxa,rock3a tq,imx8mp-tqma8mpql-mba8mpxl tq,imx93-tqma9352 beagle,am625-beagleplay; then
+if of_compatible -k radxa,rock3a tq,imx8mp-tqma8mpql-mba8mpxl tq,imx93-tqma9352 beagle,am625-beagleplay fsl,imx93-11x11-frdm; then
 	global.boot.default="bootchooser net"
 	global bootchooser.state_prefix="state.bootstate"
 	global bootchooser.targets="system0 system1"
diff --git a/configs/platform-v8a/dts/bootstate.dtsi b/configs/platform-v8a/dts/bootstate.dtsi
index ae5ea809..2847c7ec 100644
--- a/configs/platform-v8a/dts/bootstate.dtsi
+++ b/configs/platform-v8a/dts/bootstate.dtsi
@@ -82,6 +82,27 @@
 
 #endif
 
+/** NXP i.MX93 FRDM board *****************************************************/
+#ifdef imx93_frdm_dts
+/ {
+	aliases {
+		state = &state_sd;
+	};
+
+	state_sd: state {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "barebox,state";
+		magic = <0x81ffac43>;
+		backend = <&usdhc2>;   // uSD card slot
+		backend-type = "raw";
+		backend-storage-type = "direct";
+		backend-stridesize = <0x40>;
+	};
+};
+
+#endif
+
 /** Generic bootstate node for all platforms **********************************/
 / {
 	state: state {
diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
index 4b860b8b..e2445305 100644
--- a/configs/platform-v8a/platformconfig
+++ b/configs/platform-v8a/platformconfig
@@ -137,7 +137,7 @@ PTXCONF_KERNEL_IMAGE_RAW=y
 PTXCONF_KERNEL_IMAGE="Image"
 PTXCONF_KERNEL_DTB=y
 PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
-PTXCONF_KERNEL_DTS="armada-3720-community.dts freescale/imx8mm-evk.dts freescale/imx8mn-ddr4-evk.dts freescale/imx8mp-evk.dts freescale/imx8mq-evk.dts rockchip/rk3568-rock-3a.dts freescale/imx8mp-tqma8mpql-mba8mpxl.dts freescale/imx93-tqma9352-mba93xxca.dts ti/k3-am625-beagleplay.dts"
+PTXCONF_KERNEL_DTS="armada-3720-community.dts freescale/imx8mm-evk.dts freescale/imx8mn-ddr4-evk.dts freescale/imx8mp-evk.dts freescale/imx8mq-evk.dts rockchip/rk3568-rock-3a.dts freescale/imx8mp-tqma8mpql-mba8mpxl.dts freescale/imx93-tqma9352-mba93xxca.dts ti/k3-am625-beagleplay.dts imx93-11x11-frdm.dts"
 # PTXCONF_KERNEL_DTBO is not set
 # PTXCONF_KERNEL_CODE_SIGNING is not set
 # PTXCONF_KERNEL_ZSTD is not set
@@ -265,6 +265,7 @@ PTXCONF_IMAGE_KERNEL_INSTALL_EARLY=y
 # PTXCONF_IMAGE_KERNEL_LZOP is not set
 # end of Generate images/linuximage    
 
+PTXCONF_IMAGE_NXP_IMX93_FRDM=y
 PTXCONF_IMAGE_RAUC=y
 PTXCONF_IMAGE_RAUC_BUNDLE_VERSION="${PTXDIST_BSP_AUTOVERSION}"
 PTXCONF_IMAGE_RAUC_DESCRIPTION="${PTXCONF_PROJECT_VENDOR} ${PTXCONF_PROJECT}"
diff --git a/configs/platform-v8a/platforms/image-nxp-imx93-frdm.in b/configs/platform-v8a/platforms/image-nxp-imx93-frdm.in
new file mode 100644
index 00000000..cf82092b
--- /dev/null
+++ b/configs/platform-v8a/platforms/image-nxp-imx93-frdm.in
@@ -0,0 +1,10 @@
+## SECTION=image
+
+config IMAGE_NXP_IMX93_FRDM
+	tristate
+	select HOST_GENIMAGE
+	select IMAGE_ROOT_EXT
+	select BAREBOX
+	prompt "Generate images/nxp-imx93-frdm.img"
+	help
+	  Generate a bootable SD card image to deploy on a NXP i.MX93 FRDM board.
diff --git a/configs/platform-v8a/rules/image-nxp-imx93-frdm.make b/configs/platform-v8a/rules/image-nxp-imx93-frdm.make
new file mode 100644
index 00000000..02888b2f
--- /dev/null
+++ b/configs/platform-v8a/rules/image-nxp-imx93-frdm.make
@@ -0,0 +1,35 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2025 by Fabian Pflug <f.pflug@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_NXP_IMX93_FRDM) += image-nxp-imx93-frdm
+
+#
+# Paths and names
+#
+IMAGE_NXP_IMX93_FRDM		:= image-nxp-imx93-frdm
+IMAGE_NXP_IMX93_FRDM_DIR	:= $(BUILDDIR)/$(IMAGE_NXP_IMX93_FRDM)
+IMAGE_NXP_IMX93_FRDM_IMAGE	:= $(IMAGEDIR)/nxp-imx93-frdm.img
+IMAGE_NXP_IMX93_FRDM_FILES	:= $(IMAGEDIR)/root.tgz
+IMAGE_NXP_IMX93_FRDM_CONFIG	:= imx93.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+IMAGE_NXP_IMX93_FRDM_ENV := \
+        BAREBOX_IMAGE=barebox-nxp_mx93_frdm.img
+
+$(IMAGE_NXP_IMX93_FRDM_IMAGE):
+	@$(call targetinfo)
+	@$(call image/genimage, IMAGE_NXP_IMX93_FRDM)
+	@$(call finish)
+
+# vim: syntax=make
diff --git a/doc/hardware.rst b/doc/hardware.rst
index bbccb08d..09e789b4 100644
--- a/doc/hardware.rst
+++ b/doc/hardware.rst
@@ -198,6 +198,7 @@ Currently, DistroKit supports the following hardware:
    hardware_v8a_espressobin
    hardware_v8a_rock3a
    hardware_v8a_tqma93xxca
+   hardware_v8a_imx93_frdm
 
 
 rpi1 Platform
diff --git a/doc/hardware_v8a_imx93_frdm.rst b/doc/hardware_v8a_imx93_frdm.rst
new file mode 100644
index 00000000..cc1e6208
--- /dev/null
+++ b/doc/hardware_v8a_imx93_frdm.rst
@@ -0,0 +1,47 @@
+NXP i.MX93 FRDM Development Board
+=================================
+
+
+Boot Media
+----------
+
+Booting is available via multiple sources (Compare Table 3: Boot Switch Configuration in Quick Start Guide)
+
+.. csv-table:: Boot Switch :rst:dir:`csv-table`
+   :header: "Boot Mode", "SW1-3", "SW1-2", "SW1-1"
+
+   "Boot from Internal Fuses",      "0", "0", "0"
+   "Serial Downloader",             "0", "0", "1"
+   "Boot from USDHC1 eMMC 5.1",     "0", "1", "0"
+   "Boot from USDHC2 SD card",      "0", "1", "1"
+   "Boot from FlexSPI Serial NOR",  "1", "0", "0"
+
+
+Booting from USB and NFS
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Upload the bootloader ``platform-v8a/images/barebox-nxp_imx93_frdm.img`` via USB:
+
+.. code-block:: shell
+
+    platform-v8a/sysroot-host/bin/imx-usb-loader platform-v8a/images/barebox-nxp_imx93_frdm.img
+
+In Barebox, set the default boot location to nfs:
+
+    nv boot.default nfs://dude06//ptx/work/user/fpg/DistroKit/platform-v8a/root
+
+replace the path to one, where you have compiled your Distrokit
+
+
+Booting via SD-Card
+~~~~~~~~~~~~~~~~~~~
+
+Write the image ``platform-v8a/images/nxp-imx93-frdm.img`` to a microSD card. Put the
+microSD card into the board and boot it.
+
+
+Serial Console
+--------------
+
+The serial boot console is available via the USB-C Debug connector on the board.
+It brings 2 UARTS, whereas the first is the serial console used by kernel and bootloader.
diff --git a/projectroot/usr/lib/udev/rules.d/90-rauc-partitions.rules b/projectroot/usr/lib/udev/rules.d/90-rauc-partitions.rules
index c5930c77..253a98b3 100644
--- a/projectroot/usr/lib/udev/rules.d/90-rauc-partitions.rules
+++ b/projectroot/usr/lib/udev/rules.d/90-rauc-partitions.rules
@@ -18,6 +18,7 @@ ENV{OF_BASE_COMPATIBLE}=="*riot,imx6s-riotboard*", ENV{ID_PATH}=="platform-21980
 ENV{OF_BASE_COMPATIBLE}=="*radxa,rock3a*", ENV{ID_PATH}=="platform-fe2b0000.mmc", TAG+="boot_disk"
 ENV{OF_BASE_COMPATIBLE}=="*tq,imx8mp-tqma8mpql-mba8mpxl*", ENV{ID_PATH}=="platform-30b50000.mmc", TAG+="boot_disk"
 ENV{OF_BASE_COMPATIBLE}=="*tq,imx93-tqma9352-mba93xxca*", ENV{ID_PATH}=="platform-42860000.mmc", TAG+="boot_disk"
+ENV{OF_BASE_COMPATIBLE}=="*fsl,imx93-11x11-frdm*", ENV{ID_PATH}=="platform-42860000.mmc", TAG+="boot_disk"
 
 # second part: create /dev/disk/by-usage/ symlinks
 ENV{DEVTYPE}!="partition", GOTO="rauc_partitions_end"
-- 
2.47.3




  parent reply	other threads:[~2025-10-21 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 13:27 [DistroKit] [PATCH 0/3] Add support for i.MX93 FRDM board Fabian Pflug
2025-10-21 13:27 ` [DistroKit] [PATCH 1/3] platform-v8a: barebox: add patches for imx93 Fabian Pflug
2025-10-21 13:27 ` [DistroKit] [PATCH 2/3] platform-v8a: dts: add imx93-frdm board Fabian Pflug
2025-10-21 13:27 ` Fabian Pflug [this message]
2025-10-21 13:37 ` [DistroKit] [PATCH 0/3] Add support for i.MX93 FRDM board Robert Schwebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251021133031.3266446-4-f.pflug@pengutronix.de \
    --to=f.pflug@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox