Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9f7e1ba
DRGN-11180: Deselect nRF5 Clock controller if BT_LL_NRFXLIB enabled
PavelVPV Jan 25, 2019
b8877b0
Merge pull request #1 from rugeGerritsen/develop/DRGN-11180_create_cl…
rugeGerritsen Jan 29, 2019
22fff8d
Make Entropy nRF5 driver optional
PavelVPV Feb 1, 2019
3614d2f
Make choice of implementation of nRF5 Entropy driver
PavelVPV Feb 1, 2019
8121883
Put nRF5 Clock driver options under sublist of options
PavelVPV Feb 1, 2019
ca58cba
Get back entropy sample
PavelVPV Feb 4, 2019
fc5393f
Apply uncrustify
PavelVPV Feb 4, 2019
0e90394
Avoid the error when library has no sources
PavelVPV Feb 4, 2019
7b545dc
Restore entropy main.c example
PavelVPV Feb 6, 2019
ee36d70
Use zephyr_sources_ifdef instead of zephyr_library_sources_ifdef
PavelVPV Feb 6, 2019
4c9414a
Merge pull request #2 from rugeGerritsen/develop/DRGN-10805_create_rn…
PavelVPV Feb 6, 2019
7d4f777
net: remove l2 kconfig circular dependencies
Feb 11, 2019
d05c9e5
drivers: add `FLASH_NRF_DRIVER` kconfig choice
Feb 11, 2019
676475e
Merge remote-tracking branch 'rubin/develop/DRGN-10888_adapt_to_new_a…
Feb 12, 2019
f4a8689
drivers: Allow clock control to be configured out-of-source
Feb 14, 2019
2ee3c90
drivers: Allow entropy driver to be configured out-of-source
Feb 14, 2019
7ce49fb
drivers: Allow flash driver to be configured out-of-source
Feb 14, 2019
1f15e81
drivers: make nrf5 clock control driver default=y
Feb 14, 2019
b27db02
drivers: flash: make nrf5 driver default on
Feb 15, 2019
0a5f36c
fs: don't force select FLASH_PAGE_LAYOUT from fs
Feb 15, 2019
44f9d00
Merge pull request #3 from thomasstenersen/develop/DRGN-10806_blectrl…
rugeGerritsen Feb 15, 2019
31b3cbd
Move BT_HCI_VS out of common/Kconfig to configure it from controller
PavelVPV Feb 15, 2019
8e496b3
Use BT_LL_HAS_VS_COMMANDS instead of BT_HCI_VS_CUSTOM
PavelVPV Feb 18, 2019
9112a52
Merge remote-tracking branch 'NordicPlayground/master' into develop/D…
rugeGerritsen Feb 15, 2019
e56cc3d
Merge pull request #5 from rugeGerritsen/develop/DRGN-0000_merge_in_u…
rugeGerritsen Feb 18, 2019
38f6ed3
bluetooth: host: Use default HCI stack size if no BT_LL_SW
Feb 19, 2019
c080942
Merge pull request #6 from thomasstenersen/develop/DRGN-0000_fix_hci_…
rugeGerritsen Feb 19, 2019
504ce6a
Rename BT_LL_HAS_VS_COMMANDS with BT_HAS_HCI_VS
PavelVPV Feb 20, 2019
f034c51
Use tabs indents
PavelVPV Feb 20, 2019
758e71b
Add Events to BT_HAS_HCI_VS config
PavelVPV Feb 20, 2019
de44387
Merge remote-tracking branch 'origin/develop/DRGN-10888_adapt_to_new_…
PavelVPV Feb 20, 2019
081a40f
Merge pull request #4 from rugeGerritsen/develop/disable_zephyr_vendo…
rugeGerritsen Feb 20, 2019
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
11 changes: 11 additions & 0 deletions drivers/clock_control/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
#
# Clock controller drivers
#

config CLOCK_CONTROL_HAS_SUBSYS_DRIVER
bool
default false
help
This option can be enabled by an external library if it
needs to take control over the clock controller.

menuconfig CLOCK_CONTROL
bool "Hardware clock controller support"
help
Expand All @@ -23,6 +31,8 @@ module = CLOCK_CONTROL
module-str = clock control
source "subsys/logging/Kconfig.template.log_config"


if !CLOCK_CONTROL_HAS_SUBSYS_DRIVER
source "drivers/clock_control/Kconfig.nrf"

source "drivers/clock_control/Kconfig.quark_se"
Expand All @@ -37,4 +47,5 @@ source "drivers/clock_control/Kconfig.mcux_sim"

source "drivers/clock_control/Kconfig.rv32m1"

endif # !CLOCK_CONTROL_HAS_SUBSYS_DRIVER
endif # CLOCK_CONTROL
5 changes: 3 additions & 2 deletions drivers/clock_control/Kconfig.nrf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
menuconfig CLOCK_CONTROL_NRF
bool "NRF Clock controller support"
depends on SOC_COMPATIBLE_NRF
default y
help
Enable support for the Nordic Semiconductor nRFxx series SoC clock
driver.
Expand All @@ -28,7 +29,7 @@ config CLOCK_CONTROL_NRF_K32SRC_DRV_NAME
string "NRFx 32KHz clock device name"
default "clk_k32src"

choice
choice CLOCK_CONTROL_NRF_SOURCE
prompt "32KHz clock source"
default CLOCK_CONTROL_NRF_K32SRC_XTAL

Expand All @@ -49,7 +50,7 @@ config CLOCK_CONTROL_NRF_K32SRC_BLOCKING
initially start running and automatically switch to crystal when
ready.

choice
choice CLOCK_CONTROL_NRF_ACCURACY
prompt "32KHz clock accuracy"
default CLOCK_CONTROL_NRF_K32SRC_500PPM if CLOCK_CONTROL_NRF_K32SRC_RC
default CLOCK_CONTROL_NRF_K32SRC_20PPM
Expand Down
18 changes: 8 additions & 10 deletions drivers/entropy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
zephyr_library()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is not nice. Is there another way of doing this? Otherwise CMake will complain about an empty library.

Copy link
Collaborator

Choose a reason for hiding this comment

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

For now I saw 2 ways to avoid the empty library issue:

  1. Remove zephyr_library() and use zephyr_sources_ifdef() as it done here;
  2. Modify extensions.cmake in Zephyr to make out-of-tree drivers look like they are in the Zehpyr's tree;

Maybe the 3rd way is to do a trick with Kconfig by using another way to include driver/entropy folder even if CONFIG_ENTROPY_HAS_DRIVER is enabled.


zephyr_library_sources_ifdef(CONFIG_ENTROPY_ESP32_RNG entropy_esp32.c)
zephyr_library_sources_ifdef(CONFIG_ENTROPY_MCUX_RNGA entropy_mcux_rnga.c)
zephyr_library_sources_ifdef(CONFIG_ENTROPY_MCUX_TRNG entropy_mcux_trng.c)
zephyr_library_sources_ifdef(CONFIG_ENTROPY_NRF5_RNG entropy_nrf5.c)
zephyr_library_sources_ifdef(CONFIG_ENTROPY_SAM_RNG entropy_sam.c)
zephyr_library_sources_ifdef(CONFIG_ENTROPY_STM32_RNG entropy_stm32.c)
zephyr_library_sources_ifdef(CONFIG_FAKE_ENTROPY_NATIVE_POSIX fake_entropy_native_posix.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE entropy_handlers.c)
zephyr_sources_ifdef(CONFIG_ENTROPY_ESP32_RNG entropy_esp32.c)
zephyr_sources_ifdef(CONFIG_ENTROPY_MCUX_RNGA entropy_mcux_rnga.c)
zephyr_sources_ifdef(CONFIG_ENTROPY_MCUX_TRNG entropy_mcux_trng.c)
zephyr_sources_ifdef(CONFIG_ENTROPY_NRF5_RNG entropy_nrf5.c)
zephyr_sources_ifdef(CONFIG_ENTROPY_SAM_RNG entropy_sam.c)
zephyr_sources_ifdef(CONFIG_ENTROPY_STM32_RNG entropy_stm32.c)
zephyr_sources_ifdef(CONFIG_FAKE_ENTROPY_NATIVE_POSIX fake_entropy_native_posix.c)
zephyr_sources_ifdef(CONFIG_USERSPACE entropy_handlers.c)
11 changes: 10 additions & 1 deletion drivers/entropy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,28 @@
# SPDX-License-Identifier: Apache-2.0
#

config ENTROPY_HAS_SUBSYS_DRIVER
bool
default false
help
This option can be enabled by an external library if it
needs to take control over the entropy driver.

menuconfig ENTROPY_GENERATOR
bool "Entropy Drivers"
help
Include entropy drivers in system config.

if ENTROPY_GENERATOR

if ENTROPY_GENERATOR
if !ENTROPY_HAS_SUBSYS_DRIVER
source "drivers/entropy/Kconfig.mcux"
source "drivers/entropy/Kconfig.stm32"
source "drivers/entropy/Kconfig.esp32"
source "drivers/entropy/Kconfig.nrf5"
source "drivers/entropy/Kconfig.sam"
source "drivers/entropy/Kconfig.native_posix"
endif

config ENTROPY_HAS_DRIVER
bool
Expand Down
6 changes: 0 additions & 6 deletions drivers/entropy/Kconfig.nrf5
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ menuconfig ENTROPY_NRF5_RNG
generator, based on internal thermal noise, that provides a
random 8-bit value to the host when read.

if ENTROPY_NRF5_RNG

config ENTROPY_NRF5_BIAS_CORRECTION
bool "Enable bias correction (uniform distribution)"
depends on ENTROPY_NRF5_RNG
Expand Down Expand Up @@ -61,15 +59,11 @@ config ENTROPY_NRF5_ISR_THRESHOLD
buffer goes below this number hardware entropy generation will be
started.


config ENTROPY_NRF5_PRI
int "RNG interrupt priority"
depends on ENTROPY_NRF5_RNG
range 0 2 if SOC_SERIES_NRF51X
range 0 5 if SOC_COMPATIBLE_NRF52X
default 2 if SOC_SERIES_NRF51X
default 5 if SOC_COMPATIBLE_NRF52X
help
nRF5X RNG IRQ priority.

endif #ENTROPY_NRF5_RNG
11 changes: 11 additions & 0 deletions drivers/flash/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ config FLASH_HAS_PAGE_LAYOUT
This option is enabled when the SoC flash driver supports
retrieving the layout of flash memory pages.

config FLASH_HAS_SUBSYS_DRIVER
bool
default n
help
This option can be enabled by an external library if it
needs to take control over the flash memory peripheral.

menuconfig FLASH
bool "Flash hardware support"
help
Expand All @@ -44,9 +51,12 @@ config FLASH_PAGE_LAYOUT
help
Enables API for retrieving the layout of flash memory pages.

if !FLASH_HAS_SUBSYS_DRIVER

config SOC_FLASH_NRF
bool "Nordic Semiconductor nRF flash driver"
depends on SOC_FAMILY_NRF
default y
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
help
Expand Down Expand Up @@ -106,4 +116,5 @@ source "drivers/flash/Kconfig.sam"

source "drivers/flash/Kconfig.w25qxxdv"

endif # FLASH_HAS_SUBSYS_DRIVER
endif
3 changes: 2 additions & 1 deletion drivers/timer/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ config ALTERA_AVALON_TIMER
config NRF_RTC_TIMER
bool "nRF Real Time Counter (NRF_RTC1) Timer"
default y
depends on CLOCK_CONTROL_NRF
depends on CLOCK_CONTROL
depends on SOC_COMPATIBLE_NRF
select TICKLESS_CAPABLE
help
This module implements a kernel device driver for the nRF Real Time
Expand Down
12 changes: 6 additions & 6 deletions soc/arm/nordic_nrf/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ source "soc/arm/nordic_nrf/*/Kconfig.defconfig.series"
config BUILD_OUTPUT_HEX
default y

if FLASH
if SERIAL

config SOC_FLASH_NRF
config GPIO
default y

endif # FLASH
endif # SERIAL

if ENTROPY_GENERATOR
if GPIO

config ENTROPY_NRF5_RNG
config GPIO_NRFX
default y

endif # ENTROPY_GENERATOR
endif # GPIO

if SPI

Expand Down
3 changes: 1 addition & 2 deletions soc/arm/nordic_nrf/nrf52/Kconfig.series
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ config SOC_SERIES_NRF52X
select SOC_FAMILY_NRF
select NRF_RTC_TIMER
select CLOCK_CONTROL
select CLOCK_CONTROL_NRF
select SYS_POWER_DEEP_SLEEP_SUPPORTED
select SYS_POWER_STATE_DEEP_SLEEP_SUPPORTED
select XIP
select HAS_CMSIS
select HAS_NRFX
select HAS_SEGGER_RTT
help
Enable support for NRF52 MCU series
Enable support for NRF52 MCU series
41 changes: 41 additions & 0 deletions subsys/bluetooth/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,47 @@ source "subsys/bluetooth/common/Kconfig"
source "subsys/bluetooth/host/Kconfig"
source "subsys/bluetooth/controller/Kconfig"
source "subsys/bluetooth/shell/Kconfig"

config BT_HAS_HCI_VS
bool
help
This option can be enabled by an external library if it
supports the Zephyr HCI Vendor-Specific Commands and Events.

config BT_HCI_VS
bool "Zephyr HCI Vendor-Specific Commands"
depends on BT_HAS_HCI_VS
default y
help
Enable support for the Zephyr HCI Vendor-Specific Commands in the
Host and/or Controller. This enables Set Version Information,
Supported Commands, Supported Features vendor commands.

config BT_HCI_VS_EXT
bool "Zephyr HCI Vendor-Specific Extensions"
depends on BT_HCI_VS
default y
help
Enable support for the Zephyr HCI Vendor-Specific Extensions in the
Host and/or Controller. This enables Write BD_ADDR, Read Build Info,
Read Static Addresses and Read Key Hierarchy Roots vendor commands.

config BT_HCI_VS_EXT_DETECT
bool "Use heuristics to guess HCI vendor extensions support in advance"
depends on BT_HCI_VS_EXT && !BT_CTLR
default y if BOARD_QEMU_X86 || BOARD_QEMU_CORTEX_M3 || BOARD_NATIVE_POSIX
help
Use some heuristics to try to guess in advance whether the controller
supports the HCI vendor extensions in advance, in order to prevent
sending vendor commands to controller which may interpret them in
completely different ways.

config BT_HCI_MESH_EXT
bool "Mesh HCI Command support"
depends on BT_BROADCASTER && BT_OBSERVER && !BT_LL_SW_SPLIT
help
Enable support for the Bluetooth Mesh HCI Commands.

endif # BT_HCI

endif # BT
Expand Down
33 changes: 0 additions & 33 deletions subsys/bluetooth/common/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,6 @@

if BT_HCI

config BT_HCI_VS
bool "Zephyr HCI Vendor-Specific Commands"
default y
help
Enable support for the Zephyr HCI Vendor-Specific Commands in the
Host and/or Controller. This enables Set Version Information,
Supported Commands, Supported Features vendor commands.

config BT_HCI_VS_EXT
bool "Zephyr HCI Vendor-Specific Extensions"
depends on BT_HCI_VS
default y
help
Enable support for the Zephyr HCI Vendor-Specific Extensions in the
Host and/or Controller. This enables Write BD_ADDR, Read Build Info,
Read Static Addresses and Read Key Hierarchy Roots vendor commands.

config BT_HCI_VS_EXT_DETECT
bool "Use heuristics to guess HCI vendor extensions support in advance"
depends on BT_HCI_VS_EXT && !BT_CTLR
default y if BOARD_QEMU_X86 || BOARD_QEMU_CORTEX_M3 || BOARD_NATIVE_POSIX
help
Use some heuristics to try to guess in advance whether the controller
supports the HCI vendor extensions in advance, in order to prevent
sending vendor commands to controller which may interpret them in
completely different ways.

config BT_HCI_MESH_EXT
bool "Mesh HCI Command support"
depends on BT_BROADCASTER && BT_OBSERVER && !BT_LL_SW_SPLIT
help
Enable support for the Bluetooth Mesh HCI Commands.

config BT_RPA
# Virtual/hidden option
bool
Expand Down
1 change: 1 addition & 0 deletions subsys/bluetooth/controller/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ choice BT_LL_CHOICE
config BT_LL_SW
bool "Software-based BLE Link Layer"
select BT_RECV_IS_RX_THREAD
select BT_HAS_HCI_VS
select ENTROPY_GENERATOR
select ENTROPY_NRF5_RNG if SOC_COMPATIBLE_NRF
select ENTROPY_NRF5_BIAS_CORRECTION if SOC_COMPATIBLE_NRF
Expand Down
8 changes: 5 additions & 3 deletions subsys/bluetooth/host/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,18 @@ config BT_RX_BUF_LEN
(4 bytes) and the ACL header (also 4 bytes) which yields 73 bytes.

config BT_HCI_TX_STACK_SIZE
# NOTE: By _not_ having a prompt here, Kconfig will fall back on
# the default value if none of the other values are set.
int
default 512 if BT_H4
default 512 if BT_H5
default 416 if BT_SPI
default 940 if BT_CTLR && NO_OPTIMIZATIONS
default 640 if BT_CTLR
default 940 if BT_CTLR && (BT_LL_SW || BT_LL_SW_SPLIT) && NO_OPTIMIZATIONS
default 640 if BT_CTLR && (BT_LL_SW || BT_LL_SW_SPLIT)
default 512 if BT_USERCHAN
# Even if no driver is selected the following default is still
# needed e.g. for unit tests.
default 512
default 1024
help
Stack size needed for executing bt_send with specified driver

Expand Down
2 changes: 1 addition & 1 deletion subsys/fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ config FAT_FILESYSTEM_ELM

config FILE_SYSTEM_NFFS
bool "NFFS file system support"
select FLASH_PAGE_LAYOUT
depends on FLASH_PAGE_LAYOUT
select FS_FLASH_STORAGE_PARTITION
help
Enables NFFS file system support.
Expand Down
10 changes: 5 additions & 5 deletions subsys/net/l2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ config NET_L2_DUMMY
config NET_L2_BT
bool "Enable Bluetooth support"
depends on NET_IPV6
select BT
select BT_PERIPHERAL
select BT_CENTRAL
select BT_SMP
select BT_L2CAP_DYNAMIC_CHANNEL
depends on BT
depends on BT_PERIPHERAL
depends on BT_CENTRAL
depends on BT_SMP
depends on BT_L2CAP_DYNAMIC_CHANNEL
select NET_6LO
help
Enable Bluetooth driver that send and receives IPv6 packets,
Expand Down
4 changes: 2 additions & 2 deletions subsys/net/l2/openthread/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#
menuconfig NET_L2_OPENTHREAD
bool "OpenThread L2"
depends on FLASH
depends on FLASH_PAGE_LAYOUT
depends on FLASH_HAS_DRIVER_ENABLED
depends on FLASH_HAS_PAGE_LAYOUT
depends on CPLUSPLUS
depends on REBOOT
select OPENTHREAD_PLAT
Expand Down