Commit graph

87353 commits

Author SHA1 Message Date
Henrik Brix Andersen c0c8952739 shell: do not enable subsystem/driver shell modules by default
Do not enable subsystem/driver shell modules by default and stop abusing
CONFIG_SHELL_MINIMAL, which is internal to the shell subsystem, to decide
when to enable a driver shell.

The list of shell modules has grown considerably through the
years. Enabling CONFIG_SHELL for doing e.g. an interactive debug session
leads to a large number of shell modules also being enabled unless
explicitly disabled, which again leads to non-negligible increases in
RAM/ROM usage.

This commit attempts to establish a policy of subsystem/driver shell
modules being disabled by default, requiring the user/application to
explicitly enable only those needed.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-20 09:21:40 +01:00
Andrej Butok f345378db1 doc: application: Fix application build comment
Fix the application build comment
to make it valid for both ninja and make build tools.
It generated the wrong "ninja" comment for "make".

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-20 09:21:22 +01:00
Alberto Escolar Piedras c5e0f6c0ff tests/net/lib/http_server: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras 8991e0176c tests/net/lib/coap_server: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras 0a81ea5406 tests/net/socket/can: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras a86e0a8da9 tests/net/lib/lwm2m/*: Switch integation_platforms to native_sim
Switch integation_platforms from native_posix to native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras 640b926b0a tests/net/lib lwm2m_engine: Switch from native_posix to native_sim
Switch support of native_posix to native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras 0de923e2b0 tests/net/lib/lwm2m/interop: Switch from native_posix to native_sim
Switch support of native_posix to native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras f7b8ded41a tests/net/lib/coap_client/: Enable for native_sim
Enable this test for native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras c64f33a648 tests/net lwm2m_rd_client: Switch from native_posix to native_sim
Switch these tests from native_posix to native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras eae99c1035 tests net/ptp/clock: Enable for native_sim
Enable these tests for native_sim and switch from
native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras 18d27f0a29 tests ieee802154: Enable for native_sim
Enable these tests for native_sim and switch from
native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras 6bba2d955b tests/net/traffic_class: Enable for native_sim
Enable these tests in native_sim
and switch from native_posix to native_sim as default
test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:21:13 +01:00
Alberto Escolar Piedras ef346c2505 tests input/gpio_keys: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras e13acd2f29 tests fuel_gauge/sbs_gauge: Enable for native_sim
Enable for native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 3ff73f22a4 tests fuel_gauge/max17048: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras c6f5dbe8a7 tests fuel_gauge/bq27z746: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 64cb9a4540 tests/drivers/regulator/api: Enable for native_sim
Enable for native_sim.
and switch from native_posix to native_sim as default
test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras be8f4e104b tests/drivers espi: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 7d5772d2d6 tests/drivers/pinctrl/api: Enable for native_sim
Enable for native_sim.
and switch from native_posix to native_sim as default
test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras b85aef003c tests/drivers/build_all/sensor: Enable for native_sim
And switch from native_posix to native_sim as default
test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 1846fa6f2c tests/drivers ina237: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 5327ba38e5 tests/drivers ina230: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 75006ad9af tests/drivers akm09918c: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 5dbb71cc6f tests/drivers icm42688: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 3175a81da5 tests/drivers adltc2990: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 95bf611ac6 tests/drivers sbs_gauge: Switch from native_posix to native_sim
Switch from native_posix to native_sim as native test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Benjamin Lindqvist 1d6d24b6ef net: lwm2m: don't load credentials on plaintext context
Since lwm2m_load_tls_credentials(ctx) will assume that the ctx has a
valid security object assigned to it, it should not be called at all
when ctx.use_dtls == false.

This solves a major bug where LwM2M comms are DTLS encrypted but FOTA is
allowed to be plain-text.

Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
2023-11-20 09:20:43 +01:00
Juha Heiskanen 07ae06f8fe mgmt: mcumgr: Doxygen tags update
Added a missing defgroup and ingroup for mcmumgr client
and smp client.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2023-11-20 09:20:25 +01:00
Piotr Wojnarowski 6670dbe834 tests: drivers: intc_plic: Add tests for register index and offset
Add a test to verify that the regression from
ffb8f31bff is fixed.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-11-20 09:20:13 +01:00
Piotr Wojnarowski 3afe238926 drivers: intc: plic: Fix memory-mapped register offset calculation
Previously, the PLIC's registers were accessed through uint32_t *,
so all calculated offsets were effectively multiplied by
sizeof(uint32_t). Do the same manuallly now that we have
mem_addr_t/sys_read32.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-11-20 09:20:13 +01:00
Piotr Wojnarowski 3ef34ff6d1 drivers: intc: plic: Make function names and types consistent
`get_claim_complete_offset` and `get_threshold_priority_offset` actually
return addresses directly. Rename them to `_addr` for consistency within
the driver. Also change their return type to `mem_addr_t`.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-11-20 09:20:13 +01:00
Laurentiu Mihalcea 43a0839c6c drivers: dma: Add SOF host DMA driver
This commit introduces the SOF host DMA driver.
This driver is used by NXP platforms in the context of
SOF's host component to copy data from the host memory
to the firmware (local) memory. This is possible because
NXP platforms can access the host memory directly w/o
an actual DMA engine.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2023-11-20 09:19:53 +01:00
Natalia Pluta 8b2c5120aa drivers: sensor: qdec_nrfx: Add support for new QDEC instances
Introducing support for new QDEC instances in the driver.

Signed-off-by: Natalia Pluta <natalia.pluta@nordicsemi.no>
2023-11-20 09:19:45 +01:00
Natalia Pluta f5658254e8 modules: hal_nordic: Add QDEC Kconfig symbols and translation to nrfx
Add Kconfig symbols for QDEC instances (20, 21, 130, 131) and
translation symbols used in nrfx drivers.

Signed-off-by: Natalia Pluta <natalia.pluta@nordicsemi.no>
2023-11-20 09:19:45 +01:00
Natalia Pluta d7d11ef09f soc: arm: nordic_nrf: Add Kconfig symbols for QDEC instances
Add QDEC instances 20, 21, 130, 131

Signed-off-by: Natalia Pluta <natalia.pluta@nordicsemi.no>
2023-11-20 09:19:45 +01:00
Pieter De Gendt 0156593221 bindesc: Use zephyr_library_add_dependencies
Replace usage of add_dependencies(${ZEPHYR_CURRENT_LIBRARY} ...)

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-20 09:19:34 +01:00
Pieter De Gendt 8f8a77abc9 modules: hal_rpi_pico: Use zephyr_library_add_dependencies
Replace usage of add_dependencies(${ZEPHYR_CURRENT_LIBRARY} ...)

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-20 09:19:34 +01:00
Pieter De Gendt 58152eb938 cmake: modules: Add zephyr_library_add_dependencies extension
Add a CMake zephyr library extension for add_dependencies, similar
to the target_<func> functions.
This avoids using ${ZEPHYR_CURRENT_LIBRARY} directly.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2023-11-20 09:19:34 +01:00
Daniel Leung f52f76fd6b doc: kernel/mm: some doxygen works
() Some kernel memory management functions were previously
   not in any group. So put them under the kernel memory
   management group, and now they appear in API doc.
() Group things together when appropriate.
() Add doc if none exists before.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-20 09:19:14 +01:00
Daniel Leung f12d49d7ef kernel: mm: separate demand paging headers into its own file
This separates demand paging related headers into its own file
instead of being stuffed inside the main kernel memory
management header file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-20 09:19:14 +01:00
Daniel Leung c972ef1a0f kernel: mm: move kernel mm functions under kernel includes
This moves the k_* memory management functions from sys/ into
kernel/ includes, as there are kernel public APIs. The z_*
functions are further separated into the kernel internal
header directory.

Also made a quick change to doxygen to group sys_mem_* into
the OS Memory Management group so they will appear in doc.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-20 09:19:14 +01:00
Flavia Caforio 524ed5dbc1 drivers: counter: nrf_timer: Add event clear to set_top_value
At present, if you want to set a periodic timer again with
set_top_value, the last triggered event is not cleared. This could
result in an old event being served at the next interrupt activation.

The solution proposed in this patch adds the nrf_timer_event_clear
function into set_top_value to prevent this from happening in the
above case.

Signed-off-by: Flavia Caforio <flavia.caforio@amarulasolutions.com>
2023-11-20 09:19:02 +01:00
Andriy Gelman 0d1fa268bb drivers: clock_control: Add PWM clock device
Adds a clock control device for a PWM node, allowing the PWM
to be controlled using the clock control API.

It is a similar idea to the device driver in linux:
linux/Documentation/devicetree/bindings/clock/pwm-clock.yaml

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-20 09:18:44 +01:00
Daniel Leung b485cd717b xtensa: remove unused z_mp_entry declaration
z_mp_entry has been removed from Xtensa architecture.
So there is no need for a function declaration. Remove it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-17 18:23:06 -05:00
Nicolas Pitre 21d885535e MAINTAINERS: declare myself as a RISC-V collaborator
... given that 62.5% of the code in arch/riscv/core/* is mine.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-11-17 18:22:02 -05:00
Manuel Argüelles 92fb8b2238 arm: nxp_mpu: enable module's clock only when needed
NXP SYSMPU is used in other SoCs besides the Kinetis series. For
devices like S32K1xx, its bus interface clock lacks of clock gating
and it's driven by the system clock. Hence, only enable the module
clock for the Kinetis series.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-17 13:44:27 -06:00
Manuel Argüelles da3d9197a6 include: arm: nxp_mpu: remove redundant HAL include
The inclusion of `fsl_common.h` solely for defining `NXP_MPU_BASE`
is redundant, as this symbol is not used. Consequently, this
unnecessary inclusion leads to the pervasive inclusion of HAL
headers through kernel headers.
The needed HAL definitions are already included into the NXP MPU
driver implementation via the SoC header.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-17 13:42:48 -06:00
Jun Lin 317d070222 tests: timer_behavior: increase stdev tolerance for npcx timer
Change the stdev tolerance stdev from 10 to 33 when npcx timer is used.
This is because the clock source of npcx event timer, which is used to
generate the timeout interrupt, is running at 32.768 KHz.
(i.e. 1 count = ~30.5 us.) The conversion from the absolute system timer
to the event timer count might have -30.5 ~ 30.5 deviation.
The tolerance setting is under the assumption that test sampes are
evenly located at 1030.5 and 969.5 for the worst case.

Fixes #59594

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-11-17 17:24:14 +00:00
Jun Lin 4cfd4b5379 driver: timer: npcx: fix announce/set timer timeout tick
The timer driver doesn't annouce/set the timeout at the tick boundary
but at the absolute next expiration time.
It will cause the accumatlation of the tick drift and cannot pass the
kernel/timer/timer_behavior test suite.
This commit fixes the tick drift problem by annouce the time at the tick
bouandry.

Fixes #59594

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-11-17 17:24:14 +00:00