-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
manifest: Adding nRF Services library #70245
manifest: Adding nRF Services library #70245
Conversation
Hello @Rafal-Nordic, and thank you very much for your first pull request to the Zephyr project! |
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
487e9aa
to
c5bddb9
Compare
ddd8d3b
to
faedfa1
Compare
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(CONFIG_NRFS) | ||
if(CONFIG_NRFS_LOCAL_DOMAIN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMakeLists.txt in the hal/nordic/nrfs is not included.
diff --git a/modules/hal_nordic/nrfs/CMakeLists.txt b/modules/hal_nordic/nrfs/CMakeLists.txt
index a4edc6be513..eec370cf9b1 100644
--- a/modules/hal_nordic/nrfs/CMakeLists.txt
+++ b/modules/hal_nordic/nrfs/CMakeLists.txt
@@ -2,6 +2,8 @@
# SPDX-License-Identifier: Apache-2.0
if(CONFIG_NRFS)
+ add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR}/nrfs nrfs)
+
if(CONFIG_NRFS_LOCAL_DOMAIN)
zephyr_sources_ifdef(CONFIG_NRFS_BACKEND_IPC_SERVICE_EXTENDED
backends/nrfs_backend_ipc_service.c)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMakeLists are now completely reorganized.
modules/hal_nordic/nrfs/Kconfig
Outdated
config USB_SERVICE_ENABLED | ||
bool "USB service" | ||
depends on NRFS_HAS_USB_SERVICE | ||
default y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must not be anything prefixed with USB_ or USB_SERVICE_ or have prompt "USB service" that is not part of the USB support in Zephyr. You need to find another short and concise name for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
help | ||
This option enables the nRF Services library | ||
|
||
config NRFS_LOCAL_DOMAIN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly is LOCAL_DOMAIN? Is there also REMOTE_DOMAIN?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are local and global domains in this SoC architecture
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Local domain" name comes from Product Specification and is commonly used in the MDK. nrf54H20 has the following local domains:
- App core
- Rad core
- Secure domain
modules/hal_nordic/nrfs/Kconfig
Outdated
help | ||
This option enables the nRF Services Local Domain libraries | ||
|
||
config NRFS_BACKEND_IPC_SERVICE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can NRFS be use without IPC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible to provide custom implementation of the backend layer. The default one supported by Nordic is the IPC Service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SysCtrl supports only IPC_SERVICE backend protocol today, but other domains use also other protocols, so I don't exclude that in the future additional protocols will be supported.
config NRFS_BACKEND_IPC_SERVICE_EXTENDED | ||
bool "Zephyr IPC service backend for NRFS with additional buffering." | ||
|
||
config NRFS_BACKEND_IPC_SERVICE_LITE | ||
bool "Use IPC service directly by NRFS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why two backends and what are the differences?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked that "standard" version doesn't make sense anymore. I'll remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
}; | ||
|
||
static struct ipc_channel_config_t ipc_cpusys_channel_config = { | ||
.ipc_instance = DEVICE_DT_GET(DT_NODELABEL(ipc_to_cpusys)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That finally blocked me, I could not fix it myself quickly. Neither ipc_to_cpusys
nor cpuapp_cpusys_ipc
seems to exist with all the other things that belong to it. It is like a rocket without a propulsion system. Same for the lite backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, not all required dts files were moved to the upstream repo. I'm checking how to fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented here: #71265
faedfa1
to
486c552
Compare
486c552
to
de211c3
Compare
d3a735d
to
101f9e1
Compare
/** | ||
* @brief Helper function to set bit in state variable. | ||
* | ||
* @param bit_pos bit position in state variable. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, please remove redundant comments / redundant doxygen comments. It does not provide valuable information.
101f9e1
to
be781fc
Compare
extern "C" { | ||
#endif | ||
|
||
struct __NRFS_PACKED ipc_data_packet_t { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use __packed
here?
struct __packed ipc_data_packet {
Please remove _t
|
||
#define IPC_INIT_DONE_EVENT (0x01) | ||
|
||
struct ipc_channel_config_t { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct ipc_channel_config {
_t
/** | ||
* @brief Task to handle dvfs init procedure. | ||
* | ||
* @param dummy0 | ||
* @param dummy1 | ||
* @param dummy2 | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* Task to handle dvfs init procedure. */
/** | ||
* @brief Function to set hsfll to highest frequency when switched to ABB. | ||
* | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* Function to set hsfll to highest frequency when switched to ABB. */
/** | ||
* @brief DVFS event handler callback function. | ||
* | ||
* @param p_evt event to handle | ||
* @param context context data | ||
*/ | ||
void nrfs_dvfs_evt_handler(nrfs_dvfs_evt_t const *p_evt, void *context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static void nrfs_dvfs_evt_handler(nrfs_dvfs_evt_t const *p_evt, void *context)
/** | ||
* @brief Function handling steps for scaling preparation. | ||
* | ||
* @param oppoint_freq requested frequency oppoint | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* Function handling steps for scaling preparation. */
/** | ||
* @brief Function to check if current operation is down-scaling | ||
* | ||
* @param target_freq_setting frequency setting target | ||
* @return true down-scaling procedure | ||
* @return false not down-scaling procedure | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* Function to check if current operation is down-scaling */
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
zephyr_library() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this under if(CONFIG_NRFS)
to prevent the following CMake warning:
No SOURCES given to Zephyr library: modules__hal_nordic__nrfs
when NRFS is not enabled.
When I disabled |
be781fc
to
2044bce
Compare
Adding nRF Services library to the hal-nordic repo Signed-off-by: Rafal Dyla <rafal.dyla@nordicsemi.no>
Add driver, together with the corresponding dts binding and node in the nRF54H20 SoC definiton, for the nRF temperature sensor that cannot be accessed directly but only through nRF Services (nrfs) layer. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add a simple test intended primarily for checking the nRF temperature sensor in its nrfs variant but intentionally was made generic enough that it should be usable with other temperature sensors (after just providing an overlay) and could be helpful in development of new temperature sensor drivers, and possibly extended then if needed. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2044bce
to
670d4e7
Compare
… accessed via nrfs Upstream PR: zephyrproject-rtos/zephyr#70245 Add driver, together with the corresponding dts binding and node in the nRF54H20 SoC definiton, for the nRF temperature sensor that cannot be accessed directly but only through nRF Services (nrfs) layer. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no> (cherry picked from commit 8e76ae58fa3cccd1bb520cfced5992d3fe1c8c55)
Upstream PR: zephyrproject-rtos/zephyr#70245 Add a simple test intended primarily for checking the nRF temperature sensor in its nrfs variant but intentionally was made generic enough that it should be usable with other temperature sensors (after just providing an overlay) and could be helpful in development of new temperature sensor drivers, and possibly extended then if needed. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no> (cherry picked from commit 37f4572b2c21b56322ae5d8779549e40c38ee36a)
Hi @Rafal-Nordic! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
Adding nRF Services library to the hal-nordic repo
Depends on zephyrproject-rtos/docker-image#181