Skip to contentSkip to conversation

arm64: dts: rockchip: Fix wrong register range of rk3576 gpu

PATCH Superseded Chaoyi Chen 4 participants 6 messages Dec 30, 2025 – Jan 6

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: rockchip: Fix wrong register range of rk3576 gpu

From: Chaoyi Chen <[email protected]>

According to RK3576 TRM part1 page13, the size of the GPU registers is 128 KB.

Fixes 57b1ce903966 ("arm64: dts: rockchip: Add rk3576 SoC base DT")
---
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3576.dtsi +1 -1
index 6284e7bdc442..b375015f0662 100644
@@ -1271,7 +1271,7 @@ power-domain@RK3576_PD_VO1 {
 
 		gpu: gpu@27800000 {
 			compatible = "rockchip,rk3576-mali", "arm,mali-bifrost";
-			reg = <0x0 0x27800000 0x0 0x200000>;
+			reg = <0x0 0x27800000 0x0 0x20000>;
 			assigned-clocks = <&scmi_clk SCMI_CLK_GPU>;
 			assigned-clock-rates = <198000000>;
 			clocks = <&cru CLK_GPU>;
Signature · 1 line
2.51.1
#1 lore raw
Quoted 17 lines · On Tuesday, 30 December 2025 10:02:46 Central European Standard Time Chaoyi…

From: Chaoyi Chen <[email protected]>

According to RK3576 TRM part1 page13, the size of the GPU registers is 128 KB.

Fixes 57b1ce903966 ("arm64: dts: rockchip: Add rk3576 SoC base DT")
---
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3576.dtsi +0 -0
index 6284e7bdc442..b375015f0662 100644

arch/arm64/boot/dts/rockchip/rk3576.dtsi power-domain@RK3576_PD_VO1 { · line 1277

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3576.dtsi +1 -1
@@ -1271,7 +1271,7 @@ power-domain@RK3576_PD_VO1 {
 
 		gpu: gpu@27800000 {
 			compatible = "rockchip,rk3576-mali", "arm,mali-bifrost";
-			reg = <0x0 0x27800000 0x0 0x200000>;
+			reg = <0x0 0x27800000 0x0 0x20000>;
 			assigned-clocks = <&scmi_clk SCMI_CLK_GPU>;
 			assigned-clock-rates = <198000000>;
 			clocks = <&cru CLK_GPU>;

This is only true if you only consider the GPU_CONTROL and JOB_CONTROL register ranges, and leave out the MMU_STAGE1 and MMU_STAGE2 ranges. I don't know if those need to be mapped, since the MMU control registers are < 0x2000.

What do other bifrost devices do?

Kind regards,
Nicolas Frattaroli

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#2 lore raw

Hello Nicolas,

Quoted 32 lines · Nicolas Frattaroli
Quoted 17 lines · On Tuesday, 30 December 2025 10:02:46 Central European Standard Time Chaoyi…

From: Chaoyi Chen <[email protected]>

According to RK3576 TRM part1 page13, the size of the GPU registers is 128 KB.

Fixes 57b1ce903966 ("arm64: dts: rockchip: Add rk3576 SoC base DT")
---
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3576.dtsi +0 -0
index 6284e7bdc442..b375015f0662 100644

arch/arm64/boot/dts/rockchip/rk3576.dtsi power-domain@RK3576_PD_VO1 { · line 1277

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3576.dtsi +1 -1
@@ -1271,7 +1271,7 @@ power-domain@RK3576_PD_VO1 {
 
 		gpu: gpu@27800000 {
 			compatible = "rockchip,rk3576-mali", "arm,mali-bifrost";
-			reg = <0x0 0x27800000 0x0 0x200000>;
+			reg = <0x0 0x27800000 0x0 0x20000>;
 			assigned-clocks = <&scmi_clk SCMI_CLK_GPU>;
 			assigned-clock-rates = <198000000>;
 			clocks = <&cru CLK_GPU>;

This is only true if you only consider the GPU_CONTROL and JOB_CONTROL register ranges, and leave out the MMU_STAGE1 and MMU_STAGE2 ranges. I don't know if those need to be mapped, since the MMU control registers are < 0x2000.

Quoted 2 lines

What do other bifrost devices do?

I don't quite understand your point. And this size is 0x20000, not 0x2000. Before the change it was 0x200000, which overlaps the address space of some hardware that comes after it like JPEG.

Could you explain it again? Thank you.

Quoted 5 lines

Kind regards,
Nicolas Frattaroli

Signature · 6 lines
Best, 
Chaoyi

-- 
Best, 
Chaoyi
Reviewed-by
#3 lore raw
Quoted 35 lines · On Monday, 5 January 2026 09:12:00 Central European Standard Time Chaoyi Chen…

Hello Nicolas,

Quoted 32 lines · Nicolas Frattaroli
Quoted 17 lines · On Tuesday, 30 December 2025 10:02:46 Central European Standard Time Chaoyi…

From: Chaoyi Chen <[email protected]>

According to RK3576 TRM part1 page13, the size of the GPU registers is 128 KB.

Fixes 57b1ce903966 ("arm64: dts: rockchip: Add rk3576 SoC base DT")
---
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3576.dtsi +0 -0
index 6284e7bdc442..b375015f0662 100644

arch/arm64/boot/dts/rockchip/rk3576.dtsi power-domain@RK3576_PD_VO1 { · line 1277

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3576.dtsi +1 -1
@@ -1271,7 +1271,7 @@ power-domain@RK3576_PD_VO1 {
 
 		gpu: gpu@27800000 {
 			compatible = "rockchip,rk3576-mali", "arm,mali-bifrost";
-			reg = <0x0 0x27800000 0x0 0x200000>;
+			reg = <0x0 0x27800000 0x0 0x20000>;
 			assigned-clocks = <&scmi_clk SCMI_CLK_GPU>;
 			assigned-clock-rates = <198000000>;
 			clocks = <&cru CLK_GPU>;

This is only true if you only consider the GPU_CONTROL and JOB_CONTROL register ranges, and leave out the MMU_STAGE1 and MMU_STAGE2 ranges. I don't know if those need to be mapped, since the MMU control registers are < 0x2000.

Quoted 8 lines
Quoted 2 lines

What do other bifrost devices do?

I don't quite understand your point. And this size is 0x20000, not 0x2000. Before the change it was 0x200000, which overlaps the address space of some hardware that comes after it like JPEG.

Could you explain it again? Thank you.

Oops, I misread. You are correct, there's one too many zeroes, and I thought you removed one too many. :)

Quoted 8 lines
Quoted 6 lines

Kind regards,
Nicolas Frattaroli

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

Reviewed-by on v1 1/1
#4 lore raw
In reply to Chaoyi Chen

Hi,

Quoted 4 lines · Chaoyi Chen

From: Chaoyi Chen <[email protected]>

According to RK3576 TRM part1 page13, the size of the GPU registers is 128 KB.

RK3576 TRM V1.2 has the address mapping on page 15. Maybe just reference "Table 1-1 Address Mapping" instead of giving a page number?

I think it makes sense to add the following extra text:

The current mapping incorrectly includes the addresses of multiple following IP like the eInk interface at 0x27900000. This has not been detected by the DT tooling as none of the extra mapped IP is described in the upstream RK3576 DT so far.

Quoted 3 lines
Fixes 57b1ce903966 ("arm64: dts: rockchip: Add rk3576 SoC base DT")

---

Greetings,

-- Sebastian

Quoted 19 lines
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3576.dtsi +1 -1
index 6284e7bdc442..b375015f0662 100644
@@ -1271,7 +1271,7 @@ power-domain@RK3576_PD_VO1 {
 
 		gpu: gpu@27800000 {
 			compatible = "rockchip,rk3576-mali", "arm,mali-bifrost";
-			reg = <0x0 0x27800000 0x0 0x200000>;
+			reg = <0x0 0x27800000 0x0 0x20000>;
 			assigned-clocks = <&scmi_clk SCMI_CLK_GPU>;
 			assigned-clock-rates = <198000000>;
 			clocks = <&cru CLK_GPU>;
Signature · 1 line
2.51.1

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#5 lore raw

Hi Sebasitian,

Quoted 12 lines · Sebastian Reichel

Hi,

Quoted 4 lines · Chaoyi Chen

From: Chaoyi Chen <[email protected]>

According to RK3576 TRM part1 page13, the size of the GPU registers is 128 KB.

RK3576 TRM V1.2 has the address mapping on page 15. Maybe just reference "Table 1-1 Address Mapping" instead of giving a page number?

Quoted 7 lines

I think it makes sense to add the following extra text:

The current mapping incorrectly includes the addresses of multiple following IP like the eInk interface at 0x27900000. This has not been detected by the DT tooling as none of the extra mapped IP is described in the upstream RK3576 DT so far.

I will add these info in v2. Thank you :)

Quoted 29 lines
Quoted 3 lines
Fixes 57b1ce903966 ("arm64: dts: rockchip: Add rk3576 SoC base DT")

---

Greetings,

-- Sebastian

Quoted 19 lines
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3576.dtsi +1 -1
index 6284e7bdc442..b375015f0662 100644
@@ -1271,7 +1271,7 @@ power-domain@RK3576_PD_VO1 {
 
 		gpu: gpu@27800000 {
 			compatible = "rockchip,rk3576-mali", "arm,mali-bifrost";
-			reg = <0x0 0x27800000 0x0 0x200000>;
+			reg = <0x0 0x27800000 0x0 0x20000>;
 			assigned-clocks = <&scmi_clk SCMI_CLK_GPU>;
 			assigned-clock-rates = <198000000>;
 			clocks = <&cru CLK_GPU>;
Signature · 1 line
2.51.1
Signature · 7 lines
Best, 
Chaoyi

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip