mbox series

[v2,0/8] Add Allwinner H6 Mali Midgard GPU

Message ID 20190411105720.32357-1-peron.clem@gmail.com
Headers show
Series Add Allwinner H6 Mali Midgard GPU | expand

Message

Clément Péron April 11, 2019, 10:57 a.m. UTC
Hi,

The Allwinner H6 has a Mali-T720 MP2. The drivers are
out-of-tree so this series only introduce the dt-bindings.

The first patch is from Neil Amstrong and has been already
merged in linux-amlogic. It is required for this series.

The second patch is from Icenowy Zheng where I changed the
order has required by Rob Herring.
See: https://patchwork.kernel.org/patch/10699829/

The GPU opp table was taken from Jernej Škrabec's patch
on LibreELEC.tv.

Thanks,
Clement

Changes in v2 (Thanks to Maxime Ripard):
 - Drop GPU OPP Table
 - Add clocks and clock-names in required

Clément Péron (7):
  dt-bindings: gpu: add bus clock for Mali Midgard GPUs
  dt-bindings: gpu: mali-midgard: Add h6 mali gpu compatible
  arm64: dts: allwinner: Add ARM Mali GPU node for H6
  arm64: dts: allwinner: Add mali GPU supply for Pine H64
  arm64: dts: allwinner: Add mali GPU supply for Beelink GS1
  arm64: dts: allwinner: Add mali GPU supply for OrangePi Boards
  arm64: dts: allwinner: Add mali GPU supply for OrangePi 3

Neil Armstrong (1):
  dt-bindings: gpu: mali-midgard: Add resets property

 .../bindings/gpu/arm,mali-midgard.txt         | 27 +++++++++++++++++++
 .../dts/allwinner/sun50i-h6-beelink-gs1.dts   |  5 ++++
 .../dts/allwinner/sun50i-h6-orangepi-3.dts    |  5 ++++
 .../dts/allwinner/sun50i-h6-orangepi.dtsi     |  5 ++++
 .../boot/dts/allwinner/sun50i-h6-pine-h64.dts |  5 ++++
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  | 14 ++++++++++
 6 files changed, 61 insertions(+)

Comments

Maxime Ripard April 11, 2019, 12:32 p.m. UTC | #1
On Thu, Apr 11, 2019 at 12:57:12PM +0200, Clément Péron wrote:
> Hi,
>
> The Allwinner H6 has a Mali-T720 MP2. The drivers are
> out-of-tree so this series only introduce the dt-bindings.
>
> The first patch is from Neil Amstrong and has been already
> merged in linux-amlogic. It is required for this series.
>
> The second patch is from Icenowy Zheng where I changed the
> order has required by Rob Herring.
> See: https://patchwork.kernel.org/patch/10699829/
>
> The GPU opp table was taken from Jernej Škrabec's patch
> on LibreELEC.tv.

One valuable information here would be which stack did you use,
panfrost and mesa or the ARM stack? If so, with which driver and which
blob?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Jernej Škrabec April 11, 2019, 3:01 p.m. UTC | #2
Hi!

Dne četrtek, 11. april 2019 ob 14:32:23 CEST je Maxime Ripard napisal(a):
> On Thu, Apr 11, 2019 at 12:57:12PM +0200, Clément Péron wrote:
> > Hi,
> > 
> > The Allwinner H6 has a Mali-T720 MP2. The drivers are
> > out-of-tree so this series only introduce the dt-bindings.
> > 
> > The first patch is from Neil Amstrong and has been already
> > merged in linux-amlogic. It is required for this series.
> > 
> > The second patch is from Icenowy Zheng where I changed the
> > order has required by Rob Herring.
> > See: https://patchwork.kernel.org/patch/10699829/
> > 
> > The GPU opp table was taken from Jernej Škrabec's patch
> > on LibreELEC.tv.
> 
> One valuable information here would be which stack did you use,
> panfrost and mesa or the ARM stack? If so, with which driver and which
> blob?

