Skip to contentSkip to conversation

power: Add Renesas R-Car V4H and V4M support

PATCH In review Geert Uytterhoeven 4 participants 8 messages Sep 10 – Sep 11

Subsystems (5)
lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

cover power: Add Renesas R-Car V4H and V4M support

Hi all,

This patch series documents support for the Imagination Technologies GPUs integrated in Renesas R-Car V4H and V4M SoCs, and adds device nodes for them to the SoC-specific DTS files.

I wrote these patches a while ago, and never submitted them, as these GPUs do not work due to missing or failing firmware. However, people showed interested, so I decided to post them.

Thanks for your comments!

Geert Uytterhoeven (3):
dt-bindings: gpu: img,powervr-rogue: Document R-Car V4H and V4M
support
arm64: dts: renesas: r8a779g0: Add GPU node
arm64: dts: renesas: r8a779h0: Add GPU node

 .../bindings/gpu/img,powervr-rogue.yaml       | 22 ++++++++++++++++++-
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi     | 21 ++++++++++++++++++
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi     | 21 ++++++++++++++++++
 3 files changed, 63 insertions(+), 1 deletion(-)
Signature · 12 lines
2.43.0

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
author maintainer
#1 lore raw

PATCH 1/3 dt-bindings: gpu: img, powervr-rogue: Document R-Car V4H and V4M support

The Renesas R-Car V4H SoC integrates an Imagination Technologies IMG AXM-8-256 GPU, while R-Car V4M integrates an Imagination Technologies IMG BXS-4-64 GPU. Both variants can generate 8 interrupts.

---
 .../bindings/gpu/img,powervr-rogue.yaml       | 22 ++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +21 -1
index e9218e0f363d1848..9bea037602c137a7 100644
@@ -35,6 +35,11 @@ properties:
           # work with newer dts.
           - const: img,img-axe
           - const: img,img-rogue
+      - items:
+          - enum:
+              - renesas,r8a779g0-gpu
+          - const: img,img-axm-8-256
+          - const: img,img-rogue
       - items:
           - enum:
               - thead,th1520-gpu
@@ -44,6 +49,7 @@ properties:
           - enum:
               - ti,am62p-gpu
               - ti,j721s2-gpu
+              - renesas,r8a779h0-gpu
           - const: img,img-bxs-4-64
           - const: img,img-rogue
 
@@ -70,7 +76,8 @@ properties:
     minItems: 1
 
   interrupts:
-    maxItems: 1
+    minItems: 1
+    maxItems: 8
 
   power-domains:
     minItems: 1
@@ -173,6 +180,19 @@ allOf:
       required:
         - power-domains
 
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - renesas,r8a779g0-gpu
+                - renesas,r8a779h0-gpu
+    then:
+      properties:
+        interrupts:
+          maxItems: 1
+
 examples:
   - |
     #include <dt-bindings/interrupt-controller/irq.h>
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH/RFC 1/3] dt-bindings: gpu: img,powervr-rogue: Document R-Car V4H and V4M support

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The newly added compatible string `img,img-axm-8-256` is omitted from the `power-domains`…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added compatible string img,img-axm-8-256 is omitted from the power-domains conditional block, allowing incomplete device tree nodes to silently pass validation. --

commit 2124d2433f8e144a72392a5dd4a2382c06e9682a
Author: Geert Uytterhoeven <[email protected]>

dt-bindings: gpu: img,powervr-rogue: Document R-Car V4H and V4M support

The Renesas R-Car V4H SoC integrates an Imagination Technologies IMG AXM-8-256 GPU, while R-Car V4M integrates an Imagination Technologies IMG BXS-4-64 GPU. Both variants can generate 8 interrupts.

Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml properties: · line 42

Quoted 13 lines
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +5 -0
index e9218e0f363d1..9bea037602c13 100644
@@ -35,6 +35,11 @@ properties:
           # work with newer dts.
           - const: img,img-axe
           - const: img,img-rogue
+      - items:
+          - enum:
+              - renesas,r8a779g0-gpu
+          - const: img,img-axm-8-256
+          - const: img,img-rogue

[Severity: Medium]
Does the newly added img,img-axm-8-256 compatible string need to be included in the power-domains conditional block?

Looking at the allOf/power-domains constraints further down in Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml, the existing block requires two power domains for similar hardware:

