Skip to contentSkip to conversation

Allwinner H6 Mali GPU support

PATCH Applied Clément Péron 2 participants 4 messages Oct 30, 2019 – Oct 31, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v7 cover Allwinner H6 Mali GPU support

Hi,

Proper iommu patches has been merged[0].

There is still work to do to make it works with panfrost but all modules can be probed and removed smoothly.

These bindings could be used also for out-of-tree modules.

[0]: https://lore.kernel.org/linux-iommu/[email protected]/

Change since v6:
- Remove iommu patches
- Rebase on 5.4-rc4

Clément Péron (2):
arm64: dts: allwinner: Add ARM Mali GPU node for H6
arm64: dts: allwinner: Add mali GPU supply for H6 boards

 .../boot/dts/allwinner/sun50i-h6-beelink-gs1.dts   |  6 ++++++
 .../boot/dts/allwinner/sun50i-h6-orangepi-3.dts    |  6 ++++++
 .../boot/dts/allwinner/sun50i-h6-orangepi.dtsi     |  6 ++++++
 .../boot/dts/allwinner/sun50i-h6-pine-h64.dts      |  6 ++++++
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi       | 14 ++++++++++++++
 5 files changed, 38 insertions(+)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v7 1/2 arm64: dts: allwinner: Add ARM Mali GPU node for H6

Add the mali gpu node to the H6 device-tree.

---
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +14 -0
index 0d5ea19336a1..a029daf67345 100644
@@ -149,6 +149,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";
Signature · 1 line
2.20.1
#2 lore raw

PATCH v7 2/2 arm64: dts: allwinner: Add mali GPU supply for H6 boards

In reply to Clément Péron

Enable and add supply to the Mali GPU node on all the H6 boards.

Regarding the datasheet the maximum time for supply to reach its voltage is 32ms.

---
 arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 6 ++++++
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts  | 6 ++++++
 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi   | 6 ++++++
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts    | 6 ++++++
 4 files changed, 24 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +6 -0
index 1d05d570142f..e5ed1d4bfef8 100644
@@ -89,6 +89,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&reg_dcdcc>;
+	status = "okay";
+};
+
 &hdmi {
 	status = "okay";
 };
@@ -225,6 +230,7 @@
 			};
 
 			reg_dcdcc: dcdcc {
+				regulator-enable-ramp-delay = <32000>;
 				regulator-min-microvolt = <810000>;
 				regulator-max-microvolt = <1080000>;
 				regulator-name = "vdd-gpu";
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +6 -0
index eb379cd402ac..f5ae5182f0c5 100644
@@ -102,6 +102,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&reg_dcdcc>;
+	status = "okay";
+};
+
 &hdmi {
 	status = "okay";
 };
@@ -237,6 +242,7 @@
 			};
 
 			reg_dcdcc: dcdcc {
+				regulator-enable-ramp-delay = <32000>;
 				regulator-min-microvolt = <810000>;
 				regulator-max-microvolt = <1080000>;
 				regulator-name = "vdd-gpu";
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi +6 -0
index ec9b6a578e3f..df4cbd7ef96c 100644
@@ -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>;
@@ -163,6 +168,7 @@
 			};
 
 			reg_dcdcc: dcdcc {
+				regulator-enable-ramp-delay = <32000>;
 				regulator-min-microvolt = <810000>;
 				regulator-max-microvolt = <1080000>;
 				regulator-name = "vdd-gpu";
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +6 -0
index 30102daf83cc..74899ede00fb 100644
@@ -85,6 +85,11 @@
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&reg_dcdcc>;
+	status = "okay";
+};
+
 &hdmi {
 	status = "okay";
 };
@@ -221,6 +226,7 @@
 			};
 
 			reg_dcdcc: dcdcc {
+				regulator-enable-ramp-delay = <32000>;
 				regulator-min-microvolt = <810000>;
 				regulator-max-microvolt = <1080000>;
 				regulator-name = "vdd-gpu";
Signature · 1 line
2.20.1
#3 lore raw
In reply to Clément Péron
Quoted 8 lines · Clément Péron

Hi,

Proper iommu patches has been merged[0].

There is still work to do to make it works with panfrost but all modules can be probed and removed smoothly.

These bindings could be used also for out-of-tree modules.

Applied both, thanks

Maxime