Skip to content

soc: ambiq: Add support for ambiq apollo510 soc #88737

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
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

AlessandroLuo
Copy link
Collaborator

This PR introduces board support for the Apollo510 SOC while updating several drivers and device tree bindings to accommodate Apollo5x series hardware changes. Key changes include the addition of a new GPIO header and function, updates to timer and serial drivers for Apollo5x compatibility, and new board definitions and device tree bindings.

Copy link

github-actions bot commented Apr 17, 2025

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

Name Old Revision New Revision Diff
hal_ambiq zephyrproject-rtos/hal_ambiq@a6dff0a zephyrproject-rtos/hal_ambiq@e916e84 (main) 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_ambiq DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Apr 17, 2025
@AlessandroLuo AlessandroLuo requested a review from Copilot April 17, 2025 02:30
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 25 out of 36 changed files in this pull request and generated no comments.

Files not reviewed (11)
  • boards/ambiq/apollo510_evb/CMakeLists.txt: Language not supported
  • boards/ambiq/apollo510_evb/Kconfig: Language not supported
  • boards/ambiq/apollo510_evb/Kconfig.apollo510_evb: Language not supported
  • boards/ambiq/apollo510_evb/Kconfig.defconfig: Language not supported
  • boards/ambiq/apollo510_evb/apollo510_evb-pinctrl.dtsi: Language not supported
  • boards/ambiq/apollo510_evb/apollo510_evb.dts: Language not supported
  • boards/ambiq/apollo510_evb/apollo510_evb_defconfig: Language not supported
  • boards/ambiq/apollo510_evb/board.cmake: Language not supported
  • boards/ambiq/apollo510_evb/doc/index.rst: Language not supported
  • drivers/pinctrl/Kconfig.ambiq: Language not supported
  • dts/arm/ambiq/ambiq_apollo510.dtsi: Language not supported
Comments suppressed due to low confidence (2)

drivers/timer/ambiq_stimer.c:218

  • For CONFIG_SOC_SERIES_APOLLO5X, the call to am_hal_stimer_config omits enabling COMPARE_B. Please verify that this change is intentional and that the hardware does not require the COMPARE_B configuration.
am_hal_stimer_config((oldCfg & ~(AM_HAL_STIMER_CFG_FREEZE | STIMER_STCFG_CLKSEL_Msk)) | TIMER_CLKSRC | AM_HAL_STIMER_CFG_COMPARE_A_ENABLE);

drivers/pinctrl/pinctrl_ambiq.c:62

  • The default case in the new switch on 'pin->sdif_cdwp' simply breaks without any handling. Consider logging or explicitly handling unexpected values to clarify intent.
default:

@AlessandroLuo AlessandroLuo force-pushed the apollo510-base-ver branch 2 times, most recently from 808630d to 3b157f6 Compare April 17, 2025 02:38
@github-actions github-actions bot removed the DNM (manifest) This PR should not be merged (controlled by action-manifest) label Apr 17, 2025
@AlessandroLuo AlessandroLuo requested a review from Copilot April 17, 2025 02:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 25 out of 36 changed files in this pull request and generated no comments.

Files not reviewed (11)
  • boards/ambiq/apollo510_evb/CMakeLists.txt: Language not supported
  • boards/ambiq/apollo510_evb/Kconfig: Language not supported
  • boards/ambiq/apollo510_evb/Kconfig.apollo510_evb: Language not supported
  • boards/ambiq/apollo510_evb/Kconfig.defconfig: Language not supported
  • boards/ambiq/apollo510_evb/apollo510_evb-pinctrl.dtsi: Language not supported
  • boards/ambiq/apollo510_evb/apollo510_evb.dts: Language not supported
  • boards/ambiq/apollo510_evb/apollo510_evb_defconfig: Language not supported
  • boards/ambiq/apollo510_evb/board.cmake: Language not supported
  • boards/ambiq/apollo510_evb/doc/index.rst: Language not supported
  • drivers/pinctrl/Kconfig.ambiq: Language not supported
  • dts/arm/ambiq/ambiq_apollo510.dtsi: Language not supported
Comments suppressed due to low confidence (2)

drivers/timer/ambiq_stimer.c:36

  • [nitpick] Consider clarifying in the surrounding comment why the backup comparator is omitted for Apollo5x configurations to improve code readability.
#if defined(CONFIG_SOC_SERIES_APOLLO5X)

drivers/gpio/gpio_ambiq.c:583

  • [nitpick] Consider adding an inline comment to explain why the offset is shifted right by 2 for non-Apollo3x configurations.
   pin += (dev_cfg->offset >> 2);

@AlessandroLuo AlessandroLuo force-pushed the apollo510-base-ver branch 3 times, most recently from e341193 to 9e93f4d Compare April 17, 2025 08:24
@github-actions github-actions bot added the DNM (manifest) This PR should not be merged (controlled by action-manifest) label Apr 17, 2025
@github-actions github-actions bot removed the DNM (manifest) This PR should not be merged (controlled by action-manifest) label Apr 17, 2025
@AlessandroLuo AlessandroLuo force-pushed the apollo510-base-ver branch 2 times, most recently from b9eb8d5 to 6641ec9 Compare April 17, 2025 14:47
@AlessandroLuo AlessandroLuo marked this pull request as ready for review April 17, 2025 16:01
@github-actions github-actions bot added area: Timer Timer area: Pinctrl area: UART Universal Asynchronous Receiver-Transmitter area: Watchdog Watchdog area: GPIO platform: Ambiq Ambiq labels Apr 17, 2025
@AlessandroLuo AlessandroLuo requested a review from swift-tk April 18, 2025 03:29
Add all required parts (new SoC family/series, device tree) for
the Ambiq Apollo510 SoC.

Signed-off-by: Hao Luo <[email protected]>
This commit adds support for the Ambiq Apollo510 Evaluation Board.

Signed-off-by: Hao Luo <[email protected]>
This commit adds pinctrl support for Apollo510 SoCs,
and unified pinctrl bindings across apollo families.

Signed-off-by: Hao Luo <[email protected]>
Added more clock sources for Apollo510 support

Signed-off-by: Hao Luo <[email protected]>
This commit adds support for Apollo510 SoC in ambiq stimer driver

Signed-off-by: Hao Luo <[email protected]>
This commit adds support for Apollo510 SoC in ambiq gpio driver

Signed-off-by: Hao Luo <[email protected]>
This commit adds support for Apollo510 SoC in ambiq wdt driver

Signed-off-by: Hao Luo <[email protected]>
@AlessandroLuo AlessandroLuo requested a review from aaronyegx April 18, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants