Skip to contentSkip to conversation

ARM/arm64: dts: exynos: Add support for Mali

PATCH In review Krzysztof Kozlowski 3 participants 15 messages Jun 18, 2019 – Jun 19, 2019

Subsystems (7)
lore
Share & tools
lore

Krzysztof Kozlowski

author maintainer
#0 lore raw

cover ARM/arm64: dts: exynos: Add support for Mali

Hi,

Inspired by patch from Joseph Kogut [1], let's add support for Mali GPUs to most of other boards. However it was tested only on Odroid U3 (Exynos4412) and not fully because requirement of special Mesa drivers with Lima support.

Even without tests it brings full description of hardware and replaces some out-of-tree downstream code (e.g. in Tizen).

Comments and tests are welcomed.

[1] https://patchwork.kernel.org/patch/10996887/

Best regards,
Krzysztof

Krzysztof Kozlowski (10):
dt-bindings: gpu: mali: Add Samsung compatibles for Midgard and Utgard
clk: samsung: Add bus clock for GPU/G3D on Exynos4412
ARM: dts: exynos: Fix language typo and indentation
ARM: dts: exynos: Add GPU/Mali 400 node to Exynos3250
ARM: dts: exynos: Add GPU/Mali 400 node to Exynos4
arm64: dts: exynos: Add GPU/Mali T760 node to Exynos5433
arm64: dts: exynos: Add GPU/Mali T760 node to Exynos7
ARM: multi_v7_defconfig: Enable Panfrost and LIMA drivers
ARM: exynos_defconfig: Enable Panfrost and LIMA drivers
arm64: defconfig: Enable Panfrost driver

 .../bindings/gpu/arm,mali-midgard.txt         |  1 +
 .../bindings/gpu/arm,mali-utgard.txt          |  1 +
 arch/arm/boot/dts/exynos3250-artik5.dtsi      |  5 ++
 arch/arm/boot/dts/exynos3250-monk.dts         |  5 ++
 arch/arm/boot/dts/exynos3250-rinato.dts       |  5 ++
 arch/arm/boot/dts/exynos3250.dtsi             | 33 ++++++++++++
 arch/arm/boot/dts/exynos4.dtsi                | 29 +++++++++++
 arch/arm/boot/dts/exynos4210-origen.dts       |  5 ++
 arch/arm/boot/dts/exynos4210-trats.dts        |  4 ++
 .../boot/dts/exynos4210-universal_c210.dts    |  5 ++
 arch/arm/boot/dts/exynos4210.dtsi             | 36 +++++++++++--
 .../boot/dts/exynos4412-itop-scp-core.dtsi    |  5 ++
 arch/arm/boot/dts/exynos4412-midas.dtsi       |  5 ++
 .../boot/dts/exynos4412-odroid-common.dtsi    |  5 ++
 arch/arm/boot/dts/exynos4412.dtsi             | 32 ++++++++++++
 arch/arm/configs/exynos_defconfig             |  3 +-
 arch/arm/configs/multi_v7_defconfig           |  3 +-
 .../dts/exynos/exynos5433-tm2-common.dtsi     |  5 ++
 arch/arm64/boot/dts/exynos/exynos5433.dtsi    | 51 +++++++++++++++++++
 .../boot/dts/exynos/exynos7-espresso.dts      |  5 ++
 arch/arm64/boot/dts/exynos/exynos7.dtsi       | 11 ++++
 arch/arm64/configs/defconfig                  |  2 +-
 drivers/clk/samsung/clk-exynos4.c             |  1 +
 include/dt-bindings/clock/exynos4.h           |  1 +
 24 files changed, 251 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH 1/10 dt-bindings: gpu: mali: Add Samsung compatibles for Midgard and Utgard

Add vendor compatibles for specific implementation of Mali Utgard (Exynos3250, Exynos4-family) and Midgard (Exynos5433, Exynos7).

---
 Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 +
 Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt  | 1 +
 2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +1 -0
index e5ad3b2afe17..9b298edec5b2 100644
@@ -17,6 +17,7 @@ Required properties:
   * which must be preceded by one of the following vendor specifics:
     + "allwinner,sun50i-h6-mali"
     + "amlogic,meson-gxm-mali"
+    + "samsung,exynos5433-mali"
     + "rockchip,rk3288-mali"
     + "rockchip,rk3399-mali"
 
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +1 -0
index ae63f09fda7d..519018cb860b 100644
@@ -17,6 +17,7 @@ Required properties:
       + amlogic,meson8b-mali
       + amlogic,meson-gxbb-mali
       + amlogic,meson-gxl-mali
+      + samsung,exynos3250-mali
       + rockchip,rk3036-mali
       + rockchip,rk3066-mali
       + rockchip,rk3188-mali
Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

Re: [RFT 01/10] dt-bindings: gpu: mali: Add Samsung compatibles for Midgard and Utgard

Hi Krzysztof,

Quoted 26 lines · Krzysztof Kozlowski

Add vendor compatibles for specific implementation of Mali Utgard (Exynos3250, Exynos4-family) and Midgard (Exynos5433, Exynos7).

---
  Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 +
  Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt  | 1 +
  2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +1 -0
index e5ad3b2afe17..9b298edec5b2 100644
@@ -17,6 +17,7 @@ Required properties:
    * which must be preceded by one of the following vendor specifics:
      + "allwinner,sun50i-h6-mali"
      + "amlogic,meson-gxm-mali"
+    + "samsung,exynos5433-mali"
      + "rockchip,rk3288-mali"
      + "rockchip,rk3399-mali"
 
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +0 -0
index ae63f09fda7d..519018cb860b 100644

Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt Required properties: · line 20

Quoted 4 lines
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +1 -0
@@ -17,6 +17,7 @@ Required properties:
        + amlogic,meson8b-mali
        + amlogic,meson-gxbb-mali
        + amlogic,meson-gxl-mali
+      + samsung,exynos3250-mali

I would prefer 'samsung,exynos4-mali', because historically Exynos4 was the first SoC with Mali400 and such prefix is already used for many hw blocks.

Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt Required properties: · line 23

Quoted 3 lines
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +0 -0
        + rockchip,rk3036-mali
        + rockchip,rk3066-mali
        + rockchip,rk3188-mali

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
author maintainer
#3 lore raw

Re: [RFT 01/10] dt-bindings: gpu: mali: Add Samsung compatibles for Midgard and Utgard

Quoted 25 lines · Marek Szyprowski

Hi Krzysztof,

Quoted 21 lines · Krzysztof Kozlowski

Add vendor compatibles for specific implementation of Mali Utgard (Exynos3250, Exynos4-family) and Midgard (Exynos5433, Exynos7).

---
  Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 +
  Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt  | 1 +
  2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +1 -0
index e5ad3b2afe17..9b298edec5b2 100644
@@ -17,6 +17,7 @@ Required properties:
    * which must be preceded by one of the following vendor specifics:
      + "allwinner,sun50i-h6-mali"
      + "amlogic,meson-gxm-mali"
+    + "samsung,exynos5433-mali"
      + "rockchip,rk3288-mali"
      + "rockchip,rk3399-mali"
 
Quoted 12 lines

Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt Required properties: · line 20

Quoted 9 lines
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +1 -0
index ae63f09fda7d..519018cb860b 100644
@@ -17,6 +17,7 @@ Required properties:
        + amlogic,meson8b-mali
        + amlogic,meson-gxbb-mali
        + amlogic,meson-gxl-mali
+      + samsung,exynos3250-mali

I would prefer 'samsung,exynos4-mali', because historically Exynos4 was the first SoC with Mali400 and such prefix is already used for many hw blocks.

Then maybe samsung,exynos4210-mali so it will not be confused with Exynos4415?

Best regards,
Krzysztof
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Re: [RFT 01/10] dt-bindings: gpu: mali: Add Samsung compatibles for Midgard and Utgard

Hi Krzysztof,

Quoted 37 lines · Krzysztof Kozlowski
Quoted 24 lines · Marek Szyprowski

Hi Krzysztof,

Quoted 21 lines · Krzysztof Kozlowski

Add vendor compatibles for specific implementation of Mali Utgard (Exynos3250, Exynos4-family) and Midgard (Exynos5433, Exynos7).

---
   Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 +
   Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt  | 1 +
   2 files changed, 2 insertions(+)
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +1 -0
index e5ad3b2afe17..9b298edec5b2 100644
@@ -17,6 +17,7 @@ Required properties:
     * which must be preceded by one of the following vendor specifics:
       + "allwinner,sun50i-h6-mali"
       + "amlogic,meson-gxm-mali"
+    + "samsung,exynos5433-mali"
       + "rockchip,rk3288-mali"
       + "rockchip,rk3399-mali"
 
Quoted 12 lines

Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt Required properties: · line 20

Quoted 9 lines
Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt +1 -0
index ae63f09fda7d..519018cb860b 100644
@@ -17,6 +17,7 @@ Required properties:
         + amlogic,meson8b-mali
         + amlogic,meson-gxbb-mali
         + amlogic,meson-gxl-mali
+      + samsung,exynos3250-mali

I would prefer 'samsung,exynos4-mali', because historically Exynos4 was the first SoC with Mali400 and such prefix is already used for many hw blocks.

Quoted 1 line

Then maybe samsung,exynos4210-mali so it will not be confused with Exynos4415?

Fine for me. Exynos4415 also has Mali400, so don't see any issue here.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
author maintainer
#5 lore raw

PATCH 2/10 clk: samsung: Add bus clock for GPU/G3D on Exynos4412

In reply to Krzysztof Kozlowski

Add ID and gate for bus clock for GPU (Mali 400) on Exynos4412.

---
 drivers/clk/samsung/clk-exynos4.c   | 1 +
 include/dt-bindings/clock/exynos4.h | 1 +
 2 files changed, 2 insertions(+)
drivers/clk/samsung/clk-exynos4.c +1 -0
index d2a68a792a21..ed4af7da9c4f 100644
@@ -961,6 +961,7 @@ static const struct samsung_gate_clock exynos4210_gate_clks[] __initconst = {
 
 /* list of gate clocks supported in exynos4x12 soc */
 static const struct samsung_gate_clock exynos4x12_gate_clks[] __initconst = {
+	GATE(CLK_ASYNC_G3D, "async_g3d", "aclk200", GATE_IP_LEFTBUS, 6, 0, 0),
 	GATE(CLK_AUDSS, "audss", "sclk_epll", E4X12_GATE_IP_MAUDIO, 0, 0, 0),
 	GATE(CLK_MDNIE0, "mdnie0", "aclk160", GATE_IP_LCD0, 2, 0, 0),
 	GATE(CLK_ROTATOR, "rotator", "aclk200", E4X12_GATE_IP_IMAGE, 1, 0, 0),
include/dt-bindings/clock/exynos4.h +1 -0
index a0439ce8e8d3..88ec3968b90a 100644
@@ -187,6 +187,7 @@
 #define CLK_MIPI_HSI		349 /* Exynos4210 only */
 #define CLK_PIXELASYNCM0	351
 #define CLK_PIXELASYNCM1	352
+#define CLK_ASYNC_G3D		353 /* Exynos4x12 only */
 #define CLK_PWM_ISP_SCLK	379 /* Exynos4x12 only */
 #define CLK_SPI0_ISP_SCLK	380 /* Exynos4x12 only */
 #define CLK_SPI1_ISP_SCLK	381 /* Exynos4x12 only */
Signature · 1 line
2.17.1
#6 lore raw

Re: [RFT 02/10] clk: samsung: Add bus clock for GPU/G3D on Exynos4412

Quoted 1 line · Krzysztof Kozlowski

Add ID and gate for bus clock for GPU (Mali 400) on Exynos4412.

Patch applied to clk/samsung tree, thanks.

author maintainer
#7 lore raw

PATCH 3/10 ARM: dts: exynos: Fix language typo and indentation

In reply to Krzysztof Kozlowski

Correct language typo and wrong indentation.

---
 arch/arm/boot/dts/exynos4210.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/exynos4210.dtsi +4 -4
index b491c345b2e8..ea0e043cd2b4 100644
@@ -8,7 +8,7 @@
  *		www.linaro.org
  *
  * Samsung's Exynos4210 SoC device nodes are listed in this file. Exynos4210
- * based board files can include this file and provide values for board specfic
+ * based board files can include this file and provide values for board specific
  * bindings.
  *
  * Note: This file does not include device nodes for all the controllers in
@@ -381,13 +381,13 @@
 
 			trips {
 				cpu_alert0: cpu-alert-0 {
-				temperature = <85000>; /* millicelsius */
+					temperature = <85000>; /* millicelsius */
 				};
 				cpu_alert1: cpu-alert-1 {
-				temperature = <100000>; /* millicelsius */
+					temperature = <100000>; /* millicelsius */
 				};
 				cpu_alert2: cpu-alert-2 {
-				temperature = <110000>; /* millicelsius */
+					temperature = <110000>; /* millicelsius */
 				};
 			};
 		};
Signature · 1 line
2.17.1
author maintainer
#8 lore raw

PATCH 4/10 ARM: dts: exynos: Add GPU/Mali 400 node to Exynos3250

In reply to Krzysztof Kozlowski

Add nodes for GPU (Mali 400) to Exynos3250. This is still limited and not tested:
1. No dynamic voltage and frequency scaling,
2. Not sure what to do with CLK_G3D clock responsible for gating entire IP block (it is now being disabled as unused).

---
 arch/arm/boot/dts/exynos3250-artik5.dtsi |  5 ++++
 arch/arm/boot/dts/exynos3250-monk.dts    |  5 ++++
 arch/arm/boot/dts/exynos3250-rinato.dts  |  5 ++++
 arch/arm/boot/dts/exynos3250.dtsi        | 33 ++++++++++++++++++++++++
 4 files changed, 48 insertions(+)
arch/arm/boot/dts/exynos3250-artik5.dtsi +5 -0
index ace50e194a45..dee35e3a5c4b 100644
@@ -59,6 +59,11 @@
 	cpu0-supply = <&buck2_reg>;
 };
 
+&gpu {
+	mali-supply = <&buck3_reg>;
+	status = "okay";
+};
+
 &i2c_0 {
 	#address-cells = <1>;
 	#size-cells = <0>;
arch/arm/boot/dts/exynos3250-monk.dts +5 -0
index e25765500e99..248bd372fe70 100644
@@ -172,6 +172,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&buck3_reg>;
+	status = "okay";
+};
+
 &hsotg {
 	vusb_d-supply = <&ldo15_reg>;
 	vusb_a-supply = <&ldo12_reg>;
arch/arm/boot/dts/exynos3250-rinato.dts +5 -0
index 7479993755da..86c26a4edfd7 100644
@@ -244,6 +244,11 @@
 	};
 };
 
+&gpu {
+	mali-supply = <&buck3_reg>;
+	status = "okay";
+};
+
 &i2c_0 {
 	#address-cells = <1>;
 	#size-cells = <0>;
arch/arm/boot/dts/exynos3250.dtsi +33 -0
index 8ce3a7786b19..c5f37618f329 100644
@@ -126,6 +126,39 @@
 		};
 	};
 
+	gpu: gpu@13000000 {
+		compatible = "samsung,exynos3250-mali", "arm,mali-400";
+		reg = <0x13000000 0x10000>;
+		interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 179 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "gp",
+				  "gpmmu",
+				  "pp0",
+				  "ppmmu0",
+				  "pp1",
+				  "ppmmu1",
+				  "pp2",
+				  "ppmmu2",
+				  "pp3",
+				  "ppmmu3",
+				  "pmu";
+		clocks = <&cmu CLK_ASYNC_G3D>,
+			 <&cmu CLK_SCLK_G3D>;
+		clock-names = "bus", "core";
+		power-domains = <&pd_g3d>;
+		status = "disabled";
+		/* TODO: operating points for DVFS */
+	};
+
 	pmu {
 		compatible = "arm,cortex-a7-pmu";
 		interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
Signature · 1 line
2.17.1
author maintainer
#9 lore raw

PATCH 5/10 ARM: dts: exynos: Add GPU/Mali 400 node to Exynos4

In reply to Krzysztof Kozlowski

Add nodes for GPU (Mali 400) to Exynos4210 and Exynos4412. Describe the GPU as much as possible however still few elements are missing:
1. Exynos4210 bus clock is not described in hardware manual therefore the IP gate clock was provided,
2. Exynos4412: Not sure what to do with CLK_G3D clock responsible for gating entire IP block (it is now being disabled as unused),
3. Regulator supplies on Trats board.

Limited testing on Odroid U3 (Exynos4412).

---
 arch/arm/boot/dts/exynos4.dtsi                | 29 +++++++++++++++++
 arch/arm/boot/dts/exynos4210-origen.dts       |  5 +++
 arch/arm/boot/dts/exynos4210-trats.dts        |  4 +++
 .../boot/dts/exynos4210-universal_c210.dts    |  5 +++
 arch/arm/boot/dts/exynos4210.dtsi             | 28 ++++++++++++++++
 .../boot/dts/exynos4412-itop-scp-core.dtsi    |  5 +++
 arch/arm/boot/dts/exynos4412-midas.dtsi       |  5 +++
 .../boot/dts/exynos4412-odroid-common.dtsi    |  5 +++
 arch/arm/boot/dts/exynos4412.dtsi             | 32 +++++++++++++++++++
 9 files changed, 118 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +29 -0
index 36ccf227434d..112a4fb8e5dd 100644
@@ -51,6 +51,35 @@
 		serial3 = &serial_3;
 	};
 
