arm/dt: iommu: Rename files

Rename device tree files to align with IOMMU architecture naming.

There are currently two different types of IOMMU hardware being used.
We have first generation IOMMU used by msm8610 and second generation
IOMMU used by msm8226 and msm8974. The first generation IOMMU is called
IOMMU-v0 (msm-iommu-v0.dtsi) while the second generation is called
IOMMU-v1 (msm-iommu-v1.dtsi).

msm8226 share the same version of IOMMU (v1) as 8974 but it has a
different configuration so msm8226 IOMMU is split into its own file
(msm8226-iommu.dtsi).

In addition we have version v1 and v2 of msm8974 which have a slightly
different IOMMU configuration which is handled by having dedicated
iommu file (msm8974-v1-iommu.dtsi) for each revision of the msm8974
chip.

Change-Id: I6f4c3ac8c17eaf2175890e625a3a76f33582c80a
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
diff --git a/arch/arm/boot/dts/mpq8092-iommu.dtsi b/arch/arm/boot/dts/mpq8092-iommu.dtsi
index 6a88992..c6693e1 100644
--- a/arch/arm/boot/dts/mpq8092-iommu.dtsi
+++ b/arch/arm/boot/dts/mpq8092-iommu.dtsi
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -10,7 +10,7 @@
  * GNU General Public License for more details.
  */
 
-/include/ "msm-iommu.dtsi"
+/include/ "msm-iommu-v1.dtsi"
 
 &jpeg_iommu {
 	status = "ok";
diff --git a/arch/arm/boot/dts/msm-iommu-v0.dtsi b/arch/arm/boot/dts/msm-iommu-v0.dtsi
new file mode 100644
index 0000000..fbc1940
--- /dev/null
+++ b/arch/arm/boot/dts/msm-iommu-v0.dtsi
@@ -0,0 +1,228 @@
+/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/ {
+	lpass_iommu: qcom,iommu@fd000000 {
+		compatible = "qcom,msm-smmu-v1";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		reg = <0xfd000000 0x10000>;
+		qcom,glb-offset = <0xF000>;
+		label = "lpass_iommu";
+		status = "disabled";
+
+		lpass_q6_fw: qcom,iommu-ctx@fd000000 {
+			reg = <0xfd000000 0x1000>;
+			interrupts = <0 250 0>;
+			qcom,iommu-ctx-mids = <0 15>;
+			label = "q6_fw";
+		};
+
+		lpass_audio_shared: qcom,iommu-ctx@fd001000 {
+			reg = <0xfd001000 0x1000>;
+			interrupts = <0 250 0>;
+			qcom,iommu-ctx-mids = <1>;
+			label = "audio_shared";
+		};
+
+		lpass_video_shared: qcom,iommu-ctx@fd002000 {
+			reg = <0xfd002000 0x1000>;
+			interrupts = <0 250 0>;
+			qcom,iommu-ctx-mids = <2>;
+			label = "video_shared";
+		};
+
+		lpass_q6_spare: qcom,iommu-ctx@fd003000 {
+			reg = <0xfd003000 0x1000>;
+			interrupts = <0 250 0>;
+			qcom,iommu-ctx-mids = <3 4 5 6 7 8 9 10 11 12 13 14>;
+			label = "q6_spare";
+		};
+	};
+
+	copss_iommu: qcom,iommu@fd010000 {
+		compatible = "qcom,msm-smmu-v1";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		reg = <0xfd010000 0x10000>;
+		qcom,glb-offset = <0xF000>;
+		label = "copss_iommu";
+		status = "disabled";
+
+		qcom,iommu-ctx@fd010000 {
+			reg = <0xfd010000 0x1000>;
+			interrupts = <0 254 0>;
+			qcom,iommu-ctx-mids = <0>;
+			label = "copss_0";
+		};
+
+		qcom,iommu-ctx@fd011000 {
+			reg = <0xfd011000 0x1000>;
+			interrupts = <0 254 0>;
+			qcom,iommu-ctx-mids = <1>;
+			label = "copss_1";
+		};
+
+		qcom,iommu-ctx@fd012000 {
+			reg = <0xfd012000 0x1000>;
+			interrupts = <0 254 0>;
+			qcom,iommu-ctx-mids = <2>;
+			label = "copss_2";
+		};
+
+		qcom,iommu-ctx@fd013000 {
+			reg = <0xfd013000 0x1000>;
+			interrupts = <0 254 0>;
+			qcom,iommu-ctx-mids = <3>;
+			label = "copss_3";
+		};
+
+		qcom,iommu-ctx@fd014000 {
+			reg = <0xfd014000 0x1000>;
+			interrupts = <0 254 0>;
+			qcom,iommu-ctx-mids = <4>;
+			label = "copss_4";
+		};
+
+		qcom,iommu-ctx@fd015000 {
+			reg = <0xfd015000 0x1000>;
+			interrupts = <0 254 0>;
+			qcom,iommu-ctx-mids = <5>;
+			label = "copss_5";
+		};
+
+		qcom,iommu-ctx@fd016000 {
+			reg = <0xfd016000 0x1000>;
+			interrupts = <0 254 0>;
+			qcom,iommu-ctx-mids = <6>;
+			label = "copss_6";
+		};
+
+		qcom,iommu-ctx@fd017000 {
+			reg = <0xfd017000 0x1000>;
+			interrupts = <0 254 0>;
+			qcom,iommu-ctx-mids = <7>;
+			label = "copss_7";
+		};
+	};
+
+	mdpe_iommu: qcom,iommu@fd860000 {
+		compatible = "qcom,msm-smmu-v1";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		reg = <0xfd860000 0x10000>;
+		qcom,glb-offset = <0xF000>;
+		label = "mdpe_iommu";
+		status = "disabled";
+
+		qcom,iommu-ctx@fd860000 {
+			reg = <0xfd860000 0x1000>;
+			interrupts = <0 247 0>;
+			qcom,iommu-ctx-mids = <>;
+			label = "mdpe_0";
+		};
+
+		qcom,iommu-ctx@fd861000 {
+			reg = <0xfd861000 0x1000>;
+			interrupts = <0 247 0>;
+			qcom,iommu-ctx-mids = <>;
+			label = "mdpe_1";
+		};
+	};
+
+	mdps_iommu: qcom,iommu@fd870000 {
+		compatible = "qcom,msm-smmu-v1";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		reg = <0xfd870000 0x10000>;
+		qcom,glb-offset = <0xF000>;
+		label = "mdps_iommu";
+		status = "disabled";
+
+		qcom,iommu-ctx@fd870000 {
+			reg = <0xfd870000 0x1000>;
+			interrupts = <0 247 0>;
+			qcom,iommu-ctx-mids = <>;
+			label = "mdps_0";
+		};
+
+		qcom,iommu-ctx@fd871000 {
+			reg = <0xfd871000 0x1000>;
+			interrupts = <0 247 0>;
+			qcom,iommu-ctx-mids = <>;
+			label = "mdps_1";
+		};
+	};
+
+	gfx_iommu: qcom,iommu@fd880000 {
+		compatible = "qcom,msm-smmu-v1";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		reg = <0xfd880000 0x10000>;
+		qcom,glb-offset = <0xF000>;
+		label = "gfx_iommu";
+		status = "disabled";
+
+		qcom,iommu-ctx@fd880000 {
+			reg = <0xfd880000 0x1000>;
+			interrupts = <0 241 0>;
+			qcom,iommu-ctx-mids = <0 1 2 3 4 5 6 7 8 9 10 11 12 13
+					       14 15>;
+			label = "gfx3d_user";
+		};
+
+		qcom,iommu-ctx@fd881000 {
+			reg = <0xfd881000 0x1000>;
+			interrupts = <0 241 0>;
+			qcom,iommu-ctx-mids = <16 17 18 19 20 21 22 23 24 25
+					       26 27 28 29 30 31>;
+			label = "gfx3d_priv";
+		};
+
+		qcom,iommu-ctx@fd882000 {
+			reg = <0xfd882000 0x1000>;
+			interrupts = <0 241 0>;
+			qcom,iommu-ctx-mids = <>;
+			label = "gfx3d_spare";
+		};
+	};
+
+	vfe_iommu: qcom,iommu@fd890000 {
+		compatible = "qcom,msm-smmu-v1";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		reg = <0xfd890000 0x10000>;
+		qcom,glb-offset = <0xF000>;
+		label = "vfe_iommu";
+		status = "disabled";
+
+		qcom,iommu-ctx@fd890000 {
+			reg = <0xfd890000 0x1000>;
+			interrupts = <0 65 0>;
+			qcom,iommu-ctx-mids = <0>;
+			label = "vfe0";
+		};
+
+		qcom,iommu-ctx@fd891000 {
+			reg = <0xfd891000 0x1000>;
+			interrupts = <0 65 0>;
+			qcom,iommu-ctx-mids = <1>;
+			label = "vfe1";
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/msm-iommu-v1.dtsi b/arch/arm/boot/dts/msm-iommu-v1.dtsi
index ea4fa75..9bb642d 100644
--- a/arch/arm/boot/dts/msm-iommu-v1.dtsi
+++ b/arch/arm/boot/dts/msm-iommu-v1.dtsi
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -11,218 +11,354 @@
  */
 
 / {
-	lpass_iommu: qcom,iommu@fd000000 {
-		compatible = "qcom,msm-smmu-v1";
+	jpeg_iommu: qcom,iommu@fda64000 {
+		compatible = "qcom,msm-smmu-v2";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		reg = <0xfd000000 0x10000>;
-		qcom,glb-offset = <0xF000>;
-		label = "lpass_iommu";
+		reg = <0xfda64000 0x10000>;
+		reg-names = "iommu_base";
+		interrupts = <0 67 0>;
+		vdd-supply = <&gdsc_jpeg>;
+		qcom,needs-alt-core-clk;
+		label = "jpeg_iommu";
 		status = "disabled";
 
-		lpass_q6_fw: qcom,iommu-ctx@fd000000 {
-			reg = <0xfd000000 0x1000>;
-			interrupts = <0 250 0>;
-			qcom,iommu-ctx-mids = <0 15>;
-			label = "q6_fw";
+		qcom,iommu-bfb-regs =  <0x204c
+					0x2050
+					0x2514
+					0x2540
+					0x256c
+					0x2314
+					0x2394
+					0x2414
+					0x20ac
+					0x215c
+					0x220c
+					0x2008
+					0x200c
+					0x2010
+					0x2014>;
+
+		qcom,iommu-bfb-data =  <0x0000ffff
+					0x0
+					0x4
+					0x4
+					0x0
+					0x0
+					0x10
+					0x50
+					0x0
+					0x10
+					0x20
+					0x0
+					0x0
+					0x0
+					0x0>;
+
+		qcom,iommu-ctx@fda6c000 {
+			reg = <0xfda6c000 0x1000>;
+			interrupts = <0 70 0>;
+			qcom,iommu-ctx-sids = <0>;
+			label = "jpeg_enc0";
 		};
 
-		lpass_audio_shared: qcom,iommu-ctx@fd001000 {
-			reg = <0xfd001000 0x1000>;
-			interrupts = <0 250 0>;
-			qcom,iommu-ctx-mids = <1>;
-			label = "audio_shared";
+		qcom,iommu-ctx@fda6d000 {
+			reg = <0xfda6d000 0x1000>;
+			interrupts = <0 70 0>;
+			qcom,iommu-ctx-sids = <1>;
+			label = "jpeg_enc1";
 		};
 
-		lpass_video_shared: qcom,iommu-ctx@fd002000 {
-			reg = <0xfd002000 0x1000>;
-			interrupts = <0 250 0>;
-			qcom,iommu-ctx-mids = <2>;
-			label = "video_shared";
-		};
-
-		lpass_q6_spare: qcom,iommu-ctx@fd003000 {
-			reg = <0xfd003000 0x1000>;
-			interrupts = <0 250 0>;
-			qcom,iommu-ctx-mids = <3 4 5 6 7 8 9 10 11 12 13 14>;
-			label = "q6_spare";
+		qcom,iommu-ctx@fda6e000 {
+			reg = <0xfda6e000 0x1000>;
+			interrupts = <0 70 0>;
+			qcom,iommu-ctx-sids = <2>;
+			label = "jpeg_dec";
 		};
 	};
 
-	copss_iommu: qcom,iommu@fd010000 {
-		compatible = "qcom,msm-smmu-v1";
+	mdp_iommu: qcom,iommu@fd928000 {
+		compatible = "qcom,msm-smmu-v2";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		reg = <0xfd010000 0x10000>;
-		qcom,glb-offset = <0xF000>;
-		label = "copss_iommu";
+		reg = <0xfd928000 0x10000>;
+		reg-names = "iommu_base";
+		interrupts = <0 73 0>;
+		vdd-supply = <&gdsc_mdss>;
+		qcom,iommu-secure-id = <1>;
+		label = "mdp_iommu";
 		status = "disabled";
 
-		qcom,iommu-ctx@fd010000 {
-			reg = <0xfd010000 0x1000>;
-			interrupts = <0 254 0>;
-			qcom,iommu-ctx-mids = <0>;
-			label = "copss_0";
+		qcom,iommu-bfb-regs =  <0x204c
+					0x2050
+					0x2514
+					0x2540
+					0x256c
+					0x20ac
+					0x215c
+					0x220c
+					0x2314
+					0x2394
+					0x2414
+					0x2008
+					0x200c
+					0x2010
+					0x2014
+					0x2018
+					0x201c
+					0x2020>;
+
+		qcom,iommu-bfb-data =  <0xffffffff
+					0x0
+					0x00000004
+					0x00000010
+					0x00000000
+					0x00000000
+					0x00000034
+					0x00000044
+					0x0
+					0x34
+					0x74
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0>;
+
+		qcom,iommu-ctx@fd930000 {
+			reg = <0xfd930000 0x1000>;
+			interrupts = <0 47 0>;
+			qcom,iommu-ctx-sids = <0>;
+			label = "mdp_0";
 		};
 
-		qcom,iommu-ctx@fd011000 {
-			reg = <0xfd011000 0x1000>;
-			interrupts = <0 254 0>;
-			qcom,iommu-ctx-mids = <1>;
-			label = "copss_1";
-		};
-
-		qcom,iommu-ctx@fd012000 {
-			reg = <0xfd012000 0x1000>;
-			interrupts = <0 254 0>;
-			qcom,iommu-ctx-mids = <2>;
-			label = "copss_2";
-		};
-
-		qcom,iommu-ctx@fd013000 {
-			reg = <0xfd013000 0x1000>;
-			interrupts = <0 254 0>;
-			qcom,iommu-ctx-mids = <3>;
-			label = "copss_3";
-		};
-
-		qcom,iommu-ctx@fd014000 {
-			reg = <0xfd014000 0x1000>;
-			interrupts = <0 254 0>;
-			qcom,iommu-ctx-mids = <4>;
-			label = "copss_4";
-		};
-
-		qcom,iommu-ctx@fd015000 {
-			reg = <0xfd015000 0x1000>;
-			interrupts = <0 254 0>;
-			qcom,iommu-ctx-mids = <5>;
-			label = "copss_5";
-		};
-
-		qcom,iommu-ctx@fd016000 {
-			reg = <0xfd016000 0x1000>;
-			interrupts = <0 254 0>;
-			qcom,iommu-ctx-mids = <6>;
-			label = "copss_6";
-		};
-
-		qcom,iommu-ctx@fd017000 {
-			reg = <0xfd017000 0x1000>;
-			interrupts = <0 254 0>;
-			qcom,iommu-ctx-mids = <7>;
-			label = "copss_7";
+		qcom,iommu-ctx@fd931000 {
+			reg = <0xfd931000 0x1000>;
+			interrupts = <0 47 0>;
+			qcom,iommu-ctx-sids = <1>;
+			label = "mdp_1";
+			qcom,secure-context;
 		};
 	};
 
-	mdpe_iommu: qcom,iommu@fd860000 {
-		compatible = "qcom,msm-smmu-v1";
+	venus_iommu: qcom,iommu@fdc84000 {
+		compatible = "qcom,msm-smmu-v2";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		reg = <0xfd860000 0x10000>;
-		qcom,glb-offset = <0xF000>;
-		label = "mdpe_iommu";
+		reg = <0xfdc84000 0x10000
+		       0xfdce0004 0x4>;
+		reg-names = "iommu_base", "clk_base";
+		interrupts = <0 45 0>;
+		vdd-supply = <&gdsc_venus>;
+		qcom,iommu-secure-id = <0>;
+		qcom,needs-alt-core-clk;
+		label = "venus_iommu";
 		status = "disabled";
 
-		qcom,iommu-ctx@fd860000 {
-			reg = <0xfd860000 0x1000>;
-			interrupts = <0 247 0>;
-			qcom,iommu-ctx-mids = <>;
-			label = "mdpe_0";
+		qcom,iommu-bfb-regs =  <0x204c
+					0x2050
+					0x2514
+					0x2540
+					0x256c
+					0x20ac
+					0x215c
+					0x220c
+					0x2314
+					0x2394
+					0x2414
+					0x2008
+					0x200c
+					0x2010
+					0x2014
+					0x2018
+					0x201c
+					0x2020
+					0x2024
+					0x2028
+					0x202c
+					0x2030
+					0x2034
+					0x2038>;
+
+		qcom,iommu-bfb-data =  <0xffffffff
+					0xffffffff
+					0x00000004
+					0x00000008
+					0x00000000
+					0x00000000
+					0x00000094
+					0x000000b4
+					0x0
+					0x94
+					0x114
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0>;
+
+		qcom,iommu-ctx@fdc8c000 {
+			reg = <0xfdc8c000 0x1000>;
+			interrupts = <0 42 0>;
+			qcom,iommu-ctx-sids = <0 1 2 3 4 5>;
+			label = "venus_ns";
 		};
 
-		qcom,iommu-ctx@fd861000 {
-			reg = <0xfd861000 0x1000>;
-			interrupts = <0 247 0>;
-			qcom,iommu-ctx-mids = <>;
-			label = "mdpe_1";
+		qcom,iommu-ctx@fdc8d000 {
+			reg = <0xfdc8d000 0x1000>;
+			interrupts = <0 42 0>;
+			qcom,iommu-ctx-sids = <0x80 0x81 0x82 0x83 0x84 0x85>;
+			label = "venus_cp";
+			qcom,secure-context;
+		};
+
+		qcom,iommu-ctx@fdc8e000 {
+			reg = <0xfdc8e000 0x1000>;
+			interrupts = <0 42 0>;
+			qcom,iommu-ctx-sids = <0xc0 0xc6>;
+			label = "venus_fw";
+			qcom,secure-context;
 		};
 	};
 
-	mdps_iommu: qcom,iommu@fd870000 {
-		compatible = "qcom,msm-smmu-v1";
+	kgsl_iommu: qcom,iommu@fdb10000 {
+		compatible = "qcom,msm-smmu-v2";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		reg = <0xfd870000 0x10000>;
-		qcom,glb-offset = <0xF000>;
-		label = "mdps_iommu";
+		reg = <0xfdb10000 0x10000>;
+		reg-names = "iommu_base";
+		interrupts = <0 38 0>;
+		vdd-supply = <&gdsc_oxili_cx>;
+		qcom,alt-vdd-supply = <&gdsc_oxili_gx>;
+		qcom,needs-alt-core-clk;
+		label = "kgsl_iommu";
 		status = "disabled";
 
-		qcom,iommu-ctx@fd870000 {
-			reg = <0xfd870000 0x1000>;
-			interrupts = <0 247 0>;
-			qcom,iommu-ctx-mids = <>;
-			label = "mdps_0";
-		};
+		qcom,iommu-bfb-regs =  <0x204c
+					0x2050
+					0x2514
+					0x2540
+					0x256c
+					0x20ac
+					0x215c
+					0x220c
+					0x2314
+					0x2394
+					0x2414
+					0x2008>;
 
-		qcom,iommu-ctx@fd871000 {
-			reg = <0xfd871000 0x1000>;
-			interrupts = <0 247 0>;
-			qcom,iommu-ctx-mids = <>;
-			label = "mdps_1";
-		};
-	};
+		qcom,iommu-bfb-data =  <0x00000003
+					0x0
+					0x00000004
+					0x00000010
+					0x00000000
+					0x00000000
+					0x00000001
+					0x00000021
+					0x0
+					0x1
+					0x81
+					0x0>;
 
-	gfx_iommu: qcom,iommu@fd880000 {
-		compatible = "qcom,msm-smmu-v1";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-		reg = <0xfd880000 0x10000>;
-		qcom,glb-offset = <0xF000>;
-		label = "gfx_iommu";
-		status = "disabled";
-
-		qcom,iommu-ctx@fd880000 {
-			reg = <0xfd880000 0x1000>;
+		qcom,iommu-ctx@fdb18000 {
+			reg = <0xfdb18000 0x1000>;
 			interrupts = <0 241 0>;
-			qcom,iommu-ctx-mids = <0 1 2 3 4 5 6 7 8 9 10 11 12 13
-					       14 15>;
+			qcom,iommu-ctx-sids = <0>;
 			label = "gfx3d_user";
 		};
 
-		qcom,iommu-ctx@fd881000 {
-			reg = <0xfd881000 0x1000>;
+		qcom,iommu-ctx@fdb19000 {
+			reg = <0xfdb19000 0x1000>;
 			interrupts = <0 241 0>;
-			qcom,iommu-ctx-mids = <16 17 18 19 20 21 22 23 24 25
-					       26 27 28 29 30 31>;
+			qcom,iommu-ctx-sids = <1>;
 			label = "gfx3d_priv";
 		};
-
-		qcom,iommu-ctx@fd882000 {
-			reg = <0xfd882000 0x1000>;
-			interrupts = <0 241 0>;
-			qcom,iommu-ctx-mids = <>;
-			label = "gfx3d_spare";
-		};
 	};
 
-	vfe_iommu: qcom,iommu@fd890000 {
-		compatible = "qcom,msm-smmu-v1";
+	vfe_iommu: qcom,iommu@fda44000 {
+		compatible = "qcom,msm-smmu-v2";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
-		reg = <0xfd890000 0x10000>;
-		qcom,glb-offset = <0xF000>;
+		reg = <0xfda44000 0x10000>;
+		reg-names = "iommu_base";
+		interrupts = <0 62 0>;
+		vdd-supply = <&gdsc_vfe>;
+		qcom,needs-alt-core-clk;
 		label = "vfe_iommu";
 		status = "disabled";
 
-		qcom,iommu-ctx@fd890000 {
-			reg = <0xfd890000 0x1000>;
+		qcom,iommu-bfb-regs =  <0x204c
+					0x2050
+					0x2514
+					0x2540
+					0x256c
+					0x2314
+					0x2394
+					0x2414
+					0x20ac
+					0x215c
+					0x220c
+					0x2008
+					0x200c
+					0x2010
+					0x2014
+					0x2018
+					0x201c
+					0x2020>;
+
+		qcom,iommu-bfb-data =  <0xffffffff
+					0x00000000
+					0x4
+					0x8
+					0x0
+					0x0
+					0x20
+					0x78
+					0x0
+					0x20
+					0x36
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0
+					0x0>;
+
+		qcom,iommu-ctx@fda4c000 {
+			reg = <0xfda4c000 0x1000>;
 			interrupts = <0 65 0>;
-			qcom,iommu-ctx-mids = <0>;
+			qcom,iommu-ctx-sids = <0>;
 			label = "vfe0";
 		};
 
-		qcom,iommu-ctx@fd891000 {
-			reg = <0xfd891000 0x1000>;
+		qcom,iommu-ctx@fda4d000 {
+			reg = <0xfda4d000 0x1000>;
 			interrupts = <0 65 0>;
-			qcom,iommu-ctx-mids = <1>;
+			qcom,iommu-ctx-sids = <1>;
 			label = "vfe1";
 		};
+
+		qcom,iommu-ctx@fda4e000 {
+			reg = <0xfda4e000 0x1000>;
+			interrupts = <0 65 0>;
+			qcom,iommu-ctx-sids = <2>;
+			label = "cpp";
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/msm-iommu.dtsi b/arch/arm/boot/dts/msm-iommu.dtsi
deleted file mode 100755
index 9bb642d..0000000
--- a/arch/arm/boot/dts/msm-iommu.dtsi
+++ /dev/null
@@ -1,364 +0,0 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-/ {
-	jpeg_iommu: qcom,iommu@fda64000 {
-		compatible = "qcom,msm-smmu-v2";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-		reg = <0xfda64000 0x10000>;
-		reg-names = "iommu_base";
-		interrupts = <0 67 0>;
-		vdd-supply = <&gdsc_jpeg>;
-		qcom,needs-alt-core-clk;
-		label = "jpeg_iommu";
-		status = "disabled";
-
-		qcom,iommu-bfb-regs =  <0x204c
-					0x2050
-					0x2514
-					0x2540
-					0x256c
-					0x2314
-					0x2394
-					0x2414
-					0x20ac
-					0x215c
-					0x220c
-					0x2008
-					0x200c
-					0x2010
-					0x2014>;
-
-		qcom,iommu-bfb-data =  <0x0000ffff
-					0x0
-					0x4
-					0x4
-					0x0
-					0x0
-					0x10
-					0x50
-					0x0
-					0x10
-					0x20
-					0x0
-					0x0
-					0x0
-					0x0>;
-
-		qcom,iommu-ctx@fda6c000 {
-			reg = <0xfda6c000 0x1000>;
-			interrupts = <0 70 0>;
-			qcom,iommu-ctx-sids = <0>;
-			label = "jpeg_enc0";
-		};
-
-		qcom,iommu-ctx@fda6d000 {
-			reg = <0xfda6d000 0x1000>;
-			interrupts = <0 70 0>;
-			qcom,iommu-ctx-sids = <1>;
-			label = "jpeg_enc1";
-		};
-
-		qcom,iommu-ctx@fda6e000 {
-			reg = <0xfda6e000 0x1000>;
-			interrupts = <0 70 0>;
-			qcom,iommu-ctx-sids = <2>;
-			label = "jpeg_dec";
-		};
-	};
-
-	mdp_iommu: qcom,iommu@fd928000 {
-		compatible = "qcom,msm-smmu-v2";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-		reg = <0xfd928000 0x10000>;
-		reg-names = "iommu_base";
-		interrupts = <0 73 0>;
-		vdd-supply = <&gdsc_mdss>;
-		qcom,iommu-secure-id = <1>;
-		label = "mdp_iommu";
-		status = "disabled";
-
-		qcom,iommu-bfb-regs =  <0x204c
-					0x2050
-					0x2514
-					0x2540
-					0x256c
-					0x20ac
-					0x215c
-					0x220c
-					0x2314
-					0x2394
-					0x2414
-					0x2008
-					0x200c
-					0x2010
-					0x2014
-					0x2018
-					0x201c
-					0x2020>;
-
-		qcom,iommu-bfb-data =  <0xffffffff
-					0x0
-					0x00000004
-					0x00000010
-					0x00000000
-					0x00000000
-					0x00000034
-					0x00000044
-					0x0
-					0x34
-					0x74
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0>;
-
-		qcom,iommu-ctx@fd930000 {
-			reg = <0xfd930000 0x1000>;
-			interrupts = <0 47 0>;
-			qcom,iommu-ctx-sids = <0>;
-			label = "mdp_0";
-		};
-
-		qcom,iommu-ctx@fd931000 {
-			reg = <0xfd931000 0x1000>;
-			interrupts = <0 47 0>;
-			qcom,iommu-ctx-sids = <1>;
-			label = "mdp_1";
-			qcom,secure-context;
-		};
-	};
-
-	venus_iommu: qcom,iommu@fdc84000 {
-		compatible = "qcom,msm-smmu-v2";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-		reg = <0xfdc84000 0x10000
-		       0xfdce0004 0x4>;
-		reg-names = "iommu_base", "clk_base";
-		interrupts = <0 45 0>;
-		vdd-supply = <&gdsc_venus>;
-		qcom,iommu-secure-id = <0>;
-		qcom,needs-alt-core-clk;
-		label = "venus_iommu";
-		status = "disabled";
-
-		qcom,iommu-bfb-regs =  <0x204c
-					0x2050
-					0x2514
-					0x2540
-					0x256c
-					0x20ac
-					0x215c
-					0x220c
-					0x2314
-					0x2394
-					0x2414
-					0x2008
-					0x200c
-					0x2010
-					0x2014
-					0x2018
-					0x201c
-					0x2020
-					0x2024
-					0x2028
-					0x202c
-					0x2030
-					0x2034
-					0x2038>;
-
-		qcom,iommu-bfb-data =  <0xffffffff
-					0xffffffff
-					0x00000004
-					0x00000008
-					0x00000000
-					0x00000000
-					0x00000094
-					0x000000b4
-					0x0
-					0x94
-					0x114
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0>;
-
-		qcom,iommu-ctx@fdc8c000 {
-			reg = <0xfdc8c000 0x1000>;
-			interrupts = <0 42 0>;
-			qcom,iommu-ctx-sids = <0 1 2 3 4 5>;
-			label = "venus_ns";
-		};
-
-		qcom,iommu-ctx@fdc8d000 {
-			reg = <0xfdc8d000 0x1000>;
-			interrupts = <0 42 0>;
-			qcom,iommu-ctx-sids = <0x80 0x81 0x82 0x83 0x84 0x85>;
-			label = "venus_cp";
-			qcom,secure-context;
-		};
-
-		qcom,iommu-ctx@fdc8e000 {
-			reg = <0xfdc8e000 0x1000>;
-			interrupts = <0 42 0>;
-			qcom,iommu-ctx-sids = <0xc0 0xc6>;
-			label = "venus_fw";
-			qcom,secure-context;
-		};
-	};
-
-	kgsl_iommu: qcom,iommu@fdb10000 {
-		compatible = "qcom,msm-smmu-v2";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-		reg = <0xfdb10000 0x10000>;
-		reg-names = "iommu_base";
-		interrupts = <0 38 0>;
-		vdd-supply = <&gdsc_oxili_cx>;
-		qcom,alt-vdd-supply = <&gdsc_oxili_gx>;
-		qcom,needs-alt-core-clk;
-		label = "kgsl_iommu";
-		status = "disabled";
-
-		qcom,iommu-bfb-regs =  <0x204c
-					0x2050
-					0x2514
-					0x2540
-					0x256c
-					0x20ac
-					0x215c
-					0x220c
-					0x2314
-					0x2394
-					0x2414
-					0x2008>;
-
-		qcom,iommu-bfb-data =  <0x00000003
-					0x0
-					0x00000004
-					0x00000010
-					0x00000000
-					0x00000000
-					0x00000001
-					0x00000021
-					0x0
-					0x1
-					0x81
-					0x0>;
-
-		qcom,iommu-ctx@fdb18000 {
-			reg = <0xfdb18000 0x1000>;
-			interrupts = <0 241 0>;
-			qcom,iommu-ctx-sids = <0>;
-			label = "gfx3d_user";
-		};
-
-		qcom,iommu-ctx@fdb19000 {
-			reg = <0xfdb19000 0x1000>;
-			interrupts = <0 241 0>;
-			qcom,iommu-ctx-sids = <1>;
-			label = "gfx3d_priv";
-		};
-	};
-
-	vfe_iommu: qcom,iommu@fda44000 {
-		compatible = "qcom,msm-smmu-v2";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges;
-		reg = <0xfda44000 0x10000>;
-		reg-names = "iommu_base";
-		interrupts = <0 62 0>;
-		vdd-supply = <&gdsc_vfe>;
-		qcom,needs-alt-core-clk;
-		label = "vfe_iommu";
-		status = "disabled";
-
-		qcom,iommu-bfb-regs =  <0x204c
-					0x2050
-					0x2514
-					0x2540
-					0x256c
-					0x2314
-					0x2394
-					0x2414
-					0x20ac
-					0x215c
-					0x220c
-					0x2008
-					0x200c
-					0x2010
-					0x2014
-					0x2018
-					0x201c
-					0x2020>;
-
-		qcom,iommu-bfb-data =  <0xffffffff
-					0x00000000
-					0x4
-					0x8
-					0x0
-					0x0
-					0x20
-					0x78
-					0x0
-					0x20
-					0x36
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0
-					0x0>;
-
-		qcom,iommu-ctx@fda4c000 {
-			reg = <0xfda4c000 0x1000>;
-			interrupts = <0 65 0>;
-			qcom,iommu-ctx-sids = <0>;
-			label = "vfe0";
-		};
-
-		qcom,iommu-ctx@fda4d000 {
-			reg = <0xfda4d000 0x1000>;
-			interrupts = <0 65 0>;
-			qcom,iommu-ctx-sids = <1>;
-			label = "vfe1";
-		};
-
-		qcom,iommu-ctx@fda4e000 {
-			reg = <0xfda4e000 0x1000>;
-			interrupts = <0 65 0>;
-			qcom,iommu-ctx-sids = <2>;
-			label = "cpp";
-		};
-	};
-};
diff --git a/arch/arm/boot/dts/msm8226-iommu.dtsi b/arch/arm/boot/dts/msm8226-iommu.dtsi
index 66a7848..d23d324 100644
--- a/arch/arm/boot/dts/msm8226-iommu.dtsi
+++ b/arch/arm/boot/dts/msm8226-iommu.dtsi
@@ -10,7 +10,7 @@
  * GNU General Public License for more details.
  */
 
-/include/ "msm-iommu.dtsi"
+/include/ "msm-iommu-v1.dtsi"
 
 &jpeg_iommu {
 	status = "ok";
diff --git a/arch/arm/boot/dts/msm8610.dtsi b/arch/arm/boot/dts/msm8610.dtsi
index f35bc59..b480f0a 100644
--- a/arch/arm/boot/dts/msm8610.dtsi
+++ b/arch/arm/boot/dts/msm8610.dtsi
@@ -11,7 +11,7 @@
  */
 
 /include/ "skeleton.dtsi"
-/include/ "msm-iommu-v1.dtsi"
+/include/ "msm-iommu-v0.dtsi"
 /include/ "msm8610-ion.dtsi"
 /include/ "msm-gdsc.dtsi"
 /include/ "msm8610-pm.dtsi"
diff --git a/arch/arm/boot/dts/msm8974-iommu.dtsi b/arch/arm/boot/dts/msm8974-v1-iommu.dtsi
old mode 100755
new mode 100644
similarity index 86%
rename from arch/arm/boot/dts/msm8974-iommu.dtsi
rename to arch/arm/boot/dts/msm8974-v1-iommu.dtsi
index 6a88992..c6693e1
--- a/arch/arm/boot/dts/msm8974-iommu.dtsi
+++ b/arch/arm/boot/dts/msm8974-v1-iommu.dtsi
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -10,7 +10,7 @@
  * GNU General Public License for more details.
  */
 
-/include/ "msm-iommu.dtsi"
+/include/ "msm-iommu-v1.dtsi"
 
 &jpeg_iommu {
 	status = "ok";
diff --git a/arch/arm/boot/dts/msm8974-v1.dtsi b/arch/arm/boot/dts/msm8974-v1.dtsi
index e60ab28..5ca4d1e 100644
--- a/arch/arm/boot/dts/msm8974-v1.dtsi
+++ b/arch/arm/boot/dts/msm8974-v1.dtsi
@@ -17,6 +17,7 @@
  */
 
 /include/ "msm8974.dtsi"
+/include/ "msm8974-v1-iommu.dtsi"
 
 / {
 	qcom,msm-imem@fc42b000 {
diff --git a/arch/arm/boot/dts/msm8974-v2.dtsi b/arch/arm/boot/dts/msm8974-v2.dtsi
index 3ee704c..5bf3236 100644
--- a/arch/arm/boot/dts/msm8974-v2.dtsi
+++ b/arch/arm/boot/dts/msm8974-v2.dtsi
@@ -17,6 +17,7 @@
  */
 
 /include/ "msm8974.dtsi"
+/include/ "msm8974-v1-iommu.dtsi"
 
 / {
 	qcom,msm-imem@fe805000 {
diff --git a/arch/arm/boot/dts/msm8974.dtsi b/arch/arm/boot/dts/msm8974.dtsi
index 465ec0d..e7ddb66 100644
--- a/arch/arm/boot/dts/msm8974.dtsi
+++ b/arch/arm/boot/dts/msm8974.dtsi
@@ -12,7 +12,6 @@
 
 /include/ "skeleton.dtsi"
 /include/ "msm8974-pm.dtsi"
-/include/ "msm8974-iommu.dtsi"
 /include/ "msm8974-camera.dtsi"
 /include/ "msm8974-coresight.dtsi"
 /include/ "msm-gdsc.dtsi"