xref: /freebsd/sys/contrib/device-tree/Bindings/iommu/msm,iommu-v0.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* QCOM IOMMU
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThe MSM IOMMU is an implementation compatible with the ARM VMSA short
4*c66ec88fSEmmanuel Vadotdescriptor page tables. It provides address translation for bus masters outside
5*c66ec88fSEmmanuel Vadotof the CPU, each connected to the IOMMU through a port called micro-TLB.
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel VadotRequired Properties:
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel Vadot  - compatible: Must contain "qcom,apq8064-iommu".
10*c66ec88fSEmmanuel Vadot  - reg: Base address and size of the IOMMU registers.
11*c66ec88fSEmmanuel Vadot  - interrupts: Specifiers for the MMU fault interrupts. For instances that
12*c66ec88fSEmmanuel Vadot    support secure mode two interrupts must be specified, for non-secure and
13*c66ec88fSEmmanuel Vadot    secure mode, in that order. For instances that don't support secure mode a
14*c66ec88fSEmmanuel Vadot    single interrupt must be specified.
15*c66ec88fSEmmanuel Vadot  - #iommu-cells: The number of cells needed to specify the stream id. This
16*c66ec88fSEmmanuel Vadot		  is always 1.
17*c66ec88fSEmmanuel Vadot  - qcom,ncb:	  The total number of context banks in the IOMMU.
18*c66ec88fSEmmanuel Vadot  - clocks	: List of clocks to be used during SMMU register access. See
19*c66ec88fSEmmanuel Vadot		  Documentation/devicetree/bindings/clock/clock-bindings.txt
20*c66ec88fSEmmanuel Vadot		  for information about the format. For each clock specified
21*c66ec88fSEmmanuel Vadot		  here, there must be a corresponding entry in clock-names
22*c66ec88fSEmmanuel Vadot		  (see below).
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel Vadot  - clock-names	: List of clock names corresponding to the clocks specified in
25*c66ec88fSEmmanuel Vadot		  the "clocks" property (above).
26*c66ec88fSEmmanuel Vadot		  Should be "smmu_pclk" for specifying the interface clock
27*c66ec88fSEmmanuel Vadot		  required for iommu's register accesses.
28*c66ec88fSEmmanuel Vadot		  Should be "smmu_clk" for specifying the functional clock
29*c66ec88fSEmmanuel Vadot		  required by iommu for bus accesses.
30*c66ec88fSEmmanuel Vadot
31*c66ec88fSEmmanuel VadotEach bus master connected to an IOMMU must reference the IOMMU in its device
32*c66ec88fSEmmanuel Vadotnode with the following property:
33*c66ec88fSEmmanuel Vadot
34*c66ec88fSEmmanuel Vadot  - iommus: A reference to the IOMMU in multiple cells. The first cell is a
35*c66ec88fSEmmanuel Vadot	    phandle to the IOMMU and the second cell is the stream id.
36*c66ec88fSEmmanuel Vadot	    A single master device can be connected to more than one iommu
37*c66ec88fSEmmanuel Vadot	    and multiple contexts in each of the iommu. So multiple entries
38*c66ec88fSEmmanuel Vadot	    are required to list all the iommus and the stream ids that the
39*c66ec88fSEmmanuel Vadot	    master is connected to.
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel VadotExample: mdp iommu and its bus master
42*c66ec88fSEmmanuel Vadot
43*c66ec88fSEmmanuel Vadot                mdp_port0: iommu@7500000 {
44*c66ec88fSEmmanuel Vadot			compatible = "qcom,apq8064-iommu";
45*c66ec88fSEmmanuel Vadot			#iommu-cells = <1>;
46*c66ec88fSEmmanuel Vadot			clock-names =
47*c66ec88fSEmmanuel Vadot			    "smmu_pclk",
48*c66ec88fSEmmanuel Vadot			    "smmu_clk";
49*c66ec88fSEmmanuel Vadot			clocks =
50*c66ec88fSEmmanuel Vadot			    <&mmcc SMMU_AHB_CLK>,
51*c66ec88fSEmmanuel Vadot			    <&mmcc MDP_AXI_CLK>;
52*c66ec88fSEmmanuel Vadot			reg = <0x07500000 0x100000>;
53*c66ec88fSEmmanuel Vadot			interrupts =
54*c66ec88fSEmmanuel Vadot			    <GIC_SPI 63 0>,
55*c66ec88fSEmmanuel Vadot			    <GIC_SPI 64 0>;
56*c66ec88fSEmmanuel Vadot			qcom,ncb = <2>;
57*c66ec88fSEmmanuel Vadot		};
58*c66ec88fSEmmanuel Vadot
59*c66ec88fSEmmanuel Vadot		mdp: qcom,mdp@5100000 {
60*c66ec88fSEmmanuel Vadot			compatible = "qcom,mdp";
61*c66ec88fSEmmanuel Vadot			...
62*c66ec88fSEmmanuel Vadot			iommus = <&mdp_port0 0
63*c66ec88fSEmmanuel Vadot				  &mdp_port0 2>;
64*c66ec88fSEmmanuel Vadot		};
65