Skip to contentSkip to conversation

drm/msm: Support for GPU in Nord

PATCH In review Akhil P Oommen 5 participants 14 messages Nov 17 – Nov 26

Subsystems (7)
lore
Share & tools
lore

Akhil P Oommen

author reviewer
#0 lore raw

v2 cover drm/msm: Support for GPU in Nord

Nord is the first Snapdragon chipset with 2 integrated GPUs. It has an Adreno 753 GPU which is very similar to the existing A750 (SM8650 chipset) and an Adreno A735 which is similar to the Adreno X1-45 GPU. This series adds support for the A753 GPU. A735 support will come later in a separate series.

The driver and dt-bindings patches are for Rob Clark and the devicetree bits are for Bjorn to pick up.

---
Changes in v2:
- Rebased on next-20261116
- Collect trailers
- Split the GPU and GMU nodes between nord.dtsi and nord-embedded.dtsi to match the existing Nord layout (Shawn)
- Moved the GPU cooling maps into nord.dtsi alongside the thermal zones (Shawn)
- Fixed the GMU OPP table to match the clock plan (Konrad)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Aastha Pandey (1):
arm64: dts: qcom: nord: Add GPU cooling

Shivam Rawat (4):
drm/msm/a6xx: Add Adreno 753 support
dt-bindings: display/msm: Document Adreno 753 GPU/GMU
arm64: dts: qcom: nord: Add GPU and GMU nodes
arm64: dts: qcom: nord-rrd: Enable Adreno 753 GPU

 .../devicetree/bindings/display/msm/gmu.yaml       |  33 ++++
 .../devicetree/bindings/display/msm/gpu.yaml       |   1 +
 arch/arm64/boot/dts/qcom/nord-embedded.dtsi        |  79 ++++++++
 arch/arm64/boot/dts/qcom/nord-rrd.dts              |  12 ++
 arch/arm64/boot/dts/qcom/nord.dtsi                 | 220 ++++++++++++++++++---
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c              |   6 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c              |   5 +-
 drivers/gpu/drm/msm/adreno/a7xx_catalog.c          |  35 ++++
 drivers/gpu/drm/msm/adreno/adreno_gpu.h            |   5 +
 9 files changed, 361 insertions(+), 35 deletions(-)

---
base-commit: 38c8be16846f10f3a710351357e4f4ace7254c8e
change-id: 20261008-nord-gpu1-7e71a91ae653

Best regards,

Signature · 1 line
Akhil P Oommen <[email protected]>
author reviewer
#1 lore raw

PATCH v2 1/5 drm/msm/a6xx: Add Adreno 753 support

From: Shivam Rawat <[email protected]>

Adreno 753 is the primary GPU in the Qualcomm Nord SoC and belongs to the A7xx Gen3 family. It is derived from A750 and shares the same IP-level configuration: protected registers, pwrup/IFPC register lists, GBIF CX registers, gmu_cgc_mode, 3MB GMEM, bus BCMs and preemption record size. The differences visible to the KMD are the chip id (0x43051701), the GMU chip id (0x70d0000) and the gen71300 SQE and GMU firmware.

The Nord primary GPU is the same as A750 but has a different chip id, so it needs its own catalog entry. Add a new catalog entry for this GPU and an adreno_is_a753() helper. HW clock gating is not working at the moment, so it is kept disabled for now.

---
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c     |  6 ++++--
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c     |  5 ++++-
 drivers/gpu/drm/msm/adreno/a7xx_catalog.c | 35 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/msm/adreno/adreno_gpu.h   |  5 +++++
 4 files changed, 48 insertions(+), 3 deletions(-)
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +4 -2
index a1561ca41a5b..0fa2d2091f3e 100644
@@ -1051,7 +1051,7 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state)
 	for (int i = 0; (gbif_cx && gbif_cx[i].offset); i++)
 		gpu_write(gpu, gbif_cx[i].offset, gbif_cx[i].value);
 
