-
Notifications
You must be signed in to change notification settings - Fork 7.7k
soc: ambiq: apollo2: Add support for Apollo2 SOC Series #93614
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
Open
srisurya1
wants to merge
6
commits into
zephyrproject-rtos:main
Choose a base branch
from
linumiz:apollo2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,145
−76
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
671c80b
dts: bindings: pinctrl: Add pinctrl bindings for Apollo2 SOC
srisurya1 b053e56
drivers: pinctrl: Add pinctrl driver for Apollo2 SoC
srisurya1 c36fa7f
drivers: serial: pl011: Add support for Ambiq Apollo2 SoC UART
srisurya1 454e615
dts: arm: ambiq: Add DTSI for Apollo2 SOC
srisurya1 e67dd34
soc: ambiq: apollo2: Add support for Apollo2 SoC
srisurya1 aef5f8e
boards: ambiq: Add support for the Ambiq Apollo2 EVB board
srisurya1 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,7 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright (c) 2025 Linumiz GmbH | ||
# Author: Sri Surya <srisurya@linumiz.com> | ||
|
||
config BOARD_APOLLO2_EVB | ||
select SOC_APOLLO2 |
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,21 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2025 Linumiz GmbH | ||
* Author: Sri Surya <srisurya@linumiz.com> | ||
*/ | ||
|
||
#include <dt-bindings/pinctrl/ambiq-apollo2-pinctrl.h> | ||
|
||
&pinctrl { | ||
uart0_default: uart0_default { | ||
group1 { | ||
pinmux = <UART0TX_P22>; | ||
}; | ||
|
||
group2 { | ||
pinmux = <UART0RX_P23>; | ||
input-enable; | ||
}; | ||
}; | ||
}; |
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,58 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
|
||
/dts-v1/; | ||
#include <ambiq/ambiq_apollo2.dtsi> | ||
|
||
#include "apollo2_evb-pinctrl.dtsi" | ||
|
||
/ { | ||
model = "Ambiq Apollo2 evaluation board"; | ||
compatible = "ambiq,apollo2_evb"; | ||
|
||
chosen { | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
zephyr,console = &uart0; | ||
zephyr,shell-uart = &uart0; | ||
zephyr,uart-mcumgr = &uart0; | ||
zephyr,uart-pipe = &uart0; | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
erase-block-size = <8192>; | ||
write-block-size = <4>; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
boot_partition: partition@c000 { | ||
label = "mcuboot"; | ||
reg = <0x0000c000 0xc000>; | ||
}; | ||
|
||
slot0_partition: partition@18000 { | ||
label = "image-0"; | ||
reg = <0x00018000 0x72000>; | ||
}; | ||
|
||
slot1_partition: partition@8a000 { | ||
label = "image-1"; | ||
reg = <0x0008a000 0x72000>; | ||
}; | ||
|
||
storage_partition: partition@fc000 { | ||
label = "storage"; | ||
reg = <0x000fc000 0x4000>; | ||
}; | ||
}; | ||
}; | ||
|
||
&uart0 { | ||
current-speed = <115200>; | ||
pinctrl-0 = <&uart0_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
}; |
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,15 @@ | ||
identifier: apollo2_evb | ||
name: Apollo2 EVB | ||
type: mcu | ||
arch: arm | ||
ram: 256 | ||
flash: 1024 | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
supported: | ||
- uart | ||
testing: | ||
ignore_tags: | ||
- net | ||
vendor: ambiq |
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 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright (c) 2025 Linumiz GmbH | ||
# Author: Sri Surya <srisurya@linumiz.com> | ||
|
||
CONFIG_CONSOLE=y | ||
CONFIG_UART_CONSOLE=y | ||
CONFIG_SERIAL=y | ||
CONFIG_UART_INTERRUPT_DRIVEN=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,8 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright (c) 2025 Linumiz GmbH | ||
# Author: Sri Surya <srisurya@linumiz.com> | ||
|
||
board_runner_args(jlink "--device=AMA2B1KK" "--iface=swd" "--speed=4000") | ||
|
||
include(${ZEPHYR_BASE}/boards/common/jlink.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,6 @@ | ||
board: | ||
name: apollo2_evb | ||
full_name: Apollo2 EVB | ||
vendor: ambiq | ||
socs: | ||
- name: apollo2 |
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,63 @@ | ||
.. zephyr:board:: apollo2_evb | ||
|
||
The Apollo2 EVB is a board by Ambiq featuring their ultra-low power Apollo2 SoC. | ||
|
||
Hardware | ||
******** | ||
|
||
The Ambiq Apollo2 SoC provides the following hardware features: | ||
|
||
- ARM® Cortex® M4F core with a Floating Point Unit | ||
- Up to 48 MHz operating frequency | ||
- 16 kB 2-way Associative Cache | ||
- Up to 1 MB of flash memory for code/data | ||
- Up to 256 KB of low leakage RAM for code/data | ||
|
||
For more information about the Apollo2 SoC and a potential Apollo2 EVB board: | ||
|
||
* `Apollo2 SoC Website <https://ambiq.com/apollo2/>`_ | ||
* `Apollo2 SoC Datasheet <https://www.fujitsu.com/uk/imagesgig5/Apollo2_Blue_MCU_Data_Sheet_rev0p8.pdf>`_ | ||
|
||
Supported Features | ||
================== | ||
|
||
.. zephyr:board-supported-hw:: | ||
|
||
Programming and Debugging | ||
========================= | ||
|
||
Flashing an application | ||
----------------------- | ||
|
||
Connect your device to your host computer using the JLINK USB port. | ||
The sample application :zephyr:code-sample:`hello_world` is used for this example. | ||
Build the Zephyr kernel and application, then flash it to the device: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:board: apollo2_evb | ||
:goals: flash | ||
|
||
.. note:: | ||
``west flash`` requires `SEGGER J-Link software`_ and `pylink`_ Python module | ||
to be installed on you host computer. | ||
|
||
Open a serial terminal (minicom, putty, etc.) with the following settings: | ||
|
||
- Speed: 115200 | ||
- Data: 8 bits | ||
- Parity: None | ||
- Stop bits: 1 | ||
|
||
Reset the board and you should be able to see on the corresponding Serial Port | ||
the following message: | ||
|
||
.. code-block:: console | ||
|
||
Hello World! apollo2_evb | ||
|
||
.. _SEGGER J-Link software: | ||
https://www.segger.com/downloads/jlink | ||
|
||
.. _pylink: | ||
https://github.com/Square/pylink |
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
Oops, something went wrong.
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.
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.
newline gap between nodes, line 15, fix in whole PR
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.
Addressed.