-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
drivers: sdhc: Add MAX32 SDHC driver #83464
base: main
Are you sure you want to change the base?
Conversation
9d6a657
to
d0b3a61
Compare
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
137184f
to
e474287
Compare
reg: | ||
required: true | ||
|
||
sd-bus-voltage: |
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.
Does this need to be set at boot time? Typically it is configured by the SDMMC framework when the card is probed. Or is this indicating the voltage the controller actually supports?
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.
very good note, thanks.
hal_adi side does this only in sdhc init and we thought we need to pass this voltage information in devicetree. there could be cases that sdmmc is not used, and user might want to set it via overlay etc i think?
return ENOTSUP; | ||
} | ||
|
||
static int sdhc_max32_set_io(const struct device *dev, struct sdhc_io *ios) |
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.
A few comments about this function:
- can we support setting voltage in this function? Or does the hardware not support adjusting that dynamically? It likely does if the controller supports UHS cards.
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.
very good note. i think we can support it. however, our hal doesn't have this functionality yet. i'll add this as a seperate task in future, unless it's a requirement?
* remove this with a better solution in future. | ||
*/ | ||
k_sleep(K_MSEC(1)); | ||
ret = MXC_SDHC_SendCommand(&sd_cmd_cfg); |
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.
Question here- is this function blocking? Or does it use interrupts within the HAL layer?
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.
yes it's blocking. it loops in while() until register is complete/timeout. we'll try to add interrupt functionality in future.
Pull in support that adds sdhc header from hal_adi Signed-off-by: Mert Ekren <[email protected]>
This commit adds MAX32666 SDHC driver. Co-Authored-By: Anil Kara <[email protected]> Co-Authored-By: Tahsin Mutlugun <[email protected]> Signed-off-by: Mert Ekren <[email protected]>
Include sdhc0 in MAX32666 devicetree and add devicetree bindings for MAX32 SDHC driver Signed-off-by: Mert Ekren <[email protected]>
Add SDHC to supported list for MAX32666FTHR Signed-off-by: Mert Ekren <[email protected]>
Add MAX32666fthr for fs_sample testing Signed-off-by: Mert Ekren <[email protected]>
Add MAX32666fthr for sdhc api testing Signed-off-by: Mert Ekren <[email protected]>
Add MAX32666fthr sdhc to tests/drivers/disk/disk_performance Signed-off-by: Mert Ekren <[email protected]>
167ff00
to
5281727
Compare
This PR adds SDHC support for max32666fthr.
Implement SDHC driver for MAX32666fthr
Add sdhc0 instances for MAX32666 .dtsi file
Add SDHC to MAX32666fthr board driver list
tests:
.\tests\drivers\sdhc
.\samples\subsys\fs\fs_sample\
.\tests\drivers\disk\disk_performance
Dependencies: