-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
[TOPIC-GPIO] disk: Convert sdhc spi driver to new gpio api #21918
[TOPIC-GPIO] disk: Convert sdhc spi driver to new gpio api #21918
Conversation
All checks are passing now. Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
Converts the sdhc spi driver to the new gpio api. Updates device trees for the olimexino_stm32 and nrf52840_blip boards to set appropriate active high/low polarity for the spi chip select pin. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
LGTM, but wait for one of @pabigot @henrikbrixandersen @ydamigos to test on HW. |
I've found a board that seems to work on master, after I resolve a few idiosyncrasies I'll test this. |
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.
samples/subsys/fs/fat_fs needs a larger stack size to run, but that's unrelated to this. I've verified with nrf51_ble400.
I see this reveals another assumption in devicetree: that SPI chip select GPIOs are always active high so it's ok to specify that in the bus node.
I would update the pin storage to use the smaller data type, but that's not being done consistently in the conversion process so it's fine as is.
@@ -28,6 +28,7 @@ struct sdhc_spi_data { | |||
struct spi_config cfg; | |||
struct device *cs; | |||
u32_t pin; |
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.
This could switch to gpio_pin_t
and save some space.
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.
Tested samples/subsys/fs/fat_fs
on olimexino_stm32
and it works fine.
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.
Tested on yet-to-be-submitted shield definition for Adafruit Data Logger Shield (and frdm-k64f).
Converts the sdhc spi driver to the new gpio api. Updates device trees
for the olimexino_stm32 and nrf52840_blip boards to set appropriate
active high/low polarity for the spi chip select pin.
Signed-off-by: Maureen Helm maureen.helm@nxp.com
@pabigot @henrikbrixandersen @ydamigos Will you please test this patch? I do not have the hardware, so I can only verify that it builds.