-	if (adreno_is_a8xx(adreno_gpu)) {
+	if (adreno_is_a8xx(adreno_gpu) || adreno_is_a753(adreno_gpu)) {
 		gpu_write(gpu, REG_A6XX_GBIF_CX_CONFIG, 0x20023000);
 		gmu_write(gmu, REG_A6XX_GMU_MRC_GBIF_QOS_CTRL, 0x33);
 	} else if (adreno_is_a722(adreno_gpu))
@@ -1227,7 +1227,9 @@ static int a6xx_gmu_secure_init(struct a6xx_gpu *a6xx_gpu)
 	if (test_bit(GMU_STATUS_SECURE_INIT, &gmu->status))
 		return 0;
 
-	if (adreno_is_a750(adreno_gpu) || adreno_is_a8xx(adreno_gpu)) {
+	if (adreno_is_a750(adreno_gpu) ||
+	    adreno_is_a753(adreno_gpu) ||
+	    adreno_is_a8xx(adreno_gpu)) {
 		/*
 		 * Assume that if qcom scm isn't available, that whatever
 		 * replacement allows writing the fuse register ourselves.
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +4 -1
index 3e4afaa5345f..ee885c663ac1 100644
@@ -651,6 +651,9 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
 	if (!(adreno_gpu->info->a6xx->hwcg || adreno_is_a7xx(adreno_gpu)))
 		return;
 
+	if (adreno_is_a753(adreno_gpu))
+		state = false;
+
 	if (adreno_is_a630(adreno_gpu))
 		clock_cntl_on = 0x8aa8aa02;
 	else if (adreno_is_a610(adreno_gpu) || adreno_is_a612(adreno_gpu))
@@ -1421,7 +1424,7 @@ static int hw_init(struct msm_gpu *gpu)
 				  BIT(6) | BIT(5) | BIT(3) | BIT(2) | BIT(1));
 	}
 
-	if (adreno_is_a750(adreno_gpu)) {
+	if (adreno_is_a750(adreno_gpu) || adreno_is_a753(adreno_gpu)) {
 		/* Disable ubwc merged UFC request feature */
 		gpu_rmw(gpu, REG_A6XX_RB_CMP_DBG_ECO_CNTL, BIT(19), BIT(19));
 
drivers/gpu/drm/msm/adreno/a7xx_catalog.c +35 -0
index 6f704898cea6..9465ffa3dd12 100644
@@ -451,6 +451,41 @@ static const struct adreno_info a7xx_gpus[] = {
 			},
 		},
 		.preempt_record_size = 3572 * SZ_1K,
+	}, {
+		.chip_ids = ADRENO_CHIP_IDS(0x43051701), /* "C523v2" */
+		.family = ADRENO_7XX_GEN3,
+		.fw = {
+			[ADRENO_FW_SQE] = "gen71300_sqe.fw",
+			[ADRENO_FW_GMU] = "gen71300_gmu.bin",
+		},
+		.gmem = 3 * SZ_1M,
+		.inactive_period = DRM_MSM_INACTIVE_PERIOD,
+		.quirks = ADRENO_QUIRK_HAS_CACHED_COHERENT |
+			  ADRENO_QUIRK_HAS_HW_APRIV |
+			  ADRENO_QUIRK_PREEMPTION |
+			  ADRENO_QUIRK_IFPC,
+		.funcs = &a7xx_gpu_funcs,
+		.a6xx = &(const struct a6xx_info) {
+			.protect = &a730_protect,
+			.pwrup_reglist = &a7xx_pwrup_reglist,
+			.dyn_pwrup_reglist = &a7xx_dyn_pwrup_reglist,
+			.ifpc_reglist = &a750_ifpc_reglist,
+			.gbif_cx = a640_gbif,
+			.gmu_chipid = 0x70d0000,
+			.gmu_cgc_mode = 0x00020202,
+			.bcms = (const struct a6xx_bcm[]) {
+				{ .name = "SH0", .buswidth = 16 },
+				{ .name = "MC0", .buswidth = 4 },
+				{
+					.name = "ACV",
+					.fixed = true,
+					.perfmode = BIT(2),
+					.perfmode_bw = 10687500,
+				},
+				{ /* sentinel */ },
+			},
+		},
+		.preempt_record_size = 3572 * SZ_1K,
 	}, {
 		.chip_ids = ADRENO_CHIP_IDS(0x43030c00),
 		.family = ADRENO_7XX_GEN2,
drivers/gpu/drm/msm/adreno/adreno_gpu.h +5 -0
index 4b2156825bdf..2911d440ab17 100644
@@ -559,6 +559,11 @@ static inline int adreno_is_a750(struct adreno_gpu *gpu)
 	return gpu->info->chip_ids[0] == 0x43051401;
 }
 
+static inline int adreno_is_a753(struct adreno_gpu *gpu)
+{
+	return gpu->info->chip_ids[0] == 0x43051701;
+}
+
 static inline int adreno_is_x185(struct adreno_gpu *gpu)
 {
 	return gpu->info->chip_ids[0] == 0x43050c01;
Signature · 1 line
2.55.0
#2 lore raw

Re: [PATCH v2 1/5] drm/msm/a6xx: Add Adreno 753 support

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] drm/msm/a6xx: missing UBWC L2/L3 swizzle disable in a6xx_set_ubwc_config() --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [High] drm/msm/a6xx: missing UBWC L2/L3 swizzle disable in a6xx_set_ubwc_config()
--

commit 0728c6891f9936a41b152874415dd989fc9326a8
Author: Shivam Rawat <[email protected]>

drm/msm/a6xx: Add Adreno 753 support

This commit adds an A7xx catalog entry, an adreno_is_a753() helper, and hardware initialization adjustments for the Adreno 753 GPU in the Qualcomm Nord SoC.

Quoted 12 lines
drivers/gpu/drm/msm/adreno/a7xx_catalog.c +4 -0
index 6f704898cea6e..9465ffa3dd12e 100644
@@ -451,6 +451,41 @@ static const struct adreno_info a7xx_gpus[] = {
 			},
 		},
 		.preempt_record_size = 3572 * SZ_1K,
+	}, {
+		.chip_ids = ADRENO_CHIP_IDS(0x43051701), /* "C523v2" */
+		.family = ADRENO_7XX_GEN3,
+		.fw = {

drivers/gpu/drm/msm/adreno/a7xx_catalog.c static const struct adreno_info a7xx_gpus[] = { · line 467

Quoted 10 lines
drivers/gpu/drm/msm/adreno/a7xx_catalog.c +10 -0
+			[ADRENO_FW_SQE] = "gen71300_sqe.fw",
+			[ADRENO_FW_GMU] = "gen71300_gmu.bin",
+		},
+		.gmem = 3 * SZ_1M,
+		.inactive_period = DRM_MSM_INACTIVE_PERIOD,
+		.quirks = ADRENO_QUIRK_HAS_CACHED_COHERENT |
+			  ADRENO_QUIRK_HAS_HW_APRIV |
+			  ADRENO_QUIRK_PREEMPTION |
+			  ADRENO_QUIRK_IFPC,
+		.funcs = &a7xx_gpu_funcs,

[Severity: High]
Does a6xx_set_ubwc_config() need to disable level 3 UBWC bank swizzling and program the swizzle disable bits into REG_A7XX_GRAS_NC_MODE_CNTL for Adreno 753 on Nord?

In drivers/soc/qcom/ubwc_config.c, "qcom,nord" maps to glymur_data, which sets both UBWC_FLAG_DISABLE_SWIZZLE_LVL2 and UBWC_FLAG_DISABLE_SWIZZLE_LVL3. That configuration is exposed to userspace via MSM_PARAM_UBWC_SWIZZLE and programmed into MDSS and Iris, and a8xx_set_ubwc_config() writes both level2_swizzling_dis and level3_swizzling_dis for other glymur_data platforms.

Adreno 753 uses a7xx_gpu_funcs -> hw_init() -> a6xx_set_ubwc_config(), which only checks UBWC_SWIZZLE_ENABLE_LVL2 and omits level 3 swizzle disable from REG_A6XX_RB_NC_MODE_CNTL, REG_A6XX_TPL1_NC_MODE_CNTL and REG_A6XX_SP_NC_MODE_CNTL, and writes neither level2_swizzling_dis nor level3_swizzling_dis to REG_A7XX_GRAS_NC_MODE_CNTL:

drivers/gpu/drm/msm/adreno/a6xx_gpu.c:a6xx_set_ubwc_config() {
	...
	u32 level2_swizzling_dis = !(qcom_ubwc_swizzle(cfg) & UBWC_SWIZZLE_ENABLE_LVL2);
	...
	if (adreno_is_a7xx(adreno_gpu)) {
		for (u32 pipe_id = PIPE_BR; pipe_id <= PIPE_BV; pipe_id++) {
			gpu_write(gpu, REG_A7XX_CP_APERTURE_CNTL_HOST,
				  A7XX_CP_APERTURE_CNTL_HOST_PIPE(pipe_id));
			gpu_write(gpu, REG_A7XX_GRAS_NC_MODE_CNTL,
				  FIELD_PREP(GENMASK(8, 5), hbb_lo));
		}
	...
}

Leaving level 3 swizzling enabled in RB/TPL1/SP and both level 2 and level 3 swizzling enabled in GRAS mismatches the rest of the SoC and userspace, corrupting UBWC surfaces during rendering and buffer sharing.

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

Re: [PATCH v2 1/5] drm/msm/a6xx: Add Adreno 753 support

In reply to Akhil P Oommen
Quoted 9 lines · Akhil P Oommen

From: Shivam Rawat <[email protected]>

Adreno 753 is the primary GPU in the Qualcomm Nord SoC and belongs to the A7xx Gen3 family. It is derived from A750 and shares the same IP-level configuration: protected registers, pwrup/IFPC register lists, GBIF CX registers, gmu_cgc_mode, 3MB GMEM, bus BCMs and preemption record size. The differences visible to the KMD are the chip id (0x43051701), the GMU chip id (0x70d0000) and the gen71300 SQE and GMU firmware.

[...]

drivers/gpu/drm/msm/adreno/a6xx_gpu.c static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state) · line 655

Quoted 8 lines
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +2 -0
@@ -651,6 +651,9 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
 	if (!(adreno_gpu->info->a6xx->hwcg || adreno_is_a7xx(adreno_gpu)))
 		return;
 
+	if (adreno_is_a753(adreno_gpu))
+		state = false;

Is that intended?

Konrad

author reviewer
#4 lore raw

Re: [PATCH v2 1/5] drm/msm/a6xx: Add Adreno 753 support

Quoted 19 lines · Konrad Dybcio
Quoted 9 lines · Akhil P Oommen

From: Shivam Rawat <[email protected]>

Adreno 753 is the primary GPU in the Qualcomm Nord SoC and belongs to the A7xx Gen3 family. It is derived from A750 and shares the same IP-level configuration: protected registers, pwrup/IFPC register lists, GBIF CX registers, gmu_cgc_mode, 3MB GMEM, bus BCMs and preemption record size. The differences visible to the KMD are the chip id (0x43051701), the GMU chip id (0x70d0000) and the gen71300 SQE and GMU firmware.

[...]

Quoted 6 lines
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +0 -0
@@ -651,6 +651,9 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
 	if (!(adreno_gpu->info->a6xx->hwcg || adreno_is_a7xx(adreno_gpu)))
 		return;
 
Quoted 4 lines

drivers/gpu/drm/msm/adreno/a6xx_gpu.c static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state) · line 655

Quoted 2 lines
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +2 -0
+	if (adreno_is_a753(adreno_gpu))
+		state = false;

Is that intended?

yes. It is mentioned in the commit text.

-Akhil.

Quoted 2 lines

Konrad

#5 lore raw

Re: [PATCH v2 1/5] drm/msm/a6xx: Add Adreno 753 support

Quoted 22 lines · Akhil P Oommen
Quoted 19 lines · Konrad Dybcio
Quoted 9 lines · Akhil P Oommen

From: Shivam Rawat <[email protected]>

Adreno 753 is the primary GPU in the Qualcomm Nord SoC and belongs to the A7xx Gen3 family. It is derived from A750 and shares the same IP-level configuration: protected registers, pwrup/IFPC register lists, GBIF CX registers, gmu_cgc_mode, 3MB GMEM, bus BCMs and preemption record size. The differences visible to the KMD are the chip id (0x43051701), the GMU chip id (0x70d0000) and the gen71300 SQE and GMU firmware.

[...]

Quoted 6 lines
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +0 -0
@@ -651,6 +651,9 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
 	if (!(adreno_gpu->info->a6xx->hwcg || adreno_is_a7xx(adreno_gpu)))
 		return;
 
Quoted 6 lines
Quoted 4 lines

drivers/gpu/drm/msm/adreno/a6xx_gpu.c static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state) · line 655

Quoted 2 lines
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +2 -0
+	if (adreno_is_a753(adreno_gpu))
+		state = false;

Is that intended?

yes. It is mentioned in the commit text.

Right, it says 'it's not working at the moment' - are we going to have a moment where it works?

Konrad

author reviewer
#6 lore raw

Re: [PATCH v2 1/5] drm/msm/a6xx: Add Adreno 753 support

Quoted 23 lines · Konrad Dybcio
Quoted 22 lines · Akhil P Oommen
Quoted 19 lines · Konrad Dybcio
Quoted 9 lines · Akhil P Oommen

From: Shivam Rawat <[email protected]>

Adreno 753 is the primary GPU in the Qualcomm Nord SoC and belongs to the A7xx Gen3 family. It is derived from A750 and shares the same IP-level configuration: protected registers, pwrup/IFPC register lists, GBIF CX registers, gmu_cgc_mode, 3MB GMEM, bus BCMs and preemption record size. The differences visible to the KMD are the chip id (0x43051701), the GMU chip id (0x70d0000) and the gen71300 SQE and GMU firmware.

[...]

Quoted 6 lines
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +0 -0
@@ -651,6 +651,9 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
 	if (!(adreno_gpu->info->a6xx->hwcg || adreno_is_a7xx(adreno_gpu)))
 		return;
 
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

drivers/gpu/drm/msm/adreno/a6xx_gpu.c static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state) · line 655

Quoted 2 lines
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +2 -0
+	if (adreno_is_a753(adreno_gpu))
+		state = false;

Is that intended?

yes. It is mentioned in the commit text.

Right, it says 'it's not working at the moment' - are we going to

Well, that clarifies that it is intended. :)

Quoted 1 line

have a moment where it works?

Yeah. Hoping to enable it in a separate patch later. It is under investigation.

-Akhil.

Quoted 2 lines

Konrad

author reviewer
#7 lore raw

PATCH v2 2/5 dt-bindings: display/msm: Document Adreno 753 GPU/GMU

In reply to Akhil P Oommen

From: Shivam Rawat <[email protected]>

Adreno 753 is the primary GPU in the Qualcomm Nord SoC and belongs to the A7xx Gen3 family. It is very similar to A750 and has the same register layout.

Document the qcom,adreno-43051701 GPU compatible and add a separate constraint block for the qcom,adreno-gmu-753.1 GMU describing its registers and clocks.

---
 .../devicetree/bindings/display/msm/gmu.yaml       | 33 ++++++++++++++++++++++
 .../devicetree/bindings/display/msm/gpu.yaml       |  1 +
 2 files changed, 34 insertions(+)
Documentation/devicetree/bindings/display/msm/gmu.yaml +33 -0
index 07f0e547b43c..6b28694624cf 100644
@@ -301,6 +301,39 @@ allOf:
       required:
         - qcom,qmp
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: qcom,adreno-gmu-753.1
+    then:
+      properties:
+        reg:
+          items:
+            - description: Core GMU registers
+            - description: Resource controller registers
+            - description: GMU PDC registers
+        reg-names:
+          items:
+            - const: gmu
+            - const: rscc
+            - const: gmu_pdc
+        clocks:
+          items:
+            - description: GPU AHB clock
+            - description: GMU clock
+            - description: GPU CX clock
+            - description: GPU AXI clock
+            - description: GPU MEMNOC clock
+            - description: GMU HUB clock
+        clock-names:
+          items:
+            - const: ahb
+            - const: gmu
+            - const: cxo
+            - const: axi
+            - const: memnoc
+            - const: hub
   - if:
       properties:
         compatible:
Documentation/devicetree/bindings/display/msm/gpu.yaml +1 -0
index c30de7feb447..3c90a09febe7 100644
@@ -451,6 +451,7 @@ allOf:
               - qcom,adreno-43050a01
               - qcom,adreno-43050c01
               - qcom,adreno-43051401
+              - qcom,adreno-43051701
               - qcom,adreno-44010000
               - qcom,adreno-44050001
               - qcom,adreno-44050a01
Signature · 1 line
2.55.0
author reviewer
#8 lore raw

PATCH v2 3/5 arm64: dts: qcom: nord: Add GPU and GMU nodes

In reply to Akhil P Oommen

From: Shivam Rawat <[email protected]>

Nord SoC integrates an Adreno 753 GPU as its primary GPU, belonging to the A7xx Gen3 family, along with its Graphics Management Unit (GMU).

Add the GPU and GMU nodes together with their OPP tables. The GPU sits behind adreno_smmu_0 and uses the gen71300 zap shader, while the GMU is clocked and powered from GPUCC.

Following the existing Nord split, the SoC-invariant properties (reg, interrupts, iommus, zap-shader) live in nord.dtsi with both nodes disabled, while nord-embedded.dtsi adds the clocks, power domains, interconnects and OPP tables that are only managed by the OS on the Embedded (non-GearVM) variant.

---
 arch/arm64/boot/dts/qcom/nord-embedded.dtsi | 79 +++++++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/nord.dtsi          | 43 ++++++++++++++++
 2 files changed, 122 insertions(+)
arch/arm64/boot/dts/qcom/nord-embedded.dtsi +79 -0
index 5a1520e436c6..e9e830bb727a 100644
@@ -76,6 +76,85 @@ &crypto {
 	status = "okay";
 };
 
+&gmu_0 {
+	clocks = <&gpucc GPU_CC_AHB_CLK>,
+		 <&gpucc GPU_CC_CX_GMU_CLK>,
+		 <&gpucc GPU_CC_CXO_CLK>,
+		 <&nwgcc NW_GCC_HSCNOC_GPU_AXI_CLK>,
+		 <&gpucc GPU_CC_MEMNOC_GFX_CLK>,
+		 <&gpucc GPU_CC_HUB_CX_INT_CLK>;
+	clock-names = "ahb",
+		      "gmu",
+		      "cxo",
+		      "axi",
+		      "memnoc",
+		      "hub";
+
+	power-domains = <&gpucc GPU_CC_CX_GDSC>,
+			<&gpucc GPU_CC_GX_GDSC>;
+	power-domain-names = "cx",
+			     "gx";
+
+	operating-points-v2 = <&gmu_opp_table_0>;
+
+	gmu_opp_table_0: opp-table {
+		compatible = "operating-points-v2";
+
+		opp-500000000 {
+			opp-hz = /bits/ 64 <500000000>;
+			opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+		};
+
+		opp-625000000 {
+			opp-hz = /bits/ 64 <625000000>;
+			opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+		};
+	};
+};
+
+&gpu_0 {
+	operating-points-v2 = <&gpu_opp_table_0>;
+
+	interconnects = <&hscnoc MASTER_GFX3D QCOM_ICC_TAG_ALWAYS
+			 &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+	interconnect-names = "gfx-mem";
+
+	gpu_opp_table_0: opp-table {
+		compatible = "operating-points-v2-adreno",
+			     "operating-points-v2";
+
+		opp-468000000 {
+			opp-hz = /bits/ 64 <468000000>;
+			opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+			opp-peak-kBps = <781250>;
+		};
+
+		opp-625000000 {
+			opp-hz = /bits/ 64 <625000000>;
+			opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+			opp-peak-kBps = <6075000>;
+		};
+
+		opp-735000000 {
+			opp-hz = /bits/ 64 <735000000>;
+			opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+			opp-peak-kBps = <8175000>;
+		};
+
+		opp-854000000 {
+			opp-hz = /bits/ 64 <854000000>;
+			opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+			opp-peak-kBps = <10687500>;
+		};
+
+		opp-1000000000 {
+			opp-hz = /bits/ 64 <1000000000>;
+			opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
+			opp-peak-kBps = <12450000>;
+		};
+	};
+};
+
 &i2c0 {
 	clocks = <&segcc SE_GCC_QUPV3_WRAP0_S0_CLK>;
 	clock-names = "se";
arch/arm64/boot/dts/qcom/nord.dtsi +43 -0

49 lines not on this page · raw message

Signature · 1 line
2.55.0
Reviewed-by on v2 3/5
#9 lore raw

Re: [PATCH v2 3/5] arm64: dts: qcom: nord: Add GPU and GMU nodes

Quoted 9 lines · Akhil P Oommen

From: Shivam Rawat <[email protected]>

Nord SoC integrates an Adreno 753 GPU as its primary GPU, belonging to the A7xx Gen3 family, along with its Graphics Management Unit (GMU).

Add the GPU and GMU nodes together with their OPP tables. The GPU sits behind adreno_smmu_0 and uses the gen71300 zap shader, while the GMU is clocked and powered from GPUCC.

Quoted 8 lines

Following the existing Nord split, the SoC-invariant properties (reg, interrupts, iommus, zap-shader) live in nord.dtsi with both nodes disabled, while nord-embedded.dtsi adds the clocks, power domains, interconnects and OPP tables that are only managed by the OS on the Embedded (non-GearVM) variant.

author reviewer
#10 lore raw

PATCH v2 4/5 arm64: dts: qcom: nord: Add GPU cooling

In reply to Akhil P Oommen

From: Aastha Pandey <[email protected]>

Unlike the CPU, the GPU does not throttle its speed automatically when it reaches high temperatures.

Set up GPU cooling on Nord by throttling the Adreno 753 GPU when it reaches 105°C. Label the passive trip points of the GPU thermal zones, map them to the GPU as a cooling device, and add a passive polling delay so the thermal framework can monitor the zones while throttling.

The thermal zones and the GPU node are both described in nord.dtsi, so do it there. On the GearVM variant the GPU node stays disabled, no cooling device gets registered for it, and the maps are simply left unbound.

---
 arch/arm64/boot/dts/qcom/nord.dtsi | 177 ++++++++++++++++++++++++++++++-------
 1 file changed, 145 insertions(+), 32 deletions(-)
arch/arm64/boot/dts/qcom/nord.dtsi +145 -32
index 36a422db8ea6..3e29c43ca9ad 100644
@@ -6,6 +6,7 @@
 #include <dt-bindings/firmware/qcom,scm.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/mailbox/qcom-ipcc.h>
+#include <dt-bindings/thermal/thermal.h>
 
 #include "nord-ipcc.h"
 
@@ -5122,12 +5123,12 @@ trip-point1 {
 		};
 
 		gpuss-0-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens6 1>;
 
 			trips {
-				trip-point0 {
+				gpuss0_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5139,15 +5140,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss0_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-1-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens6 2>;
 
 			trips {
-				trip-point0 {
+				gpuss1_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5159,15 +5167,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss1_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-2-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens6 3>;
 
 			trips {
-				trip-point0 {
+				gpuss2_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5179,15 +5194,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss2_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpu-0-0-0-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens6 4>;
 
 			trips {
-				trip-point0 {
+				gpu_0_0_0_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5199,6 +5221,13 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpu_0_0_0_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-1-0-thermal {
@@ -5342,12 +5371,12 @@ trip-point1 {
 		};
 
 		gpuss-0-1-1-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens6 12>;
 
 			trips {
-				trip-point0 {
+				gpuss_0_1_1_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5359,15 +5388,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss_0_1_1_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-1-1-1-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens6 13>;
 
 			trips {
-				trip-point0 {
+				gpuss_1_1_1_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5379,15 +5415,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss_1_1_1_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-2-1-1-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens6 14>;
 
 			trips {
-				trip-point0 {
+				gpuss_2_1_1_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5399,15 +5442,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss_2_1_1_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpu-0-1-1-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens6 15>;
 
 			trips {
-				trip-point0 {
+				gpu_0_1_1_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5419,6 +5469,13 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpu_0_1_1_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		amux-7-thermal {
@@ -5442,12 +5499,12 @@ trip-point1 {
 		};
 
 		gpuss-0-1-0-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens7 1>;
 
 			trips {
-				trip-point0 {
+				gpuss_0_1_0_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5459,15 +5516,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss_0_1_0_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-1-1-0-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens7 2>;
 
 			trips {
-				trip-point0 {
+				gpuss_1_1_0_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5479,15 +5543,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss_1_1_0_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-2-1-0-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens7 3>;
 
 			trips {
-				trip-point0 {
+				gpuss_2_1_0_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5499,15 +5570,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss_2_1_0_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpu-0-1-0-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens7 4>;
 
 			trips {
-				trip-point0 {
+				gpu_0_1_0_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5519,6 +5597,13 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpu_0_1_0_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-1-2-thermal {
@@ -5662,12 +5747,12 @@ trip-point1 {
 		};
 
 		gpuss-0-1-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens7 12>;
 
 			trips {
-				trip-point0 {
+				gpuss_0_1_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5679,15 +5764,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss_0_1_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-1-0-1-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens7 13>;
 
 			trips {
-				trip-point0 {
+				gpuss_1_0_1_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5699,15 +5791,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss_1_0_1_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpuss-2-0-1-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens7 14>;
 
 			trips {
-				trip-point0 {
+				gpuss_2_0_1_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5719,15 +5818,22 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpuss_2_0_1_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 
 		gpu-0-0-1-thermal {
-			polling-delay-passive = <0>;
+			polling-delay-passive = <10>;
 			polling-delay = <0>;
 			thermal-sensors = <&tsens7 15>;
 
 			trips {
-				trip-point0 {
+				gpu_0_0_1_alert0: trip-point0 {
 					temperature = <105000>;
 					hysteresis = <10000>;
 					type = "passive";
@@ -5739,6 +5845,13 @@ trip-point1 {
 					type = "passive";
 				};
 			};
+
+			cooling-maps {
+				map0 {
+					trip = <&gpu_0_0_1_alert0>;
+					cooling-device = <&gpu_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
 		};
 	};
 };
Signature · 1 line
2.55.0
Reviewed-by on v2 4/5
#11 lore raw

Re: [PATCH v2 4/5] arm64: dts: qcom: nord: Add GPU cooling

Quoted 10 lines · Akhil P Oommen

From: Aastha Pandey <[email protected]>

Unlike the CPU, the GPU does not throttle its speed automatically when it reaches high temperatures.

Set up GPU cooling on Nord by throttling the Adreno 753 GPU when it reaches 105°C. Label the passive trip points of the GPU thermal zones, map them to the GPU as a cooling device, and add a passive polling delay so the thermal framework can monitor the zones while throttling.

Quoted 7 lines

The thermal zones and the GPU node are both described in nord.dtsi, so do it there. On the GearVM variant the GPU node stays disabled, no cooling device gets registered for it, and the maps are simply left unbound.

author reviewer
#12 lore raw

PATCH v2 5/5 arm64: dts: qcom: nord-rrd: Enable Adreno 753 GPU

In reply to Akhil P Oommen

From: Shivam Rawat <[email protected]>

Enable the Adreno 753 GPU on the Nord RRD board and provide the firmware path for its zap shader.

---
 arch/arm64/boot/dts/qcom/nord-rrd.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/qcom/nord-rrd.dts +12 -0
index 47978df0af92..51e5ef927b7c 100644
@@ -366,6 +366,18 @@ vreg_l3l_1p8: ldo3 {
 	};
 };
 
+&gmu_0 {
+	status = "okay";
+};
+
+&gpu_0 {
+	status = "okay";
+};
+
+&gpu_0_zap_shader {
+	firmware-name = "qcom/nord/gen71300_zap.mbn";
+};
+
 &i2c7 {
 	clock-frequency = <400000>;
 
Signature · 1 line
2.55.0
#13 lore raw
In reply to Akhil P Oommen
Quoted 24 lines · Akhil P Oommen

Nord is the first Snapdragon chipset with 2 integrated GPUs. It has an Adreno 753 GPU which is very similar to the existing A750 (SM8650 chipset) and an Adreno A735 which is similar to the Adreno X1-45 GPU. This series adds support for the A753 GPU. A735 support will come later in a separate series.

The driver and dt-bindings patches are for Rob Clark and the devicetree bits are for Bjorn to pick up.

---
Changes in v2:
- Rebased on next-20261116
- Collect trailers
- Split the GPU and GMU nodes between nord.dtsi and nord-embedded.dtsi to match the existing Nord layout (Shawn)
- Moved the GPU cooling maps into nord.dtsi alongside the thermal zones (Shawn)
- Fixed the GMU OPP table to match the clock plan (Konrad)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Aastha Pandey (1):
arm64: dts: qcom: nord: Add GPU cooling

Quoted 5 lines

Shivam Rawat (4):
drm/msm/a6xx: Add Adreno 753 support
dt-bindings: display/msm: Document Adreno 753 GPU/GMU
arm64: dts: qcom: nord: Add GPU and GMU nodes
arm64: dts: qcom: nord-rrd: Enable Adreno 753 GPU

Akhil,

For the future posting, can we split driver and DTS changes?

Shawn

Quoted 20 lines
 .../devicetree/bindings/display/msm/gmu.yaml       |  33 ++++
 .../devicetree/bindings/display/msm/gpu.yaml       |   1 +
 arch/arm64/boot/dts/qcom/nord-embedded.dtsi        |  79 ++++++++
 arch/arm64/boot/dts/qcom/nord-rrd.dts              |  12 ++
 arch/arm64/boot/dts/qcom/nord.dtsi                 | 220 ++++++++++++++++++---
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c              |   6 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c              |   5 +-
 drivers/gpu/drm/msm/adreno/a7xx_catalog.c          |  35 ++++
 drivers/gpu/drm/msm/adreno/adreno_gpu.h            |   5 +
 9 files changed, 361 insertions(+), 35 deletions(-)

---
base-commit: 38c8be16846f10f3a710351357e4f4ace7254c8e
change-id: 20261008-nord-gpu1-7e71a91ae653

Best regards,

Signature · 1 line
Akhil P Oommen <[email protected]>