-
Notifications
You must be signed in to change notification settings - Fork 8.3k
drivers: can: Add driver support for TI MSPM0 G-Series MCAN module #97092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
drivers: can: Add driver support for TI MSPM0 G-Series MCAN module #97092
Conversation
Add devicetree bindings for the TI MSPM0 G-Series MCAN module. Signed-off-by: Santhosh Charles <[email protected]> Signed-off-by: Jackson Farley <[email protected]>
Would you like review comments on the current state or should I wait until you move it out of draft? |
0b687ba to
47777cc
Compare
|
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
|
@santhosh-c-c The PR description still says this is a draft PR. Is it a draft or would you like reviews? |
@henrikbrixandersen The PR is ready for Review. |
henrikbrixandersen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! A few comments below.
Is there a board, where this can be enabled?
dts/arm/ti/mspm0/g/mspm0gx51x.dtsi
Outdated
|
|
||
| canfd1: can@40510000 { | ||
| compatible = "ti,mspm0-canfd"; | ||
| reg = <0x40510000 0x8000>, <0x40510000 0x1000>, <0x40510000 0x400>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The m_can address seems wrong. I think it should be 0x40517000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just cross-checked the address with the official TRM for the x51x series, revision SLASFA2B – November 2024 (revised October 2025). According to this document, the address for MCAN1 remains 0x40510000. Could you please share your sources and the revision date you are referring to? This will help to confirm if there are differences due to newer or older revisions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am referring to the same revision. By m_can, I mean the second entry of the reg array. If you are correct, then can you explain why the m_can address of canfd0 is not 0x40508000 instead of 0x4050F000?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, I initially thought you were referring to the CAN node base address itself. Based on the calculated offset, the correct m_can address for canfd1 should indeed be 0x40517000. Thank you for catching that.
47777cc to
d1f9c51
Compare
This is for MSPM0 G series (310x, 350x, x51x). It includes only the CAN controller hardware, to test or use CAN communication you must connect an external CAN transceiver module. |
drivers/can/Kconfig.mspm0
Outdated
| config CAN_MAX_STD_ID_FILTER | ||
| int "Maximum number of standard (11-bit) ID filters" | ||
| default 128 | ||
| range 0 128 | ||
| help | ||
| Defines the maximum number of filters with standard ID (11-bit) | ||
| that can be added by the application. | ||
|
|
||
| config CAN_MAX_EXT_ID_FILTER | ||
| int "Maximum number of extended (29-bit) ID filters" | ||
| default 64 | ||
| range 0 64 | ||
| help | ||
| Defines the maximum number of filters with extended ID (29-bit) | ||
| that can be added by the application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these and use CAN_MCAN_DT_INST_CALLBACKS_DEFINE() instead.
Add driver support for MCAN module on TI's MSPM0 G-Series MCUs. The MCAN module supports both classic CAN and CAN FD protocols. Signed-off-by: Santhosh Charles <[email protected]> Signed-off-by: Jackson Farley <[email protected]> Signed-off-by: Tomasz Bursztyka <[email protected]>
Add CAN-FD devicetree nodes for MSPM0 G-Series SoCs that include the peripheral: mspm0g310x, mspm0g350x and mspm0gx51x. Signed-off-by: Santhosh Charles <[email protected]> Signed-off-by: Tomasz Bursztyka <[email protected]>
Add support for the CANCLK source for MSPM0. `mspm0_canclk_cfg` config struct is used to provide CAN-FD clock frequency selection. - Select HFCLK (HFXT) freq when `ti,canclk-source = 0` - Else fall back to SYSOSC frequency. Signed-off-by: Santhosh Charles <[email protected]>
In flight PR includes the input-enable property for all CAN RX pins. Signed-off-by: Santhosh Charles <[email protected]>
d1f9c51 to
e0ac959
Compare
|
|
Please rebase on |



This patch introduces driver support for the MCAN (CAN FD and classic CAN) module on TI's MSPM0 G-Series microcontrollers. The MCAN module supports both the classic CAN protocol and the newer CAN FD protocol, enabling flexible CAN communication.
Signed-off-by: Santhosh Charles [email protected]