compatible strings.
DTS and DTSI file structure
Device tree source files are located underarch/arm64/boot/dts/qcom/ in the
kernel source tree.
Table: Device tree file types
| File type | Purpose |
|---|---|
.dtsi | SoC-level or shared hardware description. Included by board DTS files. |
.dts | Board-level file. Includes one or more DTSI files and adds board-specific nodes such as pinmux settings, regulators, and on-board peripherals. |
.dtb | Compiled binary output from a DTS file. Loaded by the bootloader at runtime. |
.dtbo | Device tree overlay binary. Applied on top of a base DTB to enable optional hardware configurations such as mezzanine boards. |
Board vs SoC layering
Qualcomm Linux follows a strict two-tier layering convention:-
SoC DTSI (for example,
qcs6490.dtsi), defines clocks, power domains, interrupt controllers, and core peripherals that are common to all boards using that SoC. -
Board DTS (for example,
qcs6490-rb3gen2.dts), includes the SoC DTSI and adds board-specific nodes: GPIO assignments, regulator values, on-board sensors, and display panels.
FIT-based DTB packaging
Qualcomm Linux supports multiple SoCs and boards within a single software release. DTBs are packaged into one Flattened Image Tree (FIT) image (qclinux_fit.img) stored in the dtb_a partition. UEFI firmware selects
the correct DTB at boot by matching hardware-detected identifiers against the
compatible string of each FIT configuration entry.
The FIT image is described by an Image Tree Source (.its) file and built
with mkimage. It has two top-level sections:
images, declares every binary blob: DTBs, DTBOs, and the metadata binary.configurations, declares every platform configuration, each referencing one or more images.
Qualcomm DTB metadata
The qcom-dtb-metadata project provides:qcom-metadata.dtscompiles into a metadata DTB used by firmware to map hardware identifiers to FIT configurationcompatiblestrings.qcom-next-fitimage.itsis the ITS template for standalone builds.
compatible string suffix tokens into nodes:
soc, soc-sku, socver, board, boardrev, board-subtype-*, softsku,
and oem.
Boot-time DTB selection flow
- UEFI loads
qclinux_fit.imgfrom thedtb_apartition. - The embedded
qcom-metadata.dtbis parsed to build a table mapping hardware numeric IDs to symbolic token names used incompatiblestrings. - Hardware identifiers are read: SoC chip ID/version, board type and revision from the Configuration Data Table (CDT), storage type, and DDR size.
- FIT configurations are iterated in order (
conf-1,conf-2, …). - For each configuration, every token in its
compatiblestring is matched exactly against hardware-derived values. The first configuration where all tokens match is selected. - The selected configuration’s DTB(s) are loaded and passed to the OS via EFI boot.
- If no configuration matches, boot fails. See Common DT issues & fixes for diagnosis steps.
Compatible string format
Each FIT configuration’scompatible string encodes platform identity as
dash-separated tokens:
configurations block.
Examples:
Wire DTBs into the FIT image (Yocto)
The Yocto build generates the FIT image from two inputs:KERNEL_DEVICETREEandLINUX_QCOM_KERNEL_DEVICETREErepresent the list of DTBs and DTBOs to package into theimagessection.FIT_DTB_COMPATIBLEentries inconf/machine/include/fit-dtb-compatible.incenumerates theconfigurationssection entries that map a DTB (or DTB+DTBO combination) to the hardwarecompatiblestrings UEFI will match at boot.
FIT_DTB_COMPATIBLE entries
Each entry maps a DTB key (orDTB+DTBO key, using + as a separator) to one
or more compatible strings:
Single DTB with no overlay:
configurations block in the FIT image where each
conf-N entry carries the corresponding compatible string and fdt list.
UEFI iterates these in order and selects the first matching configuration.
More specific
compatible strings must appear before generic ones in the
configurations block. FIT evaluates configurations in order; the first
match wins. See Device tree architecture
for the compatible string token reference.EL2 device trees for KVM
Device tree files marked withel2 in the filename support Linux running at
Exception Level 2 (EL2) for KVM. The build system applies el2 overlays to
the platform DTB to generate EL2 DTB variants. Targets by default boot into KVM
mode, except few targets that may not be KVM ready yet. Please refer release
notes to know about platform capability. See Enable virtualization
for more details.
Staging device tree overlays
Device tree files marked withstaging in the filename enable in-kernel-tree
drivers that are present in the kernel source but not yet submitted upstream.
Examples include SoC-level TGU nodes (kodiak-staging.dtso,
lemans-staging.dtso, monaco-staging.dtso, talos-staging.dtso) and
board-level staging Ethernet PHY overlays for development kits. The build
system applies these overlays when the VendorDtbOverlays EFI variable is set
to staging:
Use staging DTBs when staging downstream features are required.
CAMX camera device tree overlays
Device tree files marked withcamx in the filename replace the upstream
camera subsystem (camss) with the Qualcomm® CAMX proprietary camera
framework. Board-level CAMX overlays (for example,
qcs6490-rb3gen2-vision-mezzanine-camx.dtso, lemans-evk-camx.dtso,
monaco-evk-camx.dtso) disable the upstream camss node and enable the CAMX
nodes. A combined *-camx-el2.dtso overlay is applied when both CAMX and KVM
are required simultaneously. The build system applies CAMX overlays when the
VendorDtbOverlays EFI variable is set to camx:
Use CAMX DTBs only when building with the Qualcomm proprietary camera stack.
The upstream
camss driver is disabled in CAMX configurations.
