Skip to content

UPSTREAM-PEND: dts: arm: ti: mspm33c: add prescaler prop - #265

Open
Aman-Lachhiramka-ti wants to merge 1 commit into
TexasInstruments:v4.4.0-ti-nextfrom
Aman-Lachhiramka-ti:m33-counter-fix-pend-prescaler
Open

Aman-Lachhiramka-ti wants to merge 1 commit into
TexasInstruments:v4.4.0-ti-nextfrom
Aman-Lachhiramka-ti:m33-counter-fix-pend-prescaler

Conversation

@Aman-Lachhiramka-ti

Copy link
Copy Markdown

PR: 119487

Add missing prescaler property to timg12_0 instance

PR: 119487

Add missing prescaler property to timg12_0 instance

Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
@Aman-Lachhiramka-ti
Aman-Lachhiramka-ti requested a review from a team December 4, 2026 10:44
@qodo-code-review

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

Copy link
Copy Markdown

PR Summary by Qodo

dts: arm: ti: mspm33c: add missing prescaler prop to timg12_0

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 5 minutes

Grey Divider

AI Description

• Adds the missing ti,clk-prescaler property to the timg12_0 timer node.
• Sets the prescaler to `` (no prescaler), matching the intended clock configuration.
• Aligns timg12_0 with sibling MSPM0 timer nodes that already define this property.
Merge Risk 🟢 Low

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The changed device-tree property belongs to timg12_0 and is consumed by its counter child through the MSPM0 counter driver; this is one end-to-end counter capability rather than separate hardware and driver capabilities.
Sources

dts/arm/ti/mspm33c/mspm33c.dtsi[346-346]

			ti,clk-prescaler = <0>; /* No prescaler */
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before, timg12_0 applied a 256x prescaler; after, it applies no prescaler.
  • The changed correctness condition is that the configured counter rate and alarm timing must match the intended hardware clock.
Sources

dts/arm/ti/mspm33c/mspm33c.dtsi[346-346]

			ti,clk-prescaler = <0>; /* No prescaler */

drivers/counter/counter_mspm0_timer.c[469-472]

	base->commonregs.cps = config->prescaler;
	base->commonregs.cclkctl = GPTIMER_CCLKCTL_CLKEN_ENABLED;

	data->freq = clock_rate / ((config->clk_div_reg + 1U) * (config->prescaler + 1U));
Potential damage 🟡 Medium 🩹 Incorrect results

  • If the new prescaler value is incorrect for an enabled deployment, the counter frequency and alarm timing can be wrong.
  • The available source shows no persistent state or external effect specific to this counter capability.
  • Reverting the device-tree value restores the prior counter configuration; already mis-timed callbacks are not retroactively repeated, but no persistent counter data repair is indicated.
Sources

dts/arm/ti/mspm33c/mspm33c.dtsi[346-346]

			ti,clk-prescaler = <0>; /* No prescaler */

drivers/counter/counter_mspm0_timer.c[469-472]

	base->commonregs.cps = config->prescaler;
	base->commonregs.cclkctl = GPTIMER_CCLKCTL_CLKEN_ENABLED;

	data->freq = clock_rate / ((config->clk_div_reg + 1U) * (config->prescaler + 1U));
Assessed commit 573a7bd
Diagram

graph TD
  A["ckm clock controller"] --> B["timg12_0 timer node"] --> C["counterg12_0 counter"]
  D["ti,clk-prescaler = 0"] --> B
Loading
High-Level Assessment

Explicitly setting ti,clk-prescaler to is the simplest correct fix. It makes the configuration self-documenting and consistent with sibling timer nodes, so no alternative was considered worth pursuing.

Files changed (1) +1 / -0

Bug fix (1) +1 / -0
mspm33c.dtsiAdd ti,clk-prescaler = <0> to timg12_0 node +1/-0

Add ti,clk-prescaler = <0> to timg12_0 node

• Inserts the ti,clk-prescaler property with value <0> (no prescaler) into the timg12_0@40188000 timer node, between interrupts and ti,clk-div. No other properties or nodes are modified.

dts/arm/ti/mspm33c/mspm33c.dtsi

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Qodo Logo

@Aman-Lachhiramka-ti

Aman-Lachhiramka-ti commented Dec 4, 2026 •

Copy link
Copy Markdown
Author

Fixes : m33 twister build failure: https://jenkins-epsw.itg.ti.com/view/zsod/job/zsod_utils_twister_build/42/artifact/artifacts/logs/twister_build.log

cc @soumya-TI @venkatesan-krishnamoorthy

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

❌ Board tests failed

Commit 573a7bd06416

Board Build Test Jenkins build Logs
mspm0g3519 - ABORTED #26-mspm0g3519- -
mspm0l2228 SUCCESS SUCCESS #25-mspm0l2228- log.html · build.log
am62l SUCCESS SUCCESS #32-am62l- log.html · build.log
am13e230 SUCCESS SUCCESS #24-am13e230- log.html · build.log
mspm33c321a SUCCESS SUCCESS #25-mspm33c321a- 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 #29 · Workflow run

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.

3 participants