[PATCH 12/12] ARM: dts: qcom: msm8974: add the IOMMUs
From: Dmitry Baryshkov
Date: Sun Aug 09 2026 - 16:20:52 EST
Since the switch to DRM_GPUVM the drm/msm driver can't work without the
IOMMU, breaking display and GPU support on MSM8974 (and MSM8226).
Describe the IOMMU instances and point the GPU and the MDP at theirs.
The nodes follow the MSM8916 convention: ranges points at the context
bank array (base + 0x8000) so that context node offsets equal the
context bank indices.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 85 +++++++++++++++++++++++++++++++-
1 file changed, 84 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
index 06c0af0aa317..ac3058995d49 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
@@ -1958,6 +1958,8 @@ mdp: display-controller@fd900000 {
interconnects = <&mmssnoc MNOC_MAS_MDP_PORT0 &bimc BIMC_SLV_EBI_CH0>;
interconnect-names = "mdp0-mem";
+ iommus = <&mdp_iommu 0>;
+
ports {
#address-cells = <1>;
#size-cells = <0>;
@@ -2125,6 +2127,28 @@ mdss_dsi1_phy: phy@fd923000 {
};
};
+ mdp_iommu: iommu@fd928000 {
+ compatible = "qcom,msm8974-mdp-iommu";
+ reg = <0xfd928000 0x2600>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #iommu-cells = <1>;
+ ranges = <0 0xfd930000 0x1000>;
+
+ clocks = <&mmcc MDSS_AHB_CLK>,
+ <&mmcc MDSS_AXI_CLK>;
+ clock-names = "iface", "bus";
+ power-domains = <&mmcc MDSS_GDSC>;
+ qcom,iommu-secure-id = <1>;
+
+ /* MDP_0 */
+ iommu-ctx@0 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x0 0x1000>;
+ interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
cci: cci@fda0c000 {
compatible = "qcom,msm8974-cci";
#address-cells = <1>;
@@ -2180,7 +2204,7 @@ gpu: gpu@fdb00000 {
<&ocmemnoc OCMEM_VNOC_MAS_GFX3D &ocmemnoc OCMEM_SLV_OCMEM>;
interconnect-names = "gfx-mem", "ocmem";
- // iommus = <&gpu_iommu 0>;
+ iommus = <&gpu_iommu 0>;
status = "disabled";
@@ -2201,6 +2225,65 @@ opp-27000000 {
};
};
+ gpu_iommu: iommu@fdb10000 {
+ compatible = "qcom,msm8974-gpu-iommu";
+ reg = <0xfdb10000 0x2600>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #iommu-cells = <1>;
+ ranges = <0 0xfdb18000 0x2000>;
+
+ clocks = <&mmcc OXILICX_AHB_CLK>,
+ <&mmcc OXILICX_AXI_CLK>,
+ <&mmcc OXILI_GFX3D_CLK>;
+ clock-names = "iface", "bus", "tbu";
+ power-domains = <&mmcc OXILICX_GDSC>;
+
+ /* GFX3D_USER */
+ iommu-ctx@0 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x0 0x1000>;
+ interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ /* GFX3D_PRIV */
+ iommu-ctx@1000 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x1000 0x1000>;
+ interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
+ venus_iommu: iommu@fdc84000 {
+ compatible = "qcom,msm8974-venus-iommu";
+ reg = <0xfdc84000 0x2600>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ #iommu-cells = <1>;
+ ranges = <0 0xfdc8c000 0x3000>;
+
+ clocks = <&mmcc VENUS0_AHB_CLK>,
+ <&mmcc VENUS0_AXI_CLK>,
+ <&mmcc VENUS0_VCODEC0_CLK>;
+ clock-names = "iface", "bus", "tbu";
+ power-domains = <&mmcc VENUS0_GDSC>;
+ qcom,iommu-secure-id = <0>;
+
+ /* VENUS_NS */
+ iommu-ctx@0 {
+ compatible = "qcom,msm-iommu-v1-ns";
+ reg = <0x0 0x1000>;
+ interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ /* VENUS_FW */
+ iommu-ctx@2000 {
+ compatible = "qcom,msm-iommu-v1-sec";
+ reg = <0x2000 0x1000>;
+ interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
+
sram@fdd00000 {
compatible = "qcom,msm8974-ocmem";
reg = <0xfdd00000 0x2000>,
--
2.47.3