jetson-customize-mgbe
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCustomize MGBE / 25G QSFP
定制MGBE / 25G QSFP
Overview
概述
Thor T264 exposes mgbe0..mgbe3. On a custom carrier, the 25G QSFP cage
(or 10G / 1G fiber path) is wired to one of them through SerDes — with
or without an external MDIO PHY in front of the cage. This skill
renders the kernel-DT overlay that pairs the BPMP allocation with
kernel-side + PHY plumbing on .
status="okay"&mgbeNOut of scope:
- UPHY lane allocation — owned by . Refuse if the chosen
/jetson-customize-uphydoesn't allocate the target MGBE.uphy1-config-N - All ODMDATA tokens (, sub-node
mgbeN-speed-*) — owned bymgbeN_status=*in its single atomic ODMDATA commit. This skill MUST NOT touch/jetson-customize-uphy.ODMDATA=
Output is one commit to the composite custom overlay in the
hardware repo. compiles the
composite to and owns its Makefile + flash-conf registration.
.dtsbsp_sources//jetson-build-source.dtboThor T264暴露了mgbe0..mgbe3接口。在自定义载板上,25G QSFP笼(或10G/1G光纤通路)通过SerDes连接到其中一个接口,笼前可带或不带外部MDIO PHY。本Skill生成内核DT overlay,将BPMP分配与内核侧配置以及上的PHY设置进行配对。
status="okay"&mgbeN超出范围:
- UPHY通道分配 — 由负责。如果所选的
/jetson-customize-uphy未分配目标MGBE接口,请拒绝执行。uphy1-config-N - 所有ODMDATA令牌(、子节点
mgbeN-speed-*) — 由mgbeN_status=*在其原子性ODMDATA提交中处理。本Skill绝对不能修改/jetson-customize-uphy。ODMDATA=
输出结果是向硬件仓库中的复合自定义overlay 文件提交一次变更。负责将复合文件编译为,并管理其Makefile和烧录配置注册。
bsp_sources/.dts/jetson-build-source.dtboWhen to invoke
调用时机
- The user says "enable 25G", "configure QSFP", "set MGBE PHY mode", "wire MGBE to QSFP", or asks to bring up a 10G / 1G fiber path.
- Cold boot succeeds but reports
ip link show mgbe<N>orstate DOWNon the configured controller, OR the controller never appears at all.NO-CARRIER - ran with
jetson-customize-uphy(or another config allocating MGBE) and you now need to bring up the per-controller side.uphy1-config-8
Prerequisites:
- Active profile selected with (Thor) +
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 - chose a UPHY config that allocates the target MGBE controller's lanes (
/jetson-customize-uphyon Thor for MGBE0..3 25G).uphy1-config-8 - 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 — MGBE routing on a custom carrier cannot be guessed. Reference-devkit-only profiles skip this check.documents.custom_carrier_pinmux_xls - on PATH.
dtc
- 用户提及“启用25G”、“配置QSFP”、“设置MGBE PHY模式”、“将MGBE连接到QSFP”,或询问如何启用10G/1G光纤通路时。
- 冷启动成功,但报告已配置的控制器处于
ip link show mgbe<N>或state DOWN状态,或者控制器根本未出现。NO-CARRIER - 已使用
jetson-customize-uphy(或其他分配MGBE的配置)运行,现在需要启用每个控制器的对应功能。uphy1-config-8
前提条件:
- 已选择包含(Thor)和
reference_devkit:块的活跃配置文件。custom_carrier: - 存在(由
<source.root_path>/Linux_for_Tegra/.git生成)。/jetson-init-source - 已运行 — 载板烧录配置分支已在overlay跟踪器中。
/jetson-derive-carrier - 已选择分配目标MGBE控制器通道的UPHY配置(Thor平台上的
/jetson-customize-uphy用于分配mgbe0..3的25G通道)。uphy1-config-8 - 已注册或在提示时提供权威文档:适配指南、模块设计指南、SoC技术参考手册(TRM)。
- **当存在时,必须同时提供
custom_carrier:和documents.custom_carrier_schematic。**如果其中任何一个缺失,请拒绝执行 — 自定义载板上的MGBE路由无法猜测。仅使用参考开发板的配置文件可跳过此检查。documents.custom_carrier_pinmux_xls - 工具已在PATH环境变量中。
dtc
Procedure
步骤
See for the full step-by-step procedure (Steps 1–8). Summary:
references/procedure.md- Resolve active target + documents. Validate active profile, custom_carrier, overlay tracker; locate the relevant Adaptation Guide chapter and pinmap.
- Per-controller question loop. AskUserQuestion driven by (controller, phy_mode, attach kind, I²C bus/addr, reset GPIO, compatible_list).
questions.json - Derive max-speed from phy_mode. Decompile the BPMP DTB to pick sub-node vs top-level token grammar; cite the inspection in notes.
- Verify HSIO pins + auto-fix. Run for MDC/MDIO/RESET/INT; surface mismatches and route to
pin_verifier.py./jetson-customize-pinmux - (no ODMDATA edits.) MGBE ODMDATA tokens are emitted by . Step 5 only records the BPMP DTB token-form inspection (sub-node vs top-level) in
/jetson-customize-uphyfor audit.notes[] - Append composite-overlay fragments. Write one fragment per controller into the composite custom overlay ; obey the
.dtsmarker contract; run the cpp/dtc/fdtoverlay pre-flight./* custom-bsp: mgbe:mgbe... */ - (Reserved.) Sibling-skill ordering / cross-cutting validation.
- Run-state sidecar + summary + next-step chain. Write and emit the one-line + table summary, then drive the downstream chain via sequential
<profile-stem>.jetson-customize-mgbe.jsonprompts perAskUserQuestionStep 8. Never substitute a printed "Next step: …" line for the prompts.references/procedure.md
完整的分步流程(步骤1-8)请参见。摘要:
references/procedure.md- 确定活跃目标与文档。验证活跃配置文件、自定义载板、overlay跟踪器;找到相关的适配指南章节和引脚映射。
- 逐控制器提问循环。由驱动的AskUserQuestion(控制器、phy_mode、连接类型、I²C总线/地址、复位GPIO、兼容列表)。
questions.json - 从phy_mode推导最大速率。反编译BPMP DTB以选择子节点与顶层令牌语法;在备注中记录检查结果。
- 验证HSIO引脚并自动修复。针对MDC/MDIO/RESET/INT运行;显示不匹配项并引导至
pin_verifier.py进行修复。/jetson-customize-pinmux - (不修改ODMDATA) MGBE的ODMDATA令牌由生成。步骤5仅将BPMP DTB令牌格式检查(子节点 vs 顶层)记录在
/jetson-customize-uphy中用于审计。notes[] - 追加复合overlay片段。为每个控制器向复合自定义overlay 文件写入一个片段;遵守
.dts标记约定;运行cpp/dtc/fdtoverlay预检查。/* custom-bsp: mgbe:mgbe... */ - (预留) 兄弟Skill的执行顺序/跨领域验证。
- 运行状态辅助文件 + 摘要 + 后续步骤链。写入并生成单行和表格摘要,然后根据
<profile-stem>.jetson-customize-mgbe.json步骤8中的顺序references/procedure.md提示驱动下游流程。切勿用打印的“下一步:…”替代提示。AskUserQuestion
Gotchas
注意事项
- Stock Thor BPMP DTB has no subtree — only
/mgbe/mgbe@Nundermgbe<N>-speed. The/uphysub-node token is silently rejected on these releases; the whole ODMDATA line is then dropped at flash time. Always decompile BPMP DTB (Step 3) before emitting; use the top-level dashed form (mgbe<N>_status=disabledto remove,mgbe<N>-speed-delto set) when the sub-node isn't there. Same wrong-form failure surface asmgbe<N>-speed-25G.jetson-customize-uphy - child needs both
mdioAND#address-cells = <1>when#size-cells = <0>. Missing either → kernel rejectsphy_attach_kind=="phy"reg property at probe; MGBE never comes up.phy@<addr> - Overlay root must intersect live DT compatible. UEFI plugin-manager filters by compatible match. A mismatched overlay is silently skipped — flash succeeds, MGBE stays disabled, no error in dmesg. Always sanity-check against
compatibleon a booted reference DUT./proc/device-tree/compatible - ordering is
OVERLAY_DTB_FILE's problem, not this skill's. This skill never touches the carrier flash conf. The composite custom overlay is registered (byjetson-build-sourceStep 5.0a) AFTER the platform/jetson-build-source, which is the correct ordering. If you find yourself appending*-dynamic.dtboin this skill, you're duplicating ownership — stop, and let the build skill do it.OVERLAY_DTB_FILE+= - UPHY lane allocation is 's job. If the chosen
jetson-customize-uphydoesn't allocate lanes for the target MGBE controller, BL31 SError (uphy1-config-N) on cold boot. Always runfmon_update_config: detected fault 0x80first; cite the chosen/jetson-customize-uphyin this skill's run-summaryuphy1-config-N.notes[] - Don't disable a stock-okay controller via ODMDATA alone. Same
rule as :
jetson-customize-uphyfor a controller that's already disabled in BPMP DTB is a no-op the parser may treat as ambiguous → drops the rest of the ODMDATA line. Disable via the kernel-DT overlay (mgbe<N>_status=disabled) only.status="disabled" - Don't touch the upstream BSP at . All edits land in the overlay tracker /
<bsp_image.root_path>mono-repo under the pristine + customization commit pattern.bsp_sources - JSON sidecar is structured state, not authoritative. Same
caveat as : ODMDATA + overlay
jetson-customize-uphy+ two git commits are the device-facing outputs; the sidecar is for tooling and idempotency only..dts
- 原生Thor BPMP DTB没有子树 — 仅在
/mgbe/mgbe@N下有/uphy。在这些版本中,mgbe<N>-speed子节点令牌会被静默拒绝;随后整个ODMDATA行在烧录时被丢弃。生成令牌前必须始终反编译BPMP DTB(步骤3);当子节点不存在时,使用顶层短横线格式(mgbe<N>_status=disabled用于移除,mgbe<N>-speed-del用于设置)。与mgbe<N>-speed-25G存在相同的格式错误风险。jetson-customize-uphy - 当时,
phy_attach_kind=="phy"子节点需要同时设置mdio和#address-cells = <1>。缺少其中任何一个 → 内核在探测时会拒绝#size-cells = <0>的reg属性;MGBE永远无法启用。phy@<addr> - Overlay根节点的必须与当前DT的compatible相交。UEFI插件管理器会根据compatible匹配进行过滤。不匹配的overlay会被静默跳过 — 烧录成功,但MGBE保持禁用,dmesg中无错误。始终在已启动的参考DUT上针对
compatible进行 sanity 检查。/proc/device-tree/compatible - 的顺序是
OVERLAY_DTB_FILE的职责,而非本Skill。本Skill永远不会修改载板烧录配置。复合自定义overlay由jetson-build-source步骤5.0a注册,且在平台/jetson-build-source之后,这是正确的顺序。如果您发现自己在本Skill中添加*-dynamic.dtbo,则是重复了职责 — 请停止,让构建Skill处理此事。OVERLAY_DTB_FILE+= - UPHY通道分配是的职责。如果所选的
jetson-customize-uphy未为目标MGBE控制器分配通道,冷启动时会出现BL31 SError(uphy1-config-N)。必须先运行fmon_update_config: detected fault 0x80;在本Skill的运行摘要/jetson-customize-uphy中记录所选的notes[]。uphy1-config-N - 不要仅通过ODMDATA禁用原生已启用的控制器。与相同的规则:对于已在BPMP DTB中禁用的控制器,设置
jetson-customize-uphy是无效操作,解析器可能将其视为歧义 → 丢弃ODMDATA行的其余部分。仅通过内核DT overlay(mgbe<N>_status=disabled)进行禁用。status="disabled" - 不要修改下的上游BSP。所有修改都应在overlay跟踪器 /
<bsp_image.root_path>单仓库中,遵循原始提交 + 定制提交的模式。bsp_sources - JSON辅助文件是结构化状态,而非权威来源。与相同的警告:ODMDATA + overlay
jetson-customize-uphy+ 两次git提交是面向设备的输出;辅助文件仅用于工具和幂等性。.dts
References
参考资料
- — Q-1..Q-8 prompt schema consumed by Step 2.
questions.json - — shared HSIO pin verifier (Step 4).
../../scripts/pin_verifier.py - —
../../references/platform_template.yamlblock consumed by Step 1.documents: - — overlay edit protocol (batched pristine + customization commit).
../../context/bsp-customization-workflow.md - — sibling skill that owns UPHY lane allocation. Must run before this skill to set
../jetson-customize-uphy/SKILL.mdfor MGBE-allocated configurations.uphy1-config-N - — sibling skill invoked by Step 4 (with operator confirmation) to fix pin SFIO mismatches.
../jetson-customize-pinmux/SKILL.md - — must run first; produces the carrier flash-conf fork edited in Step 5 and the carrier base overlay this skill orders after.
../jetson-derive-carrier/SKILL.md - — produces the overlay tracker + bsp_sources repo this skill commits into.
../jetson-init-source/SKILL.md
- — 步骤2使用的Q-1..Q-8提示 schema。
questions.json - — 步骤4使用的共享HSIO引脚验证工具。
../../scripts/pin_verifier.py - — 步骤1使用的
../../references/platform_template.yaml块。documents: - — overlay编辑协议(批量原始提交 + 定制提交)。
../../context/bsp-customization-workflow.md - — 负责UPHY通道分配的兄弟Skill。必须在本Skill之前运行,以设置分配MGBE的
../jetson-customize-uphy/SKILL.md配置。uphy1-config-N - — 步骤4调用的兄弟Skill(需操作员确认),用于修复引脚SFIO不匹配问题。
../jetson-customize-pinmux/SKILL.md - — 必须先运行;生成步骤5中编辑的载板烧录配置分支,以及本Skill依赖的载板基础overlay。
../jetson-derive-carrier/SKILL.md - — 生成本Skill提交变更所用的overlay跟踪器 + bsp_sources仓库。",
../jetson-init-source/SKILL.md