* [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU
@ 2025-07-06 2:56 iuncuim
2025-07-06 2:56 ` [PATCH 1/2] arm64: dts: allwinner: a523: add Mali GPU node iuncuim
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: iuncuim @ 2025-07-06 2:56 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Andre Przywara, Jernej Skrabec, Samuel Holland
Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel
From: Mikhail Kalashnikov <iuncuim@gmail.com>
This patch adds gpu support on devices with a523 processor. Since there is
no support for image output yet, the gpu is disabled after boot up.
$ dmesg | grep panfrost
[ 3.826968] panfrost 1800000.gpu: clock rate = 432000000
[ 3.832305] panfrost 1800000.gpu: bus_clock rate = 200000000
[ 3.838353] panfrost 1800000.gpu: mali-g57 id 0x9091 major 0x0 minor 0x1
status 0x0
[ 3.846050] panfrost 1800000.gpu: features: 00000000,000019f7, issues:
00000001,80000400
[ 3.854134] panfrost 1800000.gpu: Features: L2:0x07110206 Shader:0x00000000
Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[ 3.866011] panfrost 1800000.gpu: shader_present=0x1 l2_present=0x1
[ 3.874108] [drm] Initialized panfrost 1.3.0 for 1800000.gpu on minor 0
Tested on x96qproplus and walnutpi 2b devices.
Based on v6.16-rc4 with patches:
https://lore.kernel.org/all/20250628054438.2864220-1-wens@kernel.org
https://lore.kernel.org/linux-sunxi/20250628161608.3072968-1-wens@kernel.org
https://lore.kernel.org/linux-sunxi/20250627152918.2606728-1-wens@kernel.org/
iuncuim (2):
arm64: dts: allwinner: a523: add Mali GPU node
arm64: dts: allwinner: a523: enable Mali GPU for all boards
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++
.../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 5 +++++
.../boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 5 +++++
.../boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 5 +++++
.../dts/allwinner/sun55i-t527-orangepi-4a.dts | 5 +++++
5 files changed, 35 insertions(+)
--
2.50.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] arm64: dts: allwinner: a523: add Mali GPU node
2025-07-06 2:56 [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU iuncuim
@ 2025-07-06 2:56 ` iuncuim
2025-07-06 2:56 ` [PATCH 2/2] arm64: dts: allwinner: a523: enable Mali GPU for all boards iuncuim
2025-07-07 23:44 ` [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU Andre Przywara
2 siblings, 0 replies; 5+ messages in thread
From: iuncuim @ 2025-07-06 2:56 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Andre Przywara, Jernej Skrabec, Samuel Holland
Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel
From: Mikhail Kalashnikov <iuncuim@gmail.com>
The Allwinner A523 SoC features the Mali-G57 MC1 GPU, which belongs
to the Mali Valhall (v9) family. There is a power domain specifically
for this GPU that needs to be enabled to utilize it.
To enable in a specific device, we need to enable the gpu node and specify
the “mali-supply” regulator additionally in the device tree.
Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index dd6fa22f9..d3528d498 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -108,6 +108,21 @@ soc {
#size-cells = <1>;
ranges = <0x0 0x0 0x0 0x40000000>;
+ gpu: gpu@1800000 {
+ compatible = "allwinner,sun55i-a523-mali",
+ "arm,mali-valhall-jm";
+ reg = <0x1800000 0x10000>;
+ interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "job", "mmu", "gpu";
+ clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>;
+ clock-names = "core", "bus";
+ power-domains = <&pck600 PD_GPU>;
+ resets = <&ccu RST_BUS_GPU>;
+ status = "disabled";
+ };
+
pio: pinctrl@2000000 {
compatible = "allwinner,sun55i-a523-pinctrl";
reg = <0x2000000 0x800>;
--
2.50.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] arm64: dts: allwinner: a523: enable Mali GPU for all boards
2025-07-06 2:56 [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU iuncuim
2025-07-06 2:56 ` [PATCH 1/2] arm64: dts: allwinner: a523: add Mali GPU node iuncuim
@ 2025-07-06 2:56 ` iuncuim
2025-07-07 23:44 ` [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU Andre Przywara
2 siblings, 0 replies; 5+ messages in thread
From: iuncuim @ 2025-07-06 2:56 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Andre Przywara, Jernej Skrabec, Samuel Holland
Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel
From: Mikhail Kalashnikov <iuncuim@gmail.com>
All devices based on the A523/A527/H728/T527 processors contain a G57 MC1 GPU.
Enable the DT nodes for this GPU and specify a regulator that supplies power
to the SoC's VDD_GPU pins. The other parameters are set in the SoC dtsi,
so are board independent.
Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 5 +++++
arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 5 +++++
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 5 +++++
arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts | 5 +++++
4 files changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
index 8bc0f2c72..553ad774e 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
@@ -66,6 +66,11 @@ &gmac0 {
status = "okay";
};
+&gpu {
+ mali-supply = <®_dcdc2>;
+ status = "okay";
+};
+
&mdio0 {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts b/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
index 59db10354..a96927fbd 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts
@@ -54,6 +54,11 @@ &ehci1 {
status = "okay";
};
+&gpu {
+ mali-supply = <®_dcdc2>;
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <®_vcc3v3>;
cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
index 142177c1f..b9eeb6753 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
@@ -76,6 +76,11 @@ &gmac0 {
status = "okay";
};
+&gpu {
+ mali-supply = <®_dcdc2>;
+ status = "okay";
+};
+
&mdio0 {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
index 5f97505ec..d07bb9193 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
@@ -95,6 +95,11 @@ &ehci1 {
status = "okay";
};
+&gpu {
+ mali-supply = <®_dcdc2>;
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <®_cldo3>;
cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */
--
2.50.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU
2025-07-06 2:56 [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU iuncuim
2025-07-06 2:56 ` [PATCH 1/2] arm64: dts: allwinner: a523: add Mali GPU node iuncuim
2025-07-06 2:56 ` [PATCH 2/2] arm64: dts: allwinner: a523: enable Mali GPU for all boards iuncuim
@ 2025-07-07 23:44 ` Andre Przywara
2025-07-08 3:43 ` Chen-Yu Tsai
2 siblings, 1 reply; 5+ messages in thread
From: Andre Przywara @ 2025-07-07 23:44 UTC (permalink / raw)
To: iuncuim
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel
On Sun, 6 Jul 2025 10:56:21 +0800
iuncuim <iuncuim@gmail.com> wrote:
> From: Mikhail Kalashnikov <iuncuim@gmail.com>
>
> This patch adds gpu support on devices with a523 processor. Since there is
> no support for image output yet, the gpu is disabled after boot up.
>
> $ dmesg | grep panfrost
> [ 3.826968] panfrost 1800000.gpu: clock rate = 432000000
> [ 3.832305] panfrost 1800000.gpu: bus_clock rate = 200000000
> [ 3.838353] panfrost 1800000.gpu: mali-g57 id 0x9091 major 0x0 minor 0x1
> status 0x0
> [ 3.846050] panfrost 1800000.gpu: features: 00000000,000019f7, issues:
> 00000001,80000400
> [ 3.854134] panfrost 1800000.gpu: Features: L2:0x07110206 Shader:0x00000000
> Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
> [ 3.866011] panfrost 1800000.gpu: shader_present=0x1 l2_present=0x1
> [ 3.874108] [drm] Initialized panfrost 1.3.0 for 1800000.gpu on minor 0
So what confidence do we have that this really works, apart from these
successful initialisation messages? Has this been shown to work with
some (yet-out-of-tree) DRM patches, to produce 3D rendered output? I
wonder if we should wait with upstreaming until we can really test this
on some kind of screen.
Cheers,
Andre
>
> Tested on x96qproplus and walnutpi 2b devices.
>
> Based on v6.16-rc4 with patches:
> https://lore.kernel.org/all/20250628054438.2864220-1-wens@kernel.org
> https://lore.kernel.org/linux-sunxi/20250628161608.3072968-1-wens@kernel.org
> https://lore.kernel.org/linux-sunxi/20250627152918.2606728-1-wens@kernel.org/
>
>
> iuncuim (2):
> arm64: dts: allwinner: a523: add Mali GPU node
> arm64: dts: allwinner: a523: enable Mali GPU for all boards
>
> arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++
> .../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 5 +++++
> .../boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 5 +++++
> .../boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 5 +++++
> .../dts/allwinner/sun55i-t527-orangepi-4a.dts | 5 +++++
> 5 files changed, 35 insertions(+)
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU
2025-07-07 23:44 ` [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU Andre Przywara
@ 2025-07-08 3:43 ` Chen-Yu Tsai
0 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2025-07-08 3:43 UTC (permalink / raw)
To: Andre Przywara
Cc: iuncuim, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jernej Skrabec, Samuel Holland, devicetree, linux-arm-kernel,
linux-sunxi, linux-kernel
On Tue, Jul 8, 2025 at 7:46 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Sun, 6 Jul 2025 10:56:21 +0800
> iuncuim <iuncuim@gmail.com> wrote:
>
> > From: Mikhail Kalashnikov <iuncuim@gmail.com>
> >
> > This patch adds gpu support on devices with a523 processor. Since there is
> > no support for image output yet, the gpu is disabled after boot up.
> >
> > $ dmesg | grep panfrost
> > [ 3.826968] panfrost 1800000.gpu: clock rate = 432000000
> > [ 3.832305] panfrost 1800000.gpu: bus_clock rate = 200000000
> > [ 3.838353] panfrost 1800000.gpu: mali-g57 id 0x9091 major 0x0 minor 0x1
> > status 0x0
> > [ 3.846050] panfrost 1800000.gpu: features: 00000000,000019f7, issues:
> > 00000001,80000400
> > [ 3.854134] panfrost 1800000.gpu: Features: L2:0x07110206 Shader:0x00000000
> > Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
> > [ 3.866011] panfrost 1800000.gpu: shader_present=0x1 l2_present=0x1
> > [ 3.874108] [drm] Initialized panfrost 1.3.0 for 1800000.gpu on minor 0
>
> So what confidence do we have that this really works, apart from these
> successful initialisation messages? Has this been shown to work with
> some (yet-out-of-tree) DRM patches, to produce 3D rendered output? I
> wonder if we should wait with upstreaming until we can really test this
> on some kind of screen.
I ran glmark2-es2-drm using vkms, and it seemed to run correctly.
The GPU job interrupt was triggering frequently, and the GPU mmu
interrupt was triggered twice for each run. This was with Mesa
25.0.2 from Debian bookworm backports.
So this is sort of
Tested-by: Chen-Yu Tsai <wens@csie.org>
If anyone has some idea about how to capture the output, I can give that
a try.
> Cheers,
> Andre
>
> >
> > Tested on x96qproplus and walnutpi 2b devices.
> >
> > Based on v6.16-rc4 with patches:
> > https://lore.kernel.org/all/20250628054438.2864220-1-wens@kernel.org
> > https://lore.kernel.org/linux-sunxi/20250628161608.3072968-1-wens@kernel.org
> > https://lore.kernel.org/linux-sunxi/20250627152918.2606728-1-wens@kernel.org/
> >
> >
> > iuncuim (2):
> > arm64: dts: allwinner: a523: add Mali GPU node
> > arm64: dts: allwinner: a523: enable Mali GPU for all boards
> >
> > arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++
> > .../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 5 +++++
> > .../boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 5 +++++
> > .../boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 5 +++++
> > .../dts/allwinner/sun55i-t527-orangepi-4a.dts | 5 +++++
> > 5 files changed, 35 insertions(+)
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-08 3:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-06 2:56 [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU iuncuim
2025-07-06 2:56 ` [PATCH 1/2] arm64: dts: allwinner: a523: add Mali GPU node iuncuim
2025-07-06 2:56 ` [PATCH 2/2] arm64: dts: allwinner: a523: enable Mali GPU for all boards iuncuim
2025-07-07 23:44 ` [PATCH 0/2] arm64: sunxi: a523: Enable Mali GPU Andre Przywara
2025-07-08 3:43 ` Chen-Yu Tsai
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).