diff --git a/qcom/msm-arm-smmu-sdxkova.dtsi b/qcom/msm-arm-smmu-sdxkova.dtsi new file mode 100644 index 00000000..66732ae4 --- /dev/null +++ b/qcom/msm-arm-smmu-sdxkova.dtsi @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include + +&soc { + apps_smmu: apps-smmu@15000000 { + compatible = "qcom,qsmmu-v500"; + reg = <0x15000000 0x40000>; + #iommu-cells = <2>; + qcom,use-3-lvl-tables; + #global-interrupts = <1>; + #size-cells = <1>; + #address-cells = <1>; + ranges; + dma-coherent; + + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + + anoc_1_qtb: anoc_1_qtb@1680000 { + compatible = "qcom,qsmmuv500-tbu", "qcom,qtb500"; + reg = <0x1680000 0x1000>; + qcom,stream-id-range = <0x0 0x400>; + qcom,iova-width = <36>; + qcom,num-qtb-ports = <1>; + }; + + ipa_qtb: ipa_qtb@1688000 { + compatible = "qcom,qsmmuv500-tbu", "qcom,qtb500"; + reg = <0x1688000 0x1000>; + qcom,stream-id-range = <0x400 0x400>; + qcom,iova-width = <41>; + qcom,num-qtb-ports = <1>; + }; + + pcie_qtb: pcie_qtb@16d0000 { + compatible = "qcom,qsmmuv500-tbu", "qcom,qtb500"; + reg = <0x16d0000 0x1000>; + qcom,stream-id-range = <0x800 0x400>; + qcom,iova-width = <36>; + qcom,num-qtb-ports = <1>; + qcom,opt-out-tbu-halting; + }; + }; + + dma_dev { + 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 0x0>; + }; + + usecase1_apps_fastmap { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&apps_smmu 0x3e0 0x0>; + qcom,iommu-dma = "fastmap"; + }; + + usecase2_apps_atomic { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&apps_smmu 0x3e0 0x0>; + qcom,iommu-dma = "atomic"; + }; + + usecase3_apps_dma { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&apps_smmu 0x3e0 0x0>; + dma-coherent; + }; + + usecase4_apps_secure { + compatible = "qcom,iommu-debug-usecase"; + iommus = <&apps_smmu 0x3e0 0x0>; + qcom,iommu-vmid = <0x2d>; /* VMID_TUIVM */ + }; + }; +}; diff --git a/qcom/sdxkova-idp-cpe.dts b/qcom/sdxkova-idp-cpe.dts index 079b3ec8..a2d3e8c1 100644 --- a/qcom/sdxkova-idp-cpe.dts +++ b/qcom/sdxkova-idp-cpe.dts @@ -7,6 +7,7 @@ #include "sdxkova.dtsi" #include "sdxkova-idp-cpe.dtsi" +#include "sdxkova-reserved-memory.dtsi" / { model = "Qualcomm Technologies, Inc. SDXKOVA IDP CPE"; diff --git a/qcom/sdxkova-idp-mbb.dts b/qcom/sdxkova-idp-mbb.dts index bbe2a28e..18dfa58e 100644 --- a/qcom/sdxkova-idp-mbb.dts +++ b/qcom/sdxkova-idp-mbb.dts @@ -7,6 +7,7 @@ #include "sdxkova.dtsi" #include "sdxkova-idp-mbb.dtsi" +#include "sdxkova-reserved-memory.dtsi" / { model = "Qualcomm Technologies, Inc. SDXKOVA IDP MBB"; diff --git a/qcom/sdxkova-reserved-memory.dtsi b/qcom/sdxkova-reserved-memory.dtsi new file mode 100644 index 00000000..0a6f7f3f --- /dev/null +++ b/qcom/sdxkova-reserved-memory.dtsi @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +&reserved_memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + gunyah_hyp_mem: gunyah_hyp_region@80000000 { + no-map; + reg = <0x0 0x80000000 0x0 0x800000>; + }; + + /* HYP elf package region at 0x80800000 to be shared with Linux */ + + access_control_db_mem: access_control_db_region@81380000 { + no-map; + reg = <0x0 0x81380000 0x0 0x80000>; + }; + + qteetz_mem: qteetz_region@814e0000 { + no-map; + reg = <0x0 0x814e0000 0x0 0x2a0000>; + }; + + trusted_apps_mem: trusted_apps_region@81780000 { + no-map; + reg = <0x0 0x81780000 0x0 0xa00000>; + }; + + /* UEFI region at 0x87100000 is reclaimed by Linux */ + + /* UEFI region at 0x87500000 is reclaimed by Linux */ + + /* ABL region at 0x87900000 is reclaimed by Linux */ + + /* XBL RAMdump at 0x87a00000 to be reused Linux */ + + cpucp_fw_mem: cpucp_fw_region@87c00000 { + no-map; + reg = <0x0 0x87c00000 0x0 0x100000>; + }; + + xbl_dtlog_mem: xbl_dtlog_region@87d00000 { + no-map; + reg = <0x0 0x87d00000 0x0 0x40000>; + }; + + xbl_sc_mem: xbl_sc_region@87d40000 { + no-map; + reg = <0x0 0x87d40000 0x0 0x40000>; + }; + + modem_efs_shared_mem: modem_efs_shared_region@87d80000 { + no-map; + reg = <0x0 0x87d80000 0x0 0x10000>; + }; + + aop_image_mem: aop_image_region@87e00000 { + no-map; + reg = <0x0 0x87e00000 0x0 0x20000>; + }; + + smem_mem: smem_region@87e20000 { + no-map; + reg = <0x0 0x87e20000 0x0 0xc0000>; + }; + + aop_cmd_db_mem: aop_cmd_db_region@87ee0000 { + compatible = "qcom,cmd-db"; + no-map; + reg = <0x0 0x87ee0000 0x0 0x20000>; + }; + + aop_config_mem: aop_config_region@87f00000 { + no-map; + reg = <0x0 0x87f00000 0x0 0x20000>; + }; + + ipa_fw_mem: ipa_fw_region@87f20000 { + no-map; + reg = <0x0 0x87f20000 0x0 0x10000>; + }; + + secdata_mem: secdata_region@87f30000 { + no-map; + reg = <0x0 0x87f30000 0x0 0x1000>; + }; + + tme_crashdump_mem: tme_crashdump_region@87f31000 { + no-map; + reg = <0x0 0x87f31000 0x0 0x40000>; + }; + + tme_log_mem: tme_log_region@87f71000 { + no-map; + reg = <0x0 0x87f71000 0x0 0x4000>; + }; + + /* UEFI region at 0x87f75000 is reclaimed by Linux */ + + qdss_mem: qdss_region@88500000 { + no-map; + reg = <0x0 0x88500000 0x0 0x300000>; + }; + + qlink_logging_mem: qlink_logging_region@88800000 { + no-map; + reg = <0x0 0x88800000 0x0 0x300000>; + }; + + audio_heap_mem: audio_heap_region@88b00000 { + no-map; + reg = <0x0 0x88b00000 0x0 0x400000>; + }; + + dsm_partition_2_mem: dsm_partition_2_region@88f00000 { + no-map; + reg = <0x0 0x88f00000 0x0 0x2500000>; + }; + + dsm_partition_1_mem: dsm_partition_1_region@8b400000 { + no-map; + reg = <0x0 0x8b400000 0x0 0x2b80000>; + }; + + q6_mpss_dtb_mem: q6_mpss_dtb_region@8df80000 { + no-map; + reg = <0x0 0x8df80000 0x0 0x80000>; + }; + + mpssadsp_mem: mpssadsp_region@8e000000 { + no-map; + reg = <0x0 0x8e000000 0x0 0xf100000>; + }; + + /* Linux kernel image is loaded at 0xa8000000 */ + +}; diff --git a/qcom/sdxkova.dtsi b/qcom/sdxkova.dtsi index a4a57891..749406b2 100644 --- a/qcom/sdxkova.dtsi +++ b/qcom/sdxkova.dtsi @@ -4,7 +4,8 @@ */ #include "sdx75.dtsi" - +/delete-node/ &apps_smmu; +#include "msm-arm-smmu-sdxkova.dtsi" / { qcom_tzlog: tz-log@14680720 { compatible = "qcom,tz-log"; @@ -13,4 +14,22 @@ hyplog-address-offset = <0x410>; hyplog-size-offset = <0x414>; }; + +/delete-node/ reserved-memory; + +reserved_memory: reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + system_cma: linux,cma { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + reusable; + alignment = <0x0 0x400000>; + size = <0x0 0x2000000>; + linux,cma-default; + }; +}; + };