Skip to content

Commit 1fcc13d

Browse files
schmiedelmigorpecovnik
authored andcommitted
boards: add mba93xxla-mini
Signed-off-by: Martin Schmiedel <Martin.Schmiedel@tq-group.com>
1 parent 8bf357c commit 1fcc13d

9 files changed

Lines changed: 1060 additions & 0 deletions

config/boards/mba93xxla-mini.conf

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# MBa93xxLA-MINI with TQMa93xxLA
2+
BOARD_NAME="MBa93xxLA-MINI"
3+
BOARD_VENDOR="tqgroup"
4+
BOARDFAMILY="imx93"
5+
BOARD_MAINTAINER="schmiedelm"
6+
INTRODUCED="2025"
7+
HAS_VIDEO_OUTPUT="yes"
8+
ATF_PLAT="imx93"
9+
ATF_UART_BASE="0x44380000"
10+
ELE_BINARY="mx93a1-ahab-container.img"
11+
BOOTCONFIG="tqma93xx_mba93xxla_mini_defconfig"
12+
KERNEL_TARGET="current"
13+
DEFAULT_CONSOLE="serial"
14+
SERIALCON="ttyLP0"
15+
BOOT_FDT_FILE="freescale/imx93-tqma9352-mba93xxla-mini.dtb"
16+
OVERLAY_PREFIX="imx93-tqma9352-mba93xxla-mini"
17+
DEFAULT_OVERLAYS="lvds-tm070jvhg33"
18+
# imx93 has no 3D GPU (only PXP 2D). GNOME/KDE are unusably slow (llvmpipe).
19+
# Only XFCE with labwc (wlroots pixman renderer) gives a responsive desktop.
20+
[[ "${BUILD_DESKTOP}" == "yes" ]] && PACKAGE_LIST_BOARD="labwc xwayland"
21+
22+
function post_family_tweaks_bsp__mba93xxla-mini() {
23+
# --- XFCE Wayland session (labwc) ---
24+
# xfce4-session 4.20 already ships /usr/share/wayland-sessions/xfce-wayland.desktop;
25+
# we only need to tell lightdm to look in that directory and set it as default.
26+
run_host_command_logged mkdir -pv --mode=755 \
27+
"${destination}/etc/lightdm/lightdm.conf.d"
28+
cat > "${destination}/etc/lightdm/lightdm.conf.d/50-wayland-sessions.conf" << 'EOF'
29+
[LightDM]
30+
sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions
31+
EOF
32+
33+
cat > "${destination}/etc/lightdm/lightdm.conf.d/60-default-session.conf" << 'EOF'
34+
[Seat:*]
35+
user-session=xfce-wayland
36+
EOF
37+
38+
run_host_command_logged mkdir -pv --mode=755 \
39+
"${destination}/etc/environment.d"
40+
cat > "${destination}/etc/environment.d/50-wayland.conf" << 'EOF'
41+
XDG_SESSION_TYPE=wayland
42+
GDK_BACKEND=wayland,x11
43+
QT_QPA_PLATFORM=wayland;xcb
44+
MOZ_ENABLE_WAYLAND=1
45+
EOF
46+
47+
# --- pixman renderer ---
48+
# imx93 has no 3D GPU. Force wlroots pixman (CPU) renderer for labwc
49+
# instead of the default GLES2 renderer which requires hardware OpenGL.
50+
run_host_command_logged mkdir -pv --mode=755 \
51+
"${destination}/etc/systemd/system/lightdm.service.d"
52+
cat > "${destination}/etc/systemd/system/lightdm.service.d/imx93-renderer.conf" << 'EOF'
53+
[Service]
54+
Environment="WLR_RENDERER=pixman"
55+
EOF
56+
57+
cat >> "${destination}/etc/environment.d/50-wayland.conf" << 'EOF'
58+
WLR_RENDERER=pixman
59+
EOF
60+
}

config/kernel/linux-tqma-current.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,7 @@ CONFIG_MEMORY=y
933933
CONFIG_FSL_IFC=y
934934
CONFIG_IIO=y
935935
CONFIG_IMX8QXP_ADC=m
936+
CONFIG_IMX93_ADC=y
936937
CONFIG_MAX9611=m
937938
CONFIG_MCP320X=m
938939
CONFIG_QCOM_SPMI_VADC=m
@@ -950,6 +951,7 @@ CONFIG_MPL3115=m
950951
CONFIG_PWM=y
951952
CONFIG_PWM_CROS_EC=m
952953
CONFIG_PWM_IMX27=m
954+
CONFIG_PWM_IMX_TPM=y
953955
CONFIG_PWM_SL28CPLD=m
954956
CONFIG_SL28CPLD_INTC=y
955957
CONFIG_RESET_IMX7=y
@@ -968,6 +970,7 @@ CONFIG_ARM_SPE_PMU=m
968970
CONFIG_ARM_DMC620_PMU=m
969971
CONFIG_HISI_PMU=y
970972
CONFIG_NVMEM_IMX_OCOTP=y
973+
CONFIG_NVMEM_IMX_OCOTP_ELE=y
971974
CONFIG_NVMEM_IMX_OCOTP_SCU=y
972975
CONFIG_NVMEM_LAYERSCAPE_SFP=m
973976
CONFIG_NVMEM_RMEM=m

config/sources/families/imx93.conf

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#
2+
# SPDX-License-Identifier: GPL-2.0
3+
#
4+
# Copyright (c) Martin Schmiedel
5+
#
6+
# This file is a part of the Armbian Build Framework
7+
# https://github.com/armbian/build/
8+
#
9+
10+
ARCH="arm64"
11+
KERNEL_IMAGE_TYPE="Image"
12+
OVERLAY_DIR="/boot/dtb/freescale/overlay"
13+
SRC_EXTLINUX="yes"
14+
IMX_FIRMWARE="${IMX_FIRMWARE:-"firmware-imx-8.26-d4c33ab"}"
15+
ELE_FIRMWARE="${ELE_FIRMWARE:-"firmware-ele-imx-2.0.2.1-d30b14a"}"
16+
UBOOT_TARGET_MAP="flash.bin;;flash.bin"
17+
OFFSET=32
18+
ATF_SKIP_LDFLAGS_WL="yes"
19+
20+
# ATF for i.MX93 uses IMX_LPUART_BASE (not IMX_BOOT_UART_BASE as on i.MX8M).
21+
# Output path uses the ATF_PLAT name (imx93).
22+
ATF_TARGET_MAP="PLAT=${ATF_PLAT} IMX_LPUART_BASE=${ATF_UART_BASE} bl31;;build/${ATF_PLAT}/release/bl31.bin"
23+
24+
case $BOARD in
25+
mba93*)
26+
ATFSOURCE='https://github.com/tq-systems/atf'
27+
ATFBRANCH="branch:TQM-lf_v2.10"
28+
BOOTSOURCE='https://github.com/tq-systems/u-boot-tqmaxx.git'
29+
BOOTBRANCH='commit:ca97a60386585c0708dc46950dc32d2496219738'
30+
BOOTPATCHDIR="u-boot-tqma"
31+
LINUXCONFIG='linux-tqma-'$BRANCH
32+
case $BRANCH in
33+
current)
34+
KERNEL_MAJOR_MINOR="6.18"
35+
;;
36+
esac
37+
;;
38+
esac
39+
40+
pre_config_uboot_target__imx93_firmware() {
41+
# DDR firmware — same package as i.MX8M, contains lpddr4_* files needed by binman
42+
rm -rf "${IMX_FIRMWARE}"*
43+
curl -fL "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${IMX_FIRMWARE}.bin" -o "${IMX_FIRMWARE}.bin" || {
44+
exit_with_error "Download of DDR firmware failed"
45+
}
46+
chmod +x "${IMX_FIRMWARE}.bin"
47+
"./${IMX_FIRMWARE}.bin" --auto-accept
48+
cp "${IMX_FIRMWARE}/firmware/ddr/synopsys/lpddr4"*.bin .
49+
50+
# ELE (Edge Lock Enclave) firmware — provides AHAB container for i.MX93 secure boot
51+
rm -rf "${ELE_FIRMWARE}"*
52+
curl -fL "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${ELE_FIRMWARE}.bin" -o "${ELE_FIRMWARE}.bin" || {
53+
exit_with_error "Download of ELE firmware failed"
54+
}
55+
chmod +x "${ELE_FIRMWARE}.bin"
56+
"./${ELE_FIRMWARE}.bin" --auto-accept
57+
cp "${ELE_FIRMWARE}/${ELE_BINARY}" .
58+
}
59+
60+
write_uboot_platform() {
61+
dd if=$1/flash.bin of=$2 bs=1K seek=${OFFSET} status=noxfer conv=fsync > /dev/null 2>&1
62+
}
63+
64+
# bsp related
65+
family_tweaks_bsp() {
66+
:
67+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
config:
2+
3+
name: tqma
4+
kind: kernel
5+
type: vendor
6+
7+
# New .dts/.dtsi files are copied from dt/ into arch/arm64/boot/dts/freescale/.
8+
# auto-patch-dt-makefile adds dtb-$(CONFIG_ARCH_MXC) += *.dtb entries automatically.
9+
dts-directories:
10+
- { source: "dt", target: "arch/arm64/boot/dts/freescale" }
11+
12+
# .dtso overlay files are copied from overlay/ into arch/arm64/boot/dts/freescale/overlay/.
13+
# The overlay/Makefile is also copied, so add_overlay_lines adds
14+
# "subdir-y := overlay" to the parent Makefile automatically.
15+
overlay-directories:
16+
- { source: "overlay", target: "arch/arm64/boot/dts/freescale/overlay" }
17+
18+
auto-patch-dt-makefile:
19+
- { directory: "arch/arm64/boot/dts/freescale", config-var: "CONFIG_ARCH_MXC" }
20+
21+
patches-to-git:
22+
do-not-commit-regexes:
23+
- "^arch/([a-zA-Z0-9]+)/boot/dts/([a-zA-Z0-9]+)/Makefile$"
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
From a6650326412bf3fafc90d2b074c6377ea1590a7c Mon Sep 17 00:00:00 2001
2+
From: Martin Schmiedel <Martin.Schmiedel@tq-group.com>
3+
Date: Mon, 18 May 2026 17:13:46 +0200
4+
Subject: arm64: dts: freescale: add MBa93xxLA-MINI (modifications only)
5+
6+
Modifications to existing kernel files for TQMa9352 / MBa93xxLA support.
7+
New DTS/DTSO files are provided via dts-directories in 0000.patching_config.yaml.
8+
9+
Signed-off-by: Martin Schmiedel <Martin.Schmiedel@tq-group.com>
10+
---
11+
.../boot/dts/freescale/imx91_93_common.dtsi | 12 ++++
12+
arch/arm64/boot/dts/freescale/imx93.dtsi | 62 +++++++++++++++++++
13+
drivers/pmdomain/imx/imx93-blk-ctrl.c | 9 +++
14+
3 files changed, 83 insertions(+)
15+
16+
diff --git a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi b/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
17+
index 52da571f26c4..32c32a90b042 100644
18+
--- a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
19+
+++ b/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
20+
@@ -1126,6 +1126,18 @@ media_blk_ctrl: system-controller@4ac10000 {
21+
status = "disabled";
22+
};
23+
24+
+ lcdif: display-controller@4ae30000 {
25+
+ compatible = "fsl,imx93-lcdif";
26+
+ reg = <0x4ae30000 0x23c>;
27+
+ interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
28+
+ clocks = <&clk IMX93_CLK_MEDIA_DISP_PIX>,
29+
+ <&clk IMX93_CLK_LCDIF_GATE>,
30+
+ <&clk IMX93_CLK_MEDIA_AXI>;
31+
+ clock-names = "pix", "axi", "disp_axi";
32+
+ power-domains = <&media_blk_ctrl IMX93_MEDIABLK_PD_LCDIF>;
33+
+ status = "disabled";
34+
+ };
35+
+
36+
usbotg1: usb@4c100000 {
37+
compatible = "fsl,imx93-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
38+
reg = <0x4c100000 0x200>;
39+
diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
40+
index 7b27012dfcb5..89a9ae71230c 100644
41+
--- a/arch/arm64/boot/dts/freescale/imx93.dtsi
42+
+++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
43+
@@ -150,6 +150,68 @@ l3_cache: l3-cache {
44+
};
45+
};
46+
47+
+&lcdif {
48+
+ assigned-clocks = <&clk IMX93_CLK_VIDEO_PLL>,
49+
+ <&clk IMX93_CLK_MEDIA_DISP_PIX>;
50+
+ assigned-clock-parents = <&clk IMX93_CLK_24M>,
51+
+ <&clk IMX93_CLK_VIDEO_PLL>;
52+
+
53+
+ port {
54+
+ #address-cells = <1>;
55+
+ #size-cells = <0>;
56+
+
57+
+ lcdif_to_ldb: endpoint@1 {
58+
+ reg = <1>;
59+
+ remote-endpoint = <&ldb_from_lcdif>;
60+
+ };
61+
+
62+
+ lcdif_to_dsi: endpoint@2 {
63+
+ reg = <2>;
64+
+ };
65+
+ };
66+
+};
67+
+
68+
+&media_blk_ctrl {
69+
+ assigned-clocks = <&clk IMX93_CLK_MEDIA_AXI>,
70+
+ <&clk IMX93_CLK_MEDIA_APB>;
71+
+ assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD0>,
72+
+ <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
73+
+ assigned-clock-rates = <333333333>, <133333333>;
74+
+ #address-cells = <1>;
75+
+ #size-cells = <1>;
76+
+
77+
+ lvds_bridge: bridge@20 {
78+
+ compatible = "fsl,imx93-ldb";
79+
+ reg = <0x20 0x4>, <0x24 0x4>;
80+
+ reg-names = "ldb", "lvds";
81+
+ clocks = <&clk IMX93_CLK_LVDS_GATE>;
82+
+ clock-names = "ldb";
83+
+ assigned-clocks = <&clk IMX93_CLK_MEDIA_LDB>;
84+
+ assigned-clock-parents = <&clk IMX93_CLK_VIDEO_PLL>;
85+
+ status = "disabled";
86+
+
87+
+ ports {
88+
+ #address-cells = <1>;
89+
+ #size-cells = <0>;
90+
+
91+
+ port@0 {
92+
+ reg = <0>;
93+
+
94+
+ ldb_from_lcdif: endpoint {
95+
+ remote-endpoint = <&lcdif_to_ldb>;
96+
+ };
97+
+ };
98+
+
99+
+ port@1 {
100+
+ reg = <1>;
101+
+
102+
+ ldb_lvds: endpoint {
103+
+ };
104+
+ };
105+
+ };
106+
+ };
107+
+};
108+
+
109+
&src {
110+
mlmix: power-domain@44461800 {
111+
compatible = "fsl,imx93-src-slice";
112+
diff --git a/drivers/pmdomain/imx/imx93-blk-ctrl.c b/drivers/pmdomain/imx/imx93-blk-ctrl.c
113+
index e094fe5a42bf..ad9467419cd9 100644
114+
--- a/drivers/pmdomain/imx/imx93-blk-ctrl.c
115+
+++ b/drivers/pmdomain/imx/imx93-blk-ctrl.c
116+
@@ -7,6 +7,7 @@
117+
#include <linux/device.h>
118+
#include <linux/module.h>
119+
#include <linux/of.h>
120+
+#include <linux/of_platform.h>
121+
#include <linux/platform_device.h>
122+
#include <linux/pm_domain.h>
123+
#include <linux/pm_runtime.h>
124+
@@ -300,8 +301,16 @@ static int imx93_blk_ctrl_probe(struct platform_device *pdev)
125+
126+
dev_set_drvdata(dev, bc);
127+
128+
+ ret = devm_of_platform_populate(dev);
129+
+ if (ret) {
130+
+ dev_err_probe(dev, ret, "failed to populate blk-ctrl sub-devices\n");
131+
+ goto cleanup_provider;
132+
+ }
133+
+
134+
return 0;
135+
136+
+cleanup_provider:
137+
+ of_genpd_del_provider(dev->of_node);
138+
cleanup_pds:
139+
for (i--; i >= 0; i--)
140+
pm_genpd_remove(&bc->domains[i].genpd);
141+
--
142+
2.43.0
143+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 3177dbdc87d9d2223d94fcc00ec45711ec9d89cc Mon Sep 17 00:00:00 2001
2+
From: Martin Schmiedel <Martin.Schmiedel@tq-group.com>
3+
Date: Thu, 21 May 2026 12:00:00 +0200
4+
Subject: arm64: dts: freescale: enable symbols in TQMa9352 MBa93xxLA-MINI DTB
5+
6+
Compile imx93-tqma9352-mba93xxla-mini.dtb with DTC -@ flag to generate
7+
__symbols__ node, which is required for DT overlay application by U-Boot.
8+
9+
Signed-off-by: Martin Schmiedel <Martin.Schmiedel@tq-group.com>
10+
---
11+
arch/arm64/boot/dts/freescale/Makefile | 3 +++
12+
1 file changed, 3 insertions(+)
13+
14+
diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
15+
index 525ef180481d..b53bb813a3a4 100644
16+
--- a/arch/arm64/boot/dts/freescale/Makefile
17+
+++ b/arch/arm64/boot/dts/freescale/Makefile
18+
@@ -45,6 +45,9 @@ DTC_FLAGS_fsl-ls2088a-rdb := -Wno-interrupt_map
19+
dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2088a-rdb.dtb
20+
DTC_FLAGS_fsl-lx2160a-bluebox3 := -Wno-interrupt_map
21+
dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-bluebox3.dtb
22+
+
23+
+# TQ TQMa9352 / MBa93xxLA-MINI: enable symbols node for DT overlay support
24+
+DTC_FLAGS_imx93-tqma9352-mba93xxla-mini += -@
25+
DTC_FLAGS_fsl-lx2160a-bluebox3-rev-a := -Wno-interrupt_map
26+
dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-bluebox3-rev-a.dtb
27+
DTC_FLAGS_fsl-lx2160a-clearfog-cx := -Wno-interrupt_map
28+
--
29+
2.43.0
30+

0 commit comments

Comments
 (0)