Skip to contentSkip to conversation

ARM: dts: exynos5420: add mali dt bindings and enable mali on Odroid XU3/4

PATCH In review Marian Mihailescu 2 participants 2 messages Oct 29, 2019 – Oct 30, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: exynos5420: add mali dt bindings and enable mali on Odroid XU3/4

Add device tree bindings for Mali GPU for Exynos 542x SoC.
GPU is disabled by default, and is enabled for each board after the regulator is defined. Tested on Odroid-XU4.

---
 arch/arm/boot/dts/exynos5420.dtsi             | 49 +++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi |  5 +++
 2 files changed, 54 insertions(+)
arch/arm/boot/dts/exynos5420.dtsi +49 -0
index 7d51e0f4ab79..5d60e0f1b09a 100644
@@ -670,6 +670,55 @@
 			iommus = <&sysmmu_gscl1>;
 		};
 
+		mali: mali@11800000 {
+			compatible = "samsung,exynos5420-mali", "arm,malit628";
+			reg = <0x11800000 0x5000>;
+			interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+						 <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
+						 <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "JOB", "MMU", "GPU";
+
+			clocks = <&clock CLK_G3D>;
+			clock-names = "core";
+			power-domains = <&g3d_pd>;
+			operating-points-v2 = <&gpu_opp_table>;
+
+			status = "disabled";
+
+			gpu_opp_table: gpu-opp-table {
+				compatible = "operating-points-v2";
+
+				opp@177000000 {
+					opp-hz = /bits/ 64 <177000000>;
+					opp-microvolt = <812500>;
+				};
+				opp@266000000 {
+					opp-hz = /bits/ 64 <266000000>;
+					opp-microvolt = <862500>;
+				};
+				opp@350000000 {
+					opp-hz = /bits/ 64 <350000000>;
+					opp-microvolt = <912500>;
+				};
+				opp-420000000 {
+					opp-hz = /bits/ 64 <420000000>;
+					opp-microvolt = <962500>;
+				};
+				opp-480000000 {
+					opp-hz = /bits/ 64 <480000000>;
+					opp-microvolt = <1000000>;
+				};
+				opp-543000000 {
+					opp-hz = /bits/ 64 <543000000>;
+					opp-microvolt = <1037500>;
+				};
+				opp-600000000 {
+					opp-hz = /bits/ 64 <600000000>;
+					opp-microvolt = <1150000>;
+				};
+			};
+		};
+
 		scaler_0: scaler@12800000 {
 			compatible = "samsung,exynos5420-scaler";
 			reg = <0x12800000 0x1294>;
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +5 -0
index 422692b20c46..210c305a0ce8 100644
@@ -659,6 +659,11 @@
 	status = "okay";
 };
 
+&mali {
+	mali-supply = <&buck4_reg>;
+	status = "okay";
+};
+
 &rtc {
 	status = "okay";
 	clocks = <&clock CLK_RTC>, <&s2mps11_osc S2MPS11_CLK_AP>;
Signature · 1 line
2.14.1
#1 lore raw

Hi,

Thanks for the patch.

Use scripts/get_maintainer.pl to get list of maintainer and lists to Cc.

Quoted 1 line · Marian Mihailescu

Add device tree bindings for Mali GPU for Exynos 542x SoC.

"Add device tree nodes", not bindings.

Quoted 14 lines

GPU is disabled by default, and is enabled for each board after the regulator is defined. Tested on Odroid-XU4.

---
 arch/arm/boot/dts/exynos5420.dtsi             | 49 +++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi |  5 +++
 2 files changed, 54 insertions(+)
arch/arm/boot/dts/exynos5420.dtsi +0 -0
index 7d51e0f4ab79..5d60e0f1b09a 100644

arch/arm/boot/dts/exynos5420.dtsi line 673

Quoted 4 lines
arch/arm/boot/dts/exynos5420.dtsi +1 -0
@@ -670,6 +670,55 @@
 			iommus = <&sysmmu_gscl1>;
 		};
 
+		mali: mali@11800000 {

The node should be generic, so use gpu. Also for the label.

arch/arm/boot/dts/exynos5420.dtsi line 674

Quoted 1 line
arch/arm/boot/dts/exynos5420.dtsi +1 -0
+			compatible = "samsung,exynos5420-mali", "arm,malit628";

First compatible is not documented - please run scripts/checkpatch.pl.
See: https://patchwork.kernel.org/patch/10996479/

Second compatible looks wrong.

arch/arm/boot/dts/exynos5420.dtsi line 678

Quoted 4 lines
arch/arm/boot/dts/exynos5420.dtsi +4 -0
+			reg = <0x11800000 0x5000>;
+			interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+						 <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
+						 <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;

Broken indentation. Align it with <GIC_SPI before.

arch/arm/boot/dts/exynos5420.dtsi line 679

Quoted 1 line
arch/arm/boot/dts/exynos5420.dtsi +1 -0
+			interrupt-names = "JOB", "MMU", "GPU";

Does not match bindings.

arch/arm/boot/dts/exynos5420.dtsi line 684

Quoted 5 lines
arch/arm/boot/dts/exynos5420.dtsi +5 -0
+
+			clocks = <&clock CLK_G3D>;
+			clock-names = "core";
+			power-domains = <&g3d_pd>;
+			operating-points-v2 = <&gpu_opp_table>;

This should be also cooling device so at least cooling cells are needed. The best would be to connect it with TMU GPU but this could be in next patches.

arch/arm/boot/dts/exynos5420.dtsi line 688

Quoted 4 lines
arch/arm/boot/dts/exynos5420.dtsi +4 -0
+
+			status = "disabled";
+
+			gpu_opp_table: gpu-opp-table {

The node name: just opp-table, to be generic.

Quoted 41 lines
arch/arm/boot/dts/exynos5420.dtsi +33 -0
+				compatible = "operating-points-v2";
+
+				opp@177000000 {
+					opp-hz = /bits/ 64 <177000000>;
+					opp-microvolt = <812500>;
+				};
+				opp@266000000 {
+					opp-hz = /bits/ 64 <266000000>;
+					opp-microvolt = <862500>;
+				};
+				opp@350000000 {
+					opp-hz = /bits/ 64 <350000000>;
+					opp-microvolt = <912500>;
+				};
+				opp-420000000 {
+					opp-hz = /bits/ 64 <420000000>;
+					opp-microvolt = <962500>;
+				};
+				opp-480000000 {
+					opp-hz = /bits/ 64 <480000000>;
+					opp-microvolt = <1000000>;
+				};
+				opp-543000000 {
+					opp-hz = /bits/ 64 <543000000>;
+					opp-microvolt = <1037500>;
+				};
+				opp-600000000 {
+					opp-hz = /bits/ 64 <600000000>;
+					opp-microvolt = <1150000>;
+				};
+			};
+		};
+
 		scaler_0: scaler@12800000 {
 			compatible = "samsung,exynos5420-scaler";
 			reg = <0x12800000 0x1294>;
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +0 -0
index 422692b20c46..210c305a0ce8 100644

arch/arm/boot/dts/exynos5422-odroid-core.dtsi line 663

Quoted 5 lines
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +2 -0
@@ -659,6 +659,11 @@
 	status = "okay";
 };
 
+&mali {
+	mali-supply = <&buck4_reg>;

Remove the always-on from buck4.

Best regards,
Krzysztof

Quoted 9 lines
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +3 -0
+	status = "okay";
+};
+
 &rtc {
 	status = "okay";
 	clocks = <&clock CLK_RTC>, <&s2mps11_osc S2MPS11_CLK_AP>;
Signature · 1 line
2.14.1