+	gpu: gpu@13000000 {
+		compatible = "samsung,exynos3250-mali", "arm,mali-400";
+		reg = <0x13000000 0x10000>;
+		interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "gp",
+				  "gpmmu",
+				  "pp0",
+				  "ppmmu0",
+				  "pp1",
+				  "ppmmu1",
+				  "pp2",
+				  "ppmmu2",
+				  "pp3",
+				  "ppmmu3",
+				  "pmu";
+		power-domains = <&pd_g3d>;
+		status = "disabled";
+	};
+
 	pmu: pmu {
 		compatible = "arm,cortex-a9-pmu";
 		interrupt-parent = <&combiner>;
arch/arm/boot/dts/exynos4210-origen.dts +5 -0
index 36b1edea254a..0d1e1a9c2f6e 100644
@@ -132,6 +132,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&buck3_reg>;
+	status = "okay";
+};
+
 &hsotg {
 	vusb_d-supply = <&ldo3_reg>;
 	vusb_a-supply = <&ldo8_reg>;
arch/arm/boot/dts/exynos4210-trats.dts +4 -0
index 6882480dbaf7..7c39dd1c4d3a 100644
@@ -239,6 +239,10 @@
 	status = "okay";
 };
 
+&gpu {
+	status = "okay";
+};
+
 &hsotg {
 	vusb_d-supply = <&vusb_reg>;
 	vusb_a-supply = <&vusbdac_reg>;
arch/arm/boot/dts/exynos4210-universal_c210.dts +5 -0
index bf092e97e14f..82a8b5449978 100644
@@ -262,6 +262,11 @@
 	};
 };
 
+&gpu {
+	mali-supply = <&buck2_reg>;
+	status = "okay";
+};
+
 &hdmi {
 	hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
 	pinctrl-names = "default";
arch/arm/boot/dts/exynos4210.dtsi +28 -0
index ea0e043cd2b4..3a1cd4be9ca1 100644
@@ -449,6 +449,34 @@
 	samsung,lcd-wb;
 };
 
+&gpu {
+	/*
+	 * CLK_G3D is not actually bus clock but a IP-level clock.
+	 * The bus clock is not described in hardware manual.
+	 */
+	clocks = <&clock CLK_G3D>,
+		 <&clock CLK_SCLK_G3D>;
+	clock-names = "bus", "core";
+	operating-points-v2 = <&gpu_opp_table>;
+
+	gpu_opp_table: opp_table {
+		compatible = "operating-points-v2";
+
+		opp-160000000 {
+			opp-hz = /bits/ 64 <160000000>;
+			opp-microvolt = <950000>;
+		};
+		opp-267000000 {
+			opp-hz = /bits/ 64 <267000000>;
+			opp-microvolt = <1050000>;
+		};
+		opp-330000000 {
+			opp-hz = /bits/ 64 <330000000>;
+			opp-microvolt = <1100000>;
+		};
+	};
+};
+
 &mdma1 {
 	power-domains = <&pd_lcd0>;
 };
arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi +5 -0
index 0038465f38f1..462a5409b1de 100644
@@ -115,6 +115,11 @@
 	cpu0-supply = <&buck2_reg>;
 };
 
+&gpu {
+	mali-supply = <&buck4_reg>;
+	status = "okay";
+};
+
 &hsotg {
 	vusb_d-supply = <&ldo15_reg>;
 	vusb_a-supply = <&ldo12_reg>;
arch/arm/boot/dts/exynos4412-midas.dtsi +5 -0
index 4c15cb616cdf..83be3a797411 100644
@@ -453,6 +453,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&buck4_reg>;
+	status = "okay";
+};
+
 &hdmi {
 	hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
 	pinctrl-names = "default";
arch/arm/boot/dts/exynos4412-odroid-common.dtsi +5 -0
index 08d3a0a7b4eb..ea55f377d17c 100644
@@ -229,6 +229,11 @@
 	assigned-clock-rates = <0>, <176000000>;
 };
 
+&gpu {
+	mali-supply = <&buck4_reg>;
+	status = "okay";
+};
+
 &hdmi {
 	hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
 	pinctrl-names = "default";
arch/arm/boot/dts/exynos4412.dtsi +32 -0
index e5c041ec0756..e8dbad3c36d8 100644
@@ -716,6 +716,38 @@
 	cpu-offset = <0x4000>;
 };
 
+&gpu {
+	clocks = <&clock CLK_ASYNC_G3D>,
+		 <&clock CLK_SCLK_G3D>;
+	clock-names = "bus", "core";
+	operating-points-v2 = <&gpu_opp_table>;
+
+	gpu_opp_table: opp_table {
+		compatible = "operating-points-v2";
+
+		opp-100000000 {
+			opp-hz = /bits/ 64 <100000000>;
+			opp-microvolt = <875000>;
+		};
+		opp-160000000 {
+			opp-hz = /bits/ 64 <160000000>;
+			opp-microvolt = <875000>;
+		};
+		opp-267000000 {
+			opp-hz = /bits/ 64 <267000000>;
+			opp-microvolt = <900000>;
+		};
+		opp-350000000 {
+			opp-hz = /bits/ 64 <350000000>;
+			opp-microvolt = <950000>;
+		};
+		opp-440000000 {
+			opp-hz = /bits/ 64 <440000000>;
+			opp-microvolt = <1025000>;
+		};
+	};
+};
+
 &hdmi {
 	compatible = "samsung,exynos4212-hdmi";
 };
Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author maintainer
#10 lore raw

PATCH 6/10 arm64: dts: exynos: Add GPU/Mali T760 node to Exynos5433

In reply to Krzysztof Kozlowski

Add nodes for GPU (Mali T760) to Exynos5433. Missing element is the cooling device. Not tested on HW.

---
 .../dts/exynos/exynos5433-tm2-common.dtsi     |  5 ++
 arch/arm64/boot/dts/exynos/exynos5433.dtsi    | 51 +++++++++++++++++++
 2 files changed, 56 insertions(+)
arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi +5 -0
index d2de16645e10..6f90b0e62cba 100644
@@ -350,6 +350,11 @@
 	pinctrl-0 = <&te_irq>;
 };
 
+&gpu {
+	mali-supply = <&buck6_reg>;
+	status = "okay";
+};
+
 &hdmi {
 	hpd-gpios = <&gpa3 0 GPIO_ACTIVE_HIGH>;
 	status = "okay";
arch/arm64/boot/dts/exynos/exynos5433.dtsi +51 -0

57 lines not on this page · raw message

Signature · 1 line
2.17.1
author maintainer
#11 lore raw

PATCH 7/10 arm64: dts: exynos: Add GPU/Mali T760 node to Exynos7

In reply to Krzysztof Kozlowski

Add nodes for GPU (Mali T760) to Exynos7. Current support for Exynos7 misses a lot, including proper clocks, power domains, frequency and voltage scaling and cooling. However this still can provide basic GPU description. Not tested on HW.

---
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts |  5 +++++
 arch/arm64/boot/dts/exynos/exynos7.dtsi         | 11 +++++++++++
 2 files changed, 16 insertions(+)
arch/arm64/boot/dts/exynos/exynos7-espresso.dts +5 -0
index 00dd89b92b42..080e0f56e108 100644
@@ -59,6 +59,11 @@
 	clock-frequency = <24000000>;
 };
 
+&gpu {
+	mali-supply = <&buck6_reg>;
+	status = "okay";
+};
+
 &serial_2 {
 	status = "okay";
 };
arch/arm64/boot/dts/exynos/exynos7.dtsi +11 -0
index 077d23478901..bcb9d8cee267 100644
@@ -78,6 +78,17 @@
 		};
 	};
 
+	gpu: gpu@14ac0000 {
+		compatible = "samsung,exynos5433-mali", "arm,mali-t760";
+		reg = <0x14ac0000 0x5000>;
+		interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "job", "mmu", "gpu";
+		status = "disabled";
+		/* TODO: operating points for DVFS, cooling device */
+	};
+
 	psci {
 		compatible = "arm,psci-0.2";
 		method = "smc";
Signature · 1 line
2.17.1
author maintainer
#12 lore raw

PATCH 8/10 ARM: multi_v7_defconfig: Enable Panfrost and LIMA drivers

In reply to Krzysztof Kozlowski

Enable support for Mali GPU with Panfrost and LIMA drivers. Most of Exynos chipsets come with Mali GPUs:
1. Mali 400 (Exynos3250, Exynos4210, Exynos4412),
2. Mali T7xx (Exynos542x).

As Mali GPU is quite popular among ARM vendors, other platforms will benefit as well.

---
 arch/arm/configs/multi_v7_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/configs/multi_v7_defconfig +2 -1
index 6b748f214eae..268161911fc9 100644
@@ -656,6 +656,8 @@ CONFIG_DRM_VC4=m
 CONFIG_DRM_ETNAVIV=m
 CONFIG_DRM_MXSFB=m
 CONFIG_DRM_PL111=m
+CONFIG_DRM_LIMA=m
+CONFIG_DRM_PANFROST=m
 CONFIG_FB_EFI=y
 CONFIG_FB_WM8505=y
 CONFIG_FB_SH_MOBILE_LCDC=y
@@ -940,7 +942,6 @@ CONFIG_ARCH_TEGRA_2x_SOC=y
 CONFIG_ARCH_TEGRA_3x_SOC=y
 CONFIG_ARCH_TEGRA_114_SOC=y
 CONFIG_ARCH_TEGRA_124_SOC=y
-CONFIG_PM_DEVFREQ=y
 CONFIG_ARM_TEGRA_DEVFREQ=m
 CONFIG_TI_AEMIF=y
 CONFIG_IIO=y
Signature · 1 line
2.17.1
author maintainer
#13 lore raw

PATCH 9/10 ARM: exynos_defconfig: Enable Panfrost and LIMA drivers

In reply to Krzysztof Kozlowski

Enable support for Mali GPU with Panfrost and LIMA drivers. Most of Exynos chipsets come with Mali GPUs:
1. Mali 400 (Exynos3250, Exynos4210, Exynos4412),
2. Mali T7xx (Exynos542x).

---
 arch/arm/configs/exynos_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/configs/exynos_defconfig +2 -1
index 8d08eed99aa1..f140532ddca7 100644
@@ -212,6 +212,8 @@ CONFIG_DRM_NXP_PTN3460=y
 CONFIG_DRM_PARADE_PS8622=y
 CONFIG_DRM_SII9234=y
 CONFIG_DRM_TOSHIBA_TC358764=y
+CONFIG_DRM_LIMA=y
+CONFIG_DRM_PANFROST=y
 CONFIG_LCD_CLASS_DEVICE=y
 CONFIG_LCD_PLATFORM=y
 CONFIG_BACKLIGHT_PWM=y
@@ -284,7 +286,6 @@ CONFIG_CROS_EC_SPI=y
 CONFIG_COMMON_CLK_MAX77686=y
 CONFIG_COMMON_CLK_S2MPS11=y
 CONFIG_EXYNOS_IOMMU=y
-CONFIG_PM_DEVFREQ=y
 CONFIG_DEVFREQ_GOV_PERFORMANCE=y
 CONFIG_DEVFREQ_GOV_POWERSAVE=y
 CONFIG_DEVFREQ_GOV_USERSPACE=y
Signature · 1 line
2.17.1
author maintainer
#14 lore raw

PATCH 10/10 arm64: defconfig: Enable Panfrost driver

In reply to Krzysztof Kozlowski

Enable support for Mali GPU with Panfrost driver, e.g. for Exynos5433 and Exynos7 (having Mali T760).

---
 arch/arm64/configs/defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/configs/defconfig +1 -1
index 6b4f5cf23324..972b17239f13 100644
@@ -517,6 +517,7 @@ CONFIG_DRM_HISI_HIBMC=m
 CONFIG_DRM_HISI_KIRIN=m
 CONFIG_DRM_MESON=m
 CONFIG_DRM_PL111=m
+CONFIG_DRM_PANFROST=m
 CONFIG_FB=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_BACKLIGHT_GENERIC=m
@@ -717,7 +718,6 @@ CONFIG_ARCH_TEGRA_194_SOC=y
 CONFIG_ARCH_K3_AM6_SOC=y
 CONFIG_SOC_TI=y
 CONFIG_TI_SCI_PM_DOMAINS=y
-CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
 CONFIG_EXTCON_USB_GPIO=y
 CONFIG_EXTCON_USBC_CROS_EC=y
 CONFIG_MEMORY=y
Signature · 1 line
2.17.1