2019-11-06 22:58:55

by Marian Mihailescu

[permalink] [raw]
Subject: [PATCH v4 1/2] dt-bindings: gpu: mali-midgard: add samsung exynos 5420 compatible

Add "samsung,exynos5420-mali" binding

Signed-off-by: Marian Mihailescu <[email protected]>
---
Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
index 47bc1ac36426..41b928bce4ea 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,exynos5420-mali
+ - const: arm,mali-t628

# "arm,mali-t624"
- # "arm,mali-t628"
# "arm,mali-t830"
# "arm,mali-t880"

--
2.14.1


2019-11-06 22:59:48

by Marian Mihailescu

[permalink] [raw]
Subject: [PATCH v4 2/2] ARM: dts: exynos5420: add mali dt node and enable mali on Odroid XU3/4

Add device tree node 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 v3:
- fixed compatible to match bindings

Changes since v2:
- separate patch for bindings
- fixed bindings typo

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 <[email protected]>
---
arch/arm/boot/dts/exynos5420.dtsi | 50 +++++++++++++++++++++++++++
arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 6 +++-
2 files changed, 55 insertions(+), 1 deletion(-)

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,exynos5420-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

2019-11-07 09:19:13

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] dt-bindings: gpu: mali-midgard: add samsung exynos 5420 compatible

On Thu, Nov 07, 2019 at 09:25:26AM +1030, Marian Mihailescu wrote:
> Add "samsung,exynos5420-mali" binding
>
> Signed-off-by: Marian Mihailescu <[email protected]>
> ---
> Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
> index 47bc1ac36426..41b928bce4ea 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,exynos5420-mali
> + - const: arm,mali-t628

I would prefer to order it logically/alphabetically, so after 5250 and
before 5433. With that change:

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2019-11-07 09:50:37

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 2/2] ARM: dts: exynos5420: add mali dt node and enable mali on Odroid XU3/4

On Thu, Nov 07, 2019 at 09:25:27AM +1030, Marian Mihailescu wrote:
> Add device tree node 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 v3:
> - fixed compatible to match bindings

Changelog does not go to commit message. Put it after msg separator
(---).

Except this looks good so I will fix it up while applying.

Best regards,
Krzysztof


>
> Changes since v2:
> - separate patch for bindings
> - fixed bindings typo
>
> 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 <[email protected]>
> ---
> arch/arm/boot/dts/exynos5420.dtsi | 50 +++++++++++++++++++++++++++
> arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 6 +++-
> 2 files changed, 55 insertions(+), 1 deletion(-)
>
> 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,exynos5420-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
>

2019-11-12 15:24:02

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 2/2] ARM: dts: exynos5420: add mali dt node and enable mali on Odroid XU3/4

On Thu, Nov 07, 2019 at 09:25:27AM +1030, Marian Mihailescu wrote:
> Add device tree node 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 v3:
> - fixed compatible to match bindings
>
> Changes since v2:
> - separate patch for bindings
> - fixed bindings typo
>
> 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 <[email protected]>
> ---
> arch/arm/boot/dts/exynos5420.dtsi | 50 +++++++++++++++++++++++++++
> arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 6 +++-

Hi,

Unfortunately this does not apply around exynos5422-odroid-core.dtsi.
I think there were no changes to this file in current development cycle
so I am surprised that there are conflicts.

On what version were you basing your patch? Was it tested on latest
kernel? The patches should be based usually on one of:
1. current-rc1 (v5.4-rc1)
2. latest-rc (v5.4-rc7)
3. maintainer's tree (my next/dt or for-next)
4. linux-next

In all other cases the patch would need rebasing and re-testing.

Best regards,
Krzysztof

2019-11-13 03:22:58

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] dt-bindings: gpu: mali-midgard: add samsung exynos 5420 compatible

On Thu, 7 Nov 2019 09:25:26 +1030, Marian Mihailescu wrote:
> Add "samsung,exynos5420-mali" binding
>
> Signed-off-by: Marian Mihailescu <[email protected]>
> ---
> Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>

Applied, thanks.

Rob

2019-11-14 00:06:23

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] dt-bindings: gpu: mali-midgard: add samsung exynos 5420 compatible

On Thu, Nov 7, 2019 at 3:17 AM Krzysztof Kozlowski <[email protected]> wrote:
>
> On Thu, Nov 07, 2019 at 09:25:26AM +1030, Marian Mihailescu wrote:
> > Add "samsung,exynos5420-mali" binding
> >
> > Signed-off-by: Marian Mihailescu <[email protected]>
> > ---
> > Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
> > index 47bc1ac36426..41b928bce4ea 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,exynos5420-mali
> > + - const: arm,mali-t628
>
> I would prefer to order it logically/alphabetically, so after 5250 and
> before 5433. With that change:

I didn't see your comment, but that's what I did. This has been
re-ordered to be sorted by Mali part numbers (though partially to
avoid a conflict). Good thing Arm and Samsung agree
newer/better/faster should be higher numbers. :)

Rob

2019-11-14 00:08:05

by Marian Mihailescu

[permalink] [raw]
Subject: Re: [PATCH v4 2/2] ARM: dts: exynos5420: add mali dt node and enable mali on Odroid XU3/4

Apologies - it was applied and tested on latest -rc, however I had
gpu_tmu enabled as well (by adding status=okay), line which was not
included in the patch and was the cause of it not applying. Fixed it
in the coming v5, tested and applies on a fresh -rc7.

Either I've been missing something or nothing has been going on. (K. E. Gordon)

On Wed, Nov 13, 2019 at 1:49 AM Krzysztof Kozlowski <[email protected]> wrote:
>
> On Thu, Nov 07, 2019 at 09:25:27AM +1030, Marian Mihailescu wrote:
> > Add device tree node 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 v3:
> > - fixed compatible to match bindings
> >
> > Changes since v2:
> > - separate patch for bindings
> > - fixed bindings typo
> >
> > 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 <[email protected]>
> > ---
> > arch/arm/boot/dts/exynos5420.dtsi | 50 +++++++++++++++++++++++++++
> > arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 6 +++-
>
> Hi,
>
> Unfortunately this does not apply around exynos5422-odroid-core.dtsi.
> I think there were no changes to this file in current development cycle
> so I am surprised that there are conflicts.
>
> On what version were you basing your patch? Was it tested on latest
> kernel? The patches should be based usually on one of:
> 1. current-rc1 (v5.4-rc1)
> 2. latest-rc (v5.4-rc7)
> 3. maintainer's tree (my next/dt or for-next)
> 4. linux-next
>
> In all other cases the patch would need rebasing and re-testing.
>
> Best regards,
> Krzysztof
>

2019-11-14 00:12:37

by Marian Mihailescu

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] dt-bindings: gpu: mali-midgard: add samsung exynos 5420 compatible

> >
> > I would prefer to order it logically/alphabetically, so after 5250 and
> > before 5433. With that change:
>
> I didn't see your comment, but that's what I did. This has been
> re-ordered to be sorted by Mali part numbers (though partially to
> avoid a conflict). Good thing Arm and Samsung agree
> newer/better/faster should be higher numbers. :)
>
> Rob

Thank you.
-Marian