linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: sun8i-h3: Add Mali node
@ 2018-03-13 10:16 Giulio Benetti
  2018-03-14  8:05 ` Maxime Ripard
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Giulio Benetti @ 2018-03-13 10:16 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, dri-devel, devicetree, linux-kernel,
	linux-arm-kernel, Giulio Benetti

The H3 has an ARM Mali 400 GPU, so add binding to our DT.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 .../devicetree/bindings/gpu/arm,mali-utgard.txt    |  1 +
 arch/arm/boot/dts/sun8i-h3.dtsi                    | 27 ++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
index ad87654..c1f65d1 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
@@ -10,6 +10,7 @@ Required properties:
     * And, optionally, one of the vendor specific compatible:
       + allwinner,sun4i-a10-mali
       + allwinner,sun7i-a20-mali
+      + allwinner,sun8i-h3-mali
       + allwinner,sun50i-h5-mali
       + amlogic,meson-gxbb-mali
       + amlogic,meson-gxl-mali
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index 8495dee..10da8ed 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -79,6 +79,33 @@
 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
 	};
+
+	soc {
+		mali: gpu@1c40000 {
+			compatible = "allwinner,sun8i-h3-mali", "arm,mali-400";
+			reg = <0x01c40000 0x10000>;
+			interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "gp",
+					  "gpmmu",
+					  "pp0",
+					  "ppmmu0",
+					  "pp1",
+					  "ppmmu1",
+					  "pmu";
+			clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
+			clock-names = "bus", "core";
+			resets = <&ccu RST_BUS_GPU>;
+
+			assigned-clocks = <&ccu CLK_GPU>;
+			assigned-clock-rates = <384000000>;
+		};
+	};
 };
 
 &ccu {
-- 
2.7.4

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

* Re: [PATCH] ARM: dts: sun8i-h3: Add Mali node
  2018-03-13 10:16 [PATCH] ARM: dts: sun8i-h3: Add Mali node Giulio Benetti
@ 2018-03-14  8:05 ` Maxime Ripard
  2018-03-14 10:16   ` Giulio Benetti
  2018-03-18 12:49 ` Rob Herring
  2018-03-18 21:57 ` Maxime Ripard
  2 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2018-03-14  8:05 UTC (permalink / raw)
  To: Giulio Benetti
  Cc: Chen-Yu Tsai, dri-devel, devicetree, linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

On Tue, Mar 13, 2018 at 11:16:45AM +0100, Giulio Benetti wrote:
> The H3 has an ARM Mali 400 GPU, so add binding to our DT.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>

How was this tested?

Is there any specific reason not to share it with the H5?

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] ARM: dts: sun8i-h3: Add Mali node
  2018-03-14  8:05 ` Maxime Ripard
@ 2018-03-14 10:16   ` Giulio Benetti
  0 siblings, 0 replies; 5+ messages in thread
From: Giulio Benetti @ 2018-03-14 10:16 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, dri-devel, devicetree, linux-kernel, linux-arm-kernel

Hi,

Il 14/03/2018 09:05, Maxime Ripard ha scritto:
> On Tue, Mar 13, 2018 at 11:16:45AM +0100, Giulio Benetti wrote:
>> The H3 has an ARM Mali 400 GPU, so add binding to our DT.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> 
> How was this tested?

I wanted you asked me about this to ask you:
if I can't test it on HW, but others tested it all around,
for example using this patch:
https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/32-h3-DT-add-mali-node.patch

Is it enough? Or do I have to test it directly?
Or maybe I can invite those people to tag this patch as tested-by ?

> 
> Is there any specific reason not to share it with the H5?

Yes, H5 has dual GPU but quad PP and on IRQ you can clearly see:
- GPU_GP
- GPU_GPMMU
- GPU_PMU
- GPU_PP
- GPU_PP0
- GPU_PPMMU0
- GPU_PP1
- GPU_PPMMU1
- GPU_PP2
- GPU_PPMMU2
- GPU_PP3
- GPU_PPMMU3

So I think they should be placed in specific dts files.
What do you think?

Thanks

> 
> Maxime
> 


-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

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

* Re: [PATCH] ARM: dts: sun8i-h3: Add Mali node
  2018-03-13 10:16 [PATCH] ARM: dts: sun8i-h3: Add Mali node Giulio Benetti
  2018-03-14  8:05 ` Maxime Ripard
@ 2018-03-18 12:49 ` Rob Herring
  2018-03-18 21:57 ` Maxime Ripard
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2018-03-18 12:49 UTC (permalink / raw)
  To: Giulio Benetti
  Cc: Maxime Ripard, Chen-Yu Tsai, dri-devel, devicetree, linux-kernel,
	linux-arm-kernel

On Tue, Mar 13, 2018 at 11:16:45AM +0100, Giulio Benetti wrote:
> The H3 has an ARM Mali 400 GPU, so add binding to our DT.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
>  .../devicetree/bindings/gpu/arm,mali-utgard.txt    |  1 +
>  arch/arm/boot/dts/sun8i-h3.dtsi                    | 27 ++++++++++++++++++++++
>  2 files changed, 28 insertions(+)

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH] ARM: dts: sun8i-h3: Add Mali node
  2018-03-13 10:16 [PATCH] ARM: dts: sun8i-h3: Add Mali node Giulio Benetti
  2018-03-14  8:05 ` Maxime Ripard
  2018-03-18 12:49 ` Rob Herring
@ 2018-03-18 21:57 ` Maxime Ripard
  2 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2018-03-18 21:57 UTC (permalink / raw)
  To: Giulio Benetti
  Cc: Chen-Yu Tsai, dri-devel, devicetree, linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

On Tue, Mar 13, 2018 at 11:16:45AM +0100, Giulio Benetti wrote:
> The H3 has an ARM Mali 400 GPU, so add binding to our DT.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2018-03-18 21:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 10:16 [PATCH] ARM: dts: sun8i-h3: Add Mali node Giulio Benetti
2018-03-14  8:05 ` Maxime Ripard
2018-03-14 10:16   ` Giulio Benetti
2018-03-18 12:49 ` Rob Herring
2018-03-18 21:57 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).