← Back to Pull requests

hal: microchip: sam: add the three SPI aliases the D5x/E5x pack lacks #75

Closed
unknown closed this pull request without merging on Sep 06, 2026 04:20 UTC
View on GitHub
unknown unknown commented on Aug 19, 2026 13:01 UTC
Author

Moving the SPI driver onto the generic SERCOM_SPI_ names needs three aliases the D5x/E5x pack never defined, and this is the one family whose Kconfig compiles the CTRLC line at all.

Three names missing from forty

sercom_samd5xe5x.h maps the generic SERCOM_SPI_ names onto this pack's
SERCOM_SPIM_ ones, some forty of them, and three are absent:
CTRLA_SWRST, SYNCBUSY_SWRST and CTRLC_ICSPACE.

Nothing noticed, because spi_mchp_sercom_g1.c reached past the mapping and
used the SPIM spelling directly in exactly those four places. That direct
use is what stops the driver building on PIC32CM SG/GC, which has one SPI
block and no SPIM prefix at all.

The family where the third name matters

SPI_MCHP_INTER_CHARACTER_SPACE is depends on
SOC_FAMILY_MICROCHIP_SAM_D5X_E5X
, so the CTRLC write is compiled here and
nowhere else. On PIC32CM JH the same three-name gap exists for the two
SWRST names only: that pack has no SPIM CTRLC register at all, and the
Kconfig can never select it, so aliasing CTRLC_ICSPACE there would be a
definition pointing at a name that does not exist.

sam_e54_xpro is the in-tree board that carries this pack and a
microchip,sercom-g1-spi node.

Scope

Six lines in one header, all of the same one-line form as the forty already
in it. Nothing that compiles today changes meaning: on this pack each new
generic name resolves to the SPIM definition the driver used before.

Testing

samples/hello_world on sam_e54_xpro with CONFIG_SPI=y and
CONFIG_SPI_MCHP_INTER_CHARACTER_SPACE=1, with the Zephyr generic-names
change in the tree. spi_mchp_sercom_g1.c.obj is built, and the generated
autoconf.h carries CONFIG_SPI_MCHP_INTER_CHARACTER_SPACE 1, so the
CTRLC line inside the #ifdef is compiled rather than skipped - which is
the only way this pack's third alias gets exercised at all.

No D5x/E5x board is on this bench, so L3 is UNVERIFIED.

Verification

Built in the project's dev container, whose west workspace applies this
change as a module patch. This is one of the consumer-side pairs of
zephyrproject-rtos/zephyr's spi-mchp-sercom-g1-generic-names; the other
is sercom-jh-spi-aliases, and all three have to land in the same window.

Diff: 280 lines (+210 / -70) across 3 files Reviewer: Madhan-Kurukondar Review duration: 25398m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 280 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.337
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #75"
general weight: 0.35
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.6% (MEDIUM) · Higher = larger blast radius
39.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.7% · Safe to merge
15.7%