I'm using similar binding (different clock and interrupt names, but otherwise  
same) for quiet some time now on LibreELEC with ARM proprietary userspace and 
kernel space driver (32-bit GBM version) and it works well.

It's true that I'm using OPP table, but most (if not all) of the time GPU is 
set to lowest setting as there is not much to do when rendering GUI.

Best regards,
Jernej
Jernej Škrabec April 11, 2019, 3:05 p.m. UTC | #3
Dne četrtek, 11. april 2019 ob 12:57:16 CEST je Clément Péron napisal(a):
> Add the mali gpu node to the H6 device-tree.
> 
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> e0dc4a05c1ba..196753110434 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> @@ -157,6 +157,20 @@
>  			allwinner,sram = <&ve_sram 1>;
>  		};
> 
> +		gpu: gpu@1800000 {
> +			compatible = "allwinner,sun50i-h6-mali",
> +				     "arm,mali-t720";
> +			reg = <0x01800000 0x4000>;
> +			interrupts = <GIC_SPI 84 
IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 85 
IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 83 
IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "job", "mmu", "gpu";
> +			clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
> +			clock-names = "core", "bus";
> +			resets = <&ccu RST_BUS_GPU>;
> +			status = "disabled";

Usually self sufficient peripherals are enabled by default in DTSI.

> +		};
> +
>  		syscon: syscon@3000000 {
>  			compatible = "allwinner,sun50i-h6-system-
control",
>  				     "allwinner,sun50i-a64-
system-control";
Clément Péron April 11, 2019, 3:09 p.m. UTC | #4
Hi,

On Thu, 11 Apr 2019 at 17:01, Jernej Škrabec <jernej.skrabec@siol.net> wrote:
>
> Hi!
>
> Dne četrtek, 11. april 2019 ob 14:32:23 CEST je Maxime Ripard napisal(a):
> > On Thu, Apr 11, 2019 at 12:57:12PM +0200, Clément Péron wrote:
> > > Hi,
> > >
> > > The Allwinner H6 has a Mali-T720 MP2. The drivers are
> > > out-of-tree so this series only introduce the dt-bindings.
> > >
> > > The first patch is from Neil Amstrong and has been already
> > > merged in linux-amlogic. It is required for this series.
> > >
> > > The second patch is from Icenowy Zheng where I changed the
> > > order has required by Rob Herring.
> > > See: https://patchwork.kernel.org/patch/10699829/
> > >
> > > The GPU opp table was taken from Jernej Škrabec's patch
> > > on LibreELEC.tv.
> >
> > One valuable information here would be which stack did you use,
> > panfrost and mesa or the ARM stack? If so, with which driver and which
> > blob?
All of this work has be done by Jernej so he could answer better than me.

He uses the ARM stack r22p0-01rel0 + patches
https://github.com/LibreELEC/LibreELEC.tv/commit/5273f889964c42e88fe02289290c3c6cb6086770

Blob are also from Jernej too (taken from ???) :
https://github.com/jernejsk/H6-mali-userspace

Regards,
Clement

>
> I'm using similar binding (different clock and interrupt names, but otherwise
> same) for quiet some time now on LibreELEC with ARM proprietary userspace and
> kernel space driver (32-bit GBM version) and it works well.
>
> It's true that I'm using OPP table, but most (if not all) of the time GPU is
> set to lowest setting as there is not much to do when rendering GUI.
>
> Best regards,
> Jernej
>
>
Clément Péron April 11, 2019, 3:20 p.m. UTC | #5
Hi,

On Thu, 11 Apr 2019 at 17:05, Jernej Škrabec <jernej.skrabec@siol.net> wrote:
>
> Dne četrtek, 11. april 2019 ob 12:57:16 CEST je Clément Péron napisal(a):
> > Add the mali gpu node to the H6 device-tree.
> >
> > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> > e0dc4a05c1ba..196753110434 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > @@ -157,6 +157,20 @@
> >                       allwinner,sram = <&ve_sram 1>;
> >               };
> >
> > +             gpu: gpu@1800000 {
> > +                     compatible = "allwinner,sun50i-h6-mali",
> > +                                  "arm,mali-t720";
> > +                     reg = <0x01800000 0x4000>;
> > +                     interrupts = <GIC_SPI 84
> IRQ_TYPE_LEVEL_HIGH>,
> > +                                  <GIC_SPI 85
> IRQ_TYPE_LEVEL_HIGH>,
> > +                                  <GIC_SPI 83
> IRQ_TYPE_LEVEL_HIGH>;
> > +                     interrupt-names = "job", "mmu", "gpu";
> > +                     clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
> > +                     clock-names = "core", "bus";
> > +                     resets = <&ccu RST_BUS_GPU>;
> > +                     status = "disabled";
>
> Usually self sufficient peripherals are enabled by default in DTSI.

I follow the other Mali Midgard (rk3399, rk3288) syntax.
But I think you're right here, will go for an update I think.

Clement

>
> > +             };
> > +
> >               syscon: syscon@3000000 {
> >                       compatible = "allwinner,sun50i-h6-system-
> control",
> >                                    "allwinner,sun50i-a64-
> system-control";
>
>
>
>
Jernej Škrabec April 11, 2019, 3:23 p.m. UTC | #6
Dne četrtek, 11. april 2019 ob 17:20:04 CEST je Clément Péron napisal(a):
> Hi,
> 
> On Thu, 11 Apr 2019 at 17:05, Jernej Škrabec <jernej.skrabec@siol.net> 
wrote:
> > Dne četrtek, 11. april 2019 ob 12:57:16 CEST je Clément Péron napisal(a):
> > > Add the mali gpu node to the H6 device-tree.
> > > 
> > > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > > ---
> > > 
> > >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 14 ++++++++++++++
> > >  1 file changed, 14 insertions(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> > > e0dc4a05c1ba..196753110434 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > @@ -157,6 +157,20 @@
> > > 
> > >                       allwinner,sram = <&ve_sram 1>;
> > >               
> > >               };
> > > 
> > > +             gpu: gpu@1800000 {
> > > +                     compatible = "allwinner,sun50i-h6-mali",
> > > +                                  "arm,mali-t720";
> > > +                     reg = <0x01800000 0x4000>;
> > > +                     interrupts = <GIC_SPI 84
> > 
> > IRQ_TYPE_LEVEL_HIGH>,
> > 
> > > +                                  <GIC_SPI 85
> > 
> > IRQ_TYPE_LEVEL_HIGH>,
> > 
> > > +                                  <GIC_SPI 83
> > 
> > IRQ_TYPE_LEVEL_HIGH>;
> > 
> > > +                     interrupt-names = "job", "mmu", "gpu";
> > > +                     clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
> > > +                     clock-names = "core", "bus";
> > > +                     resets = <&ccu RST_BUS_GPU>;
> > > +                     status = "disabled";
> > 
> > Usually self sufficient peripherals are enabled by default in DTSI.
> 
> I follow the other Mali Midgard (rk3399, rk3288) syntax.
> But I think you're right here, will go for an update I think.
> 

I quickly checked A64 and H5 DTSI and both have GPU enabled by default (status 
property is not set).

Best regards,
Jernej

> Clement
> 
> > > +             };
> > > +
> > > 
> > >               syscon: syscon@3000000 {
> > >               
> > >                       compatible = "allwinner,sun50i-h6-system-
> > 
> > control",
> > 
> > >                                    "allwinner,sun50i-a64-
> > 
> > system-control";
Maxime Ripard April 11, 2019, 3:27 p.m. UTC | #7
On Thu, Apr 11, 2019 at 05:23:25PM +0200, Jernej Škrabec wrote:
> Dne četrtek, 11. april 2019 ob 17:20:04 CEST je Clément Péron napisal(a):
> > Hi,
> >
> > On Thu, 11 Apr 2019 at 17:05, Jernej Škrabec <jernej.skrabec@siol.net>
> wrote:
> > > Dne četrtek, 11. april 2019 ob 12:57:16 CEST je Clément Péron napisal(a):
> > > > Add the mali gpu node to the H6 device-tree.
> > > >
> > > > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > > > ---
> > > >
> > > >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 14 ++++++++++++++
> > > >  1 file changed, 14 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> > > > e0dc4a05c1ba..196753110434 100644
> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > @@ -157,6 +157,20 @@
> > > >
> > > >                       allwinner,sram = <&ve_sram 1>;
> > > >
> > > >               };
> > > >
> > > > +             gpu: gpu@1800000 {
> > > > +                     compatible = "allwinner,sun50i-h6-mali",
> > > > +                                  "arm,mali-t720";
> > > > +                     reg = <0x01800000 0x4000>;
> > > > +                     interrupts = <GIC_SPI 84
> > >
> > > IRQ_TYPE_LEVEL_HIGH>,
> > >
> > > > +                                  <GIC_SPI 85
> > >
> > > IRQ_TYPE_LEVEL_HIGH>,
> > >
> > > > +                                  <GIC_SPI 83
> > >
> > > IRQ_TYPE_LEVEL_HIGH>;
> > >
> > > > +                     interrupt-names = "job", "mmu", "gpu";
> > > > +                     clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
> > > > +                     clock-names = "core", "bus";
> > > > +                     resets = <&ccu RST_BUS_GPU>;
> > > > +                     status = "disabled";
> > >
> > > Usually self sufficient peripherals are enabled by default in DTSI.
> >
> > I follow the other Mali Midgard (rk3399, rk3288) syntax.
> > But I think you're right here, will go for an update I think.
>
> I quickly checked A64 and H5 DTSI and both have GPU enabled by default (status
> property is not set).

I asked myself the same question, but the H6 seems to have a supply
wired to the GPU, while the H3 and H5 do not. So I'm not sure we want
to enable it on all the boards, even though some might have left out
the GPU supply which will result in a non-working GPU (I assume?)

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Jernej Škrabec April 11, 2019, 3:42 p.m. UTC | #8
Dne četrtek, 11. april 2019 ob 17:27:52 CEST je Maxime Ripard napisal(a):
> On Thu, Apr 11, 2019 at 05:23:25PM +0200, Jernej Škrabec wrote:
> > Dne četrtek, 11. april 2019 ob 17:20:04 CEST je Clément Péron napisal(a):
> > > Hi,
> > > 
> > > On Thu, 11 Apr 2019 at 17:05, Jernej Škrabec <jernej.skrabec@siol.net>
> > 
> > wrote:
> > > > Dne četrtek, 11. april 2019 ob 12:57:16 CEST je Clément Péron 
napisal(a):
> > > > > Add the mali gpu node to the H6 device-tree.
> > > > > 
> > > > > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > > > > ---
> > > > > 
> > > > >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 14 ++++++++++++++
> > > > >  1 file changed, 14 insertions(+)
> > > > > 
> > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> > > > > e0dc4a05c1ba..196753110434 100644
> > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > @@ -157,6 +157,20 @@
> > > > > 
> > > > >                       allwinner,sram = <&ve_sram 1>;
> > > > >               
> > > > >               };
> > > > > 
> > > > > +             gpu: gpu@1800000 {
> > > > > +                     compatible = "allwinner,sun50i-h6-mali",
> > > > > +                                  "arm,mali-t720";
> > > > > +                     reg = <0x01800000 0x4000>;
> > > > > +                     interrupts = <GIC_SPI 84
> > > > 
> > > > IRQ_TYPE_LEVEL_HIGH>,
> > > > 
> > > > > +                                  <GIC_SPI 85
> > > > 
> > > > IRQ_TYPE_LEVEL_HIGH>,
> > > > 
> > > > > +                                  <GIC_SPI 83
> > > > 
> > > > IRQ_TYPE_LEVEL_HIGH>;
> > > > 
> > > > > +                     interrupt-names = "job", "mmu", "gpu";
> > > > > +                     clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
> > > > > +                     clock-names = "core", "bus";
> > > > > +                     resets = <&ccu RST_BUS_GPU>;
> > > > > +                     status = "disabled";
> > > > 
> > > > Usually self sufficient peripherals are enabled by default in DTSI.
> > > 
> > > I follow the other Mali Midgard (rk3399, rk3288) syntax.
> > > But I think you're right here, will go for an update I think.
> > 
> > I quickly checked A64 and H5 DTSI and both have GPU enabled by default
> > (status property is not set).
> 
> I asked myself the same question, but the H6 seems to have a supply
> wired to the GPU, while the H3 and H5 do not. So I'm not sure we want
> to enable it on all the boards, even though some might have left out
> the GPU supply which will result in a non-working GPU (I assume?)

It's true that GPU doesn't work at all without power supply. Even worse, ARM 
kernel driver just hangs whole SoC if it tries to use unpowered GPU.

I checked few datasheets and almost none of them have GPU power supply, except 
H5, where GPU is enabled by default in DTSI.

Yeah, I guess it's more safe to explicitly enable it in board DT.

Jernej
Maxime Ripard April 11, 2019, 3:50 p.m. UTC | #9
On Thu, Apr 11, 2019 at 05:42:56PM +0200, Jernej Škrabec wrote:
> Dne četrtek, 11. april 2019 ob 17:27:52 CEST je Maxime Ripard napisal(a):
> > On Thu, Apr 11, 2019 at 05:23:25PM +0200, Jernej Škrabec wrote:
> > > Dne četrtek, 11. april 2019 ob 17:20:04 CEST je Clément Péron napisal(a):
> > > > Hi,
> > > >
> > > > On Thu, 11 Apr 2019 at 17:05, Jernej Škrabec <jernej.skrabec@siol.net>
> > >
> > > wrote:
> > > > > Dne četrtek, 11. april 2019 ob 12:57:16 CEST je Clément Péron
> napisal(a):
> > > > > > Add the mali gpu node to the H6 device-tree.
> > > > > >
> > > > > > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > > > > > ---
> > > > > >
> > > > > >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 14 ++++++++++++++
> > > > > >  1 file changed, 14 insertions(+)
> > > > > >
> > > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > > b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> > > > > > e0dc4a05c1ba..196753110434 100644
> > > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > > @@ -157,6 +157,20 @@
> > > > > >
> > > > > >                       allwinner,sram = <&ve_sram 1>;
> > > > > >
> > > > > >               };
> > > > > >
> > > > > > +             gpu: gpu@1800000 {
> > > > > > +                     compatible = "allwinner,sun50i-h6-mali",
> > > > > > +                                  "arm,mali-t720";
> > > > > > +                     reg = <0x01800000 0x4000>;
> > > > > > +                     interrupts = <GIC_SPI 84
> > > > >
> > > > > IRQ_TYPE_LEVEL_HIGH>,
> > > > >
> > > > > > +                                  <GIC_SPI 85
> > > > >
> > > > > IRQ_TYPE_LEVEL_HIGH>,
> > > > >
> > > > > > +                                  <GIC_SPI 83
> > > > >
> > > > > IRQ_TYPE_LEVEL_HIGH>;
> > > > >
> > > > > > +                     interrupt-names = "job", "mmu", "gpu";
> > > > > > +                     clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
> > > > > > +                     clock-names = "core", "bus";
> > > > > > +                     resets = <&ccu RST_BUS_GPU>;
> > > > > > +                     status = "disabled";
> > > > >
> > > > > Usually self sufficient peripherals are enabled by default in DTSI.
> > > >
> > > > I follow the other Mali Midgard (rk3399, rk3288) syntax.
> > > > But I think you're right here, will go for an update I think.
> > >
> > > I quickly checked A64 and H5 DTSI and both have GPU enabled by default
> > > (status property is not set).
> >
> > I asked myself the same question, but the H6 seems to have a supply
> > wired to the GPU, while the H3 and H5 do not. So I'm not sure we want
> > to enable it on all the boards, even though some might have left out
> > the GPU supply which will result in a non-working GPU (I assume?)
>
> It's true that GPU doesn't work at all without power supply. Even worse, ARM
> kernel driver just hangs whole SoC if it tries to use unpowered GPU.
>
> I checked few datasheets and almost none of them have GPU power supply, except
> H5, where GPU is enabled by default in DTSI.

I guess we should fix that then.

> Yeah, I guess it's more safe to explicitly enable it in board DT.

It's also something we do for the CPU, even though the CPU should be
obviously be powered before starting Linux...

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Rob Herring April 11, 2019, 4:24 p.m. UTC | #10
On Thu, Apr 11, 2019 at 10:27 AM Maxime Ripard
<maxime.ripard@bootlin.com> wrote:
>
> On Thu, Apr 11, 2019 at 05:23:25PM +0200, Jernej Škrabec wrote:
> > Dne četrtek, 11. april 2019 ob 17:20:04 CEST je Clément Péron napisal(a):
> > > Hi,
> > >
> > > On Thu, 11 Apr 2019 at 17:05, Jernej Škrabec <jernej.skrabec@siol.net>
> > wrote:
> > > > Dne četrtek, 11. april 2019 ob 12:57:16 CEST je Clément Péron napisal(a):
> > > > > Add the mali gpu node to the H6 device-tree.
> > > > >
> > > > > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > > > > ---
> > > > >
> > > > >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 14 ++++++++++++++
> > > > >  1 file changed, 14 insertions(+)
> > > > >
> > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index
> > > > > e0dc4a05c1ba..196753110434 100644
> > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > > > @@ -157,6 +157,20 @@
> > > > >
> > > > >                       allwinner,sram = <&ve_sram 1>;
> > > > >
> > > > >               };
> > > > >
> > > > > +             gpu: gpu@1800000 {
> > > > > +                     compatible = "allwinner,sun50i-h6-mali",
> > > > > +                                  "arm,mali-t720";
> > > > > +                     reg = <0x01800000 0x4000>;
> > > > > +                     interrupts = <GIC_SPI 84
> > > >
> > > > IRQ_TYPE_LEVEL_HIGH>,
> > > >
> > > > > +                                  <GIC_SPI 85
> > > >
> > > > IRQ_TYPE_LEVEL_HIGH>,
> > > >
> > > > > +                                  <GIC_SPI 83
> > > >
> > > > IRQ_TYPE_LEVEL_HIGH>;
> > > >
> > > > > +                     interrupt-names = "job", "mmu", "gpu";
> > > > > +                     clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
> > > > > +                     clock-names = "core", "bus";
> > > > > +                     resets = <&ccu RST_BUS_GPU>;
> > > > > +                     status = "disabled";
> > > >
> > > > Usually self sufficient peripherals are enabled by default in DTSI.
> > >
> > > I follow the other Mali Midgard (rk3399, rk3288) syntax.
> > > But I think you're right here, will go for an update I think.
> >
> > I quickly checked A64 and H5 DTSI and both have GPU enabled by default (status
> > property is not set).
>
> I asked myself the same question, but the H6 seems to have a supply
> wired to the GPU, while the H3 and H5 do not. So I'm not sure we want
> to enable it on all the boards, even though some might have left out
> the GPU supply which will result in a non-working GPU (I assume?)

If the default state is enabled, then only devfreq will be disabled
for panfrost, but it should otherwise work. I guess we could be
smarter and just do frequency changes if all the OPP voltages are the
same.

Rob