Skip to content

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 [email protected]

@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

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 <[email protected]>
@galak
Copy link
Contributor

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
Contributor

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
Contributor

@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.

struct device *spi;
struct spi_config cfg;
struct device *cs;
u32_t pin;
Copy link
Contributor

@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
Contributor

@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