From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 21 Oct 2025 15:30:38 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vBCRi-00AGQG-29 for lore@lore.pengutronix.de; Tue, 21 Oct 2025 15:30:38 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vBCRi-0006ST-2u; Tue, 21 Oct 2025 15:30:38 +0200 Received: from dude06.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::5c]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vBCRg-0006P4-SN; Tue, 21 Oct 2025 15:30:36 +0200 From: Fabian Pflug To: distrokit@pengutronix.de Date: Tue, 21 Oct 2025 15:27:31 +0200 Message-ID: <20251021133031.3266446-4-f.pflug@pengutronix.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251021133031.3266446-1-f.pflug@pengutronix.de> References: <20251021133031.3266446-1-f.pflug@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 3/3] platform-v8a: add nxp-imx93-frdm board X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabian Pflug Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false 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 --- .../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 +# +# 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