162306a36Sopenharmony_ci* QCOM IOMMU 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThe MSM IOMMU is an implementation compatible with the ARM VMSA short 462306a36Sopenharmony_cidescriptor page tables. It provides address translation for bus masters outside 562306a36Sopenharmony_ciof the CPU, each connected to the IOMMU through a port called micro-TLB. 662306a36Sopenharmony_ci 762306a36Sopenharmony_ciRequired Properties: 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci - compatible: Must contain "qcom,apq8064-iommu". 1062306a36Sopenharmony_ci - reg: Base address and size of the IOMMU registers. 1162306a36Sopenharmony_ci - interrupts: Specifiers for the MMU fault interrupts. For instances that 1262306a36Sopenharmony_ci support secure mode two interrupts must be specified, for non-secure and 1362306a36Sopenharmony_ci secure mode, in that order. For instances that don't support secure mode a 1462306a36Sopenharmony_ci single interrupt must be specified. 1562306a36Sopenharmony_ci - #iommu-cells: The number of cells needed to specify the stream id. This 1662306a36Sopenharmony_ci is always 1. 1762306a36Sopenharmony_ci - qcom,ncb: The total number of context banks in the IOMMU. 1862306a36Sopenharmony_ci - clocks : List of clocks to be used during SMMU register access. See 1962306a36Sopenharmony_ci Documentation/devicetree/bindings/clock/clock-bindings.txt 2062306a36Sopenharmony_ci for information about the format. For each clock specified 2162306a36Sopenharmony_ci here, there must be a corresponding entry in clock-names 2262306a36Sopenharmony_ci (see below). 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci - clock-names : List of clock names corresponding to the clocks specified in 2562306a36Sopenharmony_ci the "clocks" property (above). 2662306a36Sopenharmony_ci Should be "smmu_pclk" for specifying the interface clock 2762306a36Sopenharmony_ci required for iommu's register accesses. 2862306a36Sopenharmony_ci Should be "smmu_clk" for specifying the functional clock 2962306a36Sopenharmony_ci required by iommu for bus accesses. 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ciEach bus master connected to an IOMMU must reference the IOMMU in its device 3262306a36Sopenharmony_cinode with the following property: 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci - iommus: A reference to the IOMMU in multiple cells. The first cell is a 3562306a36Sopenharmony_ci phandle to the IOMMU and the second cell is the stream id. 3662306a36Sopenharmony_ci A single master device can be connected to more than one iommu 3762306a36Sopenharmony_ci and multiple contexts in each of the iommu. So multiple entries 3862306a36Sopenharmony_ci are required to list all the iommus and the stream ids that the 3962306a36Sopenharmony_ci master is connected to. 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ciExample: mdp iommu and its bus master 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci mdp_port0: iommu@7500000 { 4462306a36Sopenharmony_ci compatible = "qcom,apq8064-iommu"; 4562306a36Sopenharmony_ci #iommu-cells = <1>; 4662306a36Sopenharmony_ci clock-names = 4762306a36Sopenharmony_ci "smmu_pclk", 4862306a36Sopenharmony_ci "smmu_clk"; 4962306a36Sopenharmony_ci clocks = 5062306a36Sopenharmony_ci <&mmcc SMMU_AHB_CLK>, 5162306a36Sopenharmony_ci <&mmcc MDP_AXI_CLK>; 5262306a36Sopenharmony_ci reg = <0x07500000 0x100000>; 5362306a36Sopenharmony_ci interrupts = 5462306a36Sopenharmony_ci <GIC_SPI 63 0>, 5562306a36Sopenharmony_ci <GIC_SPI 64 0>; 5662306a36Sopenharmony_ci qcom,ncb = <2>; 5762306a36Sopenharmony_ci }; 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci mdp: qcom,mdp@5100000 { 6062306a36Sopenharmony_ci compatible = "qcom,mdp"; 6162306a36Sopenharmony_ci ... 6262306a36Sopenharmony_ci iommus = <&mdp_port0 0 6362306a36Sopenharmony_ci &mdp_port0 2>; 6462306a36Sopenharmony_ci }; 65