Skip to content

PEND: boards: ti: update spi pinctrl - #262

Open
EirikRunshaugTI wants to merge 1 commit into
TexasInstruments:v4.4.0-ti-nextfrom
EirikRunshaugTI:ZEPHYR-848-update-pinmux
Open

EirikRunshaugTI wants to merge 1 commit into
TexasInstruments:v4.4.0-ti-nextfrom
EirikRunshaugTI:ZEPHYR-848-update-pinmux

Conversation

@EirikRunshaugTI

Copy link
Copy Markdown

Update CS pinmux for lp_em_cc2755r7_bg and lp_em_cc2755r10_bg.

Update CS pinmux for lp_em_cc2755r7_bg and lp_em_cc2755r10_bg.

Signed-off-by: Eirik Runshaug <e-runshaug@ti.com>
@EirikRunshaugTI
EirikRunshaugTI requested a review from a team December 3, 2026 12:30
@qodo-code-review

qodo-code-review Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

boards: ti: move SPI0 chip-select pinmux from DIO7 to DIO19

⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Moves SPI0 chip-select pinmux from DIO7 to DIO19 on lp_em_cc2755r7_bg and lp_em_cc2755r10_bg.
• Applies to the default, sleep, and flash CS pinctrl states, so all CS modes use the new pin.
• Pin numbers change only in devicetree pinctrl; no driver or Kconfig changes.
Merge Risk 🟡 Medium

Blast radius 🟡 Medium 💥 2 capabilities

  • 2 affected capabilities within one bounded functional scope: spi0_external_flash_integration.
  • The changed sleep pinctrl and flash-specific CS mapping serve the same SPI0 external-flash integration; the board DTS uses SPI0 for the external flash and the runtime DPD helper derives its CS from spi0_cs_default.
  • The changed default/sleep pinctrl, SPI0 cs-gpios declaration and external-flash DPD helper form one bounded SPI0 external-flash integration.
  • The board documentation identifies DIO7 as SPI CS, while the changed pinctrl selects DIO19, so the mismatch is within this capability rather than an independent downstream feature.
Sources

boards/ti/lp_em_cc2755r7_bg/lp_em_cc2755r7_bg-pinctrl.dtsi[72-74]

	spi0_cs_default: spi0_cs_default {
		pinmux = <19 DIO19_GPIO19>;
		input-enable;
Behavioral complexity 🟡 Medium 🧩 Coordinated invariants

  • Before, the R7 pinctrl CS entries and documented SPI CS used DIO7; after, the pinctrl entries use DIO19 while cs-gpios remains GPIO7 and the DPD helper derives its raw CS from pinctrl.
  • The new correctness condition is that SPI controller CS, sleep CS, raw DPD CS and the physical flash pin remain consistent across configuration consumers.
Sources

boards/ti/lp_em_cc2755r7_bg/lp_em_cc2755r7_bg-pinctrl.dtsi[72-74]

	spi0_cs_default: spi0_cs_default {
		pinmux = <19 DIO19_GPIO19>;
		input-enable;
Potential damage 🟡 Medium 🩹 Recoverable

  • If the new mapping were incorrect, SPI0 flash selection or low-power signaling could fail, but the inspected R10 DTS already declares GPIO19 for SPI0 CS.
  • No persistent flash-state corruption is supported.
  • Correcting or reverting the pin mapping restores subsequent operation; no stored-data repair or external compensation is indicated.
Assessed commit 6b7710a
Diagram

graph TD
  A["SPI0 CS pinctrl states"] --> B["Old pin: DIO7"]
  A --> C["New pin: DIO19"]
  C --> D["CC2755 board pinmux"]
Loading
High-Level Assessment

Changing the pin number in the board pinctrl devicetree is the standard way to reassign a pin on these boards. Alternatives such as a shared common dtsi or a generated pinmux table were not considered worthwhile for two identical single-value edits.

Files changed (2) +5 / -5

Other (2) +5 / -5
lp_em_cc2755r10_bg-pinctrl.dtsiMove spi0_cs_sleep and spi0_flash_cs pinmux to DIO19 +2/-2

Move spi0_cs_sleep and spi0_flash_cs pinmux to DIO19

• Changes the pinmux value for the spi0_cs_sleep and spi0_flash_cs pinctrl states from DIO7 to DIO19. The default CS state is not in this diff.

boards/ti/lp_em_cc2755r10_bg/lp_em_cc2755r10_bg-pinctrl.dtsi

lp_em_cc2755r7_bg-pinctrl.dtsiMove spi0_cs_default, spi0_cs_sleep and spi0_flash_cs pinmux to DIO19 +3/-3

Move spi0_cs_default, spi0_cs_sleep and spi0_flash_cs pinmux to DIO19

• Changes the pinmux value for the spi0_cs_default, spi0_cs_sleep and spi0_flash_cs pinctrl states from DIO7 to DIO19, keeping the other pin properties unchanged.

boards/ti/lp_em_cc2755r7_bg/lp_em_cc2755r7_bg-pinctrl.dtsi

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo


Action required

1. Flash chip select on r7 board is no longer muxed 🐞
Description
The r7 spi0_cs_default, spi0_cs_sleep and spi0_flash_cs pinctrl nodes now mux DIO19 instead of
DIO7, while lp_em_cc2755r7_bg.dts still sets cs-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>, so the SPI
driver toggles DIO7 while pinctrl configures DIO19. DIO19 (the I2S0 SD0 / ADC6 pad) is forced into
GPIO mode for every SPI0 pinctrl state, which silently breaks any application using I2S0 or ADC6
while SPI0 pinctrl is applied (the default on these boards), and DIO7 loses its
input-enable/bias-disable sleep configuration.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
On the r7 and r10 boards, the SPI0 chip-select pinctrl states (`spi0_cs_default`, `spi0_cs_sleep`, `spi0_flash_cs`) now mux DIO19 instead of DIO7. In the r7 board, `lp_em_cc2755r7_bg.dts` still drives CS through `cs-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>`, so pinctrl and the GPIO driven as chip select point at different pins. DIO19 is also I2S0 SD0 (`i2s0_sd0_default`) and ADC channel 6 (`adc0_ch6`), and the existing dtsi comments say these functions must not be selected together, so I2S0 and ADC6 users are silently broken while SPI0 pinctrl is applied.

## Fix Focus Areas
- boards/ti/lp_em_cc2755r7_bg/lp_em_cc2755r7_bg-pinctrl.dtsi[70-111]
- boards/ti/lp_em_cc2755r7_bg/lp_em_cc2755r7_bg.dts[140-152]
- boards/ti/lp_em_cc2755r10_bg/lp_em_cc2755r10_bg-pinctrl.dtsi[97-108]
- boards/ti/lp_em_cc2755r10_bg/lp_em_cc2755r10_bg-pinctrl.dtsi[170-175]
- boards/ti/lp_em_cc2755r10_bg/lp_em_cc2755r10_bg-pinctrl.dtsi[242-262]

## Recommended Fix
Confirm the physical flash CS pin on the r7 schematic.
- If the CS is on DIO19, change `cs-gpios` in the r7 dts to `<&gpio0 19 GPIO_ACTIVE_LOW>` (as the r10 and p10/p20 boards already do). Document in the board pinctrl comments and board doc that I2S0 SD0 and ADC6 are unavailable while SPI0 is enabled, and make sure I2S test overlays do not enable SPI0 at the same time.
- If the CS is on DIO7, revert the three pinmux entries in the r7 pinctrl to `<7 DIO7_GPIO7>`. If the CS can be on a different pad, move it there instead.

Either way, pinctrl and cs-gpios must reference the same pin, add a comment explaining the choice so future I2S or ADC users do not reintroduce the conflict, and state in the PR description which hardware fact drove the change.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗



spi0_cs_default: spi0_cs_default {
pinmux = <7 DIO7_GPIO7>;
pinmux = <19 DIO19_GPIO19>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Flash chip select on r7 board is no longer muxed 🐞 Bug ≡ Correctness

The r7 spi0_cs_default, spi0_cs_sleep and spi0_flash_cs pinctrl nodes now mux DIO19 instead of
DIO7, while lp_em_cc2755r7_bg.dts still sets cs-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>, so the SPI
driver toggles DIO7 while pinctrl configures DIO19. DIO19 (the I2S0 SD0 / ADC6 pad) is forced into
GPIO mode for every SPI0 pinctrl state, which silently breaks any application using I2S0 or ADC6
while SPI0 pinctrl is applied (the default on these boards), and DIO7 loses its
input-enable/bias-disable sleep configuration.
Agent Prompt
## Issue description
On the r7 and r10 boards, the SPI0 chip-select pinctrl states (`spi0_cs_default`, `spi0_cs_sleep`, `spi0_flash_cs`) now mux DIO19 instead of DIO7. In the r7 board, `lp_em_cc2755r7_bg.dts` still drives CS through `cs-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>`, so pinctrl and the GPIO driven as chip select point at different pins. DIO19 is also I2S0 SD0 (`i2s0_sd0_default`) and ADC channel 6 (`adc0_ch6`), and the existing dtsi comments say these functions must not be selected together, so I2S0 and ADC6 users are silently broken while SPI0 pinctrl is applied.

## Fix Focus Areas
- boards/ti/lp_em_cc2755r7_bg/lp_em_cc2755r7_bg-pinctrl.dtsi[70-111]
- boards/ti/lp_em_cc2755r7_bg/lp_em_cc2755r7_bg.dts[140-152]
- boards/ti/lp_em_cc2755r10_bg/lp_em_cc2755r10_bg-pinctrl.dtsi[97-108]
- boards/ti/lp_em_cc2755r10_bg/lp_em_cc2755r10_bg-pinctrl.dtsi[170-175]
- boards/ti/lp_em_cc2755r10_bg/lp_em_cc2755r10_bg-pinctrl.dtsi[242-262]

## Recommended Fix
Confirm the physical flash CS pin on the r7 schematic.
- If the CS is on DIO19, change `cs-gpios` in the r7 dts to `<&gpio0 19 GPIO_ACTIVE_LOW>` (as the r10 and p10/p20 boards already do). Document in the board pinctrl comments and board doc that I2S0 SD0 and ADC6 are unavailable while SPI0 is enabled, and make sure I2S test overlays do not enable SPI0 at the same time.
- If the CS is on DIO7, revert the three pinmux entries in the r7 pinctrl to `<7 DIO7_GPIO7>`. If the CS can be on a different pad, move it there instead.

Either way, pinctrl and cs-gpios must reference the same pin, add a comment explaining the choice so future I2S or ADC users do not reintroduce the conflict, and state in the PR description which hardware fact drove the change.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a real issue?

@DavidFoscaTI DavidFoscaTI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

✅ Board tests passed

Commit 6b7710a06f8f

Board Build Test Jenkins build Logs
am62l SUCCESS SUCCESS #28-am62l- log.html · build.log
am13e230 SUCCESS SUCCESS #20-am13e230- log.html · build.log
mspm33c321a SUCCESS SUCCESS #21-mspm33c321a- log.html · build.log
mspm0l2228 SUCCESS SUCCESS #21-mspm0l2228- log.html · build.log
mspm0g3519 SUCCESS SUCCESS #20-mspm0g3519- log.html · build.log

All board logs (log.html and build.log) in one download: board-logs (kept 14 days)

Jenkins build: Zephyr_Board_CI #25 · Workflow run

@vmyklebust vmyklebust left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to expand the commit title to be more specific, for example "boards: ti: update spi cs pinctrl node for cc27xx bg boards"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants