Skip to content
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

pkg/tinyusb: add ULPI and UTMI+ HS PHY support for STM32 USB OTG HS ports #18776

Merged
merged 6 commits into from Oct 21, 2022

Conversation

gschorcht
Copy link
Contributor

Contribution description

This PR provides the support of external ULPI and internal UTMI+ HS PHYs for STM32 USB OTG HS ports. The support of these HS PHYs allows the use of the tinyUSB package also for STM32 USB OTG HS ports. The HS PHY is used by enabling either the periph_usbdev_ulpi_hs pseudomodule or the periph_usbdev_ulpi_hs pseudomodule for boards that have an USB OTG FS as well as an USB OTG HS port and provide the corresponding feature.

The PR also enables the tinyUSB feature for boards with USB OTG HS ports.

Testing procedure

  1. Use a board with an USB OTG FS port and an USB OTG HS port with external ULPI HS PHY, for example:

    USEMODULE=periph_usbdev_ulpi_hs BOARD=stm32f746g-disco make -j8 -C tests/pkg_tinyusb_cdc_msc/
    

    With the periph_usbdev_ulpi_hs module, the test should work for the USB OTG HS port. Without the periph_usbdev_ulpi_hs module, the test should work for the USB OTG FS port.

  2. Use a board with an USB OTG FS port and an USB OTG HS port with internal UTMI HS PHY, for example:

    USEMODULE=periph_usbdev_utmi_hs BOARD=stm32f723e-disco make -j8 -C tests/pkg_tinyusb_cdc_msc/
    

    With the periph_usbdev_utmi_hs module, the test should work for the USB OTG HS port. Without the periph_usbdev_ulpi_hs module, the test should work for the USB OTG FS port.

Issues/PRs references

`CFG_TUD_MAX_SPEED` definition isn't required since tinyUSB derives it from `TUD_RHPORT_MODE` if not defined or uses the maximum speed the MCU supports by default.
@github-actions github-actions bot added Area: boards Area: Board ports Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Platform: ARM Platform: This PR/issue effects ARM-based platforms labels Oct 19, 2022
@gschorcht gschorcht added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 19, 2022
@riot-ci
Copy link

riot-ci commented Oct 19, 2022

Murdock results

✔️ PASSED

3680546 boards/stm32f7508-dk: enable tinyUSB feature

Success Failures Total Runtime
1 0 1 01m:14s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

@gschorcht
Copy link
Contributor Author

@benpicco Thanks for reviewing. I just saw that the title of commit 873c525 contains a typo. I could change it and add the CI label CI: skip compile to avoid another CI compilation due to the change of the title of a commit, or we leave it as it is.

@benpicco
Copy link
Contributor

Sure go ahead

@gschorcht gschorcht added CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 21, 2022
@benpicco benpicco merged commit 21956db into RIOT-OS:master Oct 21, 2022
@gschorcht
Copy link
Contributor Author

@benpicco Thanks.

@gschorcht gschorcht deleted the pkg/tinyusb_otg_hs_ulpi branch October 22, 2022 11:27
@kaspar030 kaspar030 added this to the Release 2023.01 milestone Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants