ZHDA076A March   2026  – March 2026 AM68A , AM69A , TDA4VM

 

  1.   1
  2.   摘要
  3.   商标
  4. 1TDA4VH 内的数据移动
    1. 1.1 通用总线架构子系统 (CBASS)
    2. 1.2 导航器子系统 (NAVSS)
      1. 1.2.1 NAVSS 北桥 (NB)
    3. 1.3 多核共享内存控制器 (MSMC)
  5. 2服务质量 (QoS)
    1. 2.1 NAVSS0
      1. 2.1.1 NAVSS0 北桥
        1. 2.1.1.1 正常流量与实时流量的区别
    2. 2.2 多核共享内存控制器 (MSMC)
    3. 2.3 DDR 子系统 (DDRSS)
      1. 2.3.1 MSMC2DDR 桥接器
      2. 2.3.2 服务等级 (CoS)
    4. 2.4 QoS 摘要
  6. 3案例研究:显示同步丢失问题
    1. 3.1 问题说明
    2. 3.2 设置和重新创建
      1. 3.2.1 要求
        1. 3.2.1.1 RTOS 补丁
          1. 3.2.1.1.1 0001-vision_apps-Remove-the-DSS-application-from-MCU2_0.patch
          2. 3.2.1.1.2 0002-vision_apps-Remove-display-use-from-the-AVP-demo.patch
        2. 3.2.1.2 Linux 补丁
          1. 3.2.1.2.1 0001-arm64-dts-ti-k3-j784s4-vision-apps-Re-enable-DSS-for.patch
      2. 3.2.2 主机设置
      3. 3.2.3 目标设置
      4. 3.2.4 重新创建
    3. 3.3 调试 QoS
      1. 3.3.1 CPTracer
        1. 3.3.1.1  设置
        2. 3.3.1.2  分析吞吐量
        3. 3.3.1.3  分析延迟
        4. 3.3.1.4  分析事务
        5. 3.3.1.5  分析相关路由
        6. 3.3.1.6  分析 DSS 吞吐量
          1. 3.3.1.6.1 理论 DSS 吞吐量
          2. 3.3.1.6.2 正常 DSS 吞吐量
          3. 3.3.1.6.3 AVP 演示运行时的 DSS 吞吐量
        7. 3.3.1.7  分析 DSS 延迟
        8. 3.3.1.8  分析 C7x 吞吐量
        9. 3.3.1.9  分析 C7x 吞吐量与 DSS 延迟
        10. 3.3.1.10 分析 C7x_4 内核事务
      2. 3.3.2 编辑 QoS 设置
        1. 3.3.2.1 编辑顺序 ID
          1. 3.3.2.1.1 DSS 顺序 ID
          2. 3.3.2.1.2 C7x 顺序 ID
        2. 3.3.2.2 NRT 和 RT 路由
          1. 3.3.2.2.1 U-Boot 中的 NRT 和 RT 路由
        3. 3.3.2.3 编辑优先级
          1. 3.3.2.3.1 DSS 优先级
          2. 3.3.2.3.2 C7x 优先级
      3. 3.3.3 编辑 CoS 映射
        1. 3.3.3.1 CoS 映射寄存器
        2. 3.3.3.2 检查 CoS 映射
    4. 3.4 修复 DSS 同步丢失问题
      1. 3.4.1 重新映射 C7x_4 内核事务
        1. 3.4.1.1 ti-u-boot-2023.04
        2. 3.4.1.2 ti-u-boot-2025.01
      2. 3.4.2 遵守所有优先级
        1. 3.4.2.1 ti-u-boot-2023.04
        2. 3.4.2.2 ti-u-boot-2025.01
  7. 4总结
  8. 5参考资料
  9. 6修订历史记录

ti-u-boot-2025.01

以下补丁应用于提交的内容:f3f8c664b300 ("PSTREAM: board: ti: common: Kconfig: add CMD_CACHE")

0001-arm-mach-k3-j784s4-Remove-priority-equalization-and-.patch

From 7ac3b82eca22d6d28ca767d400c8aa5830704a59 Mon Sep 17 00:00:00 2001
From: Jared McArthur <j-mcarthur@ti.com>
Date: Thu, 28 Aug 2025 17:35:44 -0500
Subject: [PATCH 1/1] arm: mach-k3: j784s4: Remove priority equalization and
 honor VBUSM priorities

Give the DDR controller's high priority thread (HPT) priority over the
low priority thread (LPT) and give weight to transactions' individual
priorities as well.

By default, the J784S4's MSMC2DDR bridge maps all VBUSM priorities to
0. This is done with priority mapping registers.

DDRSSX_V2A_LPT_DEF_PRI_MAP_REG: default VBUSM to DDR controller
priority mapping for LPT

DDRSSX_V2A_HPT_DEF_PRI_MAP_REG: default VBUSM to DDR controller
priority mapping for HPT

Set DDRSSX_V2A_LPT_DEF_PRI_MAP_REG as 0x23456677 and
DDRSSX_V2A_HPT_DEF_PRI_MAP_REG as 0x00112345. The values are taken
from the default values for the J721E [0] and are also the default values
for the J784S4 priority map range muxes [1].

[0] https://www.ti.com/lit/zip/spruil1
[1] https://www.ti.com/lit/zip/spruj52

Signed-off-by: Jared McArthur <j-mcarthur@ti.com>
---
 arch/arm/mach-k3/j784s4/j784s4_init.c | 35 +++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/mach-k3/j784s4/j784s4_init.c b/arch/arm/mach-k3/j784s4/j784s4_init.c
index 9897f4fb921..f66a8fd1774 100644
--- a/arch/arm/mach-k3/j784s4/j784s4_init.c
+++ b/arch/arm/mach-k3/j784s4/j784s4_init.c
@@ -45,6 +45,27 @@
 #define NB_THREADMAP_BIT1				BIT(1)
 #define NB_THREADMAP_BIT2				BIT(2)
 
+/* DDRSS Config */
+#define DDRSS0_EMIF_EW_SSCFG		0x02980000
+#define DDRSS1_EMIF_EW_SSCFG		0x029A0000
+#define DDRSS2_EMIF_EW_SSCFG		0x029C0000
+#define DDRSS3_EMIF_EW_SSCFG		0x029E0000
+#define DDRSS0_V2A_LPT_DEF_PRI_MAP_REG	(DDRSS0_EMIF_EW_SSCFG + 0x30)
+#define DDRSS0_V2A_HPT_DEF_PRI_MAP_REG	(DDRSS0_EMIF_EW_SSCFG + 0x4C)
+#define DDRSS1_V2A_LPT_DEF_PRI_MAP_REG	(DDRSS1_EMIF_EW_SSCFG + 0x30)
+#define DDRSS1_V2A_HPT_DEF_PRI_MAP_REG	(DDRSS1_EMIF_EW_SSCFG + 0x4C)
+#define DDRSS2_V2A_LPT_DEF_PRI_MAP_REG	(DDRSS2_EMIF_EW_SSCFG + 0x30)
+#define DDRSS2_V2A_HPT_DEF_PRI_MAP_REG	(DDRSS2_EMIF_EW_SSCFG + 0x4C)
+#define DDRSS3_V2A_LPT_DEF_PRI_MAP_REG	(DDRSS3_EMIF_EW_SSCFG + 0x30)
+#define DDRSS3_V2A_HPT_DEF_PRI_MAP_REG	(DDRSS3_EMIF_EW_SSCFG + 0x4C)
+
+/*
+ * New thread priority mapping to remove complete priority equalization
+ * of threads coming from VBUSM space to DDRSS space.
+ */
+#define DDRSS_V2A_LPT_DEF_PRIMAP	0x23456677
+#define DDRSS_V2A_HPT_DEF_PRIMAP	0x00112345
+
 struct fwl_data infra_cbass0_fwls[] = {
 	{ "PSC0", 5, 1 },
 	{ "PLL_CTRL0", 6, 1 },
@@ -123,6 +144,19 @@ static void setup_navss_nb(void)
 	writel(NB_THREADMAP_BIT2, (uintptr_t)NAVSS0_NBSS_NB1_CFG_NB_THREADMAP);
 }
 
+/* Setup DDRSS CoS (Class of Service) registers to remove priority equalization */
+static void setup_ddrss_cos(void)
+{
+	writel(DDRSS_V2A_LPT_DEF_PRIMAP, (uintptr_t)DDRSS0_V2A_LPT_DEF_PRI_MAP_REG);
+	writel(DDRSS_V2A_HPT_DEF_PRIMAP, (uintptr_t)DDRSS0_V2A_HPT_DEF_PRI_MAP_REG);
+	writel(DDRSS_V2A_LPT_DEF_PRIMAP, (uintptr_t)DDRSS1_V2A_LPT_DEF_PRI_MAP_REG);
+	writel(DDRSS_V2A_HPT_DEF_PRIMAP, (uintptr_t)DDRSS1_V2A_HPT_DEF_PRI_MAP_REG);
+	writel(DDRSS_V2A_LPT_DEF_PRIMAP, (uintptr_t)DDRSS2_V2A_LPT_DEF_PRI_MAP_REG);
+	writel(DDRSS_V2A_HPT_DEF_PRIMAP, (uintptr_t)DDRSS2_V2A_HPT_DEF_PRI_MAP_REG);
+	writel(DDRSS_V2A_LPT_DEF_PRIMAP, (uintptr_t)DDRSS3_V2A_LPT_DEF_PRI_MAP_REG);
+	writel(DDRSS_V2A_HPT_DEF_PRIMAP, (uintptr_t)DDRSS3_V2A_HPT_DEF_PRI_MAP_REG);
+}
+
 /* Execute and check results of BIST executed on MCU1_x and MCU4_O */
 static void run_bist_j784s4(struct udevice *dev)
 {
@@ -328,6 +362,7 @@ void board_init_f(ulong dummy)
 		setup_navss_nb();
 
 	setup_qos();
+	setup_ddrss_cos();
 }
 
 u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
-- 
2.34.1