motorola-rtwo: add SM8550 ABL + hypervisor requirements to the .dts

Deeper comparison of our mainline DTB against the live LineageOS DTB and
the mainline Samsung Galaxy Tab S9 (SM8550) port turned up several
things the Motorola SM8550 firmware needs that mainline sm8550.dtsi does
not provide and the ABL does not reconstruct:

1. reserved-memory: chipinfo @ 0x81cf4000 and llcc_lpi @ 0xff800000 are
   no-map in the stock DT but absent from mainline. Both fall inside a
   HLOS DRAM bank, so Linux maps and uses firmware/hardware-owned memory
   -> external abort -> SoC resets with no console (the <2s reboot). The
   Samsung port hit the exact same "NoC error" from missing chipinfo /
   LLCC carveouts.

2. __symbols__: build the DTB with dtc -@ (DTC_FLAGS_sm8550-motorola-rtwo
   in the qcom Makefile). The SM8550 ABL runs libufdt against the base
   DTB; without symbols it drops to the bootloader menu.

3. qcom_tzlog + arch_timer labels: same ABL dtbo-apply path requires
   these two labels to exist (LKML "arm64: dts: qcom: sm8550: Fix DTBO
   boot failure").

4. compatible: keep qcom,kalama-mtp / qcom,kalama / qcom,mtp next to
   qcom,sm8550 - the ABL matches the board on these strings plus
   qcom,board-id before launching the kernel.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QF5HebjUsRaxbW4cBX6HJP
This commit is contained in:
2026-09-09 01:36:30 -03:00
co-authored by Claude Sonnet 5
parent 832651c2ca
commit 14ae05a5c2
2 changed files with 64 additions and 11 deletions
@@ -5,7 +5,7 @@ maintainer="snlavaise <snlavaise@gmail.com>"
_flavor="postmarketos-qcom-sm8550"
pkgname=linux-$_flavor
pkgver=7.2
pkgrel=11
pkgrel=12
pkgdesc="Mainline kernel for Qualcomm SM8550 (Snapdragon 8 Gen 2) + Motorola rtwo"
arch="aarch64"
_carch="arm64"
@@ -60,6 +60,12 @@ prepare() {
sed -i '/sm8550-mtp\.dtb/a dtb-$(CONFIG_ARCH_QCOM) += sm8550-motorola-rtwo.dtb' \
"$_dtsdir/Makefile"
fi
# Build this DTB with -@ so it gets a /__symbols__ node. The Motorola
# SM8550 ABL runs its dtbo-apply path (libufdt) against the base DTB
# and drops to the bootloader menu if the symbols are missing.
if ! grep -q "DTC_FLAGS_sm8550-motorola-rtwo" "$_dtsdir/Makefile"; then
echo 'DTC_FLAGS_sm8550-motorola-rtwo := -@' >> "$_dtsdir/Makefile"
fi
# Base config (from linux-postmarketos-mainline) + rtwo bring-up fragment.
cp "$srcdir/config-motorola-rtwo.aarch64" .config
@@ -106,5 +112,5 @@ sha512sums="
52d5aa7f94f6aa6141debf4ceb4fc7a2e75505a7cd38b8854e501be83c2b57863020f463f2fdb2fc93667e6cfe13274d077e5207a611e4797bd9404ee0e64c58 linux-postmarketos-qcom-sm8550-7.2.tar.gz
f9ae52489f6b9e6fef64952943cd09732a5bef90a0e8765db03c256483028368687d6d5a1d80dd813a513e7e80d91f8b47f49b91cff67266b76f1d6275a7fea0 config-motorola-rtwo.aarch64
53441c23146d76bb0eaa358a25f6cce4f21740cfb65b755df52bbb218daf2cda30b3d80fa6ca4e283ea1afe2b0fa708307b678b421898100710b8fb99b08d6c5 rtwo.config
91f6a22d1c3ae0a2919cdc8d31adb3bb0ef8db0ba9e3b1608eeefc9460ccf19704d54e09338556aa735c3a875a73107785ab33a795d48ad86febc1abd3ad5aba sm8550-motorola-rtwo.dts
f05e6c76e546c1287bbfc228e3953c5ef3646a99cf42f21c113debc8846d7442419df685f8f94feb329e60341a0e1bb47f29bdebd49b0f1c0fd097a6a3faa4d5 sm8550-motorola-rtwo.dts
"
@@ -11,10 +11,19 @@
* - only the debug UART and USB (high-speed peripheral) are enabled,
* enough to reach the initramfs and bring up USB networking
*
* Unlike Sony, this DT does carry qcom,msm-id / qcom,board-id (the
* Motorola ABL selects a DTB from a multi-FDT vendor_boot) and a
* ramoops reserved-memory region (console survives a failed boot),
* both taken from the DT the stock firmware runs.
* Unlike Sony, this DT carries several things the Motorola SM8550 ABL
* and hypervisor need, all taken from the DT the stock firmware runs:
* - qcom,msm-id / qcom,board-id + the qcom,kalama* compatibles, so the
* ABL accepts this blob out of its multi-FDT vendor_boot
* - qcom_tzlog / arch_timer labels + dtc -@ (__symbols__), without
* which the SM8550 ABL bails to the bootloader menu when it tries to
* apply a dtbo (see the LKML "sm8550: Fix DTBO boot failure" thread)
* - the chipinfo and llcc_lpi no-map carveouts, which mainline
* sm8550.dtsi lacks and the ABL does NOT reconstruct - if Linux uses
* that memory the hypervisor faults the access and the SoC resets
* with no console output (the <2s reboot we were chasing; the
* mainline Samsung Galaxy Tab S9 port hit the same "NoC error")
* - a ramoops region so a failed boot's console survives
*/
/dts-v1/;
@@ -31,13 +40,20 @@
/ {
model = "Motorola Moto Edge 40 Pro";
compatible = "motorola,rtwo", "qcom,sm8550";
/*
* "qcom,kalama*" (the downstream SoC name) is kept alongside
* "qcom,sm8550": the Motorola ABL matches the board against these
* strings *and* qcom,board-id before it will launch the kernel
* (the mainline Samsung SM8550 port needed the same).
*/
compatible = "motorola,rtwo", "qcom,kalama-mtp", "qcom,kalama",
"qcom,mtp", "qcom,sm8550";
chassis-type = "handset";
/*
* The Motorola ABL does DTB selection (its stock vendor_boot carries
* several concatenated FDTs). Carry the SoC/board match table from the
* DT the stock firmware runs so the bootloader accepts this blob:
* SoC/board match table, verbatim from the DT the stock firmware
* runs, so the ABL accepts this blob out of its multi-FDT
* vendor_boot:
* qcom,msm-id = <0x218 0x20000 0x207 0x20000 0x207 0x10000 0x218 0x10000>
* qcom,board-id = <0x241 0xb1b0>
*/
@@ -49,7 +65,11 @@
serial0 = &uart7;
};
chosen {
/*
* The 'qcom_tzlog' label must exist (on any node) or the SM8550 ABL
* refuses to apply a dtbo and drops to the bootloader menu.
*/
qcom_tzlog: chosen {
stdout-path = "serial0:115200n8";
};
@@ -68,6 +88,23 @@
console-size = <0x40000>;
record-size = <0x20000>;
};
/*
* no-map carveouts that mainline sm8550.dtsi does not have and
* the Motorola ABL does not inject. Both sit inside a HLOS DRAM
* bank, so without them Linux maps and uses memory the SoC has
* handed to firmware/hardware -> external abort -> silent reset.
* Addresses/sizes are verbatim from the stock DT.
*/
chipinfo@81cf4000 {
no-map;
reg = <0x0 0x81cf4000 0x0 0x1000>;
};
llcc-lpi@ff800000 {
no-map;
reg = <0x0 0xff800000 0x0 0x600000>;
};
};
vph_pwr: vph-pwr-regulator {
@@ -81,6 +118,16 @@
};
};
/*
* The SM8550 ABL also needs an 'arch_timer' label on the timer node
* before it will apply a dtbo. Re-opening /timer by name just attaches
* the label to the node sm8550.dtsi already defines.
*/
/ {
arch_timer: timer {
};
};
&apps_rsc {
regulators-0 {
compatible = "qcom,pm8550-rpmh-regulators";