From 66e37b33caf79fe667877e16e49159b00851f249 Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Fri, 8 Jan 2021 13:08:32 -0800 Subject: [PATCH 1/2] ARM: dts: msm: Add stub device for qcom dma layer Add initial support for qcom dma layer. Change-Id: I576af50b53255a40474b6126412a8c4451497d43 --- qcom/lahaina.dtsi | 2 +- qcom/msm-arm-smmu-lahaina.dtsi | 5 +++++ qcom/msm-arm-smmu-waipio.dtsi | 5 +++++ qcom/waipio.dtsi | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index f822b3a0..a96b8312 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -538,7 +538,7 @@ }; /* global autoconfigured region for contiguous allocations */ - linux,cma { + system_cma: linux,cma { compatible = "shared-dma-pool"; alloc-ranges = <0x0 0x00000000 0x0 0xdfffffff>; reusable; diff --git a/qcom/msm-arm-smmu-lahaina.dtsi b/qcom/msm-arm-smmu-lahaina.dtsi index de6054d5..a187cb37 100644 --- a/qcom/msm-arm-smmu-lahaina.dtsi +++ b/qcom/msm-arm-smmu-lahaina.dtsi @@ -344,6 +344,11 @@ }; }; + dma_dev@0x0 { + compatible = "qcom,iommu-dma"; + memory-region = <&system_cma>; + }; + kgsl_iommu_test_device { compatible = "iommu-debug-test"; iommus = <&kgsl_smmu 0x7 0>; diff --git a/qcom/msm-arm-smmu-waipio.dtsi b/qcom/msm-arm-smmu-waipio.dtsi index dae0e846..3dcbf748 100644 --- a/qcom/msm-arm-smmu-waipio.dtsi +++ b/qcom/msm-arm-smmu-waipio.dtsi @@ -260,4 +260,9 @@ qcom,stream-id-range = <0x2c00 0x400>; }; }; + + dma_dev@0x0 { + compatible = "qcom,iommu-dma"; + memory-region = <&system_cma>; + }; }; diff --git a/qcom/waipio.dtsi b/qcom/waipio.dtsi index 0e239211..0d5c7750 100644 --- a/qcom/waipio.dtsi +++ b/qcom/waipio.dtsi @@ -597,7 +597,7 @@ }; /* global autoconfigured region for contiguous allocations */ - linux,cma { + system_cma: linux,cma { compatible = "shared-dma-pool"; alloc-ranges = <0x0 0x00000000 0x0 0xdfffffff>; reusable; From 47f21e25aa15f004e565895cd18f5468b7a8b72a Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Fri, 8 Jan 2021 13:08:41 -0800 Subject: [PATCH 2/2] ARM: dts: msm: Enable page table coherency for smmu on waipio The io-coherency feature is supported on waipio. Change-Id: I08ff4306e7acdb9896f97e3f8db03c0401751963 --- qcom/msm-arm-smmu-waipio.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/qcom/msm-arm-smmu-waipio.dtsi b/qcom/msm-arm-smmu-waipio.dtsi index 3dcbf748..ba6d9d99 100644 --- a/qcom/msm-arm-smmu-waipio.dtsi +++ b/qcom/msm-arm-smmu-waipio.dtsi @@ -15,6 +15,7 @@ #size-cells = <1>; #address-cells = <1>; ranges; + dma-coherent; interrupts = , , ,