linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU
@ 2019-04-11 10:57 Clément Péron
  2019-04-11 10:57 ` [PATCH v2 1/8] dt-bindings: gpu: mali-midgard: Add resets property Clément Péron
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Clément Péron @ 2019-04-11 10:57 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, Jernej Skrabec
  Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
	linux-sunxi, Clément Péron

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(+)

-- 
2.17.1


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

* [PATCH v2 1/8] dt-bindings: gpu: mali-midgard: Add resets property
  2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
@ 2019-04-11 10:57 ` Clément Péron
  2019-04-11 10:57 ` [PATCH v2 2/8] dt-bindings: gpu: add bus clock for Mali Midgard GPUs Clément Péron
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Clément Péron @ 2019-04-11 10:57 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, Jernej Skrabec
  Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
	linux-sunxi, Neil Armstrong, Kevin Hilman

From: Neil Armstrong <narmstrong@baylibre.com>

The Amlogic ARM Mali Midgard requires reset controls to power on and
software reset the GPU, adds these as optional in the bindings.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
---
 .../devicetree/bindings/gpu/arm,mali-midgard.txt   | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
index 18a2cde2e5f3..1b1a74129141 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
@@ -37,6 +37,20 @@ Optional properties:
 - operating-points-v2 : Refer to Documentation/devicetree/bindings/opp/opp.txt
   for details.
 
+- resets : Phandle of the GPU reset line.
+
+Vendor-specific bindings
+------------------------
+
+The Mali GPU is integrated very differently from one SoC to
+another. In order to accomodate those differences, you have the option
+to specify one more vendor-specific compatible, among:
+
+- "amlogic,meson-gxm-mali"
+  Required properties:
+  - resets : Should contain phandles of :
+    + GPU reset line
+    + GPU APB glue reset line
 
 Example for a Mali-T760:
 
-- 
2.17.1


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

* [PATCH v2 2/8] dt-bindings: gpu: add bus clock for Mali Midgard GPUs
  2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
  2019-04-11 10:57 ` [PATCH v2 1/8] dt-bindings: gpu: mali-midgard: Add resets property Clément Péron
@ 2019-04-11 10:57 ` Clément Péron
  2019-04-11 12:30   ` Maxime Ripard
  2019-04-11 10:57 ` [PATCH v2 3/8] dt-bindings: gpu: mali-midgard: Add h6 mali gpu compatible Clément Péron
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Clément Péron @ 2019-04-11 10:57 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, Jernej Skrabec
  Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
	linux-sunxi, Clément Péron

Some SoCs adds a bus clock gate to the Mali Midgard GPU.

Add the binding for the bus clock.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
index 1b1a74129141..2e8bbce35695 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
@@ -31,6 +31,12 @@ Optional properties:
 
 - clocks : Phandle to clock for the Mali Midgard device.
 
+- clock-names : Specify the names of the clocks specified in clocks
+  when multiple clocks are present.
+    * core: clock driving the GPU itself (When only one clock is present,
+      assume it's this clock.)
+    * bus: bus clock for the GPU
+
 - mali-supply : Phandle to regulator for the Mali device. Refer to
   Documentation/devicetree/bindings/regulator/regulator.txt for details.
 
-- 
2.17.1


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

* [PATCH v2 3/8] dt-bindings: gpu: mali-midgard: Add h6 mali gpu compatible
  2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
  2019-04-11 10:57 ` [PATCH v2 1/8] dt-bindings: gpu: mali-midgard: Add resets property Clément Péron
  2019-04-11 10:57 ` [PATCH v2 2/8] dt-bindings: gpu: add bus clock for Mali Midgard GPUs Clément Péron
@ 2019-04-11 10:57 ` Clément Péron
  2019-04-11 10:57 ` [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6 Clément Péron
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Clément Péron @ 2019-04-11 10:57 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, Jernej Skrabec
  Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
	linux-sunxi, Clément Péron

This add the H6 mali compatible in the dt-bindings to later support
specific implementation.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 .../devicetree/bindings/gpu/arm,mali-midgard.txt         | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
index 2e8bbce35695..0000ec4a9f44 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
@@ -15,6 +15,7 @@ Required properties:
     + "arm,mali-t860"
     + "arm,mali-t880"
   * which must be preceded by one of the following vendor specifics:
+    + "allwinner,sun50i-h6-mali"
     + "amlogic,meson-gxm-mali"
     + "rockchip,rk3288-mali"
     + "rockchip,rk3399-mali"
@@ -49,9 +50,15 @@ Vendor-specific bindings
 ------------------------
 
 The Mali GPU is integrated very differently from one SoC to
-another. In order to accomodate those differences, you have the option
+another. In order to accommodate those differences, you have the option
 to specify one more vendor-specific compatible, among:
 
+- "allwinner,sun50i-h6-mali"
+  Required properties:
+  - clocks : phandles to core and bus clocks
+  - clock-names : must contain "core" and "bus"
+  - resets: phandle to GPU reset line
+
 - "amlogic,meson-gxm-mali"
   Required properties:
   - resets : Should contain phandles of :
-- 
2.17.1


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

* [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
  2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
                   ` (2 preceding siblings ...)
  2019-04-11 10:57 ` [PATCH v2 3/8] dt-bindings: gpu: mali-midgard: Add h6 mali gpu compatible Clément Péron
@ 2019-04-11 10:57 ` Clément Péron
  2019-04-11 15:05   ` Jernej Škrabec
  2019-04-11 10:57 ` [PATCH v2 5/8] arm64: dts: allwinner: Add mali GPU supply for Pine H64 Clément Péron
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Clément Péron @ 2019-04-11 10:57 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, Jernej Skrabec
  Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
	linux-sunxi, Clément Péron

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";
+		};
+
 		syscon: syscon@3000000 {
 			compatible = "allwinner,sun50i-h6-system-control",
 				     "allwinner,sun50i-a64-system-control";
-- 
2.17.1


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

* [PATCH v2 5/8] arm64: dts: allwinner: Add mali GPU supply for Pine H64
  2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
                   ` (3 preceding siblings ...)
  2019-04-11 10:57 ` [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6 Clément Péron
@ 2019-04-11 10:57 ` Clément Péron
  2019-04-11 10:57 ` [PATCH v2 6/8] arm64: dts: allwinner: Add mali GPU supply for Beelink GS1 Clément Péron
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Clément Péron @ 2019-04-11 10:57 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, Jernej Skrabec
  Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
	linux-sunxi, Clément Péron

Enable and add supply to the Mali GPU node on the
Pine H64 board.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index 4802902e128f..e16a8c6738f9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -85,6 +85,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&reg_dcdcc>;
+	status = "okay";
+};
+
 &hdmi {
 	status = "okay";
 };
-- 
2.17.1


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

* [PATCH v2 6/8] arm64: dts: allwinner: Add mali GPU supply for Beelink GS1
  2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
                   ` (4 preceding siblings ...)
  2019-04-11 10:57 ` [PATCH v2 5/8] arm64: dts: allwinner: Add mali GPU supply for Pine H64 Clément Péron
@ 2019-04-11 10:57 ` Clément Péron
  2019-04-11 10:57 ` [PATCH v2 7/8] arm64: dts: allwinner: Add mali GPU supply for OrangePi Boards Clément Péron
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 21+ messages in thread
From: Clément Péron @ 2019-04-11 10:57 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, Jernej Skrabec
  Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
	linux-sunxi, Clément Péron

Enable and add supply to the Mali GPU node on the
Beelink GS1 board.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 0dc33c90dd60..21440d572f0a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -70,6 +70,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&reg_dcdcc>;
+	status = "okay";
+};
+
 &hdmi {
 	status = "okay";
 };
-- 
2.17.1


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

* [PATCH v2 7/8] arm64: dts: allwinner: Add mali GPU supply for OrangePi Boards
  2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
                   ` (5 preceding siblings ...)
  2019-04-11 10:57 ` [PATCH v2 6/8] arm64: dts: allwinner: Add mali GPU supply for Beelink GS1 Clément Péron
@ 2019-04-11 10:57 ` Clément Péron
  2019-04-11 10:57 ` [PATCH v2 8/8] arm64: dts: allwinner: Add mali GPU supply for OrangePi 3 Clément Péron
  2019-04-11 12:32 ` [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Maxime Ripard
  8 siblings, 0 replies; 21+ messages in thread
From: Clément Péron @ 2019-04-11 10:57 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, Jernej Skrabec
  Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
	linux-sunxi, Clément Péron

Enable and add supply to the Mali GPU node on the
Orange Pi One Plus and Lite2 boards.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 62e27948a3fa..bd13297555ab 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -55,6 +55,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&reg_dcdcc>;
+	status = "okay";
+};
+
 &mmc0 {
 	vmmc-supply = <&reg_cldo1>;
 	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
-- 
2.17.1


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

* [PATCH v2 8/8] arm64: dts: allwinner: Add mali GPU supply for OrangePi 3
  2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
                   ` (6 preceding siblings ...)
  2019-04-11 10:57 ` [PATCH v2 7/8] arm64: dts: allwinner: Add mali GPU supply for OrangePi Boards Clément Péron
@ 2019-04-11 10:57 ` Clément Péron
  2019-04-11 12:32 ` [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Maxime Ripard
  8 siblings, 0 replies; 21+ messages in thread
From: Clément Péron @ 2019-04-11 10:57 UTC (permalink / raw)
  To: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, Jernej Skrabec
  Cc: devicetree, linux-kernel, linux-arm-kernel, dri-devel,
	linux-sunxi, Clément Péron

Enable and add supply to the Mali GPU node on the
Orange Pi 3 board.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index 17d496990108..d4c989cc92a7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -58,6 +58,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&reg_dcdcc>;
+	status = "okay";
+};
+
 &mmc0 {
 	vmmc-supply = <&reg_cldo1>;
 	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
-- 
2.17.1


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

* Re: [PATCH v2 2/8] dt-bindings: gpu: add bus clock for Mali Midgard GPUs
  2019-04-11 10:57 ` [PATCH v2 2/8] dt-bindings: gpu: add bus clock for Mali Midgard GPUs Clément Péron
@ 2019-04-11 12:30   ` Maxime Ripard
  2019-04-11 12:45     ` Clément Péron
  0 siblings, 1 reply; 21+ messages in thread
From: Maxime Ripard @ 2019-04-11 12:30 UTC (permalink / raw)
  To: Clément Péron
  Cc: Rob Herring, Chen-Yu Tsai, Icenowy Zheng, Jagan Teki,
	Jernej Skrabec, devicetree, linux-kernel, linux-arm-kernel,
	dri-devel, linux-sunxi

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

On Thu, Apr 11, 2019 at 12:57:14PM +0200, Clément Péron wrote:
> Some SoCs adds a bus clock gate to the Mali Midgard GPU.
>
> Add the binding for the bus clock.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> Signed-off-by: Clément Péron <peron.clem@gmail.com>

I'm not quite sure what you did there. If Icenowy is the author and
you're sending that commit on her behalf, then she should have the
authorship of that commit.

If you're the author of that commit, then we Icenowy's SoB is there?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

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

