-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Add support for UDC for Apollo510 family #89023
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
base: main
Are you sure you want to change the base?
Add support for UDC for Apollo510 family #89023
Conversation
The buf_in_nocache function is to be used by various device drivers to check if buffer is in noncacheable region. The cacheable DMA buffer shall be put into section .ambiq_dma_buff due to certain restrictions of the SoC. Signed-off-by: Swift Tian <[email protected]>
Standarlized transfer priority and add a medium level. Signed-off-by: Swift Tian <[email protected]>
1. Moved ambiq specific macro to mspi_ambiq header. 2. Always fill rx&tx dummy settings regardless of transfer direction. 3. Add the CONFIG_MSPI_* macro for optional features. 4. Fixed the ID read process and add k_sleep during busy_wait in atxp032 driver. Signed-off-by: Swift Tian <[email protected]>
Add the binding properties available to apollo5. Signed-off-by: Swift Tian <[email protected]>
MSPI controller nodes and corresponding XIP regions are added. Signed-off-by: Swift Tian <[email protected]>
Add mspi to board devicetree including pinctrl and mspi devices. Signed-off-by: Swift Tian <[email protected]>
Add the MSPI controller support for apollo5x. Add the MSPI controller to mspi API test. Updated west.yml for hal updates. Signed-off-by: Swift Tian <[email protected]>
The APS Z8 driver supports these variants : APS25616n, APS25616BA, and APS51216BA. Signed-off-by: Swift Tian <[email protected]>
This device driver supports ISSI is25w/lx032/64 series flash. Only extended SPI mode(1s-1s-1s, 1s-8s-8s, 1s-1s-8s) is implemented. Signed-off-by: Swift Tian <[email protected]>
The utility may be used during development stage to get ambiq platform specific timing parameters for mspi devices. Signed-off-by: Swift Tian <[email protected]>
Add USB node to apollo510 qualifier, and apollo510_evb board to enable USB support on the MCU and its EVB. Signed-off-by: Chew Zeh Yang <[email protected]>
Added handling specific to apollo510 and new feature supported by the soc. Signed-off-by: Chew Zeh Yang <[email protected]>
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
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.
Pull Request Overview
This PR adds support for UDC for the Ambiq Apollo510 family and updates several USB, MSPI, and flash drivers along with DTS bindings to support new hardware features and improved functionality.
- Updated DTS bindings for Ambiq MSPI devices and controllers
- Modified USB device controller driver for cache handling and enhanced clock configuration
- Updated flash and MSPI drivers to use new priority definitions and timing configuration macros
Reviewed Changes
Copilot reviewed 46 out of 57 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
dts/bindings/mspi/ambiq,mspi-device.yaml | Updated default array length for timing-config property |
dts/bindings/mspi/ambiq,mspi-controller.yaml | Added new properties for MSPI controller configuration |
drivers/usb/udc/udc_ambiq.c | Enhanced cache management, type definitions, and clock handling |
drivers/mspi/mspi_ambiq.h | Removed unused structure field and added timing scan types |
drivers/memc/memc_mspi_aps_z8.h | Added support definitions for new memory controller features |
drivers/memc/memc_mspi_aps6404l.c | Updated timing configuration macros using COND_CODE_1 |
drivers/flash/flash_mspi_emul_device.c | Updated transfer priority definitions |
drivers/flash/flash_mspi_atxp032.c | Switched to memcpy for JEDEC ID handling and adjusted timing macros |
boards/ambiq/apollo510_evb/apollo510_evb.yaml | Added mspi and usbd support to board configuration |
Files not reviewed (11)
- 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
- drivers/flash/CMakeLists.txt: Language not supported
- drivers/flash/Kconfig.mspi: Language not supported
- drivers/memc/CMakeLists.txt: Language not supported
- drivers/memc/Kconfig.mspi: Language not supported
- drivers/mspi/CMakeLists.txt: Language not supported
- drivers/mspi/Kconfig.ambiq: Language not supported
- drivers/usb/udc/Kconfig.ambiq: Language not supported
- dts/arm/ambiq/ambiq_apollo510.dtsi: Language not supported
Comments suppressed due to low confidence (3)
drivers/usb/udc/udc_ambiq.c:1027
- The callback parameter type for 'xfer_len' was updated to use XFER_LEN_CB_TYPE; please verify that this type change is consistently used across all related USB transfer functions to avoid potential type mismatches.
uint8_t ep_addr, XFER_LEN_CB_TYPE xfer_len, am_hal_usb_xfer_code_e code, void *param)
dts/bindings/mspi/ambiq,mspi-device.yaml:51
- The default timing configuration array length changed from 8 to 7 values; please verify that this change is consistent with the updated structure in mspi_ambiq_timing_cfg and does not break expected configurations.
default: [0, 0, 0, 0, 0, 0, 0]
drivers/mspi/mspi_ambiq.h:60
- The field 'ui32RXDQSDelayEXT' has been removed from the mspi_ambiq_timing_cfg structure; please ensure that all related code and DTS bindings have been updated accordingly to reflect this change.
struct mspi_ambiq_timing_cfg {
This PR adds support for UDC for Ambiq Apollo510 family. The boards tested are:
Followings are the USB samples tested:
CONFIG_PM_DEVICE=n
)CONFIG_PM_DEVICE=n
)However, this PR is opened as draft until the following dependencies is met:
buf_in_nocache()
insoc/ambiq/apollo5x/soc.c
is needed for cache handlinghwinfo
is needed for serial number generation, especially for webusb-next examplep/s: only commit bf0f76a and fa4c752 belongs to this PR. the other commits belong to another PR as it is needed for UDC code changes to compile. It will not be here when the official PR is up.