arm64: sunxi: a523: Enable Mali GPU
v2 cover arm64: sunxi: a523: Enable Mali GPU
From: Mikhail Kalashnikov <[email protected]>
This patch adds gpu support on devices with a523 processor.
$ 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 0Since there is no support for image output yet, it may be difficult to confirm functionality. This can be done by running weston with vnc access using the command:
$ weston --renderer=gl --backend=vnc --disable-transport-layer-security --xwayland --width=640 --height=480
After that I was able to run glmark2 with a terrain result of 30 fps, while I can see that there is a load on the GPU in nvtop and the CPU remains unloaded.
Tested on x96qproplus and walnutpi 2b devices.
Based on v6.16-rc5 with patches:
https://lore.kernel.org/all/[email protected]
https://lore.kernel.org/linux-sunxi/[email protected]
https://lore.kernel.org/linux-sunxi/[email protected]/
Changes from v1:
- added compatible to the documentation
v1: https://lore.kernel.org/linux-sunxi/CAGb2v67Pu7CTJx3K=3CVSbQ9mNB-4Vrq+iaA+hUWtxdwS2aD0Q@mail.gmail.com
Mikhail Kalashnikov (3):
dt-bindings: gpu: mali-bifrost: Add Allwinner A523 compatible
arm64: dts: allwinner: a523: add Mali GPU node
arm64: dts: allwinner: a523: enable Mali GPU for all boards
.../devicetree/bindings/gpu/arm,mali-bifrost.yaml | 1 + 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 +++++ 6 files changed, 36 insertions(+)
Signature · 1 line
2.50.0
PATCH v2 1/3 dt-bindings: gpu: mali-bifrost: Add Allwinner A523 compatible
From: Mikhail Kalashnikov <[email protected]>
Add a compatible for the Allwinner A523 SoC, with an integrated ARM Mali G57 MC1 (Valhall-JM) GPU.
--- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +1 -0
@@ -40,6 +40,7 @@ properties: - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable - items: - enum: + - allwinner,sun55i-a523-mali - mediatek,mt8188-mali - mediatek,mt8192-mali - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable
Signature · 1 line
2.50.0
Re: [PATCH v2 1/3] dt-bindings: gpu: mali-bifrost: Add Allwinner A523 compatible
Quoted 10 lines · iuncuim
From: Mikhail Kalashnikov <[email protected]>
Add a compatible for the Allwinner A523 SoC, with an integrated ARM Mali G57 MC1 (Valhall-JM) GPU.
Signed-off-by Mikhail Kalashnikov <[email protected]>--- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 1 + 1 file changed, 1 insertion(+)
Applied, thanks!
PATCH v2 2/3 arm64: dts: allwinner: a523: add Mali GPU node
In reply to iuncuimFrom: Mikhail Kalashnikov <[email protected]>
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.
--- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +15 -0
@@ -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>;
Signature · 1 line
2.50.0
Re: [PATCH v2 2/3] arm64: dts: allwinner: a523: add Mali GPU node
On Fri, 11 Jul 2025 11:57:28 +0800
iuncuim <[email protected]> wrote:
Hi,
Quoted 8 lines
From: Mikhail Kalashnikov <[email protected]>
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.
Checked the resources against the manual:
Quoted 1 line
Signed-off-by Mikhail Kalashnikov <[email protected]>
Cheers,
Andre
Quoted 30 lines
--- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +15
-0@@ -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>;
kernel test robot
build botRe: [PATCH v2 2/3] arm64: dts: allwinner: a523: add Mali GPU node
In reply to iuncuimkernel test robot noticed the following build errors:
Hi iuncuim,
kernel test robot noticed the following build errors:
[auto build test ERROR on sunxi/sunxi/for-next]
[also build test ERROR on robh/for-next linus/master v6.16-rc5 next-20250711] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/iuncuim/dt-bindings-gpu-mali-bifrost-Add-Allwinner-A523-compatible/20250711-120104 base: https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git sunxi/for-next patch link: https://lore.kernel.org/r/20250711035730.17507-3-iuncuim%40gmail.com patch subject: [PATCH v2 2/3] arm64: dts: allwinner: a523: add Mali GPU node config: arm64-randconfig-001-20250712 (https://download.01.org/0day-ci/archive/20250712/[email protected]/config) compiler: aarch64-linux-gcc (GCC) 12.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250712/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
>> Error: arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi:119.29-30 syntax error
FATAL ERROR: Unable to parse input tree
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
PATCH v2 3/3 arm64: dts: allwinner: a523: enable Mali GPU for all boards
In reply to iuncuimFrom: Mikhail Kalashnikov <[email protected]>
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.
--- 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(+)
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +5 -0
@@ -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";
arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts +5 -0
@@ -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 */
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +5 -0
@@ -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";
arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts +5 -0
@@ -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 */
Signature · 1 line
2.50.0
Re: [PATCH v2 3/3] arm64: dts: allwinner: a523: enable Mali GPU for all boards
Quoted 7 lines · On Fri, 11 Jul 2025 11:57:29 +0800 iuncuim <[email protected]> wrote:
From: Mikhail Kalashnikov <[email protected]>
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_GPUpins. The other parameters are set in the SoC dtsi, so are board independent.
Checked the schematics of the three boards where those are available, and it's indeed DCDC2 there providing the voltage. For the X96QPro+, regulators.txt in debugs confirms this as well.
Quoted 1 line
Signed-off-by Mikhail Kalashnikov <[email protected]>
Cheers,
Andre
Quoted 71 lines
--- 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(+)arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +5
-0@@ -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";arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts +5
-0@@ -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 */arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +5
-0@@ -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";arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts +5
-0@@ -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 */
Re: (subset) [PATCH v2 0/3] arm64: sunxi: a523: Enable Mali GPU
In reply to iuncuimQuoted 16 lines · iuncuim
From: Mikhail Kalashnikov <[email protected]>
This patch adds gpu support on devices with a523 processor.
$ 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
Quoted 1 line
[...]
Applied to sunxi/dt-for-6.17 in local tree, thanks!
[2/3] arm64: dts: allwinner: a523: add Mali GPU node
commit: 3d99e0dc888727a21b45ca64ff7b0cddbd17dd16
[3/3] arm64: dts: allwinner: a523: enable Mali GPU for all boards
commit: d96d9ac8d2f197f31ea3de931dde1a217950f4adBest regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>