* Re: [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU
  2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
                   ` (7 preceding siblings ...)
  2019-04-11 10:57 ` [PATCH v2 8/8] arm64: dts: allwinner: Add mali GPU supply for OrangePi 3 Clément Péron
@ 2019-04-11 12:32 ` Maxime Ripard
  2019-04-11 15:01   ` Jernej Škrabec
  8 siblings, 1 reply; 21+ messages in thread
From: Maxime Ripard @ 2019-04-11 12:32 UTC (permalink / raw)
  To: Clément Péron
  Cc: Rob Herring, Chen-Yu Tsai, Icenowy Zheng, Jagan Teki,
	Jernej Skrabec, devicetree, linux-kernel, linux-arm-kernel,
	dri-devel, linux-sunxi

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

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

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

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

* Re: [PATCH v2 2/8] dt-bindings: gpu: add bus clock for Mali Midgard GPUs
  2019-04-11 12:30   ` Maxime Ripard
@ 2019-04-11 12:45     ` Clément Péron
  0 siblings, 0 replies; 21+ messages in thread
From: Clément Péron @ 2019-04-11 12:45 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, Chen-Yu Tsai, Icenowy Zheng, Jagan Teki,
	Jernej Skrabec, devicetree, linux-kernel, linux-arm-kernel,
	dri-devel, linux-sunxi

Hi,

On Thu, 11 Apr 2019 at 14:30, Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> On Thu, Apr 11, 2019 at 12:57:14PM +0200, Clément Péron wrote:
> > Some SoCs adds a bus clock gate to the Mali Midgard GPU.
> >
> > Add the binding for the bus clock.
> >
> > Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> > Signed-off-by: Clément Péron <peron.clem@gmail.com>
>
> I'm not quite sure what you did there. If Icenowy is the author and
> you're sending that commit on her behalf, then she should have the
> authorship of that commit.

Indeed bad cherry pick, I will change the author sorry for that.

Clément

>
> If you're the author of that commit, then we Icenowy's SoB is there?
>
> Maxime
>
> --
> Maxime Ripard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

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

* Re: [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU
  2019-04-11 12:32 ` [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Maxime Ripard
@ 2019-04-11 15:01   ` Jernej Škrabec
  2019-04-11 15:09     ` Clément Péron
  0 siblings, 1 reply; 21+ messages in thread
From: Jernej Škrabec @ 2019-04-11 15:01 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Clément Péron, Rob Herring, Chen-Yu Tsai,
	Icenowy Zheng, Jagan Teki, devicetree, linux-kernel,
	linux-arm-kernel, dri-devel, linux-sunxi

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



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

* Re: [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
  2019-04-11 10:57 ` [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6 Clément Péron
@ 2019-04-11 15:05   ` Jernej Škrabec
  2019-04-11 15:20     ` Clément Péron
  0 siblings, 1 reply; 21+ messages in thread
From: Jernej Škrabec @ 2019-04-11 15:05 UTC (permalink / raw)
  To: Clément Péron
  Cc: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, devicetree, linux-kernel, linux-arm-kernel,
	dri-devel, linux-sunxi

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";





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

* Re: [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU
  2019-04-11 15:01   ` Jernej Škrabec
@ 2019-04-11 15:09     ` Clément Péron
  0 siblings, 0 replies; 21+ messages in thread
From: Clément Péron @ 2019-04-11 15:09 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: Maxime Ripard, Clément Péron, Rob Herring,
	Chen-Yu Tsai, Icenowy Zheng, Jagan Teki, devicetree,
	linux-kernel, linux-arm-kernel, dri-devel, linux-sunxi

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

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

* Re: [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
  2019-04-11 15:05   ` Jernej Škrabec
@ 2019-04-11 15:20     ` Clément Péron
  2019-04-11 15:23       ` Jernej Škrabec
  0 siblings, 1 reply; 21+ messages in thread
From: Clément Péron @ 2019-04-11 15:20 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, devicetree, linux-kernel, linux-arm-kernel,
	dri-devel, linux-sunxi

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";
>
>
>
>

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

* Re: [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
  2019-04-11 15:20     ` Clément Péron
@ 2019-04-11 15:23       ` Jernej Škrabec
  2019-04-11 15:27         ` Maxime Ripard
  0 siblings, 1 reply; 21+ messages in thread
From: Jernej Škrabec @ 2019-04-11 15:23 UTC (permalink / raw)
  To: Clément Péron
  Cc: Rob Herring, Maxime Ripard, Chen-Yu Tsai, Icenowy Zheng,
	Jagan Teki, devicetree, linux-kernel, linux-arm-kernel,
	dri-devel, linux-sunxi

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";





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

* Re: [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
  2019-04-11 15:23       ` Jernej Škrabec
@ 2019-04-11 15:27         ` Maxime Ripard
  2019-04-11 15:42           ` Jernej Škrabec
  2019-04-11 16:24           ` Rob Herring
  0 siblings, 2 replies; 21+ messages in thread
From: Maxime Ripard @ 2019-04-11 15:27 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: Clément Péron, Rob Herring, Chen-Yu Tsai,
	Icenowy Zheng, Jagan Teki, devicetree, linux-kernel,
	linux-arm-kernel, dri-devel, linux-sunxi

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

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

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

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

* Re: [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
  2019-04-11 15:27         ` Maxime Ripard
@ 2019-04-11 15:42           ` Jernej Škrabec
  2019-04-11 15:50             ` Maxime Ripard
  2019-04-11 16:24           ` Rob Herring
  1 sibling, 1 reply; 21+ messages in thread
From: Jernej Škrabec @ 2019-04-11 15:42 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Clément Péron, Rob Herring, Chen-Yu Tsai,
	Icenowy Zheng, Jagan Teki, devicetree, linux-kernel,
	linux-arm-kernel, dri-devel, linux-sunxi

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



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

* Re: [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
  2019-04-11 15:42           ` Jernej Škrabec
@ 2019-04-11 15:50             ` Maxime Ripard
  0 siblings, 0 replies; 21+ messages in thread
From: Maxime Ripard @ 2019-04-11 15:50 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: Clément Péron, Rob Herring, Chen-Yu Tsai,
	Icenowy Zheng, Jagan Teki, devicetree, linux-kernel,
	linux-arm-kernel, dri-devel, linux-sunxi

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

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

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

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

* Re: [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6
  2019-04-11 15:27         ` Maxime Ripard
  2019-04-11 15:42           ` Jernej Škrabec
@ 2019-04-11 16:24           ` Rob Herring
  1 sibling, 0 replies; 21+ messages in thread
From: Rob Herring @ 2019-04-11 16:24 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Jernej Škrabec, Clément Péron, Rob Herring,
	Chen-Yu Tsai, Icenowy Zheng, Jagan Teki, devicetree,
	linux-kernel, linux-arm-kernel, dri-devel, linux-sunxi

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

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

end of thread, other threads:[~2019-04-11 16:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11 10:57 [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Clément Péron
2019-04-11 10:57 ` [PATCH v2 1/8] dt-bindings: gpu: mali-midgard: Add resets property Clément Péron
2019-04-11 10:57 ` [PATCH v2 2/8] dt-bindings: gpu: add bus clock for Mali Midgard GPUs Clément Péron
2019-04-11 12:30   ` Maxime Ripard
2019-04-11 12:45     ` Clément Péron
2019-04-11 10:57 ` [PATCH v2 3/8] dt-bindings: gpu: mali-midgard: Add h6 mali gpu compatible Clément Péron
2019-04-11 10:57 ` [PATCH v2 4/8] arm64: dts: allwinner: Add ARM Mali GPU node for H6 Clément Péron
2019-04-11 15:05   ` Jernej Škrabec
2019-04-11 15:20     ` Clément Péron
2019-04-11 15:23       ` Jernej Škrabec
2019-04-11 15:27         ` Maxime Ripard
2019-04-11 15:42           ` Jernej Škrabec
2019-04-11 15:50             ` Maxime Ripard
2019-04-11 16:24           ` Rob Herring
2019-04-11 10:57 ` [PATCH v2 5/8] arm64: dts: allwinner: Add mali GPU supply for Pine H64 Clément Péron
2019-04-11 10:57 ` [PATCH v2 6/8] arm64: dts: allwinner: Add mali GPU supply for Beelink GS1 Clément Péron
2019-04-11 10:57 ` [PATCH v2 7/8] arm64: dts: allwinner: Add mali GPU supply for OrangePi Boards Clément Péron
2019-04-11 10:57 ` [PATCH v2 8/8] arm64: dts: allwinner: Add mali GPU supply for OrangePi 3 Clément Péron
2019-04-11 12:32 ` [PATCH v2 0/8] Add Allwinner H6 Mali Midgard GPU Maxime Ripard
2019-04-11 15:01   ` Jernej Škrabec
2019-04-11 15:09     ` Clément Péron

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