-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add mbox backend for eGPIO #16592
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
Merged
carlescufi
merged 7 commits into
nrfconnect:main
from
jaz1-nordic:add-struct-communication-to-egpio
Oct 3, 2024
+653
−286
Merged
add mbox backend for eGPIO #16592
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e50e75d
manifest: update sdk-zephyr with changes for eGPIO blinky
jaz1-nordic 1a9538b
applications: sdp: Change naming convention from SWDIOD to SDP
jaz1-nordic 4d7592d
drivers: gpio: add mbox backend for eGPIO
jaz1-nordic 9615800
applications: sdp: add mbox backend for eGPIO
jaz1-nordic dbc826b
snippets: add mbox option for egpio snippet
jaz1-nordic 722c094
sysbuild: Add SDP FLPR image to automatic sysbuilds
jaz1-nordic cb2dc7e
samples: basic: blinky: add eGPIO tests configuration
jaz1-nordic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
applications/sdp/gpio/boards/nrf54l15dk_nrf54l15_cpuflpr_icmsg.overlay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /* | ||
| * Copyright (c) 2024 Nordic Semiconductor ASA | ||
| * | ||
| * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| */ | ||
|
|
||
| / { | ||
| ipc { | ||
| ipc0: ipc0 { | ||
| compatible = "zephyr,ipc-icmsg"; | ||
| tx-region = <&sram_tx>; | ||
| rx-region = <&sram_rx>; | ||
| mboxes = <&cpuflpr_vevif_rx 21>, <&cpuflpr_vevif_tx 20>; | ||
| mbox-names = "rx", "tx"; | ||
| status = "okay"; | ||
| }; | ||
| }; | ||
| }; |
13 changes: 13 additions & 0 deletions
13
applications/sdp/gpio/boards/nrf54l15dk_nrf54l15_cpuflpr_mbox.overlay
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| /* | ||
| * Copyright (c) 2024 Nordic Semiconductor ASA | ||
| * | ||
| * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| */ | ||
|
|
||
| / { | ||
| mbox_consumer: mbox_consumer { | ||
| compatible = "vnd,mbox-consumer"; | ||
| mboxes = <&cpuflpr_vevif_rx 21>, <&cpuflpr_vevif_tx 20>; | ||
| mbox-names = "rx", "tx"; | ||
| }; | ||
| }; |
44 changes: 0 additions & 44 deletions
44
applications/sdp/gpio/boards/nrf54l15pdk_nrf54l15_cpuflpr.conf
This file was deleted.
Oops, something went wrong.
77 changes: 0 additions & 77 deletions
77
applications/sdp/gpio/boards/nrf54l15pdk_nrf54l15_cpuflpr.overlay
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| /* | ||
| * Copyright (c) 2024 Nordic Semiconductor ASA | ||
| * | ||
| * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| */ | ||
|
|
||
| #ifndef MAIN_H__ | ||
| #define MAIN_H__ | ||
|
|
||
| #include <zephyr/kernel.h> | ||
| #include <drivers/gpio/nrfe_gpio.h> | ||
|
|
||
| #if !defined(CONFIG_GPIO_NRFE_EGPIO_BACKEND_ICMSG) && !defined(CONFIG_GPIO_NRFE_EGPIO_BACKEND_MBOX) | ||
| #error "Define communication backend type" | ||
| #endif | ||
|
|
||
| void process_packet(nrfe_gpio_data_packet_t *packet); | ||
| int backend_init(void); | ||
|
|
||
| #endif /* MAIN_H__ */ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| CONFIG_IPC_SERVICE=y | ||
| CONFIG_IPC_SERVICE_BACKEND_ICMSG=y | ||
| CONFIG_MBOX=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| /* | ||
| * Copyright (c) 2024 Nordic Semiconductor ASA | ||
| * | ||
| * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
| */ | ||
|
|
||
| #include "../include/main.h" | ||
| #include <zephyr/ipc/ipc_service.h> | ||
|
|
||
| static struct ipc_ept ep; | ||
|
|
||
| volatile uint32_t bound_sem = 1; | ||
|
|
||
| static void ep_bound(void *priv) | ||
| { | ||
| bound_sem = 0; | ||
| } | ||
|
|
||
| static void ep_recv(const void *data, size_t len, void *priv) | ||
| { | ||
| (void)len; | ||
| (void)priv; | ||
|
|
||
| process_packet((nrfe_gpio_data_packet_t *)data); | ||
| } | ||
|
|
||
| static struct ipc_ept_cfg ep_cfg = { | ||
| .cb = { | ||
| .bound = ep_bound, | ||
| .received = ep_recv, | ||
| }, | ||
| }; | ||
|
|
||
| int backend_init(void) | ||
| { | ||
| int ret = 0; | ||
| const struct device *ipc0_instance; | ||
| volatile uint32_t delay = 0; | ||
|
|
||
| #if !defined(CONFIG_SYS_CLOCK_EXISTS) | ||
| /* Wait a little bit for IPC service to be ready on APP side */ | ||
| while (delay < 1000) { | ||
| delay++; | ||
| } | ||
| #endif | ||
|
|
||
| ipc0_instance = DEVICE_DT_GET(DT_NODELABEL(ipc0)); | ||
|
|
||
| ret = ipc_service_open_instance(ipc0_instance); | ||
| if ((ret < 0) && (ret != -EALREADY)) { | ||
| return ret; | ||
| } | ||
|
|
||
| ret = ipc_service_register_endpoint(ipc0_instance, &ep, &ep_cfg); | ||
| if (ret < 0) { | ||
| return ret; | ||
| } | ||
|
|
||
| /* Wait for endpoint to be bound */ | ||
| while (bound_sem != 0) { | ||
| }; | ||
|
|
||
| return 0; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.