[PATCH v3 2/2] ARM: EXYNOS: Add Gscaler device from DT

Shaik Ameer Basha shaik.ameer at samsung.com
Fri Jul 20 23:08:43 EST 2012


This patch adds,
- 4 Gscaler devices to the DT device list
- Gscaler specific entries to the machine file
- binding documentation for Gscaler entries

Signed-off-by: Abhilash Kesavan <a.kesavan at samsung.com>
Signed-off-by: Leela Krishna Amudala <l.krishna at samsung.com>
Signed-off-by: Shaik Ameer Basha <shaik.ameer at samsung.com>
---
 .../devicetree/bindings/media/exynos5-gsc.txt      |   32 ++++++++++++++++++++
 arch/arm/boot/dts/exynos5250.dtsi                  |   28 +++++++++++++++++
 arch/arm/mach-exynos/include/mach/map.h            |    3 ++
 arch/arm/mach-exynos/mach-exynos5-dt.c             |    8 +++++
 4 files changed, 71 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/exynos5-gsc.txt

diff --git a/Documentation/devicetree/bindings/media/exynos5-gsc.txt b/Documentation/devicetree/bindings/media/exynos5-gsc.txt
new file mode 100644
index 0000000..1cb4ea0
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/exynos5-gsc.txt
@@ -0,0 +1,32 @@
+* Samsung Exynos5 Gscaler device
+
+Gscaler is used for scaling and color space conversion on EXYNOS5 SoCs.
+
+Required properties:
+- compatible: should be "samsung,exynos5250-gsc"
+- reg: should contain Gscaler physical address location and length.
+- interrupts: should contain Gscaler interrupt number
+
+Example:
+
+gsc_0:  gsc at 0x13e00000 {
+	compatible = "samsung,exynos5250-gsc";
+	reg = <0x13e00000 0x1000>;
+	interrupts = <0 85 0>;
+};
+
+Aliases:
+Each Gscaler node should have a numbered alias in the aliases node,
+in the form of gscN, N = 0...3. Gscaler driver uses these aliases
+to retrieve the device IDs using "of_alias_get_id()" call.
+
+Example:
+
+aliases {
+	gsc0 =&gsc_0;
+	gsc1 =&gsc_1;
+	gsc2 =&gsc_2;
+	gsc3 =&gsc_3;
+};
+
+
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index a3a2eb2..ad6c3c5 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -27,6 +27,10 @@
 		spi0 = &spi_0;
 		spi1 = &spi_1;
 		spi2 = &spi_2;
+		gsc0 = &gsc_0;
+		gsc1 = &gsc_1;
+		gsc2 = &gsc_2;
+		gsc3 = &gsc_3;
 	};
 
 	gic:interrupt-controller at 10481000 {
@@ -460,4 +464,28 @@
 			#gpio-cells = <4>;
 		};
 	};
+
+	gsc_0:  gsc at 0x13e00000 {
+		compatible = "samsung,exynos5250-gsc";
+		reg = <0x13e00000 0x1000>;
+		interrupts = <0 85 0>;
+	};
+
+	gsc_1:  gsc at 0x13e10000 {
+		compatible = "samsung,exynos5250-gsc";
+		reg = <0x13e10000 0x1000>;
+		interrupts = <0 86 0>;
+	};
+
+	gsc_2:  gsc at 0x13e20000 {
+		compatible = "samsung,exynos5250-gsc";
+		reg = <0x13e20000 0x1000>;
+		interrupts = <0 87 0>;
+	};
+
+	gsc_3:  gsc at 0x13e30000 {
+		compatible = "samsung,exynos5250-gsc";
+		reg = <0x13e30000 0x1000>;
+		interrupts = <0 88 0>;
+	};
 };
diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h
index c72b675..217e470 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -121,6 +121,9 @@
 #define EXYNOS4_PA_SYSMMU_MFC_L		0x13620000
 #define EXYNOS4_PA_SYSMMU_MFC_R		0x13630000
 
+/* x = 0...3 */
+#define EXYNOS5_PA_GSC(x)		(0x13e00000 + ((x) * 0x10000))
+
 #define EXYNOS5_PA_SYSMMU_MDMA1		0x10A40000
 #define EXYNOS5_PA_SYSMMU_SSS		0x10A50000
 #define EXYNOS5_PA_SYSMMU_2D		0x10A60000
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index ef770bc..fd8f1ca 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -56,6 +56,14 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {
 	OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA0, "dma-pl330.0", NULL),
 	OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.1", NULL),
 	OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_MDMA1, "dma-pl330.2", NULL),
+	OF_DEV_AUXDATA("samsung,exynos5250-gsc", EXYNOS5_PA_GSC(0),
+				"exynos-gsc.0", NULL),
+	OF_DEV_AUXDATA("samsung,exynos5250-gsc", EXYNOS5_PA_GSC(1),
+				"exynos-gsc.1", NULL),
+	OF_DEV_AUXDATA("samsung,exynos5250-gsc", EXYNOS5_PA_GSC(2),
+				"exynos-gsc.2", NULL),
+	OF_DEV_AUXDATA("samsung,exynos5250-gsc", EXYNOS5_PA_GSC(3),
+				"exynos-gsc.3", NULL),
 	{},
 };
 
-- 
1.7.0.4



More information about the devicetree-discuss mailing list