18c2ecf20Sopenharmony_ci* QCOM IOMMU
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe MSM IOMMU is an implementation compatible with the ARM VMSA short
48c2ecf20Sopenharmony_cidescriptor page tables. It provides address translation for bus masters outside
58c2ecf20Sopenharmony_ciof the CPU, each connected to the IOMMU through a port called micro-TLB.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciRequired Properties:
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci  - compatible: Must contain "qcom,apq8064-iommu".
108c2ecf20Sopenharmony_ci  - reg: Base address and size of the IOMMU registers.
118c2ecf20Sopenharmony_ci  - interrupts: Specifiers for the MMU fault interrupts. For instances that
128c2ecf20Sopenharmony_ci    support secure mode two interrupts must be specified, for non-secure and
138c2ecf20Sopenharmony_ci    secure mode, in that order. For instances that don't support secure mode a
148c2ecf20Sopenharmony_ci    single interrupt must be specified.
158c2ecf20Sopenharmony_ci  - #iommu-cells: The number of cells needed to specify the stream id. This
168c2ecf20Sopenharmony_ci		  is always 1.
178c2ecf20Sopenharmony_ci  - qcom,ncb:	  The total number of context banks in the IOMMU.
188c2ecf20Sopenharmony_ci  - clocks	: List of clocks to be used during SMMU register access. See
198c2ecf20Sopenharmony_ci		  Documentation/devicetree/bindings/clock/clock-bindings.txt
208c2ecf20Sopenharmony_ci		  for information about the format. For each clock specified
218c2ecf20Sopenharmony_ci		  here, there must be a corresponding entry in clock-names
228c2ecf20Sopenharmony_ci		  (see below).
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci  - clock-names	: List of clock names corresponding to the clocks specified in
258c2ecf20Sopenharmony_ci		  the "clocks" property (above).
268c2ecf20Sopenharmony_ci		  Should be "smmu_pclk" for specifying the interface clock
278c2ecf20Sopenharmony_ci		  required for iommu's register accesses.
288c2ecf20Sopenharmony_ci		  Should be "smmu_clk" for specifying the functional clock
298c2ecf20Sopenharmony_ci		  required by iommu for bus accesses.
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciEach bus master connected to an IOMMU must reference the IOMMU in its device
328c2ecf20Sopenharmony_cinode with the following property:
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci  - iommus: A reference to the IOMMU in multiple cells. The first cell is a
358c2ecf20Sopenharmony_ci	    phandle to the IOMMU and the second cell is the stream id.
368c2ecf20Sopenharmony_ci	    A single master device can be connected to more than one iommu
378c2ecf20Sopenharmony_ci	    and multiple contexts in each of the iommu. So multiple entries
388c2ecf20Sopenharmony_ci	    are required to list all the iommus and the stream ids that the
398c2ecf20Sopenharmony_ci	    master is connected to.
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciExample: mdp iommu and its bus master
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci                mdp_port0: iommu@7500000 {
448c2ecf20Sopenharmony_ci			compatible = "qcom,apq8064-iommu";
458c2ecf20Sopenharmony_ci			#iommu-cells = <1>;
468c2ecf20Sopenharmony_ci			clock-names =
478c2ecf20Sopenharmony_ci			    "smmu_pclk",
488c2ecf20Sopenharmony_ci			    "smmu_clk";
498c2ecf20Sopenharmony_ci			clocks =
508c2ecf20Sopenharmony_ci			    <&mmcc SMMU_AHB_CLK>,
518c2ecf20Sopenharmony_ci			    <&mmcc MDP_AXI_CLK>;
528c2ecf20Sopenharmony_ci			reg = <0x07500000 0x100000>;
538c2ecf20Sopenharmony_ci			interrupts =
548c2ecf20Sopenharmony_ci			    <GIC_SPI 63 0>,
558c2ecf20Sopenharmony_ci			    <GIC_SPI 64 0>;
568c2ecf20Sopenharmony_ci			qcom,ncb = <2>;
578c2ecf20Sopenharmony_ci		};
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci		mdp: qcom,mdp@5100000 {
608c2ecf20Sopenharmony_ci			compatible = "qcom,mdp";
618c2ecf20Sopenharmony_ci			...
628c2ecf20Sopenharmony_ci			iommus = <&mdp_port0 0
638c2ecf20Sopenharmony_ci				  &mdp_port0 2>;
648c2ecf20Sopenharmony_ci		};
65