Skip to content

UPSTREAM-PEND: backport flash driver support for MSPM0 - #60

Draft
Sunil-Hegde wants to merge 13 commits into
TexasInstruments:v4.4.0-ti-nextfrom
Sunil-Hegde:mspm0_flash_downstream
Draft

Sunil-Hegde wants to merge 13 commits into
TexasInstruments:v4.4.0-ti-nextfrom
Sunil-Hegde:mspm0_flash_downstream

Conversation

@Sunil-Hegde

@Sunil-Hegde Sunil-Hegde commented Oct 1, 2026 •

Copy link
Copy Markdown

This is not merged upstream and is based on HAL. Added TI specific commits addressing the open reviews.

pr: 91500

lp_mspm0g3519, tests/drivers/flash/common

*** Booting Zephyr OS build v4.4.0-80-g0c2acf5ab176 ***
Running TESTSUITE flash_driver
===================================================================
START - test_flash_copy
Test will run on device flash-controller@400cd000
 PASS - test_flash_copy in 0.034 seconds
===================================================================
START - test_flash_erase
Test will run on device flash-controller@400cd000
 PASS - test_flash_erase in 0.014 seconds
===================================================================
START - test_flash_fill
Test will run on device flash-controller@400cd000
 PASS - test_flash_fill in 0.018 seconds
===================================================================
START - test_flash_flatten
Test will run on device flash-controller@400cd000
 PASS - test_flash_flatten in 0.021 seconds
===================================================================
START - test_flash_page_layout
Test will run on device flash-controller@400cd000
start_offset=0x70000	size=1024	index=448
page_count=512
 PASS - test_flash_page_layout in 0.013 seconds
===================================================================
START - test_flash_write_read_over_the_packet_limit
Test will run on device flash-controller@400cd000
Given bus controller does not have 'packet_data_limit' property
 SKIP - test_flash_write_read_over_the_packet_limit in 0.011 seconds
===================================================================
START - test_get_size
Test will run on device flash-controller@400cd000
 SKIP - test_get_size in 0.005 seconds
===================================================================
START - test_read_unaligned_address
Test will run on device flash-controller@400cd000
 PASS - test_read_unaligned_address in 0.013 seconds
===================================================================
START - test_supply_gpios_control
Test will run on device flash-controller@400cd000
 SKIP - test_supply_gpios_control in 0.008 seconds
===================================================================
TESTSUITE flash_driver succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [flash_driver]: pass = 6, fail = 0, skip = 3, total = 9 duration = 0.137 seconds
 - PASS - [flash_driver.test_flash_copy] duration = 0.034 seconds
 - PASS - [flash_driver.test_flash_erase] duration = 0.014 seconds
 - PASS - [flash_driver.test_flash_fill] duration = 0.018 seconds
 - PASS - [flash_driver.test_flash_flatten] duration = 0.021 seconds
 - PASS - [flash_driver.test_flash_page_layout] duration = 0.013 seconds
 - SKIP - [flash_driver.test_flash_write_read_over_the_packet_limit] duration = 0.011 seconds
 - SKIP - [flash_driver.test_get_size] duration = 0.005 seconds
 - PASS - [flash_driver.test_read_unaligned_address] duration = 0.013 seconds
 - SKIP - [flash_driver.test_supply_gpios_control] duration = 0.008 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
PROJECT EXECUTION SUCCESSFUL

tests/drivers/flash_api:

*** Boot*** Booting Zephyr OS build v4.4.0-81-gfd7a35affa6b ***
Running TESTSUITE flash_api
===================================================================
START - test_get_size
 PASS - test_get_size in 0.001 seconds
===================================================================
TESTSUITE flash_api succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [flash_api]: pass = 1, fail = 0, skip = 0, total = 1 duration = 0.001 seconds
 - PASS - [flash_api.test_get_size] duration = 0.001 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
PROJECT EXECUTION SUCCESSFUL

I have tested erase blocks and negative tests as well but logs are too big to paste here.

@Sunil-Hegde
Sunil-Hegde force-pushed the mspm0_flash_downstream branch 2 times, most recently from 427a605 to fd7a35a Compare October 5, 2026 08:24
@Aman-Lachhiramka-ti

Copy link
Copy Markdown

Better to add some tests and samples hardware runtime logs in this PR as this is from linumiz

karthi012 and others added 13 commits October 7, 2026 14:48
…ntr...

PR: 91500

Add Flash Controller binding for Texas Instruments MSPM0 Family Series

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
Signed-off-by: Jackson Farley <j-farley@ti.com>
PR: 91500

Add Flash driver for Texas Instruments MSPM0 Family Series
Currently driver supports only read,write,erase operations on
non-volatile flash MAIN memory region.

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
Signed-off-by: Jackson Farley <j-farley@ti.com>
PR: 91500

Add Flash controller support for MSPM0 and move non-volatile
flash memory under flash controller, bcoz it accessed via
flash controller driver

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
PR: 91500

flash0 is moved to flash controller node bcoz non-volatile flash
memory is accessed through flash controller driver, so fixing it
for MSPM0 G series

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
PR: 91500

flash0 is moved to flash controller node bcoz non-volatile flash
memory is accessed through flash controller driver, so fixing for
MSPM0 L series.

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
… pr...

PR: 91500

add flash controller chosen property to access non-volatile
flash memory for zephyr,flash chosen property node and adapt
partition layout to accomadate storage partition

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
… pr...

PR: 91500

add flash controller chosen property to access non-volatile
flash memory for zephyr,flash chosen property node and adapt
partition layout to accomadate storage partition

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
PR: 91500

Copyright header is missing in these dtsi files, which
makes CI Compilance warning, so fixing it

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
Add status check post erase/write operation in-order to insure
interrupt was fired for SUCCESS. DONE interrupt is fired
for both SUCCESS and FAILURE.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>

---
Reason: Addressing review comments on pr 91500
Driverlib suggests using DL_FlashCTL_executeClearStatus before
DL_FlashCTL_unprotectSector. Add the same in erase and write
APIs.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>

---
Reason: Review suggestions on pr 91500
Erase and Write use the offset assuming base address is 0
which is not the case on MSPM33. Use base_address_offset
in write and erase APIs same as read.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>

---
Reason: Review comments on pr 91500
Change the valid_range check in if condition from comparing with 0
to not operation for readability.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>

---
Reason: Review comments on pr 91500
Add flash node and mark partitions for boot, image and storage
for mspm0g3519.

Signed-off-by: Sunil Hegde <s-hegde3@ti.com>

---
Reason: Add additional board support apart from the
original PR adds.
@Sunil-Hegde
Sunil-Hegde force-pushed the mspm0_flash_downstream branch from 64cc985 to 0f6dc0a Compare October 7, 2026 09:19
@Aman-Lachhiramka-ti

Aman-Lachhiramka-ti commented Oct 7, 2026 •

Copy link
Copy Markdown

zephyrproject-rtos#115203

Check the upstream merged PR of updating zephyr partitioning happening again in this PR

@Sunil-Hegde
Sunil-Hegde marked this pull request as draft October 8, 2026 07:13
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