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

Add temp_nrfs driver #1

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
shared_ram20_region: memory@2f88f000 {
compatible = "nordic,owned-memory";
reg = <0x2f88f000 DT_SIZE_K(4)>;
status = "disabled";
status = "okay";
perm-read;
perm-write;
#address-cells = <1>;
Expand Down
6 changes: 6 additions & 0 deletions boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
sw1 = &button1;
sw2 = &button2;
sw3 = &button3;
ipc-to-cpusys = &cpuapp_cpusys_ipc;
};

buttons {
Expand Down Expand Up @@ -115,6 +116,10 @@
status = "okay";
};

&cpusys_vevif{
status = "okay";
};

&cpusec_cpuapp_ipc {
mbox-names = "tx", "rx";
tx-region = <&cpuapp_cpusec_ipc_shm>;
Expand All @@ -131,6 +136,7 @@ ipc0: &cpuapp_cpurad_ipc {
};

&cpuapp_cpusys_ipc {
status = "okay";
mbox-names = "rx", "tx";
tx-region = <&cpuapp_cpusys_ipc_shm>;
rx-region = <&cpusys_cpuapp_ipc_shm>;
Expand Down
8 changes: 8 additions & 0 deletions boards/nordic/nrf54h20dk/nrf54h20dk_nrf54h20_cpurad.dts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
zephyr,shell-uart = &uart135;
zephyr,bt-hci-ipc = &ipc0;
};
aliases {
ipc-to-cpusys = &cpurad_cpusys_ipc;
};
};

&shared_ram3x_region {
Expand All @@ -49,6 +52,10 @@
status = "okay";
};

&cpusys_vevif{
status = "okay";
};

&cpusec_cpurad_ipc {
mbox-names = "tx", "rx";
tx-region = <&cpurad_cpusec_ipc_shm>;
Expand All @@ -65,6 +72,7 @@ ipc0: &cpuapp_cpurad_ipc {
};

&cpurad_cpusys_ipc {
status = "okay";
mbox-names = "rx", "tx";
tx-region = <&cpurad_cpusys_ipc_shm>;
rx-region = <&cpusys_cpurad_ipc_shm>;
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/nordic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

# zephyr-keep-sorted-start
add_subdirectory(temp)
add_subdirectory_ifdef(CONFIG_NPM1300_CHARGER npm1300_charger)
add_subdirectory_ifdef(CONFIG_QDEC_NRFX qdec_nrfx)
add_subdirectory_ifdef(CONFIG_TEMP_NRF5 nrf5)
# zephyr-keep-sorted-stop
2 changes: 1 addition & 1 deletion drivers/sensor/nordic/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

# zephyr-keep-sorted-start
source "drivers/sensor/nordic/npm1300_charger/Kconfig"
source "drivers/sensor/nordic/nrf5/Kconfig"
source "drivers/sensor/nordic/qdec_nrfx/Kconfig"
source "drivers/sensor/nordic/temp/Kconfig"
# zephyr-keep-sorted-stop
20 changes: 0 additions & 20 deletions drivers/sensor/nordic/nrf5/Kconfig

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
if(CONFIG_TEMP_NRF5 AND NOT CONFIG_TEMP_NRF5_FORCE_ALT)
zephyr_library()
zephyr_library_sources(temp_nrf5.c)
elseif(CONFIG_TEMP_NRFS)
zephyr_library()
zephyr_library_sources(temp_nrfs.c)
endif()
38 changes: 38 additions & 0 deletions drivers/sensor/nordic/temp/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# nRF temperature sensor configuration options

# Copyright (c) 2016 ARM Ltd.
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config TEMP_NRF5_FORCE_ALT
bool
depends on SOC_COMPATIBLE_NRF
help
This option can be enabled to force an alternative implementation
of the temperature sensor driver.

config TEMP_NRF5
bool "nRF5 Temperature Sensor"
default y
depends on DT_HAS_NORDIC_NRF_TEMP_ENABLED
depends on MULTITHREADING || TEMP_NRF5_FORCE_ALT
help
Enable driver for nRF5 temperature sensor.

config TEMP_NRFS
bool "nRF Temperature Sensor accessed via nrfs"
default y
depends on DT_HAS_NORDIC_NRF_TEMP_NRFS_ENABLED
depends on NRFS
help
Enable driver for nRF temperature sensor accessed through the nRF
Services (nrfs) layer.

if TEMP_NRFS

module = TEMP_NRFS
thread_priority = 10
thread_stack_size = 1024
source "drivers/sensor/Kconfig.trigger_template"

endif # TEMP_NRFS
Loading
Loading