jetson-customize-pcie
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCustomize PCIe (per-controller status / lanes / speed)
自定义PCIe(单控制器状态/通道/速度)
Overview
概述
PCIe on Tegra264 (Thor, ) and Tegra234 (Orin,
) is split across multiple controllers that share the
UPHY lane pool with USB3 / MGBE / UFS. Each controller's runtime
behavior is determined by two surfaces, both required:
pcie@C0..C5pcie@C0..C10| Surface | Target | Authoritative for |
|---|---|---|
ODMDATA | | UPHY lane power, refclk gating, controller-side power rails |
Kernel-DT overlay on | | Kernel probe, lane width, link speed, RC/EP mode |
Skipping the kernel overlay on a disable lets the kernel probe a
powered-down PHY (link timeouts in dmesg). Skipping the ODMDATA token
on a disable leaves BPMP holding the PHY hot.
Agentic, not table-driven — no controller table, no
. Every controller, lane width, schematic-routed
receptacle, and authoritative DT node address is discovered at runtime
from the docs + DTB + carrier pinmap.
questions.jsonThe output is a kernel-DT overlay commit only. Per-controller
blocks are appended to the composite custom overlay
per
and committed to the hardware repo.
compiles the composite to and owns its
Makefile + flash-conf registration.
fragment@N.dts../../references/bsp-customization-kernel-dtb.mdbsp_sources//jetson-build-source.dtboThis skill MUST NOT edit . All ODMDATA tokens
(, , ,
, , plus the
surface tokens and clear) are
emitted by in a single atomic commit on the
carrier flash-conf fork. The allocation table this skill consumes
from the UPHY sidecar already tells the operator which controllers
are / / per-lane sized; this skill only translates
that table into kernel-DT overlay fragments and verifies that the
overlay agrees with the ODMDATA already committed by
(consistency check in Step 8 — disagreement is reported, not silently
fixed).
ODMDATA="..."pcie@N_status=…pcie@N_max-link-speedpcie@N_pcie-modepcie@N_clk-schemepcie-cN-endpoint-enableuphyX-config-NUPHY_CONFIG=""/jetson-customize-uphyokaydisabledcustomize-uphyTegra264(Thor,)和Tegra234(Orin,)上的PCIe分为多个控制器,这些控制器与USB3 / MGBE / UFS共享UPHY通道池。每个控制器的运行时行为由两个必须配置的层面决定:
pcie@C0..C5pcie@C0..C10| 层面 | 目标 | 管控范围 |
|---|---|---|
ODMDATA | BPMP DTB中的 | UPHY通道供电、参考时钟门控、控制器侧电源轨 |
基于 | 内核DTB中的 | 内核探测、通道宽度、链路速度、RC/EP模式 |
如果禁用时跳过内核overlay,内核会尝试探测已断电的PHY(dmesg中会出现链路超时)。如果禁用时跳过ODMDATA参数,BPMP会保持PHY处于热态。
基于智能代理而非表格驱动 — 无控制器表格,无。所有控制器、通道宽度、原理图布线插座、权威DT节点地址均在运行时从文档、DTB和载板引脚映射中自动发现。
questions.json输出仅为内核-DT overlay提交。单控制器的块会附加到复合自定义overlay的文件中,遵循的规范,并提交到硬件仓库。负责将复合文件编译为,并管理其Makefile和烧录配置注册。
fragment@N.dts../../references/bsp-customization-kernel-dtb.mdbsp_sources//jetson-build-source.dtbo本Skill严禁修改。所有ODMDATA参数(、、、、,以及层面参数和清空指令)均由在载板烧录配置分支的单次原子提交中生成。本Skill从UPHY辅助文件中获取的分配表已告知操作人员哪些控制器处于//指定通道数状态;本Skill仅需将该表转换为内核-DT overlay片段,并验证overlay与已提交的ODMDATA一致(步骤8的一致性检查——若不一致则上报,而非静默修复)。
ODMDATA="..."pcie@N_status=…pcie@N_max-link-speedpcie@N_pcie-modepcie@N_clk-schemepcie-cN-endpoint-enableuphyX-config-NUPHY_CONFIG=""/jetson-customize-uphyokaydisabledcustomize-uphyWhen to invoke
调用场景
- The user says "configure PCIe", "enable PCIe controller", "set PCIe
num-lanes", "change PCIe link speed", or asks to flip a
token.
pcie@N_status - A specific PCIe slot or M.2 receptacle doesn't enumerate after flash, OR the link trains at the wrong width / speed.
- ran and re-allocated lanes across PCIe controllers (e.g. switched from
jetson-customize-uphytouphy0-config-7enabling PCIe C3); the per-controller side now needs to be brought up.uphy0-config-6 - reports the QSFP path is wired but the kernel doesn't probe its PCIe-side companion (rare; XFI configurations).
jetson-customize-mgbe
Prerequisites:
- Active profile with +
reference_devkit:blocks.custom_carrier: - exists (
<source.root_path>/Linux_for_Tegra/.git)./jetson-init-source - has run — carrier flash-conf fork is in the overlay tracker.
/jetson-derive-carrier - has run — its JSON sidecar at
/jetson-customize-uphydrives the per-controller<workspace>/target-platform/<profile-stem>.jetson-customize-uphy.jsondecision.enable - Source-of-truth docs registered or supplied at prompt: Adaptation Guide, Module Design Guide, SoC TRM.
- When is present, both
custom_carrier:ANDdocuments.custom_carrier_schematicare REQUIRED. Refuse the run if either is missing — routing on a custom carrier cannot be guessed. Reference-devkit-only profiles skip this check.documents.custom_carrier_pinmux_xls - on PATH.
dtc
- 用户提及"配置PCIe"、"启用PCIe控制器"、"设置PCIe通道数"、"修改PCIe链路速度",或要求修改参数时。
pcie@N_status - 特定PCIe插槽或M.2插座在烧录后未枚举,或链路协商的宽度/速度不正确时。
- 已运行并重新分配了PCIe控制器间的通道(例如从
jetson-customize-uphy切换到uphy0-config-7以启用PCIe C3),此时需要完成单控制器层面的配置。uphy0-config-6 - 报告QSFP路径已布线,但内核未探测到其PCIe侧配套设备(罕见情况,XFI配置)。
jetson-customize-mgbe
前置条件:
- 包含+
reference_devkit:块的活跃配置文件。custom_carrier: - 存在(由
<source.root_path>/Linux_for_Tegra/.git生成)。/jetson-init-source - 已运行——载板烧录配置分支已加入overlay追踪器。
/jetson-derive-carrier - 已运行——其JSON辅助文件位于
/jetson-customize-uphy,用于驱动单控制器的<workspace>/target-platform/<profile-stem>.jetson-customize-uphy.json决策。enable - 已注册或在提示时提供权威文档:适配指南、模块设计指南、SoC技术参考手册(TRM)。
- 当存在时,必须同时提供
custom_carrier:和documents.custom_carrier_schematic。若任一缺失则拒绝运行——自定义载板的布线无法猜测。仅使用参考开发套件的配置文件可跳过此检查。documents.custom_carrier_pinmux_xls - 已添加到PATH环境变量。
dtc
Procedure (summary)
流程概述
Full step-by-step walkthrough lives in
. High-level flow:
references/procedure.md- Resolve active target + open source-of-truth documents (incl.
,
<carrier-pinmap>,<ref-dtb>). Refuse if<uphy-state>is missing.<uphy-state> - Diff PCIe topology — devkit vs custom carrier — by decompiling
and grepping the schematic for
<ref-dtb>net labels.PEX<N>_* - (multiSelect) — which controllers to customize.
AskUserQuestion - Per-controller verification: pinmap + schematic + for
pin_verifier.py,PE<N>_CLKREQ_L, optionalPE<N>_RST_L.PE<N>_WAKE_L - Auto-derive per-controller plan (from
enable,<uphy-state>/lanesfrom Adaptation Guide,speedhard-pinned tomode) → mandatory confirm-or-customize gate."rc" - Append per-controller blocks (marker
fragment@N) to the composite custom overlay/* custom-bsp: pcie:pcie@<addr> */in.dts. Pre-flightbsp_sources/+dtc. Commit via the workflow's preview gate. Do not editfdtoverlay—ODMDATAalready emitted/jetson-customize-uphy,pcie@N_status=…,pcie@N_max-link-speed,pcie@N_pcie-mode, andpcie@N_clk-schemein its single atomic ODMDATA commit. This skill only translates the per-controller plan into kernel-DT overlay fragments.pcie-cN-endpoint-enable - (Step folded into Step 6 — overlay-only emission.)
- Cross-check ODMDATA vs overlay consistency. On a contradictory
row, stop and ask the user how to recover the two commits.
Never run autonomously.
git reset --hard - Write run-state JSON sidecar at
<workspace>/target-platform/<profile-stem>.jetson-customize-pcie.json- summary, then drive the downstream next-step chain via sequential
prompts per
AskUserQuestionStep 9. Never substitute a printed "Next step: …" line for the prompts.references/procedure.md
- summary, then drive the downstream next-step chain via sequential
完整的分步指南请参阅。高层级流程如下:
references/procedure.md- 解析活跃目标并打开权威文档(含、
<carrier-pinmap>、<ref-dtb>)。若<uphy-state>缺失则拒绝运行。<uphy-state> - 对比PCIe拓扑——通过反编译并在原理图中搜索
<ref-dtb>网络标签,对比开发套件与自定义载板的差异。PEX<N>_* - (多选)——选择需要自定义的控制器。
AskUserQuestion - 单控制器验证:引脚映射+原理图+验证
pin_verifier.py、PE<N>_CLKREQ_L、可选的PE<N>_RST_L。PE<N>_WAKE_L - 自动推导单控制器配置方案(状态来自
enable,<uphy-state>/lanes来自适配指南,speed固定为mode)→ 必须经过确认或自定义环节。"rc" - 将单控制器的块(标记
fragment@N)附加到/* custom-bsp: pcie:pcie@<addr> */中复合自定义overlay的bsp_sources/文件。预执行.dts+dtc检查。通过工作流的预览环节提交。 请勿修改ODMDATA——fdtoverlay已在单次原子ODMDATA提交中生成/jetson-customize-uphy、pcie@N_status=…、pcie@N_max-link-speed、pcie@N_pcie-mode和pcie@N_clk-scheme。本Skill仅需将单控制器配置方案转换为内核-DT overlay片段。pcie-cN-endpoint-enable - (该步骤已整合到步骤6——仅生成overlay)
- 交叉检查ODMDATA与overlay的一致性。若出现矛盾项,立即停止并询问用户如何恢复这两次提交。严禁自主执行。
git reset --hard - 在写入运行状态JSON辅助文件及摘要,然后根据
<workspace>/target-platform/<profile-stem>.jetson-customize-pcie.json步骤9的提示,通过连续的references/procedure.md引导下游后续步骤。严禁用打印的"下一步:…"替代交互提示。AskUserQuestion
Limitations
限制
- Mode hard-pinned to RC. Endpoint mode is only emitted when the
operator passes in Step 5c.
mode_override="ep" - is derived, not asked. UPHY-allocated controllers are mandatorily
enable; non-allocated are mandatorilyokay.disabled - No upstream BSP edits. Output lands in +
Linux_for_Tegra/only.bsp_sources/ - Pre-flight overlay merge is a sanity check, not the production
build. is authoritative.
/jetson-build-source - Flash-conf overlay registration is out of scope. Owned by
Step 5.0a.
/jetson-build-source
- 模式固定为RC。仅当操作人员在步骤5c中传入时,才会生成端点模式配置。
mode_override="ep" - 状态为推导值,不接受用户输入。UPHY分配的控制器必须设为
enable;未分配的必须设为okay。disabled - 不修改上游BSP。输出仅写入+
Linux_for_Tegra/。bsp_sources/ - 预执行overlay合并仅为 sanity 检查,而非生产构建。为权威构建环节。
/jetson-build-source - 烧录配置的overlay注册不在本Skill范围内。由步骤5.0a负责。
/jetson-build-source
Troubleshooting
故障排查
- missing → run
<uphy-state>first./jetson-customize-uphy - Slot doesn't enumerate after flash → check ; re-verify ODMDATA
dmesg | grep pcieand the overlay fragment agree (Step 8 table inpcie@<N>_status=okay).references/procedure.md - Link trains at wrong width → confirm UPHY config in
allocates the expected lane count; the kernel fragment's
<uphy-state>must match.num-lanes - mismatch → fix the composite root, not the fragment. UEFI plugin-manager silently skips on mismatch.
compatible - Contradictory ODMDATA-vs-overlay row → ask the user; do not
auto-. See gotchas.
git reset --hard - Common pitfalls — see
(RC pinning, node- address sourcing, stock-disabled controllers, intra-file handoff with
references/gotchas.md).jetson-customize-uphy
- 缺失 → 先运行
<uphy-state>。/jetson-customize-uphy - 烧录后插槽未枚举 → 检查;重新验证ODMDATA的
dmesg | grep pcie与overlay片段是否一致(参阅pcie@<N>_status=okay步骤8的表格)。references/procedure.md - 链路协商宽度错误 → 确认中的UPHY配置分配了预期的通道数;内核片段的
<uphy-state>必须与之匹配。num-lanes - 不匹配 → 修改复合根文件,而非片段。UEFI插件管理器会在不匹配时静默跳过。
compatible - ODMDATA与overlay出现矛盾项 → 询问用户;严禁自主执行。参阅注意事项。
git reset --hard - 常见陷阱 — 请参阅(RC模式固定、节点地址来源、默认禁用的控制器、与
references/gotchas.md的文件内交接)。jetson-customize-uphy
References
参考资料
- — full nine- step procedure (topology diff, plan derivation, overlay append, ODMDATA cross-check, sidecar).
references/procedure.md - — failure modes
references/gotchas.md- invariants (RC pinning, address sourcing, BPMP handoff).
- — shared HSIO pin verifier (Step 4).
../../scripts/pin_verifier.py - —
../../references/platform_template.yamlblock consumed by Step 1.documents: - — overlay edit protocol + commit message preview gate.
../../context/bsp-customization-workflow.md - — composite overlay filename / skeleton / append protocol.
../../references/bsp-customization-kernel-dtb.md - — sibling skill that owns UPHY lane allocation; its sidecar drives the per-controller
../jetson-customize-uphy/SKILL.mddecision.enable - — sibling skill invoked by Step 4 (with operator confirmation) to fix HSIO pin SFIO mismatches.
../jetson-customize-pinmux/SKILL.md - — sibling for MGBE controllers; shares the two-surface (ODMDATA
../jetson-customize-mgbe/SKILL.md- overlay) pattern.
- — must run first; produces the carrier flash-conf fork edited in Step 6.
../jetson-derive-carrier/SKILL.md - — produces the overlay tracker + bsp_sources repo this skill commits into.
../jetson-init-source/SKILL.md
- — 完整的九步流程(拓扑对比、方案推导、overlay附加、ODMDATA交叉检查、辅助文件)。
references/procedure.md - — 故障模式与不变规则(RC模式固定、地址来源、BPMP交接)。
references/gotchas.md - — 共享HSIO引脚验证工具(步骤4)。
../../scripts/pin_verifier.py - — 步骤1使用的
../../references/platform_template.yaml块模板。documents: - — overlay编辑规范+提交信息预览环节。
../../context/bsp-customization-workflow.md - — 复合overlay的文件名/框架/附加规范。
../../references/bsp-customization-kernel-dtb.md - — 负责UPHY通道分配的兄弟Skill;其辅助文件驱动单控制器的
../jetson-customize-uphy/SKILL.md决策。enable - — 步骤4调用的兄弟Skill(需操作人员确认),用于修复HSIO引脚SFIO不匹配问题。
../jetson-customize-pinmux/SKILL.md - — 针对MGBE控制器的兄弟Skill;采用相同的双层面(ODMDATA + overlay)模式。
../jetson-customize-mgbe/SKILL.md - — 必须先运行;生成步骤6中编辑的载板烧录配置分支。
../jetson-derive-carrier/SKILL.md - — 生成本Skill提交所需的overlay追踪器和bsp_sources仓库。
../jetson-init-source/SKILL.md