Skip to content

greybus: subsys: implement SDIO protocol support using Zephyr SDHC API (#89)#91

Open
VAIBHAVIBOBDE wants to merge 2 commits intobeagleboard:mainfrom
VAIBHAVIBOBDE:main
Open

greybus: subsys: implement SDIO protocol support using Zephyr SDHC API (#89)#91
VAIBHAVIBOBDE wants to merge 2 commits intobeagleboard:mainfrom
VAIBHAVIBOBDE:main

Conversation

@VAIBHAVIBOBDE
Copy link

Overview
This PR implements the SDIO (Secure Digital Input Output) Protocol for the Greybus subsystem in Zephyr. The implementation utilizes the Zephyr SDHC (Secure Digital Host Controller) API, providing a hardware-independent way to handle SDIO communications.

Key Implementation Details
SDIO Translation: Created subsys/greybus/sdio.c to translate Greybus operations into Zephyr SDHC commands.

Deferred Execution: Introduced a mechanism to handle split Command/Data requests. This ensures that the protocol does not block the system during complex data transfers.

Kconfig Integration: Added Kconfig.sdio and updated subsys/greybus/Kconfig to allow developers to enable/disable SDIO support as needed.

Integration Tests: Created a comprehensive test suite in tests/greybus/integration/sdio/ to verify protocol stability.

Files Modified/Added
subsys/greybus/sdio.c

subsys/greybus/Kconfig

subsys/greybus/Kconfig.sdio

tests/greybus/integration/sdio/src/main.c

tests/greybus/integration/sdio/testcase.yaml

TEST_INSTRUCTIONS.md

Testing
Tests were structured to run via west. Detailed steps for environment setup and execution are provided in the included TEST_INSTRUCTIONS.md.

Fixes issue: #89

@@ -0,0 +1,7 @@
common:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests need to be done on native_sim which can actually run in CI

Copy link
Member

@Ayush1325 Ayush1325 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR uses the incorrect APIs. SDHC is not SDIO.

- beagleconnect_freedom
- native_sim
integration_platforms:
- beagleconnect_freedom
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bcf does not even have SDIO. No idea why you thought to include it here.

return msg;
}

ZTEST(greybus_sdio_tests, test_protocol_version)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless tests

zassert_true(resp_data->max_blk_size > 0, "Max block size should be > 0");

gb_message_dealloc(resp.msg);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least test transfers and events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants