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

sw_defined_io: emulated GPIO concept #16393

Merged
merged 7 commits into from
Aug 2, 2024
Merged

Conversation

masz-nordic
Copy link
Contributor

@masz-nordic masz-nordic commented Jul 10, 2024

For testing:

  1. Build zephyr's blinky (zephyr/samples/basic/blinky) with west build --pristine always -b [email protected]/nrf54l15/cpuapp -S emulated-gpio
  2. Build FLPR image at applications/sw_defined_io/gpio with west build --pristine always -b [email protected]/nrf54l15/cpuflpr
  3. Connect P2.07 with P0.04
  4. Flash both images

@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Jul 10, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jul 10, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
zephyr nrfconnect/sdk-zephyr@4c996ec nrfconnect/sdk-zephyr@bac6ef7 nrfconnect/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

Copy link
Contributor

@hubertmis hubertmis left a comment

Choose a reason for hiding this comment

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

Overall, it looks good. I've marked multiple potential improvements.

drivers/gpio/Kconfig Outdated Show resolved Hide resolved
drivers/gpio/Kconfig Show resolved Hide resolved
drivers/gpio/Kconfig Outdated Show resolved Hide resolved
drivers/gpio/gpio_nrfe.c Outdated Show resolved Hide resolved
drivers/gpio/gpio_nrfe.c Outdated Show resolved Hide resolved
include/drivers/gpio/nrfe_gpio.h Outdated Show resolved Hide resolved
applications/emulated_peripherals/gpio/src/main.c Outdated Show resolved Hide resolved
applications/emulated_peripherals/gpio/src/main.c Outdated Show resolved Hide resolved
applications/emulated_peripherals/gpio/src/main.c Outdated Show resolved Hide resolved
west.yml Outdated Show resolved Hide resolved
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jul 12, 2024

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-low-level X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

Copy link
Contributor

@magp-nordic magp-nordic left a comment

Choose a reason for hiding this comment

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

LGTM, I just left one minor note.

applications/emulated_peripherals/gpio/prj.conf Outdated Show resolved Hide resolved
@nordic-piks nordic-piks requested a review from a team July 17, 2024 10:29
@masz-nordic masz-nordic requested a review from a team as a code owner July 18, 2024 14:12
@masz-nordic masz-nordic changed the title emulated_peripherals: emulated GPIO concept sw_defined_io: emulated GPIO concept Jul 18, 2024
@masz-nordic
Copy link
Contributor Author

  1. for applications/emulated_peripherals please add sample.yaml, similar like e.g.
    https://github.com/nrfconnect/sdk-nrf/blob/main/applications/nrf5340_audio/sample.yaml
    so that this application will be at least build at CI (currently it is not)
  2. extend test-spec here https://github.com/nrfconnect/sdk-nrf/blob/main/.github/test-spec.yml#L548 with new paths i.e. drivers/gpio

Done

  1. add any test (or sample) for drivers/gpio or something similar to applications/emualted_peripherial so that it can be verified at HW at CI
    add its into test-spec (low-level)

This will be done in a separate task.

Copy link
Contributor

@magp-nordic magp-nordic left a comment

Choose a reason for hiding this comment

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

I've noticed there is still a word "emulated" in a few places. Shouldn't they also be changed? Or is it allowed to use it in terms of GPIO (for example, one of sdiod is emulated GPIO)?

@hubertmis
Copy link
Contributor

I've noticed there is still a word "emulated" in a few places. Shouldn't they also be changed? Or is it allowed to use it in terms of GPIO (for example, one of sdiod is emulated GPIO)?

What's wrong with the word "emulated"? For me "emulated GPIO" explains what this software does pretty well.

A simple eGPIO driver has been added.
It is to be used as a reference point for adding own
SW-defined IO devices.
Using it in real usecases does not make much sense.

Signed-off-by: Marcin Szymczyk <[email protected]>
Add headers for emulated GPIO driver.

Signed-off-by: Marcin Szymczyk <[email protected]>
Add binding for emulated GPIO peripheral.

Signed-off-by: Marcin Szymczyk <[email protected]>
Use this snippet to enable emulated GPIO peripheral.

Signed-off-by: Marcin Szymczyk <[email protected]>
This code is used by FLPR to emulate GPIO API functionality.

Signed-off-by: Marcin Szymczyk <[email protected]>
Add myself as codeowner of SW-defined IO devices code.

Signed-off-by: Marcin Szymczyk <[email protected]>
Add those directories to the LL test spec.

Signed-off-by: Marcin Szymczyk <[email protected]>
@github-actions github-actions bot removed the manifest label Jul 30, 2024
@carlescufi carlescufi merged commit c40c272 into nrfconnect:main Aug 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. manifest-zephyr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants