From 5c8541b27ab2c184e3f3cca9527fb4d122979de5 Mon Sep 17 00:00:00 2001 From: Jaskaran Singh Date: Mon, 7 Feb 2022 11:22:07 +0530 Subject: [PATCH] ARM: dts: msm: Add initial SMMU configuration for Anorak Add initial apps and gpu SMMU configuration for Anorak. Change-Id: Ia739dd1a3c4a2870231197faaaf5b910a8c65fe7 --- qcom/anorak.dtsi | 2 + qcom/msm-arm-smmu-anorak.dtsi | 398 ++++++++++++++++++++++++++++++++++ 2 files changed, 400 insertions(+) create mode 100644 qcom/msm-arm-smmu-anorak.dtsi diff --git a/qcom/anorak.dtsi b/qcom/anorak.dtsi index 33fb8fb3..79f31130 100644 --- a/qcom/anorak.dtsi +++ b/qcom/anorak.dtsi @@ -1065,3 +1065,5 @@ #include "anorak-dma-heaps.dtsi" #include "ipcc-test.dtsi" #include "anorak-pcie.dtsi" +#include "msm-arm-smmu-anorak.dtsi" + diff --git a/qcom/msm-arm-smmu-anorak.dtsi b/qcom/msm-arm-smmu-anorak.dtsi new file mode 100644 index 00000000..d99b700f --- /dev/null +++ b/qcom/msm-arm-smmu-anorak.dtsi @@ -0,0 +1,398 @@ +#include + +&soc { + kgsl_smmu: kgsl-smmu@3da0000 { + compatible = "qcom,qsmmu-v500", "qcom,adreno-smmu"; + reg = <0x3da0000 0x40000>, + <0x3de2000 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>; + ranges; + dma-coherent; + + qcom,regulator-names = "vdd"; + vdd-supply = <&gpu_cc_cx_gdsc>; + + clocks = <&gpucc GPU_CC_CX_GMU_CLK>, + <&gpucc GPU_CC_HUB_CX_INT_CLK>, + <&gpucc GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK>, + <&gcc GCC_GPU_MEMNOC_GFX_CLK>, + <&gcc GCC_GPU_SNOC_DVM_GFX_CLK>, + <&gpucc GPU_CC_AHB_CLK>; + clock-names = + "gpu_cc_cx_gmu", + "gpu_cc_hub_cx_int", + "gpu_cc_hlos1_vote_gpu_smmu", + "gcc_gpu_memnoc_gfx", + "gcc_gpu_snoc_dvm_gfx", + "gpu_cc_ahb"; + + qcom,actlr = + /* All CBs of GFX: +15 deep PF */ + <0x000 0x3ff 0x32B>; + + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + + gpu_qtb: gpu_qtb@3de8000 { + compatible = "qcom,qsmmuv500-tbu", "qcom,qtb500"; + reg = <0x3de8000 0x1000>; + reg-names = "base"; + qcom,iova-width = <49>; + qcom,stream-id-range = <0x0 0x400>; + qcom,num-qtb-ports = <2>; + }; + + }; + + apps_smmu: apps-smmu@15000000 { + compatible = "qcom,qsmmu-v500"; + reg = <0x15000000 0x100000>, + <0x151c6000 0x20>; + reg-names = "base", "tcu-base"; + #iommu-cells = <2>; + qcom,skip-init; + qcom,use-3-lvl-tables; + qcom,handoff-smrs = <0x1000 0x402>; + #global-interrupts = <1>; + #size-cells = <1>; + #address-cells = <1>; + ranges; + dma-coherent; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + + + qcom,actlr = + /* For display, camera +0 deep PF */ + <0x800 0x7ff 0x001>, + <0x1000 0x7ff 0x001>, + + /* For camera IFE +3 PF*/ + <0x3000 0x3ff 0x103>, + + /* For video +3 deep PF */ + <0x980 0x27 0x103>, + + /* For compute +15 deep PF */ + <0x961 0x27 0x303>; + + anoc_1_tbu: anoc_1_tbu@151c9000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151c9000 0x1000>, + <0x151c6200 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x0 0x400>; + qcom,micro-idle; + qcom,iova-width = <36>; + }; + + anoc_2_tbu: anoc_2_tbu@151cd000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151cd000 0x1000>, + <0x151c6208 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x400 0x400>; + qcom,micro-idle; + qcom,iova-width = <36>; + }; + + mmnoc_sf_0: mmnoc_sf_0_tbu@151d1000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151d1000 0x1000>, + <0x151c6210 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x800 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + mmnoc_sf_1: mmnoc_sf_1_tbu@151d5000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151d5000 0x1000>, + <0x151c6218 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0xc00 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + mdp_00_tbu: mdp_00_tbu@151d9000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151d9000 0x1000>, + <0x151c6220 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x1000 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + mdp_01_tbu: mdp_01_tbu@151dd000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151dd000 0x1000>, + <0x151c6228 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x1400 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + mdp_10_tbu: mdp_10_tbu@151e1000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151e1000 0x1000>, + <0x151c6230 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x1800 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + mdp_11_tbu: mdp_11_tbu@151e5000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151e5000 0x1000>, + <0x151c6238 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x1c00 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + nsp_0_tbu: nsp_0_tbu@151e9000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151e9000 0x1000>, + <0x151c6240 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x2000 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + nsp_1_tbu: nsp_1_tbu@151ed000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151ed000 0x1000>, + <0x151c6248 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x2400 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + lpass_tbu: lpass_tbu@151f1000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151f1000 0x1000>, + <0x151c6250 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x2800 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + anoc_pcie_tbu: anoc_pcie_tbu@151f5000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151f5000 0x1000>, + <0x151c6258 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x2c00 0x400>; + qcom,micro-idle; + qcom,iova-width = <36>; + }; + + camnoc_hf_0_tbu: camnoc_hf_0_tbu@151f9000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151f9000 0x1000>, + <0x151c6260 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x3000 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + + camnoc_hf_1_tbu: camnoc_hf_1_tbu@151fd000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x151fd000 0x1000>, + <0x151c6268 0x8>; + reg-names = "base", "status-reg"; + qcom,stream-id-range = <0x3400 0x400>; + qcom,micro-idle; + qcom,iova-width = <32>; + }; + }; + + 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 0x0007 0x0>; + }; + + usecase6_kgsl_dma { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&kgsl_smmu 0x0007 0x0>; + dma-coherent; + }; + + }; +};