From 75c7a89fb6c6930eceb276ebe5a60290dd4940f6 Mon Sep 17 00:00:00 2001 From: Vijayanand Jitta Date: Mon, 6 Sep 2021 13:37:37 +0530 Subject: [PATCH] ARM: dts: msm: Add initial smmu configuration for Neo Describe the interrupts, register map used by the iommu device on neo. Change-Id: I42f8346ffbbcce1fe4045233d139d8144759bce9 --- qcom/msm-arm-smmu-neo.dtsi | 321 +++++++++++++++++++++++++++++++++++++ qcom/neo.dtsi | 1 + 2 files changed, 322 insertions(+) create mode 100644 qcom/msm-arm-smmu-neo.dtsi diff --git a/qcom/msm-arm-smmu-neo.dtsi b/qcom/msm-arm-smmu-neo.dtsi new file mode 100644 index 00000000..74577ddb --- /dev/null +++ b/qcom/msm-arm-smmu-neo.dtsi @@ -0,0 +1,321 @@ +#include + +&soc { + kgsl_smmu: kgsl-smmu@3da0000 { + compatible = "qcom,qsmmu-v500", "qcom,adreno-smmu"; + reg = <0x3da0000 0x10000>, + <0x3dd6000 0x20>; + reg-names = "base", "tcu-base"; + #iommu-cells = <2>; + qcom,skip-init; + qcom,use-3-lvl-tables; + qcom,num-context-banks-override = <0x6>; + qcom,num-smr-override = <0x6>; + #global-interrupts = <1>; + #size-cells = <1>; + #address-cells = <1>; + status = "disabled"; + ranges; + dma-coherent; + + qcom,actlr = + /* All CBs of GFX: +15 deep PF */ + <0x000 0x3ff 0x32B>, + <0x400 0x3ff 0x32B>; + + interrupts = , + , + , + , + , + , + , + , + ; + + gfx_0_tbu: gfx_0_tbu@3dd9000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x3dd9000 0x1000>, + <0x3dd6200 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x0 0x400>; + }; + + gfx_1_tbu: gfx_1_tbu@3ddd000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x3ddd000 0x1000>, + <0x3dd6208 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x400 0x400>; + }; + }; + + apps_smmu: apps-smmu@15000000 { + compatible = "qcom,qsmmu-v500"; + reg = <0x15000000 0x100000>, + <0x151d2000 0x20>; + reg-names = "base", "tcu-base"; + #iommu-cells = <2>; + qcom,skip-init; + qcom,use-3-lvl-tables; + qcom,num-context-banks-override = <0x36>; + qcom,num-smr-override = <0x53>; + #global-interrupts = <1>; + #size-cells = <1>; + #address-cells = <1>; + ranges; + dma-coherent; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + + qcom,actlr = + /* For display, camera +0 deep PF */ + <0x400 0x3ff 0x001>, + <0x2000 0x3ff 0x001>, + <0x2400 0x3ff 0x001>, + <0x2800 0xff 0x001>, + <0x2900 0x21 0x001>, + <0x2902 0x0 0x001>, + + /* For video +3 deep PF */ + <0x2980 0x7 0x103>, + <0x29c0 0x6 0x103>, + + /* For compute +15 deep PF */ + <0x1000 0x3ff 0x303>, + <0x1400 0x3ff 0x303>; + + anoc_1_tbu: anoc_1_tbu@151d5000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151d5000 0x1000>, + <0x151d2200 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x0 0x400>; + }; + + camnoc_hf_tbu: anoc_2_tbu@151d9000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151d9000 0x1000>, + <0x151d2208 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x400 0x400>; + }; + + lsr_0_tbu: mnoc_hf_0_tbu@151dd000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151dd000 0x1000>, + <0x151d2210 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x800 0x400>; + }; + + lsr_1_tbu: mnoc_hf_1_tbu@151e1000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151e1000 0x1000>, + <0x151d2218 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0xc00 0x400>; + }; + + nsp_0_tbu: compute_1_tbu@151e5000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151e5000 0x1000>, + <0x151d2220 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x1000 0x400>; + }; + + nsp_1_tbu: compute_0_tbu@151e9000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151e9000 0x1000>, + <0x151d2228 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x1400 0x400>; + }; + + lpass_tbu: lpass_tbu@151ed000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151ed000 0x1000>, + <0x151d2230 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x1800 0x400>; + }; + + pcie_tbu: pcie_tbu@151f1000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151f1000 0x1000>, + <0x151d2238 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x1c00 0x400>; + }; + + mdp_0_tbu: sf_0_tbu@151f5000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151f5000 0x1000>, + <0x151d2240 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x2000 0x400>; + }; + + mdp_1_tbu: sf_1_tbu@151f9000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151f9000 0x1000>, + <0x151d2248 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x2400 0x400>; + }; + + mmnoc_sf_tbu: mnoc_hf_1_tbu@151fd000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151fd000 0x1000>, + <0x151d2250 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x2800 0x400>; + }; + }; + + dma_dev@0x0 { + compatible = "qcom,iommu-dma"; + memory-region = <&system_cma>; + }; + + iommu_test_device { + compatible = "qcom,iommu-debug-test"; + + usecase0_apps { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&apps_smmu 0x3e0 0>; + }; + + usecase1_apps_fastmap { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&apps_smmu 0x3e0 0>; + qcom,iommu-dma = "fastmap"; + }; + + usecase2_apps_atomic { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&apps_smmu 0x3e0 0>; + qcom,iommu-dma = "atomic"; + }; + + usecase3_apps_dma { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&apps_smmu 0x3e1 0>; + dma-coherent; + }; + + usecase4_apps_secure { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&apps_smmu 0x3e0 0x0>; + qcom,iommu-dma = "atomic"; + qcom,iommu-vmid = <0xA>; /* VMID_CP_PIXEL */ + }; + + usecase5_kgsl { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&kgsl_smmu 0x7 0x400>; + }; + + usecase6_kgsl_dma { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&kgsl_smmu 0x7 0x400>; + dma-coherent; + }; + }; +}; diff --git a/qcom/neo.dtsi b/qcom/neo.dtsi index 27bf1857..1e585b70 100644 --- a/qcom/neo.dtsi +++ b/qcom/neo.dtsi @@ -641,6 +641,7 @@ #include "neo-pinctrl.dtsi" #include "neo-dma-heaps.dtsi" #include "diwali-gdsc.dtsi" +#include "msm-arm-smmu-neo.dtsi" &gcc_apcs_gdsc_vote_ctrl { reg = <0x162200 0x4>;