-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
jhedberg
merged 10 commits into
zephyrproject-rtos:main
from
Zephyr4Microchip:sam_d5x_e5x_minimal_support
Aug 8, 2025
+3,661
−1
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0825a11
west.yml: Update west.yml for SAM_D5X_E5X dfp
ArunMCHP dc1bdfd
dts: arm: microchip: add dtsi files for Microchip SAM D5x/E5x SoC series
ArunMCHP 650d308
soc: microchip: add support for SAM D5x/E5x SoC series
ArunMCHP d45c3d3
dts: arm: microchip: add clock dts node and bindings for SAM D5x/E5x
sunil-abraham cd887b8
drivers: clock_control: microchip: clock support for SAM D5x/E5x
sunil-abraham aec748f
dts: arm: microchip: add pinctrl dts node and bindings for Port G1 IP
AzharMCHP 71b67fd
drivers: pinctrl: microchip: add pinctrl driver for Port G1 IP
AzharMCHP 83e1a1a
dts: arm: microchip: add uart dts node and bindings for sercom g1 IPs
sunil-abraham 42cec09
drivers: uart: microchip: add minimal support for sercom uart g1 IPs
sunil-abraham c7a6b8a
boards: microchip: add SAM E54 Xplained Pro board support
ArunMCHP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_SAM_E54_XPRO | ||
select SOC_ATSAME54P20A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
board: | ||
name: sam_e54_xpro | ||
full_name: SAM E54 Xplained Pro | ||
vendor: microchip | ||
socs: | ||
- name: atsame54p20a |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
.. zephyr:board:: sam_e54_xpro | ||
|
||
Overview | ||
******** | ||
|
||
The SAM E54 Xplained Pro evaluation kit is ideal for evaluation and | ||
prototyping with the SAM E54 Cortex®-M4F processor-based | ||
microcontrollers. The kit includes Microchip’s Embedded Debugger (EDBG), | ||
which provides a full debug interface without the need for additional | ||
hardware. | ||
|
||
Hardware | ||
******** | ||
|
||
- ATSAME54P20A ARM Cortex-M4F processor at 120 MHz | ||
- 32.768 kHz crystal oscillator | ||
- 12 MHz crystal oscillator | ||
- 1024 KiB flash memory and 256 KiB of RAM | ||
- One yellow user LED | ||
- One mechanical user push button | ||
- One reset button | ||
- On-board USB based EDBG unit with serial console | ||
- One QTouch® PTC button | ||
- 32 MiB QSPI Flash | ||
- ATECC508 CryptoAuthentication™ device | ||
- AT24MAC402 serial EEPROM with EUI-48™ MAC address | ||
- Ethernet | ||
|
||
- RJ45 connector with built-in magnetics | ||
- KSZ8091RNA PHY | ||
- 10Base-T/100Base-TX IEE 802.3 compliant Ethernet transceiver | ||
|
||
- USB interface, host, and device | ||
- SD/SDIO card connector | ||
|
||
Supported Features | ||
================== | ||
|
||
.. zephyr:board-supported-hw:: | ||
|
||
Connections and IOs | ||
=================== | ||
|
||
The `SAM E54 Xplained Pro User Guide`_ has detailed information about board connections. | ||
|
||
Programming and Debugging | ||
************************* | ||
|
||
The SAM E54 Xplained Pro features an on-board Microchip Embedded Debugger (EDBG), | ||
which provides both a standard debug interface and a virtual serial port used as the Zephyr console. | ||
SERCOM2 of the ATSAME54P20A MCU is configured as a USART for console output. | ||
|
||
#. Connect the board to your host machine using the debug USB port. | ||
|
||
#. Open a terminal and start a serial console on the corresponding port. | ||
On Linux, this is typically ``/dev/ttyACM0``. For example: | ||
|
||
.. code-block:: console | ||
|
||
$ minicom -D /dev/ttyACM0 -o | ||
|
||
The -o option tells minicom not to send the modem initialization | ||
string. Connection should be configured as follows: | ||
|
||
- Speed: 115200 | ||
- Data: 8 bits | ||
- Parity: None | ||
- Stop bits: 1 | ||
|
||
#. Build and flash the Zephyr ``hello_world`` sample application: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: sam_e54_xpro | ||
:goals: flash | ||
:compact: | ||
|
||
#. Observe output on the terminal. If everything is set up correctly, you should see: | ||
|
||
.. code-block:: console | ||
|
||
Hello World! same_54_xpro | ||
|
||
References | ||
********** | ||
|
||
SAM E54 Product Page: | ||
https://www.microchip.com/en-us/product/ATSAME54P20A | ||
|
||
SAM E54 Xplained Pro evaluation kit Page: | ||
https://www.microchip.com/en-us/development-tool/ATSAME54-XPRO | ||
|
||
.. _SAM E54 Xplained Pro User Guide: | ||
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/UserGuides/70005321A.pdf |
16 changes: 16 additions & 0 deletions
16
boards/microchip/sam/sam_e54_xpro/sam_e54_xpro-pinctrl.dtsi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright (c) 2025 Microchip Technology Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <dt-bindings/sam/sam_d5x_e5x/atsame54/atsame54p20a-pinctrl.h> | ||
|
||
&pinctrl { | ||
sercom2_uart_default: sercom2_uart_default { | ||
group1 { | ||
pinmux = <PB25D_SERCOM2_PAD0>, | ||
<PB24D_SERCOM2_PAD1>; | ||
}; | ||
}; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright (c) 2025 Microchip Technology Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <microchip/sam/sam_d5x_e5x/atsame54/atsame54p20a.dtsi> | ||
#include "sam_e54_xpro-pinctrl.dtsi" | ||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
||
/ { | ||
model = "SAM E54 Xplained Pro"; | ||
compatible = "same54,xpro", "microchip,atsame54p20a", "microchip,same54"; | ||
|
||
chosen { | ||
zephyr,console = &sercom2; | ||
zephyr,shell-uart = &sercom2; | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
/* | ||
* The final 16 KiB is reserved for the application. | ||
* Storage partition will be used by FCB/LittleFS/NVS | ||
* if enabled. | ||
*/ | ||
storage_partition: partition@fc000 { | ||
label = "storage"; | ||
reg = <0x000fc000 0x00004000>; | ||
}; | ||
}; | ||
}; | ||
|
||
&cpu0 { | ||
clock-frequency = <48000000>; | ||
}; | ||
|
||
&sercom2 { | ||
status = "okay"; | ||
compatible = "microchip,sercom-g1-uart"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
current-speed = <115200>; | ||
data-bits = <8>; | ||
parity = "none"; | ||
stop-bits = "1"; | ||
|
||
rxpo = <1>; | ||
txpo = <0>; | ||
|
||
pinctrl-0 = <&sercom2_uart_default>; | ||
pinctrl-names = "default"; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
identifier: sam_e54_xpro | ||
name: SAM E54 Xplained Pro | ||
type: mcu | ||
arch: arm | ||
toolchain: | ||
- zephyr | ||
flash: 1024 | ||
ram: 256 | ||
supported: | ||
- pinctrl | ||
- shell | ||
- uart | ||
vendor: microchip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_BUILD_OUTPUT_HEX=y | ||
|
||
CONFIG_ARM_MPU=y | ||
CONFIG_HW_STACK_PROTECTION=y | ||
|
||
CONFIG_CONSOLE=y | ||
CONFIG_SERIAL=y | ||
CONFIG_UART_CONSOLE=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
source [find interface/cmsis-dap.cfg] | ||
transport select swd | ||
|
||
# chip name | ||
set CHIPNAME same54p20a | ||
set ENDIAN little | ||
set CPUTAPID 0x0bc11477 | ||
|
||
source [find target/atsame5x.cfg] | ||
|
||
reset_config none | ||
cortex_m reset_config sysresetreq | ||
|
||
$_TARGETNAME configure -event gdb-attach { | ||
echo "Debugger attaching: halting execution" | ||
reset halt | ||
gdb_breakpoint_override hard | ||
} | ||
|
||
$_TARGETNAME configure -event gdb-detach { | ||
echo "Debugger detaching: resuming execution" | ||
resume | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config CLOCK_CONTROL_MCHP_COMMON | ||
bool | ||
help | ||
Common options for Microchip clock control drivers. | ||
|
||
config CLOCK_CONTROL_MCHP_SAM_D5X_E5X | ||
bool "Microchip SAM D5X/E5X clock controller Support" | ||
depends on DT_HAS_MICROCHIP_SAM_D5X_E5X_CLOCK_ENABLED | ||
default y | ||
select CLOCK_CONTROL_MCHP_COMMON | ||
help | ||
Enable clock controller driver for Microchip SAM D5X/E5X SoC family. | ||
|
||
if CLOCK_CONTROL_MCHP_COMMON | ||
|
||
config CLOCK_CONTROL_MCHP_GET_RATE | ||
bool "Get clock rate" | ||
default y | ||
help | ||
Enable support for retrieving the clock rate. This may increase | ||
code size, depending on the depth of clock source hierarchy. | ||
|
||
nandojve marked this conversation as resolved.
Show resolved
Hide resolved
|
||
endif # CLOCK_CONTROL_MCHP_COMMON |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.