From eca91d4d36d78c3176480742532b247fd3d72fe0 Mon Sep 17 00:00:00 2001
From: Simon Shields <simon@lineageos.org>
Date: Sat, 13 Jan 2018 14:17:26 +1100
Subject: [PATCH 038/146] ARM: dts: add gpu node to exynos4

v2 (Qiang Yu):
  add vender string to exynos4 mali gpu

Based off a similar commit for the Samsung Mali driver by
Tobias Jakobi <tjakobi@math.uni-bielefeld.de>

Signed-off-by: Simon Shields <simon@lineageos.org>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
---
 arch/arm/boot/dts/exynos4.dtsi | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 6085e92ac2d7..362461657136 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -730,6 +730,39 @@
 			status = "disabled";
 		};
 
+		gpu: gpu@13000000 {
+			compatible = "samsung,exynos4-mali", "arm,mali-400";
+			reg = <0x13000000 0x30000>;
+			power-domains = <&pd_g3d>;
+
+			/*
+			 * Propagate VPLL output clock to SCLK_G3D and
+			 * ensure that the DIV_G3D divider is 1.
+			 */
+			assigned-clocks = <&clock CLK_MOUT_G3D1>, <&clock CLK_MOUT_G3D>,
+					  <&clock CLK_FOUT_VPLL>, <&clock CLK_SCLK_G3D>;
+			assigned-clock-parents = <&clock CLK_SCLK_VPLL>,
+						 <&clock CLK_MOUT_G3D1>;
+			assigned-clock-rates = <0>, <0>, <160000000>, <160000000>;
+
+			clocks = <&clock CLK_SCLK_G3D>, <&clock CLK_G3D>;
+			clock-names = "bus", "core";
+
+			interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "ppmmu0", "ppmmu1", "ppmmu2", "ppmmu3",
+					  "gpmmu", "pp0", "pp1", "pp2", "pp3", "gp";
+			status = "disabled";
+		};
+
 		tmu: tmu@100c0000 {
 			interrupt-parent = <&combiner>;
 			reg = <0x100C0000 0x100>;
-- 
2.17.1

