-
Notifications
You must be signed in to change notification settings - Fork 7.7k
fix(spi): Fix bus clock for ESP32-P4 + remove S2 leftover #11547
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
Conversation
👋 Hello P-R-O-C-H-Y, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 76 files 76 suites 13m 6s ⏱️ Results for commit 13333d2. ♻️ This comment has been updated with latest results. |
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 updates SPI initialization for the ESP32-P4 target by adding proper low-level SPI clock handling and removing outdated S2 support.
- Adds
hal/spi_ll.h
include for ESP32-P4 - Removes legacy DPORT-based clock/reset for unsupported configurations
- Implements atomic clock enable/reset for FSPI and HSPI on ESP32-P4
Comments suppressed due to low confidence (2)
cores/esp32/esp32-hal-spi.c:663
- [nitpick] Consider adding a brief comment explaining the purpose of this ESP32-P4–specific atomic clock/reset block to clarify why legacy DPORT calls were removed.
#elif CONFIG_IDF_TARGET_ESP32P4
cores/esp32/esp32-hal-spi.c:664
- This new ESP32-P4 path introduces logic for both FSPI and HSPI; consider adding unit or integration tests covering both branches to prevent regressions on P4.
if (spi_num == FSPI) {
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
Description of Change
This pull request updates the SPI handling for the ESP32P4 target in the
cores/esp32/esp32-hal-spi.c
file. It introduces new logic for enabling and resetting SPI bus clocks specific to ESP32P4 and removes legacy handling for unsupported configurations.Tests scenarios
Tested using ESP32-P4 and SD card example. Tested both FSPI and HSPI.
Related links
Closes #11398