-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feature/support hpmicro chips #3398
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: master
Are you sure you want to change the base?
Feature/support hpmicro chips #3398
Conversation
|
Hi, think you, I think HP Micro use Chipidea HS controller, could you add the port to |
220d601 to
ff10f3e
Compare
Yes, I update my port files by using Chipidea HS controller to support HPMicro chips. Thank you! |
Signed-off-by: Zhihong Chen <[email protected]>
- add `zifencei` option Signed-off-by: Zhihong Chen <[email protected]>
Signed-off-by: Zhihong Chen <[email protected]>
Signed-off-by: Zhihong Chen <[email protected]>
ff10f3e to
5a1e8a0
Compare
Signed-off-by: Zhihong Chen <[email protected]>
|
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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 HPMicro chips (specifically HPM6750) and the hpm6750evk2 development board to TinyUSB. The implementation includes BSP files, USB driver integration with ChipIdea HS controller, and RISC-V toolchain updates.
Key changes:
- Integration of HPM6750 MCU with ChipIdea HS USB controller and EHCI support
- Complete BSP implementation for hpm6750evk2 board with dual USB port support
- RISC-V toolchain update to include
zifenceiextension for GCC compatibility
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/get_deps.py | Adds HPM SDK dependency entry for building HPMicro targets |
| src/tusb_option.h | Defines OPT_MCU_HPM (2600) MCU identifier |
| src/common/tusb_mcu.h | Configures HPM MCU with ChipIdea HS, EHCI, 16 endpoints, high-speed support |
| src/portable/ehci/ehci.c | Adds HPM-specific USB PHY line state handling in port reset |
| src/portable/chipidea/ci_hs/hcd_ci_hs.c | Integrates HPM USB PHY initialization for host mode |
| src/portable/chipidea/ci_hs/dcd_ci_hs.c | Integrates HPM USB PHY initialization and STS configuration for device mode |
| src/portable/chipidea/ci_hs/ci_hs_hpm.h | New header defining HPM controller registers and interrupt macros |
| hw/bsp/hpmicro/family.mk | Makefile build configuration for HPMicro family |
| hw/bsp/hpmicro/family.cmake | CMake build configuration for HPMicro family |
| hw/bsp/hpmicro/family.c | BSP implementation with USB interrupt handlers and board API |
| hw/bsp/hpmicro/boards/hpm6750evk2/board.mk | Board-specific Makefile variables and device settings |
| hw/bsp/hpmicro/boards/hpm6750evk2/board.cmake | Board-specific CMake configuration |
| hw/bsp/hpmicro/boards/hpm6750evk2/board.h | Board hardware definitions and peripheral mappings |
| hw/bsp/hpmicro/boards/hpm6750evk2/board.c | Board initialization including clock, PMP, UART, GPIO, USB |
| hw/bsp/hpmicro/boards/hpm6750evk2/pinmux.h | Pin multiplexing function declarations (auto-generated) |
| hw/bsp/hpmicro/boards/hpm6750evk2/pinmux.c | Pin multiplexing implementations (auto-generated) |
| hw/bsp/BoardPresets.json | Adds hpm6750evk2 presets; removes unrelated board entries |
| examples/build_system/make/cpu/rv32imac-ilp32.mk | Updates RISC-V march flags to include zifencei extension |
| examples/build_system/cmake/cpu/rv32imac-ilp32.cmake | Updates RISC-V march flags to include zifencei extension |
| examples/host/*/only.txt | Enables host examples for hpmicro family |
| examples/device/*_freertos/skip.txt | Skips FreeRTOS device examples for hpmicro |
| README.rst | Documents HPM6750 support in CPU compatibility table |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| #if !TUD_OPT_HIGH_SPEED | ||
| dcd_reg->PORTSC1 = PORTSC1_FORCE_FULL_SPEED; | ||
| dcd_reg->PORTSC1 |= PORTSC1_FORCE_FULL_SPEED; |
Copilot
AI
Dec 12, 2025
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.
The change from assignment (=) to bitwise OR (|=) modifies the behavior for all MCUs, not just HPM. This could potentially preserve unwanted bits that were previously cleared. If this change is necessary for HPM compatibility, consider making it conditional with #if TU_CHECK_MCU(OPT_MCU_HPM) or document why this change is safe for all supported MCUs.
| dcd_reg->PORTSC1 |= PORTSC1_FORCE_FULL_SPEED; | |
| #if TU_CHECK_MCU(OPT_MCU_HPM) | |
| dcd_reg->PORTSC1 |= PORTSC1_FORCE_FULL_SPEED; | |
| #else | |
| dcd_reg->PORTSC1 = PORTSC1_FORCE_FULL_SPEED; | |
| #endif |
hw/bsp/hpmicro/family.cmake
Outdated
| endif () | ||
| set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/riscv_${TOOLCHAIN}.cmake) | ||
|
|
||
| set(FAMILY_MCUS HPMIRCO CACHE INTERNAL "") |
Copilot
AI
Dec 12, 2025
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.
Typo in the family name. "HPMIRCO" should be "HPMICRO".
| set(FAMILY_MCUS HPMIRCO CACHE INTERNAL "") | |
| set(FAMILY_MCUS HPMICRO CACHE INTERNAL "") |
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Signed-off-by: Zixun LI <[email protected]> Signed-off-by: HiFiPhile <[email protected]>
4028edd to
6f90a4f
Compare
add hpmicro chips and hpm6750evk2 board