Skip to contentSkip to conversation

Enable Mali G310 GPU support on i.MX952 board

PATCH Superseded Guangliu Ding 3 participants 6 messages Apr 1 – Apr 2

Subsystems (6)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Enable Mali G310 GPU support on i.MX952 board

This series enable Mali G310 GPU support on i.MX952 boards, the same GPU IP as the instance on i.MX95 boards.

---
Changes in v2:
- Improve patch description, adding more GPU information.
- Remove Reviewed-by tag.
- Link to v1: https://patch.msgid.link/[email protected]

---
Guangliu Ding (2):
dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support
arm64: dts: imx952: Describe Mali G310 GPU

 .../bindings/gpu/arm,mali-valhall-csf.yaml         |  1 +
 arch/arm64/boot/dts/freescale/imx952.dtsi          | 36 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)

---
base-commit: 0138af2472dfdef0d56fc4697416eaa0ff2589bd
change-id: 20260331-master-7ec7ff0fe1b2

Best regards,

Signature · 1 line
Guangliu Ding <[email protected]>
#1 lore raw

PATCH v2 1/2 dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support

The GPU instance used on NXP i.MX952 is the Mali‑G310, document support for this variant.

A hardware GPU auto clock‑gating mechanism has been introduced, enabling GPUMIX to automatically manage the GPU clock. This improves overall response time.

---
 Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml +1 -0
index 8eccd4338a2b..6a10843a26e2 100644
@@ -20,6 +20,7 @@ properties:
           - enum:
               - mediatek,mt8196-mali
               - nxp,imx95-mali            # G310
+              - nxp,imx952-mali           # G310
               - rockchip,rk3588-mali
           - const: arm,mali-valhall-csf   # Mali Valhall GPU model/revision is fully discoverable
 
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support

Quoted 11 lines · Guangliu Ding

The GPU instance used on NXP i.MX952 is the Mali‑G310, document support for this variant.

A hardware GPU auto clock‑gating mechanism has been introduced, enabling GPUMIX to automatically manage the GPU clock. This improves overall response time.

---
 Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 +
 1 file changed, 1 insertion(+)

Why are you sending next version when the discussion is happening?

Best regards,
Krzysztof

#3 lore raw

RE: Re: [PATCH v2 1/2] dt-bindings: gpu: mali-valhall-csf: Document i.MX952 support

Quoted 8 lines · Guangliu Ding
Quoted 7 lines

The GPU instance used on NXP i.MX952 is the Mali‑G310, document support for this variant.

A hardware GPU auto clock‑gating mechanism has been introduced, enabling GPUMIX to automatically manage the GPU clock. This improves overall response time.

Quoted 7 lines
Quoted 4 lines
---
 Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 +
 1 file changed, 1 insertion(+)

Why are you sending next version when the discussion is happening?

I will drop this thread and raise v3 version with final fix. Sorry for inconvenience.

Quoted 2 lines

Best regards,
Krzysztof

#4 lore raw

PATCH v2 2/2 arm64: dts: imx952: Describe Mali G310 GPU

In reply to Guangliu Ding

Support Mali G310 GPU on i.MX952 board. Describe this GPU in the DT. Include dummy GPU voltage regulator and OPP tables.

---
 arch/arm64/boot/dts/freescale/imx952.dtsi | 36 +++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm64/boot/dts/freescale/imx952.dtsi +36 -0
index 91fe4916ac04..0bd3e7fc0674 100644
@@ -318,6 +318,28 @@ usbphynop2: usbphynop2 {
 		clock-names = "main_clk";
 	};
 
+	gpu_opp_table: opp-table {
+		compatible = "operating-points-v2";
+
+		opp-500000000 {
+			opp-hz = /bits/ 64 <500000000>;
+			opp-hz-real = /bits/ 64 <500000000>;
+			opp-microvolt = <920000>;
+		};
+
+		opp-800000000 {
+			opp-hz = /bits/ 64 <800000000>;
+			opp-hz-real = /bits/ 64 <800000000>;
+			opp-microvolt = <920000>;
+		};
+
+		opp-1000000000 {
+			opp-hz = /bits/ 64 <1000000000>;
+			opp-hz-real = /bits/ 64 <1000000000>;
+			opp-microvolt = <920000>;
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <2>;
@@ -1262,5 +1284,19 @@ usbmisc2: usbmisc@4c200200 {
 			reg = <0x0 0x4c200200 0x0 0x200>,
 			      <0x0 0x4c010014 0x0 0x4>;
 		};
+
+		gpu: gpu@4d900000 {
+			compatible = "nxp,imx952-mali", "arm,mali-valhall-csf";
+			reg = <0 0x4d900000 0 0x480000>;
+			interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "gpu", "job", "mmu";
+			clocks = <&scmi_clk IMX952_CLK_GPU>;
+			clock-names = "core";
+			power-domains = <&scmi_devpd IMX952_PD_GPU>;
+			operating-points-v2 = <&gpu_opp_table>;
+			dynamic-power-coefficient = <1013>;
+		};
 	};
 };
Signature · 1 line
2.34.1