Skip to content

chore: Sync beo/ambiq-stable with upstream Ambiq (USB fixes for 510B) - #8

Merged
ladivin merged 12 commits into
beo/ambiq-stablefrom
lapo/sync-ambiq-stable-2026-08-03
Aug 10, 2026
Merged

chore: Sync beo/ambiq-stable with upstream Ambiq (USB fixes for 510B)#8
ladivin merged 12 commits into
beo/ambiq-stablefrom
lapo/sync-ambiq-stable-2026-08-03

Conversation

@ladivin

@ladivin ladivin commented Aug 3, 2026

Copy link
Copy Markdown

This change syncs our beo/ambiq-stable branch with the latest stable upstream Ambiq repository. It pulls in several recent PRs targeting USB issues on the 510B.

RichardSWheatley and others added 12 commits May 11, 2026 06:26
Rename three existing How-to RST files to the Zephyr
lowercase-hyphen naming convention:
  MCUBoot_Samples_and_Tests.rst     -> mcuboot-samples-and-tests.rst
  Zephyr_MSPI_Samples_and_Tests.rst -> mspi-samples-and-tests.rst
  Zephyr_USB_Samples.rst            -> usb-samples-and-tests.rst

Add five new How-to guides scoped to Ambiq hardware:
  audio-samples-and-tests.rst   - AUDADC, PDM and I2S samples
  ble-samples-and-tests.rst     - BLE samples; covers apollo510b_evb
                                  integrated radio and external HCI
  crypto-samples-and-tests.rst  - Ambiq TRNG entropy and HW CRC32
                                  driver tests (ambiq,hw-crc32)
  display-samples-and-tests.rst - Display, LVGL and input samples
                                  with shield variants
  general-samples-and-tests.rst - ADC, I2C, SPI, flash, counter, RTC,
                                  PWM, UART, HWINFO, PM, SDHC, WDT
                                  and benchmark samples

Replace all specific board names in build commands with
your_board_here across all doc/ambiq How-to files.

Update README.rst to reference all eight How-to files.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Fixing the table.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Update to reword properly

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
fix with reword

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Replace the bare busy-wait loop in mspi_context_lock() with a timed
loop that calls k_yield() on each iteration and returns -ETIMEDOUT if
the xfer timeout elapses. Applies to AP3, AP4, and AP5 drivers.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Backport the apollo510b_evb USB device-controller fixes from the
apollo510L-dev branch so USB works on ambiq-stable:

- Kconfig.ambiq: gate UDC_DRIVER_HAS_HIGH_SPEED_SUPPORT on
  SOC_SERIES_APOLLO5X && !SOC_APOLLO510B, so Apollo510B runs
  full-speed only (matching its USB IP).
- udc_ambiq.c: drop the OUT-transaction MPS clamp in udc_ambiq_rx();
  it is unnecessary and breaks non-short-packet OUT transfers.

The board USB node, vddusb GPIOs, usbd support tag, and the
tests/drivers/udc test suite already match between the two branches;
only these two driver files differed.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Backport the SDIO pinctrl fix from apollo510L-dev (e434acf). SDIF0
DAT1/DAT3 were in group0 (no bias); move them into group1 alongside
DAT0/DAT2/CMD so they get the bias-pull-up. Without pull-ups on
DAT1/DAT3 the 8-bit eMMC CRC fails intermittently on multi-block
writes.

Needed alongside the udc_ambiq USB fixes to bring up and test this
board on ambiq-stable.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Program the Apollo510B board clock information with the 12 MHz SIP
EXTREF source and mark the SIP path as enabled when USB-only EXTREF
init or Bluetooth HCI is in use.

Add a board-local EM9305 wake path for non-Bluetooth builds so USB
high-speed applications can use EXTREF without requiring the Bluetooth
stack. Bluetooth builds continue to let the HCI driver own EM9305 reset
and SPI traffic.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Clear any stale EM9305 active-state flag before starting a fresh
controller reset and initialization sequence.

This avoids reusing a late active-state event from a previous attempt
and lets Bluetooth coexist with the board EXTREF setup.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Allow Apollo5x UDC high-speed support and keep Apollo510B UDC
buffers in nocache memory for DMA coherency.

Tune the USB mass-storage sample for larger control transfers and DMA1
bulk transfers, and let the Ambiq UDC schedule full OUT request sizes
with DMA1 mode.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Only include and call the Zephyr memory-attribute helper when
CONFIG_MEM_ATTR is enabled.

The linker nocache-region check remains available independently.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
…q-stable-2026-08-03

Signed-off-by: Ladislav Podivin <EXTLAPO@bang-olufsen.dk>
@ladivin ladivin changed the title Chore: Sync with Ambiq Stable to get USB fixes chore: Sync beo/ambiq-stable with upstream Ambiq (USB fixes for 510B) Aug 3, 2026
@ladivin
ladivin marked this pull request as ready for review August 5, 2026 13:17
@ladivin
ladivin requested a review from a team August 5, 2026 13:17

@hansbinderup hansbinderup left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice 💯

@ladivin
ladivin merged commit f3ada56 into beo/ambiq-stable Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants