Commit graph

60624 commits

Author SHA1 Message Date
Jan Van Winkel 94960f72c3 CODEOWNERS: Removed vanwinkeljan
Removed vanwinkeljan as codeowner from:
 * drivers/display
 * dts/posix
 * include/drivers/display.h
 * include/display
 * lib/gui
 * samples/subsys/display
 * samples/drivers/display
 * subsys/cpp
 * subsys/debug/asan_hacks.c
 * subsys/fs/fuse_fs_access.c

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2022-02-21 22:14:15 -05:00
Jan Van Winkel 022720ca97 MAINTAINERS: Removed filesystems collaborator
Removed vanwinkeljab from filesystems collaborators

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2022-02-21 22:14:15 -05:00
Jan Van Winkel 5afde52db0 MAINTAINERS: Removed display drivers maintainer
Removed vanwinkeljan as display drivers maintainer

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2022-02-21 22:14:15 -05:00
Chen Peng1 b3c4b90a21 tests: skip kernel_timer_interrupts when CONFIG_TICKLESS_KERNEL=n.
Skip kernel_timer_interrupts when CONFIG_TICKLESS_KERNEL
is disabled, because timer won't generate interrupts
anymore after invoking irq_disable and irq_enable
to enable timer interrupt again in TICK mode.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2022-02-21 22:13:54 -05:00
Sylvio Alves bf08b5f0ed drivers: uart: esp32: fix driver initialization id number
The select uart instance used in uart driver initialization won't
work as expected because the index used was not correct. This
fixes the macro call to use proper index value.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-02-21 22:12:55 -05:00
Sylvio Alves d29b98dbea drivers: gpio: esp32: check pin number range
As a complement of 7689abee34,
which fixed an issue where gpio number could errouneously be
set to a number greater than 32 in DTS, there is also another
situation where driver instance can be configured with a pin number
greater than 32.
This PR adds another check in GPIO driver to confirm
whether the PIN number is within valid bounds.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2022-02-21 22:12:55 -05:00
Anas Nashif c50966ac17 twister: support xt-sim as a runnable target
Use xt-sim to run Xtensa simulator in twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-02-21 22:10:42 -05:00
Anas Nashif a1d1810e54 cmake: emu: allow emulation to be OOT
Some emulation definition might be defined out of tree. Do not try to
include them here, instead they will be included in the module tree
defining them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-02-21 22:10:42 -05:00
Pavel Vasilyev 6bbc1c8e62 tests: Bluetooth: Mesh: Test secure network beacons processing
Add tests checking that:
- invalid beacons are dropped and do not affect beacon interval;
- valid beacons with old Net Keys are either processed or dropped
depending on the Key Refresh phase;

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2022-02-21 22:10:24 -05:00
Andy Ross 59d5dc4dcf tests/kernel/common: Add nested irq_offload() test
Add a very simple test of the CONFIG_IRQ_OFFSET_NESTED feature that
exercises nested interrupts in a portable way.  It calls irq_offset()
from within a k_timer callback and validates that the return lands
back in the original interrupt successfully.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-02-21 22:10:03 -05:00
Andy Ross 73453a39d1 arch: Add IRQ_OFFSET_NESTED feature
The x86 and xtensa implementations of irq_offload() invoke synchronous
interrupts on the local CPU, and are therefore safe to use from within
an interrupt context.  This is a cheap and portable way to exercise
nested interrupts, which are otherwise highly platform-dependent to
test.  Add a kconfig to signal the capability.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-02-21 22:10:03 -05:00
Andy Ross c174ade4a1 arch/xtensa: Rework irq_offload: automatic config, SMP-safe
The Xtensa implementation of arch_irq_offload() required that the user
select the correct interrupt manually, and would race with itself if
invoked from separate CPUs (it was saved here by the main
irq_offload() function which has a semaphore to serialize access).

Use the new gen_zsr.py script to automatically detect the highest
available software interrupt, and keep a per-CPU set of
callback/parameter pointers.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-02-21 22:10:03 -05:00
Andy Ross 066e4da281 drivers/xtensa_sys_timer: Change default timer ID
Use index zero, not one.  The Xtensa tools emit the timers in priority
order, and as mentioned in the kconfig warnings using high priority
timers doesn't work.  This also makes room for using software
interrupts that can preempt a timer interrupt for test purposes.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-02-21 22:10:03 -05:00
Carlo Caione ac6060f966 code_relocation: Extend the nocopy sample to nRF5340dk
The nRF5340dk is shipping an external QSPI flash that can be used to do
XIP from. Extend the code_relocation nocopy sample to support this
platform so that part of the functions are executed from internal flash
and others from external flash.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:09:46 -05:00
Carlo Caione d3203dc70d code_relocation: Add NOCOPY feature
* Use case of interest:

Some platforms are shipping in parallel to the internal FLASH some other
storage / external FLASH (usually a QSPI FLASH) that can be used to
execute (XIP) code from.

The content of this external FLASH can usually be written at flash time
using proper tools (see for example the case of the external FLASH on
the nRF5340DK that can be written at flash time using nrfjprog).

The external FLASH is a nice addition that is extremely useful when a
large application code doesn't entirely fit on the internal FLASH so
that we could want to move part of it in the auxiliary FLASH to XIP the
code from there.

* The problem:

Right now Zephyr doesn't have a formal and generic way to move at build
time part of the code to a different memory region.

* The current status:

Zephyr is indeed shipping a code_relocation feature but that doesn't
entirely match our needs.

When XIP is enabled, the code_relocation feature is used in Zephyr to
move the selected code (that is to copy text section, to initialize data
and zero bss) from FLASH to SRAM at run time and execute code from SRAM.

The relocation is done by a generated snippet of code that is
memcpy()-ing the right content to the destination region also using some
build-time generated portions of linker script to retrieve start and
destination addresses and regions.

* This patch:

This patch is leveraging the code_relocation code and adding a NOCOPY
feature. This feature is using the code_relocation feature to
dynamically build the linker script snippets but entirely skipping the
run-time code relocation so that the code can be XIP-ed from the
destination region.

* Example:

Let's say that we have a big file called `huge_file.c` that we want to
XIP from the external FLASH that is mapped in an EXTFLASH region.

In this case we should enable `CONFIG_XIP` and
`CONFIG_CODE_DATA_RELOCATION` and instruct cmake as follows:

  zephyr_code_relocate(src/huge_file.c EXTFLASH_TEXT NOCOPY)
  zephyr_code_relocate(src/huge_file.c SRAM_DATA)

this means that:

- The .text section of the `huge_file.c` must reside in the EXTFLASH
  memory region and we do not need to copy the section there because we
  are going to XIP it (and we assume that the file is going to be placed
  in the external FLASH at flash time).
- The .data section of the `huge_file.c` must still reside in the SRAM
  memory region.

* TODOs:

It's desirable to have the possibility to relocate libraries and
pre-build files instead of source code files.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:09:46 -05:00
Aymeric Aillet 513389b659 drivers: adc: lmp90xxx: do not use generated macros
Do not used generated macro from devicetree subsys directly
in driver.
Remove definition of it's own "FOREACH_STATUS_OKAY".
Redefine "DT_DRV_COMPAT" for each supported compatible string.

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2022-02-21 22:09:27 -05:00
Emil Gydesen 06e07b4a54 Bluetooth: Kconfig: Increase default RX stack size for LE Audio
LE Audio builds on top of the BT Host stack, and will
thus require a higher amount of stack size. Even simple
applications using BAP will likely reach the 1024 default
size with the default BAP configurations, and when
we start adding CAP and even TMAP/HAP on top of it, it
will likely increase even further.

The default value of 2048 is unlikely to be reached,
and applications that want to optimize can likely
reduce it, depending on the configuration.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-02-21 22:08:51 -05:00
Daniel Leung cb929597cd bluetooth: remove @return doc for void functions
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-21 22:07:44 -05:00
Daniel Leung 697baef0b1 kernel: remove @return doc for void functions
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-02-21 22:07:44 -05:00
Martí Bolívar 254ceb6b79 doc: application: tweak experimental features text
We use a specific experimental Kconfig option when describing the
behavior of CONFIG_WARN_EXPERIMENTAL.

However, this option may not be experimental forever. This therefore
may go stale. Rather than try to keep generic documentation about
experimental options up to date with whatever the bluetooth subsystem
happens to consider experimental or not, use a placeholder CONFIG_FOO
instead of a real option.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-02-21 22:07:12 -05:00
Veijo Pesonen 37b9bb87f0 net: lwm2m: Adds semantics for handling time
This far time values have been synonymous to integer values. Content
formats like CBOR do use different representation.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2022-02-21 22:07:01 -05:00
Lingao Meng 2cf069df6b Bluetooth: Mesh: Opt ram of transport segment message
As use for simple message with no-segment send or receive.

This will be useful for ram-resource-constrained device.
such as bbc-microbit-v1.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2022-02-21 22:06:38 -05:00
Asbjørn Sæbø 34de2af394 Bluetooth: audio - remove BT_AUDIO_DEBUG
Remove the BT_AUDIO_DEBUG Kconfig option.

Given that all the audio modules are guarded by the BT_AUDIO config,
it seems excessive to also have a separate guard for audio module
debug. It is sufficient that this is turned on/off module by module.

Note that the BT_AUDIO_DEBUG was also located in the wrong file - the
babs Kconfig file, not the main Kconfig file.

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-02-21 22:03:04 -05:00
Asbjørn Sæbø 21fc1cc670 Bluetooth: Audio - remove superfluous check for BT_AUDIO from Kconfig
Remove the check for BT_AUDIO from the Kconfig files that had it, for
consistency (some files did not have it).

This check is not required - all Kconfig.* files are sourced from the
main Kconfig file _only_ if BT_AUDIO has been configured.  As long as
this is the case, it is not required to check in the files themselves.

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2022-02-21 22:03:04 -05:00
Juha Heiskanen 3e04783bbb net: lwm2m: LwM2M Portfolio object id support
Added support for Portfolio object support because LwM2M v1.1 conformance
test requirement that. This object is only for conformance test purposing.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-02-21 22:02:44 -05:00
Aleksander Wasaznik 299fac833b Bluetooth: Host: Settings: Handle extra settings_load before bt_enable
Before this change, enabling CONFIG_BT_SETTINGS and calling
settings_load(), but delaying / not calling bt_enable would trigger an
assertion error due to a timeout. The fault is that the settings load
handler for the Bluetooth host assumes bt_enable has already been called
and sends HCI commands to the controller. This times out if HCI is not
running.

The fix is to skip loading Bluetooth settings before bt_enable. The doc
is updated to guide the user on how to enable Bluetooth after settings
have been loaded before.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-02-21 22:02:34 -05:00
Aleksander Wasaznik eeb1f92a2d Bluetooth: Host: Remove no-op settings handler
STATIC_HANDLER_DEFINE accepts NULL in place of unneeded handlers.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2022-02-21 22:02:34 -05:00
Gerard Marull-Paretas 01bc8f7dd9 drivers: uart: remove uart_device_config
This structure is no longer used by drivers. Instead, each driver is
responsible to define the required fields and the types that are needed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas f8423a1b45 drivers: serial: xmc4xxx: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas 4ee2f327bd drivers: serial: xlnx_ps: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas b6404df1ab drivers: serial: stellaris: remove unused definitions
The register definitions are not used by the driver (struct _uart is
used instead).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas ece65d7a74 drivers: serial: stellaris: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only. Since the config struct can now store a pointer to
the UART structure, casts from address to (struct _uart*) are no longer
needed. UART_STRUCT has also been dropped in favor of using the config
pointer directly now that it is possible.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas cb982cd669 drivers: serial: pl011: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only. Since the config struct can now store a pointer to
the UART structure, casts from address to (struct pl011_regs *) are no
longer needed. PL011_REGS has also been dropped in favor of using the
config pointer directly now that it is possible.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas dd3e3a7ee2 drivers: serial: numicro: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only. Since the config struct can now store a pointer to
the UART structure, casts from address to (UART_T *) are no longer
needed. UART_STRUCT has also been dropped in favor of using the config
pointer directly now that it is possible.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas 863a661f70 drivers: serial: npcx: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only. Since the config struct can now store a pointer to
the UART structure, casts from address to (struct uart_reg *) are no
longer needed. HAL_INSTANCE has also been dropped in favor of using the
uart field from the config struct now that it is possible.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas dbdaf8ddba drivers: serial: msp432p4xx: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas 14dda3af08 drivers: serial: msp432p4xx: remove unused sys_clk_freq
The variable is not used by the driver, so there is no need to
initialize it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas 8e26bfcca2 drivers: serial: cmsdk_apb: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only. Since the config struct can now store a pointer to
the UART structure, casts from (uint8_t *) to (struct uart_cmsdk_apb*)
are no longer needed. UART_STRUCT has also been dropped in favor of
using the config pointer directly now that it is possible.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas c5ef13266a drivers: serial: cc32xx: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas 1e6b251913 drivers: serial: cc13xx_cc26xx: drop usage of uart_device_config
Create a driver specific configuration structure, containing the
required fields only.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas 70eefdbac9 drivers: serial: altera_jtag: remove unused config
The driver configuration was not used, so just remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas e101cc78e9 drivers: serial: stm32: store IRQ config function in a single place
When CONFIG_PM=y, the IRQ function also needs to be stored, something
the "generic" uart_device_config cannot support. This uses the config
irq_config_func field to store the function in all situations, thus
removing unnecessary logic and finally dropping uart_device_config.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Gerard Marull-Paretas 32a3a028f2 drivers: serial: stm32: store USART instance
Instead of using "generic" uart_device_config fields, store the right
pointer to avoid unnecessary casts. This change makes code simpler and
more idiomatic.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-02-21 22:02:23 -05:00
Carlo Caione 34339e2560 cmake: linker: Automatically generates memory regions
As already done for the regular linker script, dinamically generates the
memory regions with the 'zephyr,memory-region' compatible also when
using the cmake linker generator.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:02:04 -05:00
Carlo Caione 18ffcdcf74 linker: Introduce zephyr,memory-region compatible
Introduce a new "zephyr,memory-region" compatible to be used when a new
memory region must be created in the linker script from the devicetree
nodes using the compatible.

Remove also the LINKER_DT_REGION_FROM_NODE macro and add a new
LINKER_DT_REGIONS macro to cycle through all the compatible regions.

In the same PR modify the DTS files and the linker scripts.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:02:04 -05:00
Carlo Caione 3c0c03b9eb cmake: dts: Add dt_comp_path() cmake function
Add a new cmake extension function:

  dt_comp_path(<var> COMPATIBLE <compatible> [INDEX <idx>])

to get a list of paths for the nodes with the given <compatible>. This
is useful when we have to cycle through several nodes with the same
compatible.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-02-21 22:02:04 -05:00
Dino Li 36164c29c1 espi: it8xxx2: enable configuration of Chromebook
This enables the below configuration so the AP and EC are able to
communicate over eSPI:

CONFIG_ESPI_PERIPHERAL_EC_HOST_CMD
CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION
CONFIG_ESPI_PERIPHERAL_CUSTOM_OPCODE

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2022-02-21 22:01:48 -05:00
Dino Li f3c1acaeea riscv: linker: move snippets-ram-sections.ld to ram start
This align the RISC-V linker script with ARM linker script.
(The snippets-ram-sections.ld is included first inside the
RAMABLE_REGION)

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2022-02-21 22:01:48 -05:00
Ryan Erickson a9804002e2 modem: hl7800: Use built in socket restore on boot
When sleep modes are used, configure sockets
to restore on boot. Letting the HL7800 manage
this means the driver does not have to do it.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2022-02-21 22:01:23 -05:00
Morten Priess 1417e8f8c7 rf: JIT scheduler fixes and improvements
- Prevent double callback with ADV re-scheduling
  For configurations using CONFIG_BT_CTLR_JIT_SCHEDULING, when last
  ADV before initiating connection is re-scheduled with a small delay,
  the disabled_cb would be called a second time. This would unexpectedly
  invoke a second conn setup with illegal parameters.
  To avoid this JIT scheduler phenomenon, clear the ADV disabled_cb
  when invoked.
- Add priority to LLL header. This allows the conn priority to be
  associated with the object. Used in vendor LLL implementation.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2022-02-21 22:00:57 -05:00