All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: exynos5420: add mali dt bindings and enable mali on Odroid XU3/4
@ 2019-10-29  1:13 Marian Mihailescu
  2019-10-30  8:14 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Marian Mihailescu @ 2019-10-29  1:13 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: Marian Mihailescu

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.

Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
---
 arch/arm/boot/dts/exynos5420.dtsi             | 49 +++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi |  5 +++
 2 files changed, 54 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 7d51e0f4ab79..5d60e0f1b09a 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -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>;
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
index 422692b20c46..210c305a0ce8 100644
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
@@ -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>;
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: dts: exynos5420: add mali dt bindings and enable mali on Odroid XU3/4
  2019-10-29  1:13 [PATCH] ARM: dts: exynos5420: add mali dt bindings and enable mali on Odroid XU3/4 Marian Mihailescu
@ 2019-10-30  8:14 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2019-10-30  8:14 UTC (permalink / raw)
  To: Marian Mihailescu; +Cc: linux-samsung-soc

Hi,

Thanks for the patch.

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

On Tue, Oct 29, 2019 at 11:43:12AM +1030, Marian Mihailescu wrote:
> Add device tree bindings for Mali GPU for Exynos 542x SoC.

"Add device tree nodes", not bindings.

> GPU is disabled by default, and is enabled for each board after the regulator
> is defined. Tested on Odroid-XU4.
> 
> Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
> ---
>  arch/arm/boot/dts/exynos5420.dtsi             | 49 +++++++++++++++++++++++++++
>  arch/arm/boot/dts/exynos5422-odroid-core.dtsi |  5 +++
>  2 files changed, 54 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> index 7d51e0f4ab79..5d60e0f1b09a 100644
> --- a/arch/arm/boot/dts/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/exynos5420.dtsi
> @@ -670,6 +670,55 @@
>  			iommus = <&sysmmu_gscl1>;
>  		};
>  
> +		mali: mali@11800000 {

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

> +			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.

> +			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.

> +			interrupt-names = "JOB", "MMU", "GPU";

Does not match bindings.

> +
> +			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.

> +
> +			status = "disabled";
> +
> +			gpu_opp_table: gpu-opp-table {

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

> +				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>;
> diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
> index 422692b20c46..210c305a0ce8 100644
> --- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
> +++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
> @@ -659,6 +659,11 @@
>  	status = "okay";
>  };
>  
> +&mali {
> +	mali-supply = <&buck4_reg>;

Remove the always-on from buck4.

Best regards,
Krzysztof


> +	status = "okay";
> +};
> +
>  &rtc {
>  	status = "okay";
>  	clocks = <&clock CLK_RTC>, <&s2mps11_osc S2MPS11_CLK_AP>;
> -- 
> 2.14.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: dts: exynos5420: add mali dt bindings and enable mali on Odroid XU3/4
  2019-11-06  6:25 Marian Mihailescu
@ 2019-11-06 13:45 ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2019-11-06 13:45 UTC (permalink / raw)
  To: Marian Mihailescu
  Cc: linux-samsung-soc, linux-kernel, devicetree, Krzysztof Kozlowski,
	Mark Rutland, Kukjin Kim

On Wed, Nov 6, 2019 at 12:25 AM Marian Mihailescu
<mihailescu2m@gmail.com> wrote:
>
> From: memeka <mihailescu2m@gmail.com>
>
> Add device tree bindings and nodes 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.
>
> Changes since v1:
> - used generic node and label for GPU
> - added bindings for compatible
> - fixed irq indentation
> - fixed interrupt-names to match bindings
> - added cooling cells for future TMU connection
> - used generic node and label for GPU opp table
> - removed always-on from SoC GPU regulator
>
> Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
> ---
>  .../devicetree/bindings/gpu/arm,mali-midgard.yaml  |  5 ++-

Split to a separate patch.

>  arch/arm/boot/dts/exynos5420.dtsi                  | 50 ++++++++++++++++++++++
>  arch/arm/boot/dts/exynos5422-odroid-core.dtsi      |  6 ++-
>  3 files changed, 59 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
> index 47bc1ac36426..e8868cb587de 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
> @@ -38,9 +38,12 @@ properties:
>            - enum:
>               - samsung,exynos5433-mali
>            - const: arm,mali-t760
> +      - items:
> +          - enum:
> +             - samsung,exynis5420-mali

exynis?

> +          - const: arm,mali-t628
>
>            # "arm,mali-t624"
> -          # "arm,mali-t628"
>            # "arm,mali-t830"
>            # "arm,mali-t880"
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: dts: exynos5420: add mali dt bindings and enable mali on Odroid XU3/4
@ 2019-11-06  6:25 Marian Mihailescu
  2019-11-06 13:45 ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Marian Mihailescu @ 2019-11-06  6:25 UTC (permalink / raw)
  To: linux-samsung-soc, linux-kernel, devicetree, krzk, robh+dt,
	mark.rutland, kgene
  Cc: memeka

From: memeka <mihailescu2m@gmail.com>

Add device tree bindings and nodes 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.

Changes since v1:
- used generic node and label for GPU
- added bindings for compatible
- fixed irq indentation
- fixed interrupt-names to match bindings
- added cooling cells for future TMU connection
- used generic node and label for GPU opp table
- removed always-on from SoC GPU regulator

Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
---
 .../devicetree/bindings/gpu/arm,mali-midgard.yaml  |  5 ++-
 arch/arm/boot/dts/exynos5420.dtsi                  | 50 ++++++++++++++++++++++
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi      |  6 ++-
 3 files changed, 59 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
index 47bc1ac36426..e8868cb587de 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
@@ -38,9 +38,12 @@ properties:
           - enum:
              - samsung,exynos5433-mali
           - const: arm,mali-t760
+      - items:
+          - enum:
+             - samsung,exynis5420-mali
+          - const: arm,mali-t628
 
           # "arm,mali-t624"
-          # "arm,mali-t628"
           # "arm,mali-t830"
           # "arm,mali-t880"
 
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 7d51e0f4ab79..31b5f7ba0e3b 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -670,6 +670,56 @@
 			iommus = <&sysmmu_gscl1>;
 		};
 
+		gpu: gpu@11800000 {
+			compatible = "samsung,exynos5422-mali", "arm,mali-t628";
+			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";
+			#cooling-cells = <2>;
+
+			gpu_opp_table: 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>;
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
index 422692b20c46..ce774f7b2ce0 100644
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
@@ -522,7 +522,6 @@
 				regulator-name = "vdd_g3d";
 				regulator-min-microvolt = <800000>;
 				regulator-max-microvolt = <1400000>;
-				regulator-always-on;
 				regulator-boot-on;
 
 				regulator-state-mem {
@@ -659,6 +658,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&buck4_reg>;
+	status = "okay";
+};
+
 &rtc {
 	status = "okay";
 	clocks = <&clock CLK_RTC>, <&s2mps11_osc S2MPS11_CLK_AP>;
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-06 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29  1:13 [PATCH] ARM: dts: exynos5420: add mali dt bindings and enable mali on Odroid XU3/4 Marian Mihailescu
2019-10-30  8:14 ` Krzysztof Kozlowski
2019-11-06  6:25 Marian Mihailescu
2019-11-06 13:45 ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.