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

[TOPIC-GPIO] disk: Convert sdhc spi driver to new gpio api #21918

Merged
merged 1 commit into from
Jan 22, 2020
Merged

[TOPIC-GPIO] disk: Convert sdhc spi driver to new gpio api #21918

merged 1 commit into from
Jan 22, 2020

Conversation

MaureenHelm
Copy link
Member

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.

@MaureenHelm MaureenHelm changed the title disk: Convert sdhc spi driver to new gpio api [TOPIC-GPIO] disk: Convert sdhc spi driver to new gpio api Jan 14, 2020
@zephyrbot
Copy link
Collaborator

zephyrbot commented Jan 14, 2020

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>
@galak
Copy link
Collaborator

galak commented Jan 17, 2020

LGTM, but wait for one of @pabigot @henrikbrixandersen @ydamigos to test on HW.

@galak galak added the block: HW Test Testing on hardware required before merging label Jan 17, 2020
@pabigot
Copy link
Collaborator

pabigot commented Jan 17, 2020

I've found a board that seems to work on master, after I resolve a few idiosyncrasies I'll test this.

Copy link
Collaborator

@pabigot pabigot left a 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;
Copy link
Collaborator

@pabigot pabigot Jan 17, 2020

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.

Copy link
Collaborator

@ydamigos ydamigos left a 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.

Copy link
Member

@henrikbrixandersen henrikbrixandersen left a 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).

@carlescufi carlescufi merged commit c025504 into zephyrproject-rtos:topic-gpio Jan 22, 2020
@MaureenHelm MaureenHelm deleted the spi-sdhc-gpio branch January 22, 2020 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Boards area: Samples Samples block: HW Test Testing on hardware required before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants