Skip to content

Add Basic support for Microchip SAM D5X/E5X Family devices #93450

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

Merged

Conversation

ArunMCHP
Copy link
Contributor

This PR adds initial support for Microchip’s SAM D5x/E5x family of SoCs, along with board support for the SAM E54 Xplained Pro development kit (ATSAME54-XPRO). It includes the basic SoC integration, devicetree files, and minimal configuration needed to bring up the board with a working UART console.

Associated pull request for the addition of the SAM D5x/E5x devices to hal_microchip:
zephyrproject-rtos/hal_microchip#33

The naming convention of driver files and device organization is as per the RFC : #92168

@zephyrbot zephyrbot added platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) area: Pinctrl area: Flash area: UART Universal Asynchronous Receiver-Transmitter labels Jul 21, 2025
Copy link

Hello @ArunMCHP, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Copy link

github-actions bot commented Jul 21, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_microchip zephyrproject-rtos/hal_microchip@415c92d zephyrproject-rtos/hal_microchip@2c5eb6b (master) zephyrproject-rtos/[email protected]

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-hal_microchip DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jul 21, 2025
@ArunMCHP ArunMCHP force-pushed the sam_d5x_e5x_minimal_support branch from 5e8b12a to 4981667 Compare July 22, 2025 14:19
@ArunMCHP ArunMCHP requested a review from nordicjm July 22, 2025 14:37
Copy link
Member

@parthitce parthitce left a comment

Choose a reason for hiding this comment

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

Please re-order the commits.

@ArunMCHP ArunMCHP force-pushed the sam_d5x_e5x_minimal_support branch 2 times, most recently from 5b8d763 to eac3759 Compare July 23, 2025 18:04
Copy link
Contributor

@kartben kartben left a comment

Choose a reason for hiding this comment

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

Some minor problems spotted in the documentation page of the new board

Thanks!

Comment on lines 3 to 5
SAM E54 Xplained Pro Evaluation Kit
###################################

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
SAM E54 Xplained Pro Evaluation Kit
###################################

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 14 to 17

.. image:: img/atsam_e54_xpro.webp
:align: center
:alt: SAM_E54_XPRO
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.. image:: img/atsam_e54_xpro.webp
:align: center
:alt: SAM_E54_XPRO

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 56 to 59

.. image:: img/atsam_e54_xpro_pinout.webp
:align: center
:alt: SAME54-XPRO-pinout
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.. image:: img/atsam_e54_xpro_pinout.webp
:align: center
:alt: SAME54-XPRO-pinout

Please drop this image file. It adds no useful information

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 61 to 63
Default Zephyr Peripheral Mapping:
----------------------------------
- SERCOM2 USART TX : PB24
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Default Zephyr Peripheral Mapping:
----------------------------------
- SERCOM2 USART TX : PB24
Default Zephyr Peripheral Mapping
---------------------------------
- SERCOM2 USART TX : PB24

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Comment on lines 63 to 83
- SERCOM2 USART TX : PB24
- SERCOM2 USART RX : PB25
- GPIO/PWM LED0 : PC18
- GPIO SW0 : PB31
- GMAC RMII REFCK : PA14
- GMAC RMII TXEN : PA17
- GMAC RMII TXD0 : PA18
- GMAC RMII TXD1 : PA19
- GMAC RMII CRSDV : PC20
- GMAC RMII RXD0 : PA13
- GMAC RMII RXD1 : PA12
- GMAC RMII RXER : PA15
- GMAC MDIO MDC : PC11
- GMAC MDIO MDIO : PC12
- SERCOM4 SPI SCK : PB26
- SERCOM4 SPI MOSI : PB27
- SERCOM4 SPI MISO : PB29
- SERCOM7 I2C SDA : PD08
- SERCOM7 I2C SCL : PD09
- USB DP : PA25
- USB DM : PA24
Copy link
Contributor

Choose a reason for hiding this comment

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

You may want to make this a table -- your manual semicolon alignment are lost in html form (but it can also stay like this, your call)

https://builds.zephyrproject.io/zephyr/pr/93450/docs/boards/microchip/sam/sam_e54_xpro/doc/index.html#default-zephyr-peripheral-mapping

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @kartben, We have removed this section and given reference to board user guide.

Copy link
Contributor

Choose a reason for hiding this comment

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

Convention is to name the file exactly the same as the board

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed same as board name.

Copy link
Contributor

@kartben kartben left a comment

Choose a reason for hiding this comment

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

Also note that you may want to refrain from using the word "binding" in the description of the bindings you're introducing, and may want to look at adding a concise title: property which is what will get picked up for the autogenerated list of supported hardware features
https://docs.zephyrproject.org/latest/boards/microchip/sam/sama7g54_ek/doc/index.html#supported-features

sunil-abraham and others added 6 commits August 6, 2025 19:14
Add clock dts node and minimal set of binding parameters
for clock_control driver.

Signed-off-by: Sunil Abraham <[email protected]>
Add clock control driver with minimal functionality.
Implement basic on, off, get_status and get_rate API.

Signed-off-by: Sunil Abraham <[email protected]>
Add pinctrl dts node and binding parameters for Microchip
Pinctrl Port G1 IP

Signed-off-by: Mohamed Azhar <[email protected]>
Add pinctrl driver for Microchip Port G1 Peripheral IPs

Signed-off-by: Mohamed Azhar <[email protected]>
Add uart dts nodes and minimal set of binding parameters
for sercom uart driver.

Signed-off-by: Sunil Abraham <[email protected]>
Add uart driver with minimal features.
Implement polling receive and transmit functionality.

Signed-off-by: Sunil Abraham <[email protected]>
@ArunMCHP ArunMCHP dismissed stale reviews from nordicjm, parthitce, and nandojve via 3688ddd August 6, 2025 14:39
@ArunMCHP ArunMCHP force-pushed the sam_d5x_e5x_minimal_support branch from 1bc7d79 to 3688ddd Compare August 6, 2025 14:39
@ArunMCHP
Copy link
Contributor Author

ArunMCHP commented Aug 6, 2025

Also note that you may want to refrain from using the word "binding" in the description of the bindings you're introducing, and may want to look at adding a concise title: property which is what will get picked up for the autogenerated list of supported hardware features https://docs.zephyrproject.org/latest/boards/microchip/sam/sama7g54_ek/doc/index.html#supported-features

Thanks @kartben. We have added a title to each binding we introduced and also removed the word "binding" from the description section.

We have addressed all the review comments, kindly review and merge the PR if everything looks good.

@ArunMCHP ArunMCHP requested a review from kartben August 7, 2025 16:29
kartben
kartben previously approved these changes Aug 7, 2025
Comment on lines 53 to 55
Follow these steps to program and debug the board:
==================================================

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems unnecessary, you're already in the Programming and Debugging section

Suggested change
Follow these steps to program and debug the board:
==================================================

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @kartben. I will remove this and update the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed these lines.

Add initial support for the Microchip SAM E54 Xplained Pro board
(ATSAME54-XPRO).

Product page: https://www.microchip.com/en-us/development-tool/atsame54-xpro

Signed-off-by: Arunprasath P <[email protected]>
@ArunMCHP
Copy link
Contributor Author

ArunMCHP commented Aug 8, 2025

Hi @kartben,
Thank you for your valuable feedback. We’ve addressed your previous comment, kindly re-review and approve the PR when convenient.

Hi @parthitce, @nordicjm , @nandojve,
Thanks again for your earlier reviews and approvals. Since we’ve made documentation updates based on @kartben comments, we kindly request your re-approval on the updated PR.

@ArunMCHP ArunMCHP requested a review from kartben August 8, 2025 05:00
@nandojve nandojve requested a review from nordicjm August 8, 2025 08:29
@jhedberg jhedberg merged commit 8d44550 into zephyrproject-rtos:main Aug 8, 2025
26 checks passed
Copy link

github-actions bot commented Aug 8, 2025

Hi @ArunMCHP!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

@ArunMCHP ArunMCHP deleted the sam_d5x_e5x_minimal_support branch August 11, 2025 06:45
@ArunMCHP ArunMCHP restored the sam_d5x_e5x_minimal_support branch August 11, 2025 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Clock Control area: Flash area: Pinctrl area: UART Universal Asynchronous Receiver-Transmitter manifest manifest-hal_microchip platform: Microchip MEC Microchip MEC Platform platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM)
Projects
None yet
Development

Successfully merging this pull request may close these issues.