How to disable IOMMU on TX2 with L4T 32.4.4

Hi,

how can I disable IOMMU for PCIe devices on TX2 and TX2 4GB Jetson modules with L4T version 32.4.4? I’ve found instructions for older L4T versions, but they seem to be outdated due to changes in devicetree.

I need to disable IOMMU to debug and possibly workaround an issue with DMA memory locking in the kernel, about which I will share details later (after I better understand it).

Have you tried the following method to disable IOMMU?

diff --git a/kernel-dts/tegra186-soc/tegra186-soc-base.dtsi b/kernel-dts/tegra186-soc/tegra186-soc-base.dtsi
index 9f0d21b1ca04..f342dc2a6ab1 100644
--- a/kernel-dts/tegra186-soc/tegra186-soc-base.dtsi
+++ b/kernel-dts/tegra186-soc/tegra186-soc-base.dtsi
@@ -1846,8 +1846,8 @@
                interrupt-map-mask = <0 0 0 0>;
                interrupt-map = <0 0 0 0 &intc 0 72 0x04>;// check this
 
-               iommus = <&smmu TEGRA_SID_AFI>;
-               iommu_sodev_map;
+//             iommus = <&smmu TEGRA_SID_AFI>;
+//             iommu_sodev_map;
 #if LINUX_VERSION >= 414
                iommu-map = <0x0 &smmu TEGRA_SID_AFI 0x1000>;
                iommu-map-mask = <0x0>;

Yes, thank you, this works.