- if:
properties:
compatible:
contains:
enum:
- img,img-bxs-4-64
- img,img-ge7800
- img,img-gx6250
then:
properties:
power-domains:
minItems: 2
power-domain-names:
minItems: 2
required:
- power-domains
- power-domain-names

If a developer compiles a device tree using renesas,r8a779g0-gpu without providing the required two power domains, will the dtbs_check tool process the device tree without flagging the omission?

Should this enum list be updated to include img,img-axm-8-256 to correctly enforce the two power domains requirement for the R-Car V4H hardware?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer
#3 lore raw

Re: [PATCH/RFC 1/3] dt-bindings: gpu: img, powervr-rogue: Document R-Car V4H and V4M support

In reply to Geert Uytterhoeven

Hi Geert,

Quoted 14 lines · Geert Uytterhoeven

The Renesas R-Car V4H SoC integrates an Imagination Technologies IMG AXM-8-256 GPU, while R-Car V4M integrates an Imagination Technologies IMG BXS-4-64 GPU. Both variants can generate 8 interrupts.

---
 .../bindings/gpu/img,powervr-rogue.yaml       | 22 ++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +0 -0
index e9218e0f363d1848..9bea037602c137a7 100644

Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml properties: · line 42

Quoted 8 lines
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +5 -0
@@ -35,6 +35,11 @@ properties:
           # work with newer dts.
           - const: img,img-axe
           - const: img,img-rogue
+      - items:
+          - enum:
+              - renesas,r8a779g0-gpu
+          - const: img,img-axm-8-256
+          - const: img,img-rogue

It was already pointed out in another reply, but AXM is a Volcanic GPU where Volcanic is the architecture following Rogue.

We will have a separate set of bindings for Volcanic with a few differences including a new base compatible name. The driver is going to be the same, just with a whole lot of changes that are still being worked on.

The updates for AXM and V4H from this series will need to wait until at least the new bindings have been upstreamed.

Thanks,
Alessio

Quoted 41 lines
Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +16 -1
       - items:
           - enum:
               - thead,th1520-gpu
@@ -44,6 +49,7 @@ properties:
           - enum:
               - ti,am62p-gpu
               - ti,j721s2-gpu
+              - renesas,r8a779h0-gpu
           - const: img,img-bxs-4-64
           - const: img,img-rogue
 
@@ -70,7 +76,8 @@ properties:
     minItems: 1
 
   interrupts:
-    maxItems: 1
+    minItems: 1
+    maxItems: 8
 
   power-domains:
     minItems: 1
@@ -173,6 +180,19 @@ allOf:
       required:
         - power-domains
 
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - renesas,r8a779g0-gpu
+                - renesas,r8a779h0-gpu
+    then:
+      properties:
+        interrupts:
+          maxItems: 1
+
 examples:
   - |
     #include <dt-bindings/interrupt-controller/irq.h>
author maintainer
#4 lore raw

PATCH 2/3 arm64: dts: renesas: r8a779g0: Add GPU node

In reply to Geert Uytterhoeven

Add a device node for the Imagination Technologies IMG AXM-8-256 GPU.

---
Fails to load firmware:

    powervr fd000000.gpu: Direct firmware load for powervr/rogue_30.3.408.101_v1.fw failed with error -2
    powervr fd000000.gpu: [drm] *ERROR* failed to load firmware powervr/rogue_30.3.408.101_v1.fw (err=-2)

Firmware not available in upstream linux-firmware or
https://gitlab.freedesktop.org/imagination/linux-firmware.

---
 arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +21 -0
index ee3fd0df4fca6020..c2e97d679d35be6d 100644
@@ -2168,6 +2168,27 @@ its: msi-controller@40000 {
 			};
 		};
 
+		gsx: gpu@fd000000 {
+			compatible = "renesas,r8a779g0-gpu",
+				     "img,img-axm-8-256", "img,img-rogue";
+			reg = <0 0xfd000000 0 0x800000>;
+			interrupts = <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 0>;
+			clock-names = "core";
+			power-domains = <&sysc R8A779G0_PD_A33DGA>,
+					<&sysc R8A779G0_PD_A23DGB>;
+			power-domain-names = "a", "b";
+			resets = <&cpg 0>;
+			status = "disabled";
+		};
+
 		csi40: csi2@fe500000 {
 			compatible = "renesas,r8a779g0-csi2";
 			reg = <0 0xfe500000 0 0x40000>;
Signature · 1 line
2.43.0
#5 lore raw

Re: [PATCH/RFC 2/3] arm64: dts: renesas: r8a779g0: Add GPU node

Quoted 11 lines · Geert Uytterhoeven

Add a device node for the Imagination Technologies IMG AXM-8-256 GPU.

---
Fails to load firmware:

     powervr fd000000.gpu: Direct firmware load for powervr/rogue_30.3.408.101_v1.fw failed with error -2
     powervr fd000000.gpu: [drm] *ERROR* failed to load firmware powervr/rogue_30.3.408.101_v1.fw (err=-2)

Firmware not available in upstream linux-firmware or
https://gitlab.freedesktop.org/imagination/linux-firmware.

The GPU is the next generation (Volcanic), that is why there is no firmware.

author maintainer
#6 lore raw

PATCH 3/3 arm64: dts: renesas: r8a779h0: Add GPU node

In reply to Geert Uytterhoeven

Add a device node for the Imagination Technologies IMG BXS-4-64 GPU.

---
TI K3 J721s2 uses the same GPU, and firmware is available in upstream linux-firmware. The firmware is loaded, but fails to boot:

    powervr fd000000.gpu: [drm] loaded firmware powervr/rogue_36.53.104.796_v1.fw
    powervr fd000000.gpu: [drm] FW version v1.1 (build 6976702 OS)
    powervr fd000000.gpu: [drm] *ERROR* Firmware failed to boot
---
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/renesas/r8a779h0.dtsi +21 -0
index 0c9ca0f90badc096..ac6665568bd83a12 100644
@@ -1873,6 +1873,27 @@ its: msi-controller@40000 {
 			};
 		};
 
+		gsx: gpu@fd000000 {
+			compatible = "renesas,r8a779h0-gpu",
+				     "img,img-bxs-4-64", "img,img-rogue";
+			reg = <0 0xfd000000 0 0x800000>;
+			interrupts = <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 0>;
+			clock-names = "core";
+			power-domains = <&sysc R8A779H0_PD_A33DGA>,
+					<&sysc R8A779H0_PD_A23DGB>;
+			power-domain-names = "a", "b";
+			resets = <&cpg 0>;
+			status = "disabled";
+		};
+
 		csi40: csi2@fe500000 {
 			compatible = "renesas,r8a779h0-csi2";
 			reg = <0 0xfe500000 0 0x40000>;
Signature · 1 line
2.43.0
maintainer
#7 lore raw

Re: [PATCH/RFC 3/3] arm64: dts: renesas: r8a779h0: Add GPU node

Hi Geert,

Quoted 10 lines · Geert Uytterhoeven

Add a device node for the Imagination Technologies IMG BXS-4-64 GPU.

---
TI K3 J721s2 uses the same GPU, and firmware is available in upstream linux-firmware. The firmware is loaded, but fails to boot:

    powervr fd000000.gpu: [drm] loaded firmware powervr/rogue_36.53.104.796_v1.fw
    powervr fd000000.gpu: [drm] FW version v1.1 (build 6976702 OS)
    powervr fd000000.gpu: [drm] *ERROR* Firmware failed to boot

This is suspicious because as you said the same GPU/firmware are already used on at least another platform. We have a V4M so we can try figuring out soon what's preventing the firmware from booting from the driver/firmware point of view.

In the meantime, could you hold off on merging the updated bindings and DT node in case they need fixing?

Thanks,
Alessio

Quoted 36 lines
---
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/renesas/r8a779h0.dtsi +21 -0
index 0c9ca0f90badc096..ac6665568bd83a12 100644
@@ -1873,6 +1873,27 @@ its: msi-controller@40000 {
 			};
 		};
 
+		gsx: gpu@fd000000 {
+			compatible = "renesas,r8a779h0-gpu",
+				     "img,img-bxs-4-64", "img,img-rogue";
+			reg = <0 0xfd000000 0 0x800000>;
+			interrupts = <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 0>;
+			clock-names = "core";
+			power-domains = <&sysc R8A779H0_PD_A33DGA>,
+					<&sysc R8A779H0_PD_A23DGB>;
+			power-domain-names = "a", "b";
+			resets = <&cpg 0>;
+			status = "disabled";
+		};
+
 		csi40: csi2@fe500000 {
 			compatible = "renesas,r8a779h0-csi2";
 			reg = <0 0xfe500000 0 0x40000>;