-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Sama7g5 USB UDC (UDPHS) driver #99620
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
Open
MCHP-MPU-Solutions-SHA
wants to merge
5
commits into
zephyrproject-rtos:main
Choose a base branch
from
MCHP-MPU-Solutions-SHA:sama7g5_udphs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,790
−0
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d38fa7d
drivers: usb: udc: add api for check setup stage
MCHP-MPU-Solutions-SHA c1436ca
soc: microchip: sam: sama7g5: update mmu for udphs
MCHP-MPU-Solutions-SHA f48040f
dts: arm: microchip: sam: add udc device to sama7g5
MCHP-MPU-Solutions-SHA a2d92b8
driver: usb: udc: add support for sama7g5 UDPHS
MCHP-MPU-Solutions-SHA 9ca0f9a
boards: microchip: sam: sama7g54_ek: enable udc device
MCHP-MPU-Solutions-SHA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,4 +16,5 @@ supported: | |
| - sdhc | ||
| - shell | ||
| - uart | ||
| - udc | ||
| vendor: microchip | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Copyright (C) 2025 Microchip Technology Inc. and its subsidiaries | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
|
|
||
| config UDC_MCHP_SAM | ||
| bool "Microchip SAM UDPHS USB Device High Speed Port" | ||
| default y | ||
| depends on DT_HAS_MICROCHIP_SAM_UDPHS_ENABLED | ||
| select CACHE_MANAGEMENT | ||
| select PINCTRL | ||
| select GPIO | ||
| select SYS_MEM_BLOCKS | ||
| select EVENTS | ||
| select UDC_DRIVER_HAS_HIGH_SPEED_SUPPORT | ||
| help | ||
| Enable the Microchip SAM UDPHS driver. | ||
|
|
||
| if UDC_MCHP_SAM | ||
|
|
||
| config UDC_MCHP_SAM_STACK_SIZE | ||
| int "UDC controller driver internal thread stack size" | ||
| default 1024 | ||
| help | ||
| Device controller driver internal thread stack size. | ||
|
|
||
| config UDC_MCHP_SAM_THREAD_PRI | ||
| int "UDC controller driver thread priority" | ||
| default 8 | ||
| help | ||
| Device controller driver thread priority. | ||
|
|
||
| config UDC_MCHP_SAM_BURST_LOCK | ||
| bool "Lock bus access for maximum bandwidth" | ||
| help | ||
| USB packets system data bursts will be locked for | ||
| maximum optimization of the bus bandwidth usage. | ||
|
|
||
| config UDC_MCHP_SAM_RAW_DEBUG | ||
| bool "UDC controller driver raw debug" | ||
| depends on LOG_MODE_IMMEDIATE | ||
| help | ||
| Enable driver raw debugging for short and real-time log outputs. | ||
|
Comment on lines
+39
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this option. No idea what you are meaning with "raw debugging" or "real-time log outputs", but there is no reason to overwrite LOG_DBG with printk() neither when using LOG_MODE_IMMEDIATE nor without it, or using LOG_MODE_IMMEDIATE. |
||
|
|
||
| endif # UDC_MCHP_SAM | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I have no idea what this really means. From code it seems that you set some bit. Is it essentially affecting DMA operation/memory access arbitrage?
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.
Hi, this is a chip related feature, for more details please refer to the datasheet, see bit BURST_LCK in register UDPHS_DMACONTROL.
This will allow the UDPHS DMA channel has max burst length when accessing the bus.
And I made a switch for this feature in the Kconfig, customer can enable it for higher USB bandwidth under heavy system load.