Customize pinmux (per-pin SFIO / direction / state)
Overview
The Tegra pinmux spreadsheet (.xlsm) is the ground truth for every
CVM ball: SoC pin name, supported SFIOs, customer-selected function,
direction, and initial state. This skill parses that XLSM, runs a
per-pin Q1–Q6 interactive loop, and emits the three BCT DTSIs
(pinmux, gpio, padvoltage) in one shot into the overlay tracker
at <source.root_path>/Linux_for_Tegra/bootloader/.
Unlike sibling skills jetson-customize-uphy / jetson-customize-pcie /
jetson-customize-camera, **pinmux has no kernel-DT overlay surface and no
ODMDATA edit**. The XLSM is the source of truth; the three emitted
DTSIs land at flash time via the carrier conf's
PINMUX_CONFIG= / GPIOINT_CONFIG= / PMC_CONFIG= references (which
/jetson-derive-carrier set up).
Pad classification (silicon-fixed): only BD* and BI* pads have
configurable pull / drive / open-drain attributes. LP5XA_*,
UPHYDS_*, DP_SINGLE_*, BDMIPI16X_*, BDUSB2_*, OSCI27_* are
fixed-function and skip Q4–Q6 (configurable: no).
The bundled scripts/modify_pinmux.py is the workhorse: it parses
the XLSM via openpyxl>=3.1, builds the per-carrier pinmap JSON,
captures pin edits into a session shim, and (on generate) writes
the three DTSIs.
When to invoke
- The user says "configure pin", "set SFIO", "edit pinmux DTSI",
"set pin direction", "set initial state", or asks to repurpose a
CVM ball (e.g. flip a pin between GPIO and a peripheral function).
- A sibling skill (
jetson-customize-camera,jetson-customize-pcie,
jetson-customize-usb, jetson-customize-mgbe) reports an HSIO pin mismatch
via pin_verifier.py and the user wants to fix it.
- The user pre-derived a custom carrier with
/jetson-derive-carrier
and now wants to author the pinmux from a freshly-edited .xlsm.
Prerequisites:
- Active profile selected (
target-platform/active_target.yml→
<profile>.yaml with reference_devkit: AND custom_carrier:).
<source.root_path>/Linux_for_Tegra/exists as a git repo
(/jetson-init-source).
/jetson-derive-carrierhas run — the three pinmux-side BCT DTSIs
(PINMUX_CONFIG, GPIOINT_CONFIG, PMC_CONFIG references in the
carrier conf) exist in the overlay tracker.
- A pinmux
.xlsmis registered in the active profile at
documents.custom_carrier_pinmux_xls (preferred when custom-carrier-
specific) or documents.ref_devkit_pinmux_xls (fallback). The
bundled modify_pinmux.py requires openpyxl>